net80211: simplify code after STA/AP VAPs traffic hang fix

Combine the comment and double-unsetting of OACTIVE into a single case
after e8de31cace.
This saves the question of why we do it twice--once right before and
one more time right after the state change check.
Also move the XXX comment about kicking the queue up to where it seems
better suited now.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	adrian
Differential Revision: https://reviews.freebsd.org/D35135
This commit is contained in:
Bjoern A. Zeeb 2022-05-05 22:21:03 +00:00
parent e99c0c8b79
commit 464907ce1c

View file

@ -2583,11 +2583,28 @@ ieee80211_newstate_cb(void *xvap, int npending)
* also be no-op code.
*/
if (nstate == IEEE80211_S_RUN) {
/*
* OACTIVE may be set on the vap if the upper layer
* tried to transmit (e.g. IPv6 NDP) before we reach
* RUN state. Clear it and restart xmit.
*
* Note this can also happen as a result of SLEEP->RUN
* (i.e. coming out of power save mode).
*
* Historically this was done only for a state change
* but is needed earlier; see next comment. The 2nd half
* of the work is still only done in case of an actual
* state change below.
*/
/*
* Unblock the VAP queue; a RUN->RUN state can happen
* on a STA+AP setup on the AP vap. See wakeupwaiting().
*/
vap->iv_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
/*
* XXX TODO Kick-start a VAP queue - this should be a method!
*/
}
/* No actual transition, skip post processing */
@ -2595,19 +2612,6 @@ ieee80211_newstate_cb(void *xvap, int npending)
goto done;
if (nstate == IEEE80211_S_RUN) {
/*
* OACTIVE may be set on the vap if the upper layer
* tried to transmit (e.g. IPv6 NDP) before we reach
* RUN state. Clear it and restart xmit.
*
* Note this can also happen as a result of SLEEP->RUN
* (i.e. coming out of power save mode).
*/
vap->iv_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
/*
* XXX TODO Kick-start a VAP queue - this should be a method!
*/
/* bring up any vaps waiting on us */
wakeupwaiting(vap);