diff options
author | Sujith Manoharan <Sujith.Manoharan@atheros.com> | 2010-12-28 03:58:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-04 14:43:00 -0500 |
commit | 039a07215e0fca00c450f4bf1dc9b458bdfe8559 (patch) | |
tree | ac6942c132aed0367134e13b3c5e7d5e46d6fb34 /drivers/net/wireless/ath/ath9k | |
parent | 73908674c6957082e8ab57daed57d2bb97a1ebba (diff) |
ath9k_htc: Fix fast channel change
When returning to the operating channel, a full HW
reset has to be done instead of a fast channel change.
Since sw_scan_complete() is called after the config() call for the
home channel, we end up doing a FCC. Fix this issue by checking
the OFFCHANNEL flag to determine FCC.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc.h | 19 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 8 |
2 files changed, 11 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index 10622740dc76..34456a85ab77 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h | |||
@@ -331,16 +331,15 @@ void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv); | |||
331 | 331 | ||
332 | #define OP_INVALID BIT(0) | 332 | #define OP_INVALID BIT(0) |
333 | #define OP_SCANNING BIT(1) | 333 | #define OP_SCANNING BIT(1) |
334 | #define OP_FULL_RESET BIT(2) | 334 | #define OP_LED_ASSOCIATED BIT(2) |
335 | #define OP_LED_ASSOCIATED BIT(3) | 335 | #define OP_LED_ON BIT(3) |
336 | #define OP_LED_ON BIT(4) | 336 | #define OP_PREAMBLE_SHORT BIT(4) |
337 | #define OP_PREAMBLE_SHORT BIT(5) | 337 | #define OP_PROTECT_ENABLE BIT(5) |
338 | #define OP_PROTECT_ENABLE BIT(6) | 338 | #define OP_ASSOCIATED BIT(6) |
339 | #define OP_ASSOCIATED BIT(7) | 339 | #define OP_ENABLE_BEACON BIT(7) |
340 | #define OP_ENABLE_BEACON BIT(8) | 340 | #define OP_LED_DEINIT BIT(8) |
341 | #define OP_LED_DEINIT BIT(9) | 341 | #define OP_BT_PRIORITY_DETECTED BIT(9) |
342 | #define OP_BT_PRIORITY_DETECTED BIT(10) | 342 | #define OP_BT_SCAN BIT(10) |
343 | #define OP_BT_SCAN BIT(11) | ||
344 | 343 | ||
345 | struct ath9k_htc_priv { | 344 | struct ath9k_htc_priv { |
346 | struct device *dev; | 345 | struct device *dev; |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 07f10ddee6a5..6da5e8867309 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -177,7 +177,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, | |||
177 | struct ath_hw *ah = priv->ah; | 177 | struct ath_hw *ah = priv->ah; |
178 | struct ath_common *common = ath9k_hw_common(ah); | 178 | struct ath_common *common = ath9k_hw_common(ah); |
179 | struct ieee80211_conf *conf = &common->hw->conf; | 179 | struct ieee80211_conf *conf = &common->hw->conf; |
180 | bool fastcc = true; | 180 | bool fastcc; |
181 | struct ieee80211_channel *channel = hw->conf.channel; | 181 | struct ieee80211_channel *channel = hw->conf.channel; |
182 | struct ath9k_hw_cal_data *caldata; | 182 | struct ath9k_hw_cal_data *caldata; |
183 | enum htc_phymode mode; | 183 | enum htc_phymode mode; |
@@ -188,8 +188,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, | |||
188 | if (priv->op_flags & OP_INVALID) | 188 | if (priv->op_flags & OP_INVALID) |
189 | return -EIO; | 189 | return -EIO; |
190 | 190 | ||
191 | if (priv->op_flags & OP_FULL_RESET) | 191 | fastcc = !!(hw->conf.flags & IEEE80211_CONF_OFFCHANNEL); |
192 | fastcc = false; | ||
193 | 192 | ||
194 | ath9k_htc_ps_wakeup(priv); | 193 | ath9k_htc_ps_wakeup(priv); |
195 | htc_stop(priv->htc); | 194 | htc_stop(priv->htc); |
@@ -231,8 +230,6 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, | |||
231 | goto err; | 230 | goto err; |
232 | 231 | ||
233 | htc_start(priv->htc); | 232 | htc_start(priv->htc); |
234 | |||
235 | priv->op_flags &= ~OP_FULL_RESET; | ||
236 | err: | 233 | err: |
237 | ath9k_htc_ps_restore(priv); | 234 | ath9k_htc_ps_restore(priv); |
238 | return ret; | 235 | return ret; |
@@ -1847,7 +1844,6 @@ static void ath9k_htc_sw_scan_complete(struct ieee80211_hw *hw) | |||
1847 | spin_lock_bh(&priv->beacon_lock); | 1844 | spin_lock_bh(&priv->beacon_lock); |
1848 | priv->op_flags &= ~OP_SCANNING; | 1845 | priv->op_flags &= ~OP_SCANNING; |
1849 | spin_unlock_bh(&priv->beacon_lock); | 1846 | spin_unlock_bh(&priv->beacon_lock); |
1850 | priv->op_flags |= OP_FULL_RESET; | ||
1851 | if (priv->op_flags & OP_ASSOCIATED) { | 1847 | if (priv->op_flags & OP_ASSOCIATED) { |
1852 | ath9k_htc_beacon_config(priv, priv->vif); | 1848 | ath9k_htc_beacon_config(priv, priv->vif); |
1853 | ath_start_ani(priv); | 1849 | ath_start_ani(priv); |