summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/calib.c
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2011-08-13 10:28:16 +0530
committerJohn W. Linville <linville@tuxdriver.com>2011-08-24 13:59:46 -0400
commit6b3d348681a153b8e4a16ba1a6f792711e389a9e (patch)
treea5b06bad22f4ea0debb89ae4b1236bc9dc1de092 /drivers/net/wireless/ath/ath9k/calib.c
parentf82b4bde17aeb6c2f8bf0540ee44811de4651cf6 (diff)
downloadlinux-stable-6b3d348681a153b8e4a16ba1a6f792711e389a9e.tar.gz
linux-stable-6b3d348681a153b8e4a16ba1a6f792711e389a9e.tar.bz2
linux-stable-6b3d348681a153b8e4a16ba1a6f792711e389a9e.zip
ath9k: Fix noisefloor history update for extn chains
Before doing hw reset the current channel's noisefloor readings are updated into history buffer. The extension chain's readings are considered only if the current channel was configured in HT40. While moving from HT40 to HT20, the extn chain's readings are skipped though the current channel is in ht40. This patch updates extn chain reading based on channel flag. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/calib.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/calib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index ac2da3cce788..ebaf304f464b 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -82,7 +82,6 @@ static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah,
int16_t *nfarray)
{
struct ath_common *common = ath9k_hw_common(ah);
- struct ieee80211_conf *conf = &common->hw->conf;
struct ath_nf_limits *limit;
struct ath9k_nfcal_hist *h;
bool high_nf_mid = false;
@@ -94,7 +93,7 @@ static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah,
for (i = 0; i < NUM_NF_READINGS; i++) {
if (!(chainmask & (1 << i)) ||
- ((i >= AR5416_MAX_CHAINS) && !conf_is_ht40(conf)))
+ ((i >= AR5416_MAX_CHAINS) && !IS_CHAN_HT40(ah->curchan)))
continue;
h[i].nfCalBuffer[h[i].currIndex] = nfarray[i];