From nobody Fri Jun 3 17:19:20 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C1FED1BDA8AA; Fri, 3 Jun 2022 17:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LF8kc64c0z4XWs; Fri, 3 Jun 2022 17:19:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654276761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PL+foq476VS3c2NhjQ8/ZwEqwyitOQwz6A7CWiHR1Fw=; b=RRxFiTP2b02yYbDvcwqenwocIFtMX1uob0slZ3+z1nGpGrHCqNScrU6iGLHVPoSWhlCQD9 rgF4FXBrqOheTR4k+GIsSBf8ZU2/1cIspgtj1SsZP6y4y1BsbvxL4/9ezxJSGpv+ysiMI9 Am77mtwrnuCtLVdtDHSl7GNjsN7usEPMgORnKOTUftEgSb0CPW+4unriGiSYyClwcF7sQ/ HtsYrR+pJ09WEwZV2gz9VzybwfaD62ZK8c6trPtEaiyd5g+EXzsMYDYEeNv1IB2+2+0d3V lLngqCELN73e3F9BUfYFNlvRlVUrti5g9qiKllsVTDmPxj1LSMy/N00gp3z3yQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 658F051E2; Fri, 3 Jun 2022 17:19:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 253HJKos065626; Fri, 3 Jun 2022 17:19:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 253HJKL6065625; Fri, 3 Jun 2022 17:19:20 GMT (envelope-from git) Date: Fri, 3 Jun 2022 17:19:20 GMT Message-Id: <202206031719.253HJKL6065625@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: bb6b965bebc7 - stable/13 - net80211: simplify code after STA/AP VAPs traffic hang fix List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bb6b965bebc70085320d6d58e6a048a7b1bf0edc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654276761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PL+foq476VS3c2NhjQ8/ZwEqwyitOQwz6A7CWiHR1Fw=; b=BjZ53hh+ZrE/bBOP0KaaSxJUg9QqYRwBTp1PopMyRENHOwCssQiaQzGEZW7Hpt7PL7u/12 4IdrponFyj+MwCU9LgiBMoauyF5Q9o+/0xojDrixTljLZIkevTDKSIxMKu1FcAThoHVXou KbTUIM8kJRaH0QsOKY3FYQGXmKhTy14xYPQDVf8iS9Ek0R1Ft8ZTj9UC0Yy5oa8aN5kh1i rZFRL5IXk3KDvIH/rPHXAwfAu0Jdlu8ktAJeMHOH1E+5luw0xKMc/mkt16CujREBzHVgit VWaFqfEqaY5NoSXNfnzjkPyW18qY3gh2J6IYLMgEZnCd4qIeUs0gNozKPmPzWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654276761; a=rsa-sha256; cv=none; b=svr4AsAUNlgeqve9r3BzWhAlkfsXmOXnWXJqZ0EgrTwOEPsloGlfTWXfARQp+UNZ7NGmOF kxJrtMMLu2lttVHrW6DWgyk3ioDGbjFbiy7yVHmexy4r8ygg6Ita9KFaZyQw4B/qxaZPP1 8WqnEU/QSu6j50XU2Ffm5lDvPjQJas7hXSaljMZhqyEtuB+n82JdAJr0DFkQ0WPhjQJSrQ dwSoAX82KVKXCKEd16/l0qvucK1PPwoxFmM+/2MKefBG5Klk/V+vvEpq78vWrsxEhAgoME RXgWjZqyJX259FmKLXaYSZ1Nc9FErilXmbPy3HN84AuTI6Wp6NCK7m36G7HoNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bb6b965bebc70085320d6d58e6a048a7b1bf0edc commit bb6b965bebc70085320d6d58e6a048a7b1bf0edc Author: Bjoern A. Zeeb AuthorDate: 2022-05-05 22:21:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-06-03 16:56:01 +0000 net80211: simplify code after STA/AP VAPs traffic hang fix Combine the comment and double-unsetting of OACTIVE into a single case after e8de31caceaa36caf5d7b4355072f148e2433b82. 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 Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D35135 (cherry picked from commit 464907ce1cf931091fa48999ea64480a6d2ef52c) --- sys/net80211/ieee80211_proto.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index d2bde99ce79c..f42c62444579 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -2582,18 +2582,6 @@ ieee80211_newstate_cb(void *xvap, int npending) * be no-op code - and also if OACTIVE is finally retired, it'll * also be no-op code. */ - if (nstate == IEEE80211_S_RUN) { - /* - * 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; - } - - /* No actual transition, skip post processing */ - if (ostate == nstate) - goto done; - if (nstate == IEEE80211_S_RUN) { /* * OACTIVE may be set on the vap if the upper layer @@ -2602,12 +2590,28 @@ ieee80211_newstate_cb(void *xvap, int npending) * * 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 */ + if (ostate == nstate) + goto done; + + if (nstate == IEEE80211_S_RUN) { /* bring up any vaps waiting on us */ wakeupwaiting(vap);