aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/mac80211.h3
-rw-r--r--net/mac80211/rx.c9
2 files changed, 9 insertions, 3 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 7477f020ee7a..c06974accfa6 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -659,6 +659,8 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info)
659 * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index 659 * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index
660 * @RX_FLAG_40MHZ: HT40 (40 MHz) was used 660 * @RX_FLAG_40MHZ: HT40 (40 MHz) was used
661 * @RX_FLAG_SHORT_GI: Short guard interval was used 661 * @RX_FLAG_SHORT_GI: Short guard interval was used
662 * @RX_FLAG_NO_SIGNAL_VAL: The signal strength value is not present.
663 * Valid only for data frames (mainly A-MPDU)
662 */ 664 */
663enum mac80211_rx_flags { 665enum mac80211_rx_flags {
664 RX_FLAG_MMIC_ERROR = 1<<0, 666 RX_FLAG_MMIC_ERROR = 1<<0,
@@ -672,6 +674,7 @@ enum mac80211_rx_flags {
672 RX_FLAG_HT = 1<<9, 674 RX_FLAG_HT = 1<<9,
673 RX_FLAG_40MHZ = 1<<10, 675 RX_FLAG_40MHZ = 1<<10,
674 RX_FLAG_SHORT_GI = 1<<11, 676 RX_FLAG_SHORT_GI = 1<<11,
677 RX_FLAG_NO_SIGNAL_VAL = 1<<12,
675}; 678};
676 679
677/** 680/**
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 3cf011fc97f4..f3b515d16f24 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -177,7 +177,8 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
177 pos += 2; 177 pos += 2;
178 178
179 /* IEEE80211_RADIOTAP_DBM_ANTSIGNAL */ 179 /* IEEE80211_RADIOTAP_DBM_ANTSIGNAL */
180 if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) { 180 if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM &&
181 !(status->flag & RX_FLAG_NO_SIGNAL_VAL)) {
181 *pos = status->signal; 182 *pos = status->signal;
182 rthdr->it_present |= 183 rthdr->it_present |=
183 cpu_to_le32(1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL); 184 cpu_to_le32(1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL);
@@ -1309,8 +1310,10 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
1309 1310
1310 sta->rx_fragments++; 1311 sta->rx_fragments++;
1311 sta->rx_bytes += rx->skb->len; 1312 sta->rx_bytes += rx->skb->len;
1312 sta->last_signal = status->signal; 1313 if (!(status->flag & RX_FLAG_NO_SIGNAL_VAL)) {
1313 ewma_add(&sta->avg_signal, -status->signal); 1314 sta->last_signal = status->signal;
1315 ewma_add(&sta->avg_signal, -status->signal);
1316 }
1314 1317
1315 /* 1318 /*
1316 * Change STA power saving mode only at the end of a frame 1319 * Change STA power saving mode only at the end of a frame