Skip to content

Commit

Permalink
ath9k: Handle failure to send NoA
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith Manoharan authored and John W. Linville committed Nov 17, 2014
1 parent 6185672 commit 2c3634a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 2c3634a

Please sign in to comment.