From nobody Sat Nov 09 21:48:26 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 4Xm8ZM1Nkbz5cjJw; Sat, 09 Nov 2024 21:48:27 +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 4Xm8ZL69fGz4nTx; Sat, 9 Nov 2024 21:48:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731188906; 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=qdKyTffyR1A+i9mu2D5A6xM90N3MshzUnITDSJTHRLo=; b=C3OWnAkGSnQnOFlHEOnoCxs/co5PmfUqnZMlEhJnmvQtD7YO+APMXxzt8jOGgJl8aZHELn jfq7kFbhIXPcaV6o/mn6AK3FdyRqbTraKnu4XwYcuBQuTkNAaSvhC+OEX09I91vjxz8i2Q ivV/sQlpMrlKycsYFGuxHto9HDQw/35djdFBBPzs1Id9n1RhrwTEjvd4QnghDjs9dpLnHx XzvrkdfWfrTmKFA3ZvFzYbiXr0UxmG69Mob07V1W7xB9sdT5FnAH1RG0JBAzfYOmFNIp2h wOYCTIqp0sHbmp9mwk/9kwfctVrJjHfFwZyOHbi60pmzoIWMq2+az53hBa1q+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731188906; 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=qdKyTffyR1A+i9mu2D5A6xM90N3MshzUnITDSJTHRLo=; b=WyPDQkZ35Wx6ZF+YdkZ9Bn+WsyUNpQwp0u33EXIcwOStYVV/BiMXFzH9jz/oluMKLcqmnW Owgnc+XQdEM2D5uHSoZWHOr7SQ4dnjrUkqHM0Yh/qtLwbkOVJPl9m8E9iSXH1fBEko5lPf 1bmV2qCy4lYg+H2SPrHZKGbH0gcwN8ojnwWqIoh/zErLm0kdPvCPysNJ42XPfAQzqW2Sqg g4/Nd1Yk2Lup6IvhvBpYWnO1T2qqbeZFRwoOc5hkr4qKzlF6aHYTyQvFifKzUaxA1V5fR9 nalBAvcaf2mAy0BrOcHzrE5+TVeOHUtO5Tego2VawEP7RiAZm8Gv2gIVEOXOyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731188906; a=rsa-sha256; cv=none; b=LFkBDa98olrOMET4MnImb8d8B+SQX0fK2BDSWXboxht/Koh/KdD7mttbHyIAneaQlryPD+ faQZs9QjTUUKmNWZbcNOaU9LD8GAzfskY279IpwvaqWRsHl1HJEU7HC/o22HAdigqU7ao0 K+b16dvWhZuLgaoORFfUZstro6nZ72EH4npil6uB+Jv8eXY8YjZ6o6HVsDpnAc/GXDiscW zXyhBdbZCr7Fa3qc1rLAws7huqK2fCR1voJgfoebHKB3RMpmW82UogAL6jsNhcub2UdslW uWAYwT+bV94bT/I62PVw15BDx50tWfKBDBLfaAdSw3ZJDJbZTHm5YnJeNUyqLg== 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 4Xm8ZL5f70zDsS; Sat, 9 Nov 2024 21:48:26 +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 4A9LmQ2q099533; Sat, 9 Nov 2024 21:48:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A9LmQ2o099530; Sat, 9 Nov 2024 21:48:26 GMT (envelope-from git) Date: Sat, 9 Nov 2024 21:48:26 GMT Message-Id: <202411092148.4A9LmQ2o099530@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: edab5a280e0b - main - 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/main X-Git-Reftype: branch X-Git-Commit: edab5a280e0b4a53d0f3e34957075c7efe048e8d Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=edab5a280e0b4a53d0f3e34957075c7efe048e8d commit edab5a280e0b4a53d0f3e34957075c7efe048e8d Author: Bjoern A. Zeeb AuthorDate: 2024-11-08 21:24:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-09 21:45:14 +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 MFC after: 3 days Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D47490 --- 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 ec471db21efd..9d0166829d52 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2763,6 +2763,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) @@ -2771,8 +2775,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; }