git: 5f760ad573d1 - stable/14 - net80211: rename iv_flags_vht to iv_vht_flags

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Thu, 30 Nov 2023 00:38:22 UTC
The branch stable/14 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=5f760ad573d1458b33403cb5ca1b1977c7f7170a

commit 5f760ad573d1458b33403cb5ca1b1977c7f7170a
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-10-27 18:18:24 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-11-30 00:36:58 +0000

    net80211: rename iv_flags_vht to iv_vht_flags
    
    While the flag field is internal start naming it as well as "iv_vht*"
    so we keep all "VHT" fields together.  This breaks with what was done
    done for HT but with HE, EHT, .. coming one day seems the more logic
    choice.
    
    No functional changes intended.
    
    Sponsored by:   The FreeBSD Foundation
    Reviewed by:    adrian, cc
    Differential Revision: https://reviews.freebsd.org/D42419
    
    (cherry picked from commit ef48d4fa122d863db11e41608ceea641eec54704)
---
 sys/net80211/ieee80211.c          |  6 +++---
 sys/net80211/ieee80211_ht.c       | 12 ++++++------
 sys/net80211/ieee80211_ioctl.c    |  2 +-
 sys/net80211/ieee80211_node.c     |  6 +++---
 sys/net80211/ieee80211_output.c   |  6 +++---
 sys/net80211/ieee80211_scan_sta.c |  8 ++++----
 sys/net80211/ieee80211_sta.c      |  4 ++--
 sys/net80211/ieee80211_var.h      |  2 +-
 sys/net80211/ieee80211_vht.c      | 10 +++++-----
 9 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c
index 6584e0b6e027..41b743c988f4 100644
--- a/sys/net80211/ieee80211.c
+++ b/sys/net80211/ieee80211.c
@@ -939,7 +939,7 @@ ieee80211_syncflag_vht_locked(struct ieee80211com *ic, int flag)
 
 	bit = 0;
 	TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
-		if (vap->iv_flags_vht & flag) {
+		if (vap->iv_vht_flags & flag) {
 			bit = 1;
 			break;
 		}
@@ -957,9 +957,9 @@ ieee80211_syncflag_vht(struct ieee80211vap *vap, int flag)
 	IEEE80211_LOCK(ic);
 	if (flag < 0) {
 		flag = -flag;
-		vap->iv_flags_vht &= ~flag;
+		vap->iv_vht_flags &= ~flag;
 	} else
-		vap->iv_flags_vht |= flag;
+		vap->iv_vht_flags |= flag;
 	ieee80211_syncflag_vht_locked(ic, flag);
 	IEEE80211_UNLOCK(ic);
 }
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c
index 0e5a4df04305..34d330f0dd09 100644
--- a/sys/net80211/ieee80211_ht.c
+++ b/sys/net80211/ieee80211_ht.c
@@ -1935,12 +1935,12 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags)
 	uint32_t vhtflags = 0;
 
 	vhtflags = 0;
-	if (ni->ni_flags & IEEE80211_NODE_VHT && vap->iv_flags_vht & IEEE80211_FVHT_VHT) {
+	if (ni->ni_flags & IEEE80211_NODE_VHT && vap->iv_vht_flags & IEEE80211_FVHT_VHT) {
 		if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_160MHZ) &&
 		    /* XXX 2 means "160MHz and 80+80MHz", 1 means "160MHz" */
 		    (_IEEE80211_MASKSHIFT(vap->iv_vhtcaps,
 		     IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) &&
-		    (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT160)) {
+		    (vap->iv_vht_flags & IEEE80211_FVHT_USEVHT160)) {
 			vhtflags = IEEE80211_CHAN_VHT160;
 			/* Mirror the HT40 flags */
 			if (htflags == IEEE80211_CHAN_HT40U) {
@@ -1952,7 +1952,7 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags)
 		    /* XXX 2 means "160MHz and 80+80MHz" */
 		    (_IEEE80211_MASKSHIFT(vap->iv_vhtcaps,
 		     IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) &&
-		    (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80P80)) {
+		    (vap->iv_vht_flags & IEEE80211_FVHT_USEVHT80P80)) {
 			vhtflags = IEEE80211_CHAN_VHT80P80;
 			/* Mirror the HT40 flags */
 			if (htflags == IEEE80211_CHAN_HT40U) {
@@ -1961,7 +1961,7 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags)
 				vhtflags |= IEEE80211_CHAN_HT40D;
 			}
 		} else if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_80MHZ) &&
-		    (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80)) {
+		    (vap->iv_vht_flags & IEEE80211_FVHT_USEVHT80)) {
 			vhtflags = IEEE80211_CHAN_VHT80;
 			/* Mirror the HT40 flags */
 			if (htflags == IEEE80211_CHAN_HT40U) {
@@ -1979,11 +1979,11 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags)
 			 * 'ht40' as that flag.
 			 */
 			if ((htflags == IEEE80211_CHAN_HT40U) &&
-			    (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT40)) {
+			    (vap->iv_vht_flags & IEEE80211_FVHT_USEVHT40)) {
 				vhtflags = IEEE80211_CHAN_VHT40U
 				    | IEEE80211_CHAN_HT40U;
 			} else if (htflags == IEEE80211_CHAN_HT40D &&
-			    (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT40)) {
+			    (vap->iv_vht_flags & IEEE80211_FVHT_USEVHT40)) {
 				vhtflags = IEEE80211_CHAN_VHT40D
 				    | IEEE80211_CHAN_HT40D;
 			} else if (htflags == IEEE80211_CHAN_HT20) {
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index 674d163e3e67..d3e4bd1ca561 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -1156,7 +1156,7 @@ ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_long cmd,
 			ireq->i_val = 1;
 		break;
 	case IEEE80211_IOC_VHTCONF:
-		ireq->i_val = vap->iv_flags_vht & IEEE80211_FVHT_MASK;
+		ireq->i_val = vap->iv_vht_flags & IEEE80211_FVHT_MASK;
 		break;
 	default:
 		error = ieee80211_ioctl_getdefault(vap, ireq);
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index e451b03d8dac..60230fcec1c5 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -1015,7 +1015,7 @@ ieee80211_sta_join(struct ieee80211vap *vap, struct ieee80211_channel *chan,
 	 */
 	if (ni->ni_ies.vhtopmode_ie != NULL &&
 	    ni->ni_ies.vhtcap_ie != NULL &&
-	    vap->iv_flags_vht & IEEE80211_FVHT_VHT) {
+	    vap->iv_vht_flags & IEEE80211_FVHT_VHT) {
 		if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) {
 			printf("%s: BSS %6D: 2GHz channel, VHT info; ignoring\n",
 			    __func__,
@@ -1589,7 +1589,7 @@ ieee80211_node_create_wds(struct ieee80211vap *vap,
 			 * ni_chan will be adjusted to an HT channel.
 			 */
 			ieee80211_ht_wds_init(ni);
-			if (vap->iv_flags_vht & IEEE80211_FVHT_VHT) {
+			if (vap->iv_vht_flags & IEEE80211_FVHT_VHT) {
 				printf("%s: TODO: vht_wds_init\n", __func__);
 			}
 		} else {
@@ -1824,7 +1824,7 @@ ieee80211_init_neighbor(struct ieee80211_node *ni,
 
 		if ((ni->ni_ies.vhtcap_ie != NULL) &&
 		    (ni->ni_ies.vhtopmode_ie != NULL) &&
-		    (ni->ni_vap->iv_flags_vht & IEEE80211_FVHT_VHT)) {
+		    (ni->ni_vap->iv_vht_flags & IEEE80211_FVHT_VHT)) {
 			do_vht_setup = 1;
 		}
 	}
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 2358ba009e13..6fc4a1567d8e 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -2524,12 +2524,12 @@ ieee80211_probereq_ie(struct ieee80211vap *vap, struct ieee80211com *ic,
 	 * VHT channel.
 	 */
 #ifdef notyet
-	if (vap->iv_flags_vht & IEEE80211_FVHT_VHT) {
+	if (vap->iv_vht_flags & IEEE80211_FVHT_VHT) {
 		struct ieee80211_channel *c;
 
 		c = ieee80211_ht_adjust_channel(ic, ic->ic_curchan,
 		    vap->iv_flags_ht);
-		c = ieee80211_vht_adjust_channel(ic, c, vap->iv_flags_vht);
+		c = ieee80211_vht_adjust_channel(ic, c, vap->iv_vht_flags);
 		frm = ieee80211_add_vhtcap_ch(frm, vap, c);
 	}
 #endif
@@ -2887,7 +2887,7 @@ ieee80211_send_mgmt(struct ieee80211_node *ni, int type, int arg)
 			frm = ieee80211_add_htcap(frm, ni);
 		}
 
-		if ((vap->iv_flags_vht & IEEE80211_FVHT_VHT) &&
+		if ((vap->iv_vht_flags & IEEE80211_FVHT_VHT) &&
 		    IEEE80211_IS_CHAN_VHT(ni->ni_chan) &&
 		    ni->ni_ies.vhtcap_ie != NULL &&
 		    ni->ni_ies.vhtcap_ie[0] == IEEE80211_ELEMID_VHT_CAP) {
diff --git a/sys/net80211/ieee80211_scan_sta.c b/sys/net80211/ieee80211_scan_sta.c
index 9389a7bf53d0..a8159fca6d80 100644
--- a/sys/net80211/ieee80211_scan_sta.c
+++ b/sys/net80211/ieee80211_scan_sta.c
@@ -1680,7 +1680,7 @@ notfound:
 				chan = ieee80211_ht_adjust_channel(ic,
 				    chan, vap->iv_flags_ht);
 				chan = ieee80211_vht_adjust_channel(ic,
-				    chan, vap->iv_flags_vht);
+				    chan, vap->iv_vht_flags);
 				ieee80211_create_ibss(vap, chan);
 				return 1;
 			}
@@ -1713,7 +1713,7 @@ notfound:
 	chan = ieee80211_ht_adjust_channel(ic,
 	    chan, vap->iv_flags_ht);
 	chan = ieee80211_vht_adjust_channel(ic,
-	    chan, vap->iv_flags_vht);
+	    chan, vap->iv_vht_flags);
 	if (!ieee80211_sta_join(vap, chan, &selbs->base))
 		goto notfound;
 	return 1;				/* terminate scan */
@@ -1866,7 +1866,7 @@ ap_end(struct ieee80211_scan_state *ss, struct ieee80211vap *vap)
 		return 1;
 	}
 	chan = ieee80211_ht_adjust_channel(ic, bestchan, vap->iv_flags_ht);
-	chan = ieee80211_vht_adjust_channel(ic, chan, vap->iv_flags_vht);
+	chan = ieee80211_vht_adjust_channel(ic, chan, vap->iv_vht_flags);
 	ieee80211_create_ibss(vap, chan);
 
 	return 1;
@@ -1946,7 +1946,7 @@ notfound:
 					chan = ieee80211_ht_adjust_channel(ic,
 					    chan, vap->iv_flags_ht);
 					chan = ieee80211_vht_adjust_channel(ic,
-					    chan, vap->iv_flags_vht);
+					    chan, vap->iv_vht_flags);
 					}
 			} else
 				chan = vap->iv_des_chan;
diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c
index 37f384325970..042f5636be29 100644
--- a/sys/net80211/ieee80211_sta.c
+++ b/sys/net80211/ieee80211_sta.c
@@ -1524,7 +1524,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype,
 				do_ht = 1;
 			}
 			if (scan.vhtcap != NULL && scan.vhtopmode != NULL &&
-			    (vap->iv_flags_vht & IEEE80211_FVHT_VHT)) {
+			    (vap->iv_vht_flags & IEEE80211_FVHT_VHT)) {
 				/* XXX state changes? */
 				ieee80211_vht_updateparams(ni,
 				    scan.vhtcap, scan.vhtopmode);
@@ -1870,7 +1870,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype,
 			ieee80211_ht_updateparams(ni, htcap, htinfo);
 
 			if ((vhtcap != NULL) && (vhtopmode != NULL) &
-			    (vap->iv_flags_vht & IEEE80211_FVHT_VHT)) {
+			    (vap->iv_vht_flags & IEEE80211_FVHT_VHT)) {
 				/*
 				 * Log if we get a VHT assoc/reassoc response.
 				 * We aren't ready for 2GHz VHT support.
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index 2fd46278d7ea..1208a8b3ab4e 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -423,7 +423,7 @@ struct ieee80211vap {
 	int			iv_inact_probe;	/* inactive probe time */
 
 	/* VHT flags */
-	uint32_t		iv_flags_vht;	/* VHT state flags */
+	uint32_t		iv_vht_flags;	/* VHT state flags */
 	uint32_t		iv_vhtcaps;	/* VHT capabilities */
 	uint32_t		iv_vhtextcaps;	/* VHT extended capabilities (TODO) */
 	struct ieee80211_vht_mcs_info	iv_vht_mcsinfo;
diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c
index f7a13157150e..32123e7a2815 100644
--- a/sys/net80211/ieee80211_vht.c
+++ b/sys/net80211/ieee80211_vht.c
@@ -148,14 +148,14 @@ ieee80211_vht_vattach(struct ieee80211vap *vap)
 	vap->iv_vhtextcaps = ic->ic_vhtextcaps;
 
 	/* XXX assume VHT80 support; should really check vhtcaps */
-	vap->iv_flags_vht =
+	vap->iv_vht_flags =
 	    IEEE80211_FVHT_VHT
 	    | IEEE80211_FVHT_USEVHT40
 	    | IEEE80211_FVHT_USEVHT80;
 	if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(vap->iv_vhtcaps))
-		vap->iv_flags_vht |= IEEE80211_FVHT_USEVHT160;
+		vap->iv_vht_flags |= IEEE80211_FVHT_USEVHT160;
 	if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ(vap->iv_vhtcaps))
-		vap->iv_flags_vht |= IEEE80211_FVHT_USEVHT80P80;
+		vap->iv_vht_flags |= IEEE80211_FVHT_USEVHT80P80;
 
 	memcpy(&vap->iv_vht_mcsinfo, &ic->ic_vht_mcsinfo,
 	    sizeof(struct ieee80211_vht_mcs_info));
@@ -383,10 +383,10 @@ ieee80211_vht_get_vhtcap_ie(struct ieee80211_node *ni,
 		    IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK);
 	}
 	if ((val2 == 2) &&
-	    ((vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80P80) == 0))
+	    ((vap->iv_vht_flags & IEEE80211_FVHT_USEVHT80P80) == 0))
 		val2 = 1;
 	if ((val2 == 1) &&
-	    ((vap->iv_flags_vht & IEEE80211_FVHT_USEVHT160) == 0))
+	    ((vap->iv_vht_flags & IEEE80211_FVHT_USEVHT160) == 0))
 		val2 = 0;
 	val = MIN(val1, val2);
 	new_vhtcap |= _IEEE80211_SHIFTMASK(val,