Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ath9k: use the new channel noise value for signal strength and survey info

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Felix Fietkau and committed by
John W. Linville
f749b946 f23fba49

+4 -2
+1 -1
drivers/net/wireless/ath/ath9k/main.c
··· 163 163 164 164 if (chan->noisefloor) { 165 165 survey->filled |= SURVEY_INFO_NOISE_DBM; 166 - survey->noise = chan->noisefloor; 166 + survey->noise = ath9k_hw_getchan_noise(ah, chan); 167 167 } 168 168 } 169 169
+3 -1
drivers/net/wireless/ath/ath9k/recv.c
··· 995 995 struct ieee80211_rx_status *rx_status, 996 996 bool *decrypt_error) 997 997 { 998 + struct ath_hw *ah = common->ah; 999 + 998 1000 memset(rx_status, 0, sizeof(struct ieee80211_rx_status)); 999 1001 1000 1002 /* ··· 1017 1015 1018 1016 rx_status->band = hw->conf.channel->band; 1019 1017 rx_status->freq = hw->conf.channel->center_freq; 1020 - rx_status->signal = ATH_DEFAULT_NOISE_FLOOR + rx_stats->rs_rssi; 1018 + rx_status->signal = ah->noise + rx_stats->rs_rssi; 1021 1019 rx_status->antenna = rx_stats->rs_antenna; 1022 1020 rx_status->flag |= RX_FLAG_MACTIME_MPDU; 1023 1021