|
@@ -452,6 +452,10 @@ static void ath_start_ani(struct ath_common *common)
|
|
{
|
|
{
|
|
struct ath_hw *ah = common->ah;
|
|
struct ath_hw *ah = common->ah;
|
|
unsigned long timestamp = jiffies_to_msecs(jiffies);
|
|
unsigned long timestamp = jiffies_to_msecs(jiffies);
|
|
|
|
+ struct ath_softc *sc = (struct ath_softc *) common->priv;
|
|
|
|
+
|
|
|
|
+ if (!(sc->sc_flags & SC_OP_ANI_RUN))
|
|
|
|
+ return;
|
|
|
|
|
|
common->ani.longcal_timer = timestamp;
|
|
common->ani.longcal_timer = timestamp;
|
|
common->ani.shortcal_timer = timestamp;
|
|
common->ani.shortcal_timer = timestamp;
|
|
@@ -767,11 +771,13 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc,
|
|
/* Reset rssi stats */
|
|
/* Reset rssi stats */
|
|
sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER;
|
|
sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER;
|
|
|
|
|
|
|
|
+ sc->sc_flags |= SC_OP_ANI_RUN;
|
|
ath_start_ani(common);
|
|
ath_start_ani(common);
|
|
} else {
|
|
} else {
|
|
ath_print(common, ATH_DBG_CONFIG, "Bss Info DISASSOC\n");
|
|
ath_print(common, ATH_DBG_CONFIG, "Bss Info DISASSOC\n");
|
|
common->curaid = 0;
|
|
common->curaid = 0;
|
|
/* Stop ANI */
|
|
/* Stop ANI */
|
|
|
|
+ sc->sc_flags &= ~SC_OP_ANI_RUN;
|
|
del_timer_sync(&common->ani.timer);
|
|
del_timer_sync(&common->ani.timer);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1377,8 +1383,10 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
|
|
|
|
|
|
if (vif->type == NL80211_IFTYPE_AP ||
|
|
if (vif->type == NL80211_IFTYPE_AP ||
|
|
vif->type == NL80211_IFTYPE_ADHOC ||
|
|
vif->type == NL80211_IFTYPE_ADHOC ||
|
|
- vif->type == NL80211_IFTYPE_MONITOR)
|
|
|
|
|
|
+ vif->type == NL80211_IFTYPE_MONITOR) {
|
|
|
|
+ sc->sc_flags |= SC_OP_ANI_RUN;
|
|
ath_start_ani(common);
|
|
ath_start_ani(common);
|
|
|
|
+ }
|
|
|
|
|
|
out:
|
|
out:
|
|
mutex_unlock(&sc->mutex);
|
|
mutex_unlock(&sc->mutex);
|
|
@@ -1399,6 +1407,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
|
|
mutex_lock(&sc->mutex);
|
|
mutex_lock(&sc->mutex);
|
|
|
|
|
|
/* Stop ANI */
|
|
/* Stop ANI */
|
|
|
|
+ sc->sc_flags &= ~SC_OP_ANI_RUN;
|
|
del_timer_sync(&common->ani.timer);
|
|
del_timer_sync(&common->ani.timer);
|
|
|
|
|
|
/* Reclaim beacon resources */
|
|
/* Reclaim beacon resources */
|