mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 15:40:44 +00:00
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 MFC after: 3 days Reviewed by: adrian, cc Differential Revision: https://reviews.freebsd.org/D42419
This commit is contained in:
parent
8895b47638
commit
ef48d4fa12
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -1680,7 +1680,7 @@ adhoc_pick_bss(struct ieee80211_scan_state *ss, struct ieee80211vap *vap)
|
|||
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 @@ adhoc_pick_bss(struct ieee80211_scan_state *ss, struct ieee80211vap *vap)
|
|||
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 @@ mesh_pick_bss(struct ieee80211_scan_state *ss, struct ieee80211vap *vap)
|
|||
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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue