From nobody Fri Apr 18 14:37:12 2025 X-Original-To: dev-commits-src-branches@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 4ZfHQw6X4Sz5stRN; Fri, 18 Apr 2025 14:37:12 +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 4ZfHQw4L4Gz3KZb; Fri, 18 Apr 2025 14:37:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1744987032; 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=EB3H70GNqiE0WlP3x9RU6h8CkSvU4V4tzgS0CseaIrw=; b=bwZD5qQRbrPhxfxfWvlxBVoaeKYzUpcMUBfL1/9T3xftKkQDLmAlFeK3/DVYywPrTikOjm /xrYLq13QLNVaUm9YwavEeCKy8/6yKLa+9Kmhz44OtvmBxXcGamyyF2O1R/rNRkz7ncCVR xgvI18KhLcCcffnVhSonOOUI6K5PoPntfGOIZ+/3qYVxqAlZ45OKBXZm2so8sR+Q3DduAM SaLnlS/ArE9xOttai4G45JK+giAZtqf1TgUMFTIKJhZcLIahD/l6NVtlVIrcsPt0bI2MVo XAuwwTua1lsbb0UMm01pEL6APZZTegT7E1u6Buv0nucyhXZADp2Y49+UdKowew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1744987032; a=rsa-sha256; cv=none; b=dvQi1BMpEWWxFnDNCeQL2IMpyEGsx81URItwq7oWI37P5Ww79X22vAF6QD1Zl6lMvtp4pM 2pHXH6IX3d8NAY1r5bfAjFP9hw3I2IRqW23eZ2U7j6b2zitDxtC6Je1a3pIpEEZkqOvph1 27VAEBW9meLnrT3MHQsez7aGIo/Vt28EDT9lCDaivzKSDr+ifTEVAULXBqFIQfZ60IRtP8 PX0D1VShcAnRvPX5uJS1o+JhUFW77VdD4WUmCdktqBpxUEv+Xw6stRp18RmWOq4KeGLfiG TKnLuQWcmwgELr/FWulD+9h1Ye1JooOmUk3UK87mnp8fEZgWm+N4479FAGKpHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1744987032; 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=EB3H70GNqiE0WlP3x9RU6h8CkSvU4V4tzgS0CseaIrw=; b=ZO3WU1fsLTQaskD1PLmifbFuzB1Leme6m454uSw5/EHaqecXbUCR0DIiw9qjXoPnK+4Tu6 2sSsIpxSsy6dSJnwnDN/RnY5D0yL93TtClZsZjnzEcvzMsrvfginZu6t9zfJ3vDqGUcXim Btye/meEeS22cJBOB40M5xm+ElmWCX9T925R+Akluo7csWTyNkrwTI7mUKNYLpFbBqljj/ xYJ5yHC4+9yv/gUDUBWb2AgTZDd89gO/oGcmKNXY7IXcVgwvSGiC3aNReDcj3qh6Q5htSL FLFwy4Z0bPYCW1b1XOHXT2t+7XpLdY2sNu7spW2V6g63LBCQN6NE7b0+1deZbw== 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 4ZfHQw3vbZzdtD; Fri, 18 Apr 2025 14:37:12 +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 53IEbCib091804; Fri, 18 Apr 2025 14:37:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53IEbCYV091801; Fri, 18 Apr 2025 14:37:12 GMT (envelope-from git) Date: Fri, 18 Apr 2025 14:37:12 GMT Message-Id: <202504181437.53IEbCYV091801@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: 494894b11a98 - stable/14 - LinuxKPI: 802.11: move chanctx_conf from vif to vif->bss_conf List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: 494894b11a9886ed974de79498ada136249cb930 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=494894b11a9886ed974de79498ada136249cb930 commit 494894b11a9886ed974de79498ada136249cb930 Author: Bjoern A. Zeeb AuthorDate: 2025-04-08 00:56:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-04-18 14:36:00 +0000 LinuxKPI: 802.11: move chanctx_conf from vif to vif->bss_conf In preparations for MLD support chanctx_conf was moved from vif to the bss_conf as it will be per-link later. Follow accordingly. Sponsored by: The FreeBSD Foundation PR: 280546 Tested by: Oleksandr Kryvulia (shuriku shurik.kiev.ua) Tested by: Oleg Nauman (oleg.nauman gmail.com) [rtw88] Differential Revision: https://reviews.freebsd.org/D49734 (cherry picked from commit 11604b2a1659fd6da9bbfdc6acf9758884cb2b36) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 1 - sys/compat/linuxkpi/common/src/linux_80211.c | 20 ++++++++++---------- sys/compat/linuxkpi/common/src/linux_80211_macops.c | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 95991dd2ac42..016143874564 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -839,7 +839,6 @@ struct ieee80211_vif { bool probe_req_reg; uint8_t addr[ETH_ALEN]; struct ieee80211_vif_cfg cfg; - struct ieee80211_chanctx_conf *chanctx_conf; /* XXX-BZ no longer used anywhere but in linuxkpi 802.11 internally; now in bss_conf per-link? */ struct ieee80211_txq *txq; struct ieee80211_bss_conf bss_conf; struct ieee80211_bss_conf *link_conf[IEEE80211_MLD_MAX_NUM_LINKS]; /* rcu? */ diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 63a6328ebc74..43d5c5dc9deb 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1736,14 +1736,14 @@ static void lkpi_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { /* Take the chan ctx down. */ - if (vif->chanctx_conf != NULL) { + if (vif->bss_conf.chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *chanctx_conf; - chanctx_conf = vif->chanctx_conf; + chanctx_conf = vif->bss_conf.chanctx_conf; /* Remove vif context. */ - lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); - /* NB: vif->chanctx_conf is NULL now. */ + lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->bss_conf.chanctx_conf); + /* NB: vif->bss_conf.chanctx_conf is NULL now. */ lkpi_hw_conf_idle(hw, true); @@ -1840,8 +1840,8 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int LKPI_80211_LHW_LOCK(lhw); /* Add chanctx (or if exists, change it). */ - if (vif->chanctx_conf != NULL) { - chanctx_conf = vif->chanctx_conf; + if (vif->bss_conf.chanctx_conf != NULL) { + chanctx_conf = vif->bss_conf.chanctx_conf; lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); IMPROVE("diff changes for changed, working on live copy, rcu"); } else { @@ -1916,7 +1916,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int bss_changed |= lkpi_update_dtim_tsf(vif, ni, vap, __func__, __LINE__); error = 0; - if (vif->chanctx_conf != NULL) { + if (vif->bss_conf.chanctx_conf != NULL) { changed = IEEE80211_CHANCTX_CHANGE_MIN_WIDTH; changed |= IEEE80211_CHANCTX_CHANGE_RADAR; changed |= IEEE80211_CHANCTX_CHANGE_RX_CHAINS; @@ -3470,7 +3470,7 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], /* XXX-BZ hardcoded for now! */ #if 1 - vif->chanctx_conf = NULL; + vif->bss_conf.chanctx_conf = NULL; vif->bss_conf.vif = vif; /* vap->iv_myaddr is not set until net80211::vap_setup or vap_attach. */ IEEE80211_ADDR_COPY(vif->bss_conf.addr, mac); @@ -5970,10 +5970,10 @@ linuxkpi_ieee80211_iterate_chan_contexts(struct ieee80211_hw *hw, TAILQ_FOREACH(lvif, &lhw->lvif_head, lvif_entry) { vif = LVIF_TO_VIF(lvif); - if (vif->chanctx_conf == NULL) + if (vif->bss_conf.chanctx_conf == NULL) continue; - lchanctx = CHANCTX_CONF_TO_LCHANCTX(vif->chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(vif->bss_conf.chanctx_conf); if (!lchanctx->added_to_drv) continue; diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index 1da3c582adb4..e9f97914a4b1 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -459,7 +459,7 @@ lkpi_80211_mo_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif * hw, vif, conf, chanctx_conf); error = lhw->ops->assign_vif_chanctx(hw, vif, conf, chanctx_conf); if (error == 0) - vif->chanctx_conf = chanctx_conf; + vif->bss_conf.chanctx_conf = chanctx_conf; out: return (error);