From nobody Fri Jun 6 16:29:38 2025 X-Original-To: dev-commits-src-main@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 4bDRc26B5Qz5xcvs; Fri, 06 Jun 2025 16:29:38 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bDRc22nQQz3NWj; Fri, 06 Jun 2025 16:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749227378; 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=nI1LH3iNEky4Zaxhg4V+h+Jcm7jJ7HgT74mxX+7SWA4=; b=Eknr+U47Jr7ByWC+38zMwmC1MU0qeF0tx4PZb97iIGFaliCNTNlkU1nNLIJXYp5TZeBLdE aQ80ZyuvynDSu3V6mnezAVp520ro/FM09UVSPhDTvMAJ9LcvxwuHda+ECfFQAaOUJb+pbU /iiL+sFFfAbN4qdCIQc7aaCx3HsG0NqqDCb5M6/AqH7WIDGxTyqg6UveHUH8rwY5nhwJhX 8mqntthfNddu6icxQf/FPiPOs3BypHv5AatQLRNBAGwF/2pojMu29HCNFoT+qACtz1YzOS ebKmxySUVhxzbGJPu94o+9FE/Sbjs+NAoRMKwh9wx5JWhuC3oCKGcn0TXsxxsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749227378; 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=nI1LH3iNEky4Zaxhg4V+h+Jcm7jJ7HgT74mxX+7SWA4=; b=M5t55Qz7KBB7vI7g/DtdqbwcPRlf7KhCnH3iofBA8nIfLwH4PCBJgpCM0zrJGtyRO8NtmB gGSxaUsLfeTE8DkSX/+Lv4A8ihPLzY2q2KWrLb5hgM51iio+pOZe5JQgvOoofVCOv60hXC phVc2tA4eLSE9aykovamYKaX18t0g/Z/jJQLrMZNnJiZWnRuoxmtRgA3cmIkndR8Dw+pOS 9sEQhblRE5J+79NzoSsJVoM2J/iff2s/3aIWiKOndWYOlCZZKAw1fToTWsYxAXy5AfwL4v y3KmrvCjGg/525f6nyphYSjrOsTInvEDs02HMoNwYhdqE938IE2fdTQaC6NEXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1749227378; a=rsa-sha256; cv=none; b=NC46QPBAgAtvJARyThhTehXrK5esW3Z+XV5VW1PaXl0h72+k2BjG0+Ky1qImqCZwF+dALR gmn8iXgUycdanRK+JxDMlE/8YGyraylPdjvA3MTl3J55jL8KC7jcIT+vQjKZQMNB6Cn0jA kUeMy+682KliM2X6I6i2ce93HsVoUTdc6WsKqZnkJ4vh9eFO5dKaYjfbVzdOFNCPfWWmUg dCO461x26XLUeeTgcysd9EebEA9nIVM53WFcx0vig8lem2p4axcWoJM6zH+3bTvLxn25gg L8SebpJN9uqzaxoQPND1lUMBBtET1izDsQXw21ziAq3o2rHS1LpHTBUChIHPHQ== 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 4bDRc226S2z12tl; Fri, 06 Jun 2025 16:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 556GTcOd067551; Fri, 6 Jun 2025 16:29:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 556GTcKf067548; Fri, 6 Jun 2025 16:29:38 GMT (envelope-from git) Date: Fri, 6 Jun 2025 16:29:38 GMT Message-Id: <202506061629.556GTcKf067548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: db480c29879c - main - LinuxKPI: 802.11: stop queues during key updates List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: db480c29879cac1afba1d887d7b8871aa4eef6db Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=db480c29879cac1afba1d887d7b8871aa4eef6db commit db480c29879cac1afba1d887d7b8871aa4eef6db Author: Bjoern A. Zeeb AuthorDate: 2025-06-05 21:47:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-06-06 16:27:59 +0000 LinuxKPI: 802.11: stop queues during key updates When beginning key updates do stop and afterwards re-enable the tx queues to avoid packets being passed to the driver. This is a theoretical problem at this point but helps some cases. These functions will likely need refinement in the future. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ef53c91a201e..4c511eeba388 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -174,6 +174,7 @@ static void lkpi_ieee80211_free_skb_mbuf(void *); #ifdef LKPI_80211_WME static int lkpi_wme_update(struct lkpi_hw *, struct ieee80211vap *, bool); #endif +static void lkpi_ieee80211_wake_queues_locked(struct ieee80211_hw *); static const char * lkpi_rate_info_bw_to_str(enum rate_info_bw bw) @@ -1631,6 +1632,11 @@ lkpi_iv_key_update_begin(struct ieee80211vap *vap) refcount_acquire(&lvif->ic_unlocked); if (ntislocked) refcount_acquire(&lvif->nt_unlocked); + + /* + * Stop the queues while doing key updates. + */ + ieee80211_stop_queues(hw); } static void @@ -1649,6 +1655,11 @@ lkpi_iv_key_update_end(struct ieee80211vap *vap) lvif = VAP_TO_LVIF(vap); nt = &ic->ic_sta; + /* + * Re-enabled the queues after the key update. + */ + lkpi_ieee80211_wake_queues_locked(hw); + icislocked = IEEE80211_IS_LOCKED(ic); MPASS(!icislocked); ntislocked = IEEE80211_NODE_IS_LOCKED(nt);