diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2014-11-16 06:11:08 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-11-17 15:32:16 -0500 |
commit | 2c3634a8d4c66f743d11dab03d0e66d77b6aac05 (patch) | |
tree | 6394f0328641e2362add1b13bc206d060510cad7 | |
parent | 6185672abad996fa520b0b4c77c30258634ee07f (diff) |
ath9k: Handle failure to send NoA
If for some reason a beacon with a new NoA is
not sent out, then reset the mgd_prepare_tx flag.
Not doing this will result in a situation where
a GO will send a new NoA when it shouldn't.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index a6cb15c96052..5f16630f26ce 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -2501,10 +2501,17 @@ static void ath9k_mgd_prepare_tx(struct ieee80211_hw *hw, init_completion(&sc->go_beacon); mutex_unlock(&sc->mutex); + if (wait_for_completion_timeout(&sc->go_beacon, - timeout) == 0) + timeout) == 0) { ath_dbg(common, CHAN_CTX, "Failed to send new NoA\n"); + + spin_lock_bh(&sc->chan_lock); + sc->sched.mgd_prepare_tx = false; + spin_unlock_bh(&sc->chan_lock); + } + mutex_lock(&sc->mutex); } |