ath5k: fix 2ghz-only radio handling on ar5312
[openwrt.git] / package / mac80211 / patches / 540-ath9k_fix_reported_signal_strength.patch
1 --- a/drivers/net/wireless/ath/ath9k/recv.c
2 +++ b/drivers/net/wireless/ath/ath9k/recv.c
3 @@ -956,6 +956,9 @@ static int ath9k_rx_skb_preprocess(struc
4 struct ieee80211_rx_status *rx_status,
5 bool *decrypt_error)
6 {
7 + struct ath_hw *ah = common->ah;
8 + int noise;
9 +
10 memset(rx_status, 0, sizeof(struct ieee80211_rx_status));
11
12 /*
13 @@ -976,7 +979,13 @@ static int ath9k_rx_skb_preprocess(struc
14
15 rx_status->band = hw->conf.channel->band;
16 rx_status->freq = hw->conf.channel->center_freq;
17 - rx_status->signal = ATH_DEFAULT_NOISE_FLOOR + rx_stats->rs_rssi;
18 +
19 + if (ah->curchan && ah->curchan->noisefloor)
20 + noise = ah->curchan->noisefloor;
21 + else
22 + noise = ATH_DEFAULT_NOISE_FLOOR;
23 +
24 + rx_status->signal = noise + rx_stats->rs_rssi;
25 rx_status->antenna = rx_stats->rs_antenna;
26 rx_status->flag |= RX_FLAG_MACTIME_MPDU;
27
This page took 0.048325 seconds and 5 git commands to generate.