diff options
author | Saravana <saravanad@posedge.com> | 2012-11-28 07:57:09 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-11-29 07:36:43 -0500 |
commit | db94357dbd79359496cd5189640cc36bb3c35733 (patch) | |
tree | 96245544e119db490457b8ad2f91b021c8b53393 | |
parent | dbeca2ea4642d9de0a59ac141b2825ea6804f408 (diff) |
mac80211: add debugfs file for last ack signal
Add a debugfs file showing the signal strength
of the ack frame that is received for the
currently sent tx packet
Signed-off-by: Saravana <saravanad@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/mac80211/debugfs_sta.c | 2 | ||||
-rw-r--r-- | net/mac80211/sta_info.h | 2 | ||||
-rw-r--r-- | net/mac80211/status.c | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index 89281d24b094..15669415ee98 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -53,6 +53,7 @@ static const struct file_operations sta_ ##name## _ops = { \ | |||
53 | STA_FILE(aid, sta.aid, D); | 53 | STA_FILE(aid, sta.aid, D); |
54 | STA_FILE(dev, sdata->name, S); | 54 | STA_FILE(dev, sdata->name, S); |
55 | STA_FILE(last_signal, last_signal, D); | 55 | STA_FILE(last_signal, last_signal, D); |
56 | STA_FILE(last_ack_signal, last_ack_signal, D); | ||
56 | 57 | ||
57 | static ssize_t sta_flags_read(struct file *file, char __user *userbuf, | 58 | static ssize_t sta_flags_read(struct file *file, char __user *userbuf, |
58 | size_t count, loff_t *ppos) | 59 | size_t count, loff_t *ppos) |
@@ -369,6 +370,7 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta) | |||
369 | DEBUGFS_ADD(dev); | 370 | DEBUGFS_ADD(dev); |
370 | DEBUGFS_ADD(last_signal); | 371 | DEBUGFS_ADD(last_signal); |
371 | DEBUGFS_ADD(ht_capa); | 372 | DEBUGFS_ADD(ht_capa); |
373 | DEBUGFS_ADD(last_ack_signal); | ||
372 | 374 | ||
373 | DEBUGFS_ADD_COUNTER(rx_packets, rx_packets); | 375 | DEBUGFS_ADD_COUNTER(rx_packets, rx_packets); |
374 | DEBUGFS_ADD_COUNTER(tx_packets, tx_packets); | 376 | DEBUGFS_ADD_COUNTER(tx_packets, tx_packets); |
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 6835cea4e402..dce76939f526 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
@@ -250,6 +250,7 @@ struct sta_ampdu_mlme { | |||
250 | * @rx_dropped: number of dropped MPDUs from this STA | 250 | * @rx_dropped: number of dropped MPDUs from this STA |
251 | * @last_signal: signal of last received frame from this STA | 251 | * @last_signal: signal of last received frame from this STA |
252 | * @avg_signal: moving average of signal of received frames from this STA | 252 | * @avg_signal: moving average of signal of received frames from this STA |
253 | * @last_ack_signal: signal of last received Ack frame from this STA | ||
253 | * @last_seq_ctrl: last received seq/frag number from this STA (per RX queue) | 254 | * @last_seq_ctrl: last received seq/frag number from this STA (per RX queue) |
254 | * @tx_filtered_count: number of frames the hardware filtered for this STA | 255 | * @tx_filtered_count: number of frames the hardware filtered for this STA |
255 | * @tx_retry_failed: number of frames that failed retry | 256 | * @tx_retry_failed: number of frames that failed retry |
@@ -329,6 +330,7 @@ struct sta_info { | |||
329 | unsigned long rx_dropped; | 330 | unsigned long rx_dropped; |
330 | int last_signal; | 331 | int last_signal; |
331 | struct ewma avg_signal; | 332 | struct ewma avg_signal; |
333 | int last_ack_signal; | ||
332 | /* Plus 1 for non-QoS frames */ | 334 | /* Plus 1 for non-QoS frames */ |
333 | __le16 last_seq_ctrl[IEEE80211_NUM_TIDS + 1]; | 335 | __le16 last_seq_ctrl[IEEE80211_NUM_TIDS + 1]; |
334 | 336 | ||
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 2d931ad0e90a..6400037dd8ec 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -539,6 +539,9 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
539 | sta->lost_packets = 0; | 539 | sta->lost_packets = 0; |
540 | } | 540 | } |
541 | } | 541 | } |
542 | |||
543 | if (acked) | ||
544 | sta->last_ack_signal = info->status.ack_signal; | ||
542 | } | 545 | } |
543 | 546 | ||
544 | rcu_read_unlock(); | 547 | rcu_read_unlock(); |