diff options
author | Rajkumar Manoharan <rmanoharan@atheros.com> | 2011-01-14 15:03:28 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-19 11:36:10 -0500 |
commit | 4e3ae3873858f1e64afb19975360000bee15b502 (patch) | |
tree | c5f0e2a8ebb47c2db9de173d61cdc5a9b2712ba9 /drivers/net/wireless/ath/ath9k/htc_drv_main.c | |
parent | bdd196a3e00d2be8b50d8af0d8cf845884f4d59b (diff) |
ath9k_htc: keep calibrated noise floor value for oper channel
The ath9k_hw assumes that caldata is valid only for
oper channel. But with ath9k_htc case, the caldata is
passed for all channels on hw_reset though we are not doing
calibration on that channel. So the oper channel's nf history
got cleared to default due to mismatch in channel flags.
This patch also saves some space.
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/htc_drv_main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index f4d576bc3cc..187af5b4440 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -121,7 +121,7 @@ void ath9k_htc_reset(struct ath9k_htc_priv *priv) | |||
121 | struct ath_hw *ah = priv->ah; | 121 | struct ath_hw *ah = priv->ah; |
122 | struct ath_common *common = ath9k_hw_common(ah); | 122 | struct ath_common *common = ath9k_hw_common(ah); |
123 | struct ieee80211_channel *channel = priv->hw->conf.channel; | 123 | struct ieee80211_channel *channel = priv->hw->conf.channel; |
124 | struct ath9k_hw_cal_data *caldata; | 124 | struct ath9k_hw_cal_data *caldata = NULL; |
125 | enum htc_phymode mode; | 125 | enum htc_phymode mode; |
126 | __be16 htc_mode; | 126 | __be16 htc_mode; |
127 | u8 cmd_rsp; | 127 | u8 cmd_rsp; |
@@ -139,7 +139,7 @@ void ath9k_htc_reset(struct ath9k_htc_priv *priv) | |||
139 | WMI_CMD(WMI_DRAIN_TXQ_ALL_CMDID); | 139 | WMI_CMD(WMI_DRAIN_TXQ_ALL_CMDID); |
140 | WMI_CMD(WMI_STOP_RECV_CMDID); | 140 | WMI_CMD(WMI_STOP_RECV_CMDID); |
141 | 141 | ||
142 | caldata = &priv->caldata[channel->hw_value]; | 142 | caldata = &priv->caldata; |
143 | ret = ath9k_hw_reset(ah, ah->curchan, caldata, false); | 143 | ret = ath9k_hw_reset(ah, ah->curchan, caldata, false); |
144 | if (ret) { | 144 | if (ret) { |
145 | ath_err(common, | 145 | ath_err(common, |
@@ -202,7 +202,8 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, | |||
202 | channel->center_freq, conf_is_ht(conf), conf_is_ht40(conf), | 202 | channel->center_freq, conf_is_ht(conf), conf_is_ht40(conf), |
203 | fastcc); | 203 | fastcc); |
204 | 204 | ||
205 | caldata = &priv->caldata[channel->hw_value]; | 205 | if (!fastcc) |
206 | caldata = &priv->caldata; | ||
206 | ret = ath9k_hw_reset(ah, hchan, caldata, fastcc); | 207 | ret = ath9k_hw_reset(ah, hchan, caldata, fastcc); |
207 | if (ret) { | 208 | if (ret) { |
208 | ath_err(common, | 209 | ath_err(common, |