1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-05 07:48:25 +02:00
openwrt-xburst/package/mac80211/patches/540-ath9k_fix_reported_signal_strength.patch
nbd c0b61bdf0a mac80211: update to wireless-testing 2011-04-06
adds some more pending patches which (among other things) fix the 'failed to stop RX DMA' messages

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26506 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-04-07 18:42:22 +00:00

28 lines
838 B
Diff

--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -956,6 +956,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));
/*
@@ -976,7 +979,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 && ah->curchan->noisefloor)
+ 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;