Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f60c49b6 authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by John W. Linville
Browse files

ath9k: Fix kernel panic on module unload



The commit "ath9k: configure beacons based on hw opmode" introduced
a regression which leads to kernel panic. Failed to stop ani timer
during the driver unload while any of the beaconing vif is running.

Signed-off-by: default avatarRajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d0ef824b
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -320,6 +320,7 @@ void ath_beacon_return(struct ath_softc *sc, struct ath_vif *avp)
	if (avp->av_bcbuf != NULL) {
	if (avp->av_bcbuf != NULL) {
		struct ath_buf *bf;
		struct ath_buf *bf;


		avp->is_bslot_active = false;
		if (avp->av_bslot != -1) {
		if (avp->av_bslot != -1) {
			sc->beacon.bslot[avp->av_bslot] = NULL;
			sc->beacon.bslot[avp->av_bslot] = NULL;
			sc->nbcnvifs--;
			sc->nbcnvifs--;
+3 −0
Original line number Original line Diff line number Diff line
@@ -1375,6 +1375,9 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
	if ((iter_data.naps + iter_data.nadhocs) > 0) {
	if ((iter_data.naps + iter_data.nadhocs) > 0) {
		sc->sc_flags |= SC_OP_ANI_RUN;
		sc->sc_flags |= SC_OP_ANI_RUN;
		ath_start_ani(common);
		ath_start_ani(common);
	} else {
		sc->sc_flags &= ~SC_OP_ANI_RUN;
		del_timer_sync(&common->ani.timer);
	}
	}
}
}