diff options
author | Raja Mani <rmani@qca.qualcomm.com> | 2012-03-16 06:24:56 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-03-20 04:59:45 -0400 |
commit | f0446ea9c11243bcfe8559f0033a5e4790b0d95b (patch) | |
tree | 923ce439da60d371f179c954f42af9f14008358f | |
parent | 7397ddebdf88758fb671a898e9aab72fe4d4af74 (diff) |
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>
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/debug.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/main.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c index 552adb3f80d0..2bcd45095eb9 100644 --- a/drivers/net/wireless/ath/ath6kl/debug.c +++ b/drivers/net/wireless/ath/ath6kl/debug.c | |||
@@ -622,6 +622,12 @@ static ssize_t read_file_tgt_stats(struct file *file, char __user *user_buf, | |||
622 | "Num disconnects", tgt_stats->cs_discon_cnt); | 622 | "Num disconnects", tgt_stats->cs_discon_cnt); |
623 | len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", | 623 | len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", |
624 | "Beacon avg rssi", tgt_stats->cs_ave_beacon_rssi); | 624 | "Beacon avg rssi", tgt_stats->cs_ave_beacon_rssi); |
625 | len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", | ||
626 | "ARP pkt received", tgt_stats->arp_received); | ||
627 | len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", | ||
628 | "ARP pkt matched", tgt_stats->arp_matched); | ||
629 | len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", | ||
630 | "ARP pkt replied", tgt_stats->arp_replied); | ||
625 | 631 | ||
626 | if (len > buf_len) | 632 | if (len > buf_len) |
627 | len = buf_len; | 633 | len = buf_len; |
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index 229e1922ebe4..7f3addd6c944 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c | |||
@@ -756,6 +756,10 @@ static void ath6kl_update_target_stats(struct ath6kl_vif *vif, u8 *ptr, u32 len) | |||
756 | stats->wow_evt_discarded += | 756 | stats->wow_evt_discarded += |
757 | le16_to_cpu(tgt_stats->wow_stats.wow_evt_discarded); | 757 | le16_to_cpu(tgt_stats->wow_stats.wow_evt_discarded); |
758 | 758 | ||
759 | stats->arp_received = le32_to_cpu(tgt_stats->arp_stats.arp_received); | ||
760 | stats->arp_replied = le32_to_cpu(tgt_stats->arp_stats.arp_replied); | ||
761 | stats->arp_matched = le32_to_cpu(tgt_stats->arp_stats.arp_matched); | ||
762 | |||
759 | if (test_bit(STATS_UPDATE_PEND, &vif->flags)) { | 763 | if (test_bit(STATS_UPDATE_PEND, &vif->flags)) { |
760 | clear_bit(STATS_UPDATE_PEND, &vif->flags); | 764 | clear_bit(STATS_UPDATE_PEND, &vif->flags); |
761 | wake_up(&ar->event_wq); | 765 | wake_up(&ar->event_wq); |