aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanoharan@atheros.com>2010-08-27 02:39:00 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-27 13:27:06 -0400
commitfe67470ddd075cb7d538de1570950da3c0f67e65 (patch)
tree3c29ca8b428f1d9bf69e69de76d773b53dcae196 /drivers
parent0ec2f2724d7e457b91e5983d11db8adba9aad47e (diff)
ath9k_htc: Enable ANI in associated state only
While scanning, ANI is triggered unnecessarily where sta is in unassociated state. And cancelling ani work in ath9k_htc_stop is not required. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 5e318cb662c6..f4672073ac0a 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1239,7 +1239,6 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
1239 1239
1240 /* Cancel all the running timers/work .. */ 1240 /* Cancel all the running timers/work .. */
1241 cancel_work_sync(&priv->ps_work); 1241 cancel_work_sync(&priv->ps_work);
1242 cancel_delayed_work_sync(&priv->ath9k_ani_work);
1243 cancel_delayed_work_sync(&priv->ath9k_led_blink_work); 1242 cancel_delayed_work_sync(&priv->ath9k_led_blink_work);
1244 ath9k_led_stop_brightness(priv); 1243 ath9k_led_stop_brightness(priv);
1245 1244
@@ -1787,7 +1786,8 @@ static void ath9k_htc_sw_scan_start(struct ieee80211_hw *hw)
1787 priv->op_flags |= OP_SCANNING; 1786 priv->op_flags |= OP_SCANNING;
1788 spin_unlock_bh(&priv->beacon_lock); 1787 spin_unlock_bh(&priv->beacon_lock);
1789 cancel_work_sync(&priv->ps_work); 1788 cancel_work_sync(&priv->ps_work);
1790 cancel_delayed_work_sync(&priv->ath9k_ani_work); 1789 if (priv->op_flags & OP_ASSOCIATED)
1790 cancel_delayed_work_sync(&priv->ath9k_ani_work);
1791 mutex_unlock(&priv->mutex); 1791 mutex_unlock(&priv->mutex);
1792} 1792}
1793 1793
@@ -1801,9 +1801,10 @@ static void ath9k_htc_sw_scan_complete(struct ieee80211_hw *hw)
1801 priv->op_flags &= ~OP_SCANNING; 1801 priv->op_flags &= ~OP_SCANNING;
1802 spin_unlock_bh(&priv->beacon_lock); 1802 spin_unlock_bh(&priv->beacon_lock);
1803 priv->op_flags |= OP_FULL_RESET; 1803 priv->op_flags |= OP_FULL_RESET;
1804 if (priv->op_flags & OP_ASSOCIATED) 1804 if (priv->op_flags & OP_ASSOCIATED) {
1805 ath9k_htc_beacon_config(priv, priv->vif); 1805 ath9k_htc_beacon_config(priv, priv->vif);
1806 ath_start_ani(priv); 1806 ath_start_ani(priv);
1807 }
1807 ath9k_htc_ps_restore(priv); 1808 ath9k_htc_ps_restore(priv);
1808 mutex_unlock(&priv->mutex); 1809 mutex_unlock(&priv->mutex);
1809} 1810}