ath9k: Check for pending frames properly
Pending frames in the driver can be present either in the HW queues or SW. ath9k_has_pending_frames() currently checks for the HW queues first and then checks if any ACs are queued in the driver. In MCC mode, we need to check the HW queues alone, since the SW queues are just marked as 'stopped' - they will be processed in the next context switch. But since we don't differentiate this now, mention whether we want to check if there are frames in the SW queues. * The flush() callback checks both HW and SW queues. * The tx_frames_pending() callback does the same. * The call to __ath9k_flush() in MCC mode checks HW queues alone. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
290c8a77e8
commit
e2d389b5aa
@@ -1137,10 +1137,11 @@ void ath_chanctx_set_next(struct ath_softc *sc, bool force)
|
||||
ath9k_chanctx_stop_queues(sc, sc->cur_chan);
|
||||
queues_stopped = true;
|
||||
|
||||
__ath9k_flush(sc->hw, ~0, true);
|
||||
__ath9k_flush(sc->hw, ~0, true, false);
|
||||
|
||||
if (ath_chanctx_send_ps_frame(sc, true))
|
||||
__ath9k_flush(sc->hw, BIT(IEEE80211_AC_VO), false);
|
||||
__ath9k_flush(sc->hw, BIT(IEEE80211_AC_VO),
|
||||
false, false);
|
||||
|
||||
send_ps = true;
|
||||
spin_lock_bh(&sc->chan_lock);
|
||||
|
Reference in New Issue
Block a user