From nobody Wed May 22 21:09:49 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 4Vl3pk02qFz5L1T9; Wed, 22 May 2024 21:09:50 +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 4Vl3pj5Rxsz4Hrp; Wed, 22 May 2024 21:09:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412189; 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=jA50DRN/yBVoxX1sMNSA7jOBmp/hQHxIygkajycqeFc=; b=aBDJPWgisJrFNEbWtfls+hqO0Wr21RHf6YcZPRA0eFVxmd1qC4YRAcc39B0Hy5kjyYdu/y 2ITtkBE8izKufpdxEdslr10MiVKGNq3cREi/rnJWVIlv+gJbWvN4UIWxK02Qass2vhh8K2 7S2PBLQDbi1uFWHBilblQvdq7fv37TT/lOVzqq9Lb2zZeLIDVAhyHJ+o0Eea+wn5wZ79Dp Fw1+EN5r+wnfhGy76tburHrrOjjhC8DNop04YTkYy/CAOrHjF6mFibFC06CB+oVVioK0gP 2BpRa4HRk2TQIboOh+Zw5o3aV8Fcm/G3l8zK+G45A26PCUkKljXCnqRbPCn95g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716412189; a=rsa-sha256; cv=none; b=RaidGSUuL4qukPBHMOThaQXnwya7xooxbW1g2F2Rhlr+D3GKFgz3Hqkn1QR2K7giWT3oAt Q5PLDS2Sq6meeVkJjG2SiBi3Ob17EdaqQYVRCA5yv0cgNGcx3nwlqWPCDMbtpDjyFzNi+1 wMz9+gzsSKoEzVfc5W0Qb0GfxZG9ce4/yB0F0Rt8xZW9Bi6dXEeEuBy4fRsGIdkOgulaxR RsEJSTxJSJuB9iv1ZtSrpmo1ihAc6QMbZpaRSFYgEo67qqLvNQsSOVdlDNE4B9xZccoU7O Aymn6GR/vIe8nbvnIurmlPMSXO35nVV3K818Y2E2CL5rFy9z0YmWlcpyiqxi8w== 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=1716412189; 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=jA50DRN/yBVoxX1sMNSA7jOBmp/hQHxIygkajycqeFc=; b=XlDZRfGunLHet+BiFjPGrjZvgatnYCJJ6uHphyXiNuczE2qtfbhGDLrVJ5xRuCqvQqiXss H4uCpCjRngpYjbhTaJIhlGx21wB39F+rh9AfAQvN59BrbqZRCgoSIU4l/FBaUAne6z7gdE qU3rincrjaHtE48TpentdFDmFvfj1p96GHeCmu2eBr3yMN+oRoGhlPR27LYEtGz7yUZn1M GdTxWtaiS+PZy4ydFqDTPsttm9YxId4dU4lympJyN+wdrCvgbXNEdYlUtthpt8ydvX+sNG S1u5btc7lKt+W8UdqdF/fc8tyEqw1reY9tUQ/tlIJH/HV1Pj+Q1fuWo7ZPigdA== 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 4Vl3pj54L2zLYp; Wed, 22 May 2024 21:09:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44ML9nac083294; Wed, 22 May 2024 21:09:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ML9nwI083291; Wed, 22 May 2024 21:09:49 GMT (envelope-from git) Date: Wed, 22 May 2024 21:09:49 GMT Message-Id: <202405222109.44ML9nwI083291@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: d1af434d9994 - main - LinuxKPI: 802.11: rename chanctx_conf for consistency 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: d1af434d99941d32a09c48fb3ef77ef83e203d29 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d1af434d99941d32a09c48fb3ef77ef83e203d29 commit d1af434d99941d32a09c48fb3ef77ef83e203d29 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 21:03:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-05-22 21:08:55 +0000 LinuxKPI: 802.11: rename chanctx_conf for consistency We used to call the struct ieee80211_chanctx_conf variable "conf" in some places but that becomes confusing with bss_conf and other "conf" bits. On the vif it is already called chanctx_conf thus also rename it on the internal struct lkpi_chanctx and for our variables in the implementation. This should not have any external visibility. No functional changes intended. Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45185 --- sys/compat/linuxkpi/common/src/linux_80211.c | 88 ++++++++++++++-------------- sys/compat/linuxkpi/common/src/linux_80211.h | 6 +- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index b982413382f8..72b39e840bfd 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1078,7 +1078,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int { struct linuxkpi_ieee80211_channel *chan; struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; struct lkpi_hw *lhw; struct ieee80211_hw *hw; struct lkpi_vif *lvif; @@ -1144,54 +1144,54 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Add chanctx (or if exists, change it). */ if (vif->chanctx_conf != NULL) { - conf = vif->chanctx_conf; - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + chanctx_conf = vif->chanctx_conf; + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); IMPROVE("diff changes for changed, working on live copy, rcu"); } else { /* Keep separate alloc as in Linux this is rcu managed? */ lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size, M_LKPI80211, M_WAITOK | M_ZERO); - conf = &lchanctx->conf; + chanctx_conf = &lchanctx->chanctx_conf; } - conf->rx_chains_dynamic = 1; - conf->rx_chains_static = 1; - conf->radar_enabled = + chanctx_conf->rx_chains_dynamic = 1; + chanctx_conf->rx_chains_static = 1; + chanctx_conf->radar_enabled = (chan->flags & IEEE80211_CHAN_RADAR) ? true : false; - conf->def.chan = chan; - conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->def.center_freq1 = chan->center_freq; - conf->def.center_freq2 = 0; + chanctx_conf->def.chan = chan; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->def.center_freq1 = chan->center_freq; + chanctx_conf->def.center_freq2 = 0; IMPROVE("Check vht_cap from band not just chan?"); KASSERT(ni->ni_chan != NULL && ni->ni_chan != IEEE80211_CHAN_ANYC, ("%s:%d: ni %p ni_chan %p\n", __func__, __LINE__, ni, ni->ni_chan)); #ifdef LKPI_80211_HT if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_40; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_40; } else - conf->def.width = NL80211_CHAN_WIDTH_20; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20; } #endif #ifdef LKPI_80211_VHT if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) { #ifdef __notyet__ if (IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_80P80; - conf->def.center_freq2 = 0; /* XXX */ + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80P80; + chanctx_conf->def.center_freq2 = 0; /* XXX */ } else #endif if (IEEE80211_IS_CHAN_VHT160(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_160; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_160; else if (IEEE80211_IS_CHAN_VHT80(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_80; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80; } #endif /* Responder ... */ - conf->min_def.chan = chan; - conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->min_def.center_freq1 = chan->center_freq; - conf->min_def.center_freq2 = 0; + chanctx_conf->min_def.chan = chan; + chanctx_conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->min_def.center_freq1 = chan->center_freq; + chanctx_conf->min_def.center_freq2 = 0; IMPROVE("currently 20_NOHT min_def only"); /* Set bss info (bss_info_changed). */ @@ -1217,14 +1217,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int changed |= IEEE80211_CHANCTX_CHANGE_RADAR; changed |= IEEE80211_CHANCTX_CHANGE_RX_CHAINS; changed |= IEEE80211_CHANCTX_CHANGE_WIDTH; - lkpi_80211_mo_change_chanctx(hw, conf, changed); + lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); } else { - error = lkpi_80211_mo_add_chanctx(hw, conf); + error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf); if (error == 0 || error == EOPNOTSUPP) { - vif->bss_conf.chandef.chan = conf->def.chan; - vif->bss_conf.chandef.width = conf->def.width; + vif->bss_conf.chandef.chan = chanctx_conf->def.chan; + vif->bss_conf.chandef.width = chanctx_conf->def.width; vif->bss_conf.chandef.center_freq1 = - conf->def.center_freq1; + chanctx_conf->def.center_freq1; #ifdef LKPI_80211_HT if (vif->bss_conf.chandef.width == NL80211_CHAN_WIDTH_40) { /* Note: it is 10 not 20. */ @@ -1235,26 +1235,26 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } #endif vif->bss_conf.chandef.center_freq2 = - conf->def.center_freq2; + chanctx_conf->def.center_freq2; } else { ic_printf(vap->iv_ic, "%s:%d: mo_add_chanctx " "failed: %d\n", __func__, __LINE__, error); goto out; } - vif->bss_conf.chanctx_conf = conf; + vif->bss_conf.chanctx_conf = chanctx_conf; /* Assign vif chanctx. */ if (error == 0) error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, - &vif->bss_conf, conf); + &vif->bss_conf, chanctx_conf); if (error == EOPNOTSUPP) error = 0; if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: mo_assign_vif_chanctx " "failed: %d\n", __func__, __LINE__, error); - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); goto out; } @@ -1456,9 +1456,9 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->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. */ @@ -1466,8 +1466,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -1794,9 +1794,9 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->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. */ @@ -1804,8 +1804,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -2363,9 +2363,9 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->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. */ @@ -2373,8 +2373,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -4770,7 +4770,7 @@ linuxkpi_ieee80211_iterate_chan_contexts(struct ieee80211_hw *hw, if (!lchanctx->added_to_drv) continue; - iterfunc(hw, &lchanctx->conf, arg); + iterfunc(hw, &lchanctx->chanctx_conf, arg); } LKPI_80211_LHW_LVIF_UNLOCK(lhw); } diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index b0156a5ade3f..a48cf719c693 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -267,12 +267,12 @@ struct lkpi_hw { /* name it mac80211_sc? */ struct lkpi_chanctx { bool added_to_drv; /* Managed by MO */ - struct ieee80211_chanctx_conf conf __aligned(CACHE_LINE_SIZE); + struct ieee80211_chanctx_conf chanctx_conf __aligned(CACHE_LINE_SIZE); }; #define LCHANCTX_TO_CHANCTX_CONF(_lchanctx) \ - (&(_lchanctx)->conf) + (&(_lchanctx)->chanctx_conf) #define CHANCTX_CONF_TO_LCHANCTX(_conf) \ - container_of(_conf, struct lkpi_chanctx, conf) + container_of(_conf, struct lkpi_chanctx, chanctx_conf) struct lkpi_wiphy { const struct cfg80211_ops *ops;