提交 fe67470d 编写于 作者: R Rajkumar Manoharan 提交者: John W. Linville

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: NRajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 0ec2f272
...@@ -1239,7 +1239,6 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw) ...@@ -1239,7 +1239,6 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
/* Cancel all the running timers/work .. */ /* Cancel all the running timers/work .. */
cancel_work_sync(&priv->ps_work); cancel_work_sync(&priv->ps_work);
cancel_delayed_work_sync(&priv->ath9k_ani_work);
cancel_delayed_work_sync(&priv->ath9k_led_blink_work); cancel_delayed_work_sync(&priv->ath9k_led_blink_work);
ath9k_led_stop_brightness(priv); ath9k_led_stop_brightness(priv);
...@@ -1787,6 +1786,7 @@ static void ath9k_htc_sw_scan_start(struct ieee80211_hw *hw) ...@@ -1787,6 +1786,7 @@ static void ath9k_htc_sw_scan_start(struct ieee80211_hw *hw)
priv->op_flags |= OP_SCANNING; priv->op_flags |= OP_SCANNING;
spin_unlock_bh(&priv->beacon_lock); spin_unlock_bh(&priv->beacon_lock);
cancel_work_sync(&priv->ps_work); cancel_work_sync(&priv->ps_work);
if (priv->op_flags & OP_ASSOCIATED)
cancel_delayed_work_sync(&priv->ath9k_ani_work); cancel_delayed_work_sync(&priv->ath9k_ani_work);
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
} }
...@@ -1801,9 +1801,10 @@ static void ath9k_htc_sw_scan_complete(struct ieee80211_hw *hw) ...@@ -1801,9 +1801,10 @@ static void ath9k_htc_sw_scan_complete(struct ieee80211_hw *hw)
priv->op_flags &= ~OP_SCANNING; priv->op_flags &= ~OP_SCANNING;
spin_unlock_bh(&priv->beacon_lock); spin_unlock_bh(&priv->beacon_lock);
priv->op_flags |= OP_FULL_RESET; priv->op_flags |= OP_FULL_RESET;
if (priv->op_flags & OP_ASSOCIATED) if (priv->op_flags & OP_ASSOCIATED) {
ath9k_htc_beacon_config(priv, priv->vif); ath9k_htc_beacon_config(priv, priv->vif);
ath_start_ani(priv); ath_start_ani(priv);
}
ath9k_htc_ps_restore(priv); ath9k_htc_ps_restore(priv);
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册