diff options
author | Venkateswara Naralasetty <vnaralas@codeaurora.org> | 2018-02-13 00:34:46 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-02-19 07:22:28 -0500 |
commit | a78b26fffd2368fcd079802897f4c97f9baea833 (patch) | |
tree | a13e18570f0442f267862e21ad3798b55d992233 /net/mac80211/status.c | |
parent | c4b50cd31d25c3d17886ffc47ca4a9a12c6dc9bf (diff) |
mac80211: Add tx ack signal support in sta info
This allows users to get ack signal strength of
last transmitted frame.
Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r-- | net/mac80211/status.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index d74d44e65bd7..743e89c5926c 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -187,9 +187,16 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb) | |||
187 | struct ieee80211_mgmt *mgmt = (void *) skb->data; | 187 | struct ieee80211_mgmt *mgmt = (void *) skb->data; |
188 | struct ieee80211_local *local = sta->local; | 188 | struct ieee80211_local *local = sta->local; |
189 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 189 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
190 | struct ieee80211_tx_info *txinfo = IEEE80211_SKB_CB(skb); | ||
190 | 191 | ||
191 | if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) | 192 | if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) { |
192 | sta->status_stats.last_ack = jiffies; | 193 | sta->status_stats.last_ack = jiffies; |
194 | if (txinfo->status.is_valid_ack_signal) { | ||
195 | sta->status_stats.last_ack_signal = | ||
196 | (s8)txinfo->status.ack_signal; | ||
197 | sta->status_stats.ack_signal_filled = true; | ||
198 | } | ||
199 | } | ||
193 | 200 | ||
194 | if (ieee80211_is_data_qos(mgmt->frame_control)) { | 201 | if (ieee80211_is_data_qos(mgmt->frame_control)) { |
195 | struct ieee80211_hdr *hdr = (void *) skb->data; | 202 | struct ieee80211_hdr *hdr = (void *) skb->data; |
@@ -486,7 +493,9 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local, | |||
486 | if (ieee80211_is_nullfunc(hdr->frame_control) || | 493 | if (ieee80211_is_nullfunc(hdr->frame_control) || |
487 | ieee80211_is_qos_nullfunc(hdr->frame_control)) | 494 | ieee80211_is_qos_nullfunc(hdr->frame_control)) |
488 | cfg80211_probe_status(sdata->dev, hdr->addr1, | 495 | cfg80211_probe_status(sdata->dev, hdr->addr1, |
489 | cookie, acked, 0, false, | 496 | cookie, acked, |
497 | info->status.ack_signal, | ||
498 | info->status.is_valid_ack_signal, | ||
490 | GFP_ATOMIC); | 499 | GFP_ATOMIC); |
491 | else | 500 | else |
492 | cfg80211_mgmt_tx_status(&sdata->wdev, cookie, | 501 | cfg80211_mgmt_tx_status(&sdata->wdev, cookie, |