From nobody Thu Nov 14 01:53:55 2024 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 4Xpjqm0DrBz5ctPN; Thu, 14 Nov 2024 01:53:56 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpjql4QYQz44cf; Thu, 14 Nov 2024 01:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549235; 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=HVY5pcizdpfuxvkEE4kxzKwV8RmITkoJlCZXgfGTwFk=; b=PrMD80moFbc5oUV2BKd+rcUqVcsO0HcsxJKkWI4dKgZm/dpxPOixzUSMrAIJ/Tx34SjHm2 Y6Kf1EJvadlEH45BAWBisKWv6NRGE3wIcKZnIbOjpOkcbS/ZU1eP7AMl2vgN213X8sSwhp FAXmrF02W0NHCbMC77iHLbaoh1/b8JkIapOwDGENtKWrV2nZgdl53hL8zpTKc40vzKYrEm syfHqX6FVc0CRwAjadyL83ESv7mUXfwcyWjWCi7hJQr4NAgoeY3eCW3MnkMrfFzUib9mUR 3i5ltOkD0Qgz866hi9ZkY5CcqwHQNUwLeZzbiMsRTTHwbqDzUX+gBDs0UUPvrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549235; 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=HVY5pcizdpfuxvkEE4kxzKwV8RmITkoJlCZXgfGTwFk=; b=k+TFmRMB3dJALk5WSjkTNMR/gFBBCO3GUVdEAoGnxzmWC4vTJl2rcyWTdA8xzgxA+g2D6L /SVxp6+vqaleqa02zKyxiPJ+3eOww5QMFkNfxCfCY3gNZzwQy67jijnHdkw31I3iJbNtl4 o92Ef77urj5EXGDYNq/lNqNhb/JpLiu3uxf4SPeO9ohI/w8GcVNWIqwi74e2NnzWDBtfMj 1GIxPeCPPcj4mYJu1ei2wuGo1fCLCkkfcF/sC1Jolzpj0aiM8y8qdQ/H36k9mPPLWo97KS P7f9amlKEcla0PNycOcnYlOU9nwRBalb1xnlCe3Lr97JxGWJrY+oRBVou/tRtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731549235; a=rsa-sha256; cv=none; b=gk9cgLdjKwLalqVbGZCpX0VN6eif55Y4z30V3OpDZ7AV/JnRpp/d9QVQAge2M8K6LrpUoX v8ignjAlFdtAVhBRpvQZM1pnxO5ucELO9DNZ9NEfeQXKSYzevm6ParwPaV6nB80u5qEYbJ VtP40s4MJW4DW+WwzGrmHMe+s/o6tcIqALYHpDdEmTn4/2hxeRLX34MiMfSBcV2xvlnW2H 94yPO3uj89F/rS5Dk07/DF8DX5bqqW2jKd4mv+h1p8RSo93bs35mHmL+bNUg6cJGhI+d5S Ub1YhHZWdqCqPhh89wEmpwJmY8jo7792sb/nY7lVV2m+DmT7GomWj1KlBD/IjA== 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 4Xpjql3yM1zK01; Thu, 14 Nov 2024 01:53:55 +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 4AE1rtPZ055194; Thu, 14 Nov 2024 01:53:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE1rtvX055191; Thu, 14 Nov 2024 01:53:55 GMT (envelope-from git) Date: Thu, 14 Nov 2024 01:53:55 GMT Message-Id: <202411140153.4AE1rtvX055191@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: 8d9b4e219f5a - stable/14 - LinuxKPI: 802.11: improve lladdr change to not use ifnet internals 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/14 X-Git-Reftype: branch X-Git-Commit: 8d9b4e219f5ac1b0f4f7fb646472c162b0c9af00 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8d9b4e219f5ac1b0f4f7fb646472c162b0c9af00 commit 8d9b4e219f5ac1b0f4f7fb646472c162b0c9af00 Author: Bjoern A. Zeeb AuthorDate: 2024-11-08 21:24:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-14 01:53:12 +0000 LinuxKPI: 802.11: improve lladdr change to not use ifnet internals The changes from 4aff4048 were based on net80211 which is still using if_private.h details. Adjust the code to no longer depend on internal details of ifnet. We also switch the "check"-functionn from if_init to if_transmit which we can query. Given we do have a per-vif eventhandler we could do without that check but would still need to check if_getflags() for IFF_UP. Sponsored by: The FreeBSD Foundation Reported by: jhibbits Fixes: 4aff4048 Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D47490 (cherry picked from commit edab5a280e0b4a53d0f3e34957075c7efe048e8d) --- sys/compat/linuxkpi/common/src/linux_80211.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index c26eb8740c77..b0ad1dee4784 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2764,6 +2764,10 @@ lkpi_ic_wme_update(struct ieee80211com *ic) * we do use a per-[l]vif event handler to be sure we exist as we * cannot assume that from every vap derives a vif and we have a hard * time checking based on net80211 information. + * Should this ever become a real problem we could add a callback function + * to wlan_iflladdr() to be set optionally but that would be for a + * single-consumer (or needs a list) -- was just too complicated for an + * otherwise perfect mechanism FreeBSD already provides. */ static void lkpi_vif_iflladdr(void *arg, struct ifnet *ifp) @@ -2772,8 +2776,9 @@ lkpi_vif_iflladdr(void *arg, struct ifnet *ifp) struct ieee80211_vif *vif; NET_EPOCH_ENTER(et); - /* NB: identify vap's by if_init; left as an extra check. */ - if (ifp->if_init != ieee80211_init || (ifp->if_flags & IFF_UP) != 0) { + /* NB: identify vap's by if_transmit; left as an extra check. */ + if (if_gettransmitfn(ifp) != ieee80211_vap_transmit || + (if_getflags(ifp) & IFF_UP) != 0) { NET_EPOCH_EXIT(et); return; }