git: fec79883cbd1 - stable/13 - net80211: rename iv_flags_vht to iv_vht_flags
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 29 Nov 2023 16:38:56 UTC
The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=fec79883cbd126c6f5d99e0b0f275407b6c63f35 commit fec79883cbd126c6f5d99e0b0f275407b6c63f35 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-29 16:36:12 +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 (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 65b28ec15095..084decd4f7ea 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -938,7 +938,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; } @@ -956,9 +956,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 9561a546b1e3..d31071ef4b5d 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 64cb9f229519..90d5646e9057 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1155,7 +1155,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 a44e19f68e7f..43e8f5995c30 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 { @@ -1844,7 +1844,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 404980bdaa27..288f0c7da2c8 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -2523,12 +2523,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 @@ -2886,7 +2886,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 50b490641c5a..70079f6bcfcc 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -1523,7 +1523,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); @@ -1869,7 +1869,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 d58acd6a9c9b..751662c36aca 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,