ath6kl: Add ARP offload related statistic info in tgt_stats

Firmware reports the below ARP offload related information
while sending the target statistic event to the host.

     * Number of ARP packets received.
     * Number of packets matched with the device IP addr.
     * Number of ARP response packet sent to the remote.

This patch adds the additional debug prints in debugfs
entry tgt_stats. It will be useful to know the ARP offload
execution status.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
Raja Mani 2012-03-16 15:54:56 +05:30 committed by Kalle Valo
parent 7397ddebdf
commit f0446ea9c1
2 changed files with 10 additions and 0 deletions

View File

@ -622,6 +622,12 @@ static ssize_t read_file_tgt_stats(struct file *file, char __user *user_buf,
"Num disconnects", tgt_stats->cs_discon_cnt); "Num disconnects", tgt_stats->cs_discon_cnt);
len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", len += scnprintf(buf + len, buf_len - len, "%20s %10d\n",
"Beacon avg rssi", tgt_stats->cs_ave_beacon_rssi); "Beacon avg rssi", tgt_stats->cs_ave_beacon_rssi);
len += scnprintf(buf + len, buf_len - len, "%20s %10d\n",
"ARP pkt received", tgt_stats->arp_received);
len += scnprintf(buf + len, buf_len - len, "%20s %10d\n",
"ARP pkt matched", tgt_stats->arp_matched);
len += scnprintf(buf + len, buf_len - len, "%20s %10d\n",
"ARP pkt replied", tgt_stats->arp_replied);
if (len > buf_len) if (len > buf_len)
len = buf_len; len = buf_len;

View File

@ -756,6 +756,10 @@ static void ath6kl_update_target_stats(struct ath6kl_vif *vif, u8 *ptr, u32 len)
stats->wow_evt_discarded += stats->wow_evt_discarded +=
le16_to_cpu(tgt_stats->wow_stats.wow_evt_discarded); le16_to_cpu(tgt_stats->wow_stats.wow_evt_discarded);
stats->arp_received = le32_to_cpu(tgt_stats->arp_stats.arp_received);
stats->arp_replied = le32_to_cpu(tgt_stats->arp_stats.arp_replied);
stats->arp_matched = le32_to_cpu(tgt_stats->arp_stats.arp_matched);
if (test_bit(STATS_UPDATE_PEND, &vif->flags)) { if (test_bit(STATS_UPDATE_PEND, &vif->flags)) {
clear_bit(STATS_UPDATE_PEND, &vif->flags); clear_bit(STATS_UPDATE_PEND, &vif->flags);
wake_up(&ar->event_wq); wake_up(&ar->event_wq);