Skip to content

Commit

Permalink
ath9k: stop ani when the STA gets disconnected.
Browse files Browse the repository at this point in the history
ANI is not required when the STA is disconnected. So stop it and enable
ANI for adhoc and monitor mode.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Senthil Balasubramanian authored and John W. Linville committed Jul 10, 2009
1 parent 2664f20 commit f38faa3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,8 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc,
} else {
DPRINTF(sc, ATH_DBG_CONFIG, "Bss Info DISASSOC\n");
sc->curaid = 0;
/* Stop ANI */
del_timer_sync(&sc->ani.timer);
}
}

Expand Down Expand Up @@ -2193,7 +2195,9 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,

ath9k_hw_set_interrupts(sc->sc_ah, sc->imask);

if (conf->type == NL80211_IFTYPE_AP)
if (conf->type == NL80211_IFTYPE_AP ||
conf->type == NL80211_IFTYPE_ADHOC ||
conf->type == NL80211_IFTYPE_MONITOR)
ath_start_ani(sc);

out:
Expand Down

0 comments on commit f38faa3

Please sign in to comment.