From nobody Thu Nov 30 00:38:24 2023 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 4Sgck92Vx1z52VGR; Thu, 30 Nov 2023 00:38:25 +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 4Sgck90Y0cz3N0X; Thu, 30 Nov 2023 00:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701304705; 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=Euya1T+PuoEqk52MNe4TMol18M/Mr4PXCX9mKtTCuIg=; b=caU99MsWiIwcVAXk4ZJAbvMCERcbErX0F7XfAUJypp9WJU0743hpHiSXVklW2ANOYzBXEa RXKe2VG8OJUPgKFCVxBEVJk+BhB95ysyHNXri0UhRLsqa0ImImEFy3+0Cr22YULyIZ1ehF LUDsxmChLEgrWogcvRoUcyftWCmTHKxEZnkeko2aNdOd2JxdW2LynpzpV0l/oODR+AoTW1 LaYCbblhx9LEyUwunVZh12Elc4KIGmfHq4I3i7V5junnpQmTo3FwZtBeOecNCdH4vZn6rv W4pZK83KDQcy+q7OI9zo8fse9aIFAQcdj8w6DjwYr2WyjoCFS15o2CbnAtkAlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701304705; 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=Euya1T+PuoEqk52MNe4TMol18M/Mr4PXCX9mKtTCuIg=; b=SH73oV05rg1OQQR06CE953GJ5JRizwjHUmIK1S3dL4tcPKMfiRfY9TjGr3egFwLekqJWnJ uMgUMy7HLzsafSRcZN3eDCjVVlM/rMudjMxLX8zsimiRVrSbCXfML2oLFA1+0cmWeAn4Xs 5pZG1IReHvTdcmG2E+4AgiMgjgvkYb0vWbXvfburmLM6WfQyw20g6v9e/MwKv2YRvHtb3c FK8euK2wfEAiZTlDG9a5dPLkdqwNt4xYI+T6WEpHf7RCEAvxkkk5oyTczksnNhgxCAoxjN fsgmg7sqx7zkBgAjaOjxe1yYBTy/Zfg0dZOrJO9lnbFJ7iTle9hiNHQL2mLtKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701304705; a=rsa-sha256; cv=none; b=eZ1gBBuxXlG3MoT54x/NozFkZL48rfi8e9MWx/Icjd4Xwp5pDaULoWoB+GPPnVJPK/R5fZ Dtt+piaEum242wm4qvXijPwbql2WFGr6QHV0FDpkFqjvH2IO4jtISmpW7Ai6YeyPe3BNNY Ui4Rq5mtrwSbx4mB33Vd/4sgHB9DgoCuKVVvDXfkVOIs1TN9/fEZMBGCG5PsqDQf8sJDy1 3ny+Y85zp8LscwqiFtpMNX4yZV3AGI6eZ+mJa0CmY69Msec4oNAysLM8n8wdogY77qLSYi us9/uPQGXwrLlIHHC9OcOhQ+l8p3vuaZKSolYcc4N/pob8vrtDv1xlXhkr5Mkg== 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 4Sgck86gYKzD6P; Thu, 30 Nov 2023 00:38:24 +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 3AU0cOq7052319; Thu, 30 Nov 2023 00:38:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AU0cOp6052316; Thu, 30 Nov 2023 00:38:24 GMT (envelope-from git) Date: Thu, 30 Nov 2023 00:38:24 GMT Message-Id: <202311300038.3AU0cOp6052316@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: 7019af03949f - stable/14 - net80211: migrate ic_vhtcaps, ic_vht_mcsinfo, ic_flags_vht 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7019af03949f689cab24bc2cbded5ce4be28f90e Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7019af03949f689cab24bc2cbded5ce4be28f90e commit 7019af03949f689cab24bc2cbded5ce4be28f90e Author: Bjoern A. Zeeb AuthorDate: 2023-10-27 18:44:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-11-30 00:36:58 +0000 net80211: migrate ic_vhtcaps, ic_vht_mcsinfo, ic_flags_vht Like for the VAP rename ic_flags_vht to ic_vht_flags for consistency to keep "VHT" fields together and merge ic_vhtcaps and ic_vht_mcsinfo into struct ieee80211_vht_cap ic_vht_cap. While the structure layout changes no other functional changes intended. Sponsored by: The FreeBSD Foundation Reviewed by: adrian, cc Differential Revision: https://reviews.freebsd.org/D42421 (cherry picked from commit 562adbe1d354377a260e66eedb6072b720a606dc) --- sys/compat/linuxkpi/common/src/linux_80211.c | 6 +++--- sys/net80211/ieee80211.c | 6 +++--- sys/net80211/ieee80211_ddb.c | 2 +- sys/net80211/ieee80211_ioctl.c | 2 +- sys/net80211/ieee80211_node.c | 2 +- sys/net80211/ieee80211_regdomain.c | 4 ++-- sys/net80211/ieee80211_var.h | 5 ++--- sys/net80211/ieee80211_vht.c | 14 +++++++------- 8 files changed, 20 insertions(+), 21 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ffda3c5693cd..42fb7a60ce57 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3556,16 +3556,16 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan, if (hw->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap.vht_supported){ ic->ic_flags_ext |= IEEE80211_FEXT_VHT; - ic->ic_vhtcaps = + ic->ic_vht_cap.vht_cap_info = hw->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap.cap; setbit(bands, IEEE80211_MODE_VHT_5GHZ); chan_flags |= NET80211_CBW_FLAG_VHT80; if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ( - ic->ic_vhtcaps)) + ic->ic_vht_cap.vht_cap_info)) chan_flags |= NET80211_CBW_FLAG_VHT160; if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ( - ic->ic_vhtcaps)) + ic->ic_vht_cap.vht_cap_info)) chan_flags |= NET80211_CBW_FLAG_VHT80P80; } #endif diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index dcd61e8de43a..3809b7e6596c 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -553,7 +553,7 @@ ieee80211_vap_setup(struct ieee80211com *ic, struct ieee80211vap *vap, vap->iv_htextcaps = ic->ic_htextcaps; /* 11ac capabilities - XXX methodize */ - vap->iv_vht_cap.vht_cap_info = ic->ic_vhtcaps; + vap->iv_vht_cap.vht_cap_info = ic->ic_vht_cap.vht_cap_info; vap->iv_vhtextcaps = ic->ic_vhtextcaps; vap->iv_opmode = opmode; @@ -944,9 +944,9 @@ ieee80211_syncflag_vht_locked(struct ieee80211com *ic, int flag) break; } if (bit) - ic->ic_flags_vht |= flag; + ic->ic_vht_flags |= flag; else - ic->ic_flags_vht &= ~flag; + ic->ic_vht_flags &= ~flag; } void diff --git a/sys/net80211/ieee80211_ddb.c b/sys/net80211/ieee80211_ddb.c index e3f70fbe3f29..cd4a4f191745 100644 --- a/sys/net80211/ieee80211_ddb.c +++ b/sys/net80211/ieee80211_ddb.c @@ -672,7 +672,7 @@ _db_show_com(const struct ieee80211com *ic, int showvaps, int showsta, db_printf("\tcryptocaps=%b\n", ic->ic_cryptocaps, IEEE80211_CRYPTO_BITS); db_printf("\thtcaps=%b\n", ic->ic_htcaps, IEEE80211_HTCAP_BITS); - db_printf("\tvhtcaps=%b\n", ic->ic_vhtcaps, IEEE80211_VHTCAP_BITS); + db_printf("\tvhtcaps=%b\n", ic->ic_vht_cap.vht_cap_info, IEEE80211_VHTCAP_BITS); #if 0 uint8_t ic_modecaps[2]; /* set of mode capabilities */ diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index d3e4bd1ca561..170cdc416276 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -711,7 +711,7 @@ ieee80211_ioctl_getdevcaps(struct ieee80211com *ic, dc->dc_drivercaps = ic->ic_caps; dc->dc_cryptocaps = ic->ic_cryptocaps; dc->dc_htcaps = ic->ic_htcaps; - dc->dc_vhtcaps = ic->ic_vhtcaps; + dc->dc_vhtcaps = ic->ic_vht_cap.vht_cap_info; ci = &dc->dc_chaninfo; ic->ic_getradiocaps(ic, maxchans, &ci->ic_nchans, ci->ic_chans); KASSERT(ci->ic_nchans <= maxchans, diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 60230fcec1c5..f277293ceb14 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -809,7 +809,7 @@ ieee80211_setupcurchan(struct ieee80211com *ic, struct ieee80211_channel *c) * based on what HT has done; it may further promote the * channel to VHT80 or above. */ - if (ic->ic_vhtcaps != 0) { + if (ic->ic_vht_cap.vht_cap_info != 0) { int flags = getvhtadjustflags(ic); if (flags > ieee80211_vhtchanflags(c)) c = ieee80211_vht_adjust_channel(ic, c, flags); diff --git a/sys/net80211/ieee80211_regdomain.c b/sys/net80211/ieee80211_regdomain.c index a482e1eaad32..3f222dc31a5a 100644 --- a/sys/net80211/ieee80211_regdomain.c +++ b/sys/net80211/ieee80211_regdomain.c @@ -149,10 +149,10 @@ ieee80211_init_channels(struct ieee80211com *ic, if (isset(bands, IEEE80211_MODE_VHT_5GHZ)) { cbw_flags |= NET80211_CBW_FLAG_HT40; /* Make sure this is set; or assert? */ cbw_flags |= NET80211_CBW_FLAG_VHT80; - if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(ic->ic_vhtcaps)) + if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(ic->ic_vht_cap.vht_cap_info)) cbw_flags |= NET80211_CBW_FLAG_VHT160; if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ( - ic->ic_vhtcaps)) + ic->ic_vht_cap.vht_cap_info)) cbw_flags |= NET80211_CBW_FLAG_VHT80P80; ieee80211_add_channel_list_5ghz(chans, IEEE80211_CHAN_MAX, nchans, def_chan_5ghz_band1, nitems(def_chan_5ghz_band1), diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 08812c5eb27c..f42ebb4fa261 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -240,10 +240,9 @@ struct ieee80211com { uint8_t ic_txstream; /* # TX streams */ /* VHT information */ - uint32_t ic_vhtcaps; /* VHT capabilities */ + uint32_t ic_vht_flags; /* VHT state flags */ + struct ieee80211_vht_cap ic_vht_cap; /* VHT capabilities + MCS info */ uint32_t ic_vhtextcaps; /* VHT extended capabilities (TODO) */ - struct ieee80211_vht_mcs_info ic_vht_mcsinfo; /* Support TX/RX VHT MCS */ - uint32_t ic_flags_vht; /* VHT state flags */ uint32_t ic_vht_spare[3]; /* optional state for Atheros SuperG protocol extensions */ diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c index 7dd2a6be1d2e..1561255be101 100644 --- a/sys/net80211/ieee80211_vht.c +++ b/sys/net80211/ieee80211_vht.c @@ -144,7 +144,7 @@ ieee80211_vht_vattach(struct ieee80211vap *vap) if (! IEEE80211_CONF_VHT(ic)) return; - vap->iv_vht_cap.vht_cap_info = ic->ic_vhtcaps; + vap->iv_vht_cap.vht_cap_info = ic->ic_vht_cap.vht_cap_info; vap->iv_vhtextcaps = ic->ic_vhtextcaps; /* XXX assume VHT80 support; should really check vhtcaps */ @@ -157,7 +157,7 @@ ieee80211_vht_vattach(struct ieee80211vap *vap) if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ(vap->iv_vht_cap.vht_cap_info)) vap->iv_vht_flags |= IEEE80211_FVHT_USEVHT80P80; - memcpy(&vap->iv_vht_cap.supp_mcs, &ic->ic_vht_mcsinfo, + memcpy(&vap->iv_vht_cap.supp_mcs, &ic->ic_vht_cap.supp_mcs, sizeof(struct ieee80211_vht_mcs_info)); } @@ -199,19 +199,19 @@ ieee80211_vht_announce(struct ieee80211com *ic) /* Channel width */ ic_printf(ic, "[VHT] Channel Widths: 20MHz, 40MHz, 80MHz%s%s\n", - (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(ic->ic_vhtcaps)) ? + (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(ic->ic_vht_cap.vht_cap_info)) ? ", 160MHz" : "", - (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ(ic->ic_vhtcaps)) ? + (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ(ic->ic_vht_cap.vht_cap_info)) ? ", 80+80MHz" : ""); /* Features */ - ic_printf(ic, "[VHT] Features: %b\n", ic->ic_vhtcaps, + ic_printf(ic, "[VHT] Features: %b\n", ic->ic_vht_cap.vht_cap_info, IEEE80211_VHTCAP_BITS); /* For now, just 5GHz VHT. Worry about 2GHz VHT later */ for (i = 0; i < 8; i++) { /* Each stream is 2 bits */ - tx = (ic->ic_vht_mcsinfo.tx_mcs_map >> (2*i)) & 0x3; - rx = (ic->ic_vht_mcsinfo.rx_mcs_map >> (2*i)) & 0x3; + tx = (ic->ic_vht_cap.supp_mcs.tx_mcs_map >> (2*i)) & 0x3; + rx = (ic->ic_vht_cap.supp_mcs.rx_mcs_map >> (2*i)) & 0x3; if (tx == 3 && rx == 3) continue; ic_printf(ic, "[VHT] NSS %d: TX MCS 0..%d, RX MCS 0..%d\n",