diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-03-01 12:00:07 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-05 15:38:32 -0500 |
commit | fe8431f89e25de722610ee5beb2892bd019d1fed (patch) | |
tree | 93212c4f0e7f897c8c53bbd0b93f31640ec33e4b /net/mac80211 | |
parent | c04a4ff71b6a59cb5c8deec961b9196226e89573 (diff) |
mac80211: add an rx flag for ignoring a packet's signal strength
For A-MPDU rx it makes sense to only process the signal strength once per
aggregate instead of once per subframe. Additonally, some hardware (e.g.
Atheros) only provides valid signal strength information for the last
subframe.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/rx.c | 9 |
1 files changed, 6 insertions, 3 deletions
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 |