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

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

ath9k: skip beaconing when reset work is pending



Whenever the reset work is queued up, do not generate beacon. And also
clear the beacon miss count once the beacon stuck was observed.

Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent af1e8a6f
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -359,6 +359,11 @@ void ath_beacon_tasklet(unsigned long data)
	int slot;
	int slot;
	u32 bfaddr, bc = 0;
	u32 bfaddr, bc = 0;


	if (work_pending(&sc->hw_reset_work)) {
		ath_dbg(common, RESET,
			"reset work is pending, skip beaconing now\n");
		return;
	}
	/*
	/*
	 * Check if the previous beacon has gone out.  If
	 * Check if the previous beacon has gone out.  If
	 * not don't try to post another, skip this period
	 * not don't try to post another, skip this period
@@ -381,6 +386,7 @@ void ath_beacon_tasklet(unsigned long data)
				ath9k_hw_bstuck_nfcal(ah);
				ath9k_hw_bstuck_nfcal(ah);
		} else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) {
		} else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) {
			ath_dbg(common, BSTUCK, "beacon is officially stuck\n");
			ath_dbg(common, BSTUCK, "beacon is officially stuck\n");
			sc->beacon.bmisscnt = 0;
			sc->sc_flags |= SC_OP_TSF_RESET;
			sc->sc_flags |= SC_OP_TSF_RESET;
			ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
			ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
		}
		}