summaryrefslogtreecommitdiff
path: root/package/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-03-30 11:38:39 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-03-30 11:38:39 +0000
commit15e79b479af6b13945a3977b55ca2da021045dee (patch)
treebd8424311d7196c1fe394716ecec40bb15c245dd /package/mac80211
parent08eca8da80dad4e819966ff066bd674b1c33a374 (diff)
downloadmtk-20170518-15e79b479af6b13945a3977b55ca2da021045dee.zip
mtk-20170518-15e79b479af6b13945a3977b55ca2da021045dee.tar.gz
mtk-20170518-15e79b479af6b13945a3977b55ca2da021045dee.tar.bz2
ath9k: fix reported signal strength
SVN-Revision: 26368
Diffstat (limited to 'package/mac80211')
-rw-r--r--package/mac80211/patches/560-ath9k_fix_reported_signal_strength.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/mac80211/patches/560-ath9k_fix_reported_signal_strength.patch b/package/mac80211/patches/560-ath9k_fix_reported_signal_strength.patch
new file mode 100644
index 0000000..2fa4c44
--- /dev/null
+++ b/package/mac80211/patches/560-ath9k_fix_reported_signal_strength.patch
@@ -0,0 +1,27 @@
+--- a/drivers/net/wireless/ath/ath9k/recv.c
++++ b/drivers/net/wireless/ath/ath9k/recv.c
+@@ -957,6 +957,9 @@ static int ath9k_rx_skb_preprocess(struc
+ struct ieee80211_rx_status *rx_status,
+ bool *decrypt_error)
+ {
++ struct ath_hw *ah = common->ah;
++ int noise;
++
+ memset(rx_status, 0, sizeof(struct ieee80211_rx_status));
+
+ /*
+@@ -977,7 +980,13 @@ static int ath9k_rx_skb_preprocess(struc
+
+ rx_status->band = hw->conf.channel->band;
+ rx_status->freq = hw->conf.channel->center_freq;
+- rx_status->signal = ATH_DEFAULT_NOISE_FLOOR + rx_stats->rs_rssi;
++
++ if (ah->curchan)
++ noise = ah->curchan->noisefloor;
++ else
++ noise = ATH_DEFAULT_NOISE_FLOOR;
++
++ rx_status->signal = noise + rx_stats->rs_rssi;
+ rx_status->antenna = rx_stats->rs_antenna;
+ rx_status->flag |= RX_FLAG_MACTIME_MPDU;
+