aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2019-05-20 07:55:06 (GMT)
committerJouni Malinen <j@w1.fi>2019-05-27 13:27:49 (GMT)
commit464dcfd0304caa92f61a612a2a39e3b38dd34f34 (patch)
tree0d884cf948cf5b36ebc465ef920cce1fb28a7066
parent846e8396aba815a30e68ed6707c7dbbecf8730da (diff)
downloadhostap-464dcfd0304caa92f61a612a2a39e3b38dd34f34.zip
hostap-464dcfd0304caa92f61a612a2a39e3b38dd34f34.tar.gz
hostap-464dcfd0304caa92f61a612a2a39e3b38dd34f34.tar.bz2
HE: Remove VHT_ prefix from CHANWITDH_* define
The bandwidth values are shared between VHT and HE mode so remove the VHT specific prefix. Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com> Signed-off-by: John Crispin <john@phrozen.org>
-rw-r--r--src/ap/acs.c14
-rw-r--r--src/ap/ap_drv_ops.c6
-rw-r--r--src/ap/dfs.c22
-rw-r--r--src/ap/drv_callbacks.c16
-rw-r--r--src/ap/hostapd.c26
-rw-r--r--src/ap/hw_features.c2
-rw-r--r--src/ap/ieee802_11_vht.c8
-rw-r--r--src/ap/neighbor_db.c8
-rw-r--r--src/common/hw_features_common.c12
-rw-r--r--src/common/ieee802_11_common.c18
-rw-r--r--src/common/ieee802_11_defs.h10
-rw-r--r--wpa_supplicant/ap.c14
-rw-r--r--wpa_supplicant/config.c4
-rw-r--r--wpa_supplicant/ctrl_iface.c8
-rw-r--r--wpa_supplicant/mesh.c14
-rw-r--r--wpa_supplicant/op_classes.c2
-rw-r--r--wpa_supplicant/p2p_supplicant.c8
-rw-r--r--wpa_supplicant/rrm.c12
-rw-r--r--wpa_supplicant/wnm_sta.c6
-rw-r--r--wpa_supplicant/wpa_supplicant.c18
20 files changed, 114 insertions, 114 deletions
diff --git a/src/ap/acs.c b/src/ap/acs.c
index 3b45075..3682dcd 100644
--- a/src/ap/acs.c
+++ b/src/ap/acs.c
@@ -596,10 +596,10 @@ acs_find_ideal_chan(struct hostapd_iface *iface)
if (iface->conf->ieee80211ac) {
switch (iface->conf->vht_oper_chwidth) {
- case VHT_CHANWIDTH_80MHZ:
+ case CHANWIDTH_80MHZ:
n_chans = 4;
break;
- case VHT_CHANWIDTH_160MHZ:
+ case CHANWIDTH_160MHZ:
n_chans = 8;
break;
}
@@ -649,7 +649,7 @@ acs_find_ideal_chan(struct hostapd_iface *iface)
if (iface->current_mode->mode == HOSTAPD_MODE_IEEE80211A &&
iface->conf->ieee80211ac) {
if (iface->conf->vht_oper_chwidth ==
- VHT_CHANWIDTH_80MHZ &&
+ CHANWIDTH_80MHZ &&
!acs_usable_vht80_chan(chan)) {
wpa_printf(MSG_DEBUG,
"ACS: Channel %d: not allowed as primary channel for VHT80",
@@ -658,7 +658,7 @@ acs_find_ideal_chan(struct hostapd_iface *iface)
}
if (iface->conf->vht_oper_chwidth ==
- VHT_CHANWIDTH_160MHZ &&
+ CHANWIDTH_160MHZ &&
!acs_usable_vht160_chan(chan)) {
wpa_printf(MSG_DEBUG,
"ACS: Channel %d: not allowed as primary channel for VHT160",
@@ -790,13 +790,13 @@ static void acs_adjust_vht_center_freq(struct hostapd_iface *iface)
wpa_printf(MSG_DEBUG, "ACS: Adjusting VHT center frequency");
switch (iface->conf->vht_oper_chwidth) {
- case VHT_CHANWIDTH_USE_HT:
+ case CHANWIDTH_USE_HT:
offset = 2 * iface->conf->secondary_channel;
break;
- case VHT_CHANWIDTH_80MHZ:
+ case CHANWIDTH_80MHZ:
offset = 6;
break;
- case VHT_CHANWIDTH_160MHZ:
+ case CHANWIDTH_160MHZ:
offset = 14;
break;
default:
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index 61390f9..f353756 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -932,12 +932,12 @@ int hostapd_drv_do_acs(struct hostapd_data *hapd)
/* Note: VHT20 is defined by combination of ht_capab & vht_oper_chwidth
*/
if (hapd->iface->conf->ieee80211ac && params.ht40_enabled) {
- if (hapd->iface->conf->vht_oper_chwidth == VHT_CHANWIDTH_80MHZ)
+ if (hapd->iface->conf->vht_oper_chwidth == CHANWIDTH_80MHZ)
params.ch_width = 80;
else if (hapd->iface->conf->vht_oper_chwidth ==
- VHT_CHANWIDTH_160MHZ ||
+ CHANWIDTH_160MHZ ||
hapd->iface->conf->vht_oper_chwidth ==
- VHT_CHANWIDTH_80P80MHZ)
+ CHANWIDTH_80P80MHZ)
params.ch_width = 160;
}
diff --git a/src/ap/dfs.c b/src/ap/dfs.c
index 79cd00f..97c5acf 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -30,15 +30,15 @@ static int dfs_get_used_n_chans(struct hostapd_iface *iface, int *seg1)
if (iface->conf->ieee80211ac) {
switch (iface->conf->vht_oper_chwidth) {
- case VHT_CHANWIDTH_USE_HT:
+ case CHANWIDTH_USE_HT:
break;
- case VHT_CHANWIDTH_80MHZ:
+ case CHANWIDTH_80MHZ:
n_chans = 4;
break;
- case VHT_CHANWIDTH_160MHZ:
+ case CHANWIDTH_160MHZ:
n_chans = 8;
break;
- case VHT_CHANWIDTH_80P80MHZ:
+ case CHANWIDTH_80P80MHZ:
n_chans = 4;
*seg1 = 4;
break;
@@ -247,7 +247,7 @@ static void dfs_adjust_vht_center_freq(struct hostapd_iface *iface,
*vht_oper_centr_freq_seg1_idx = 0;
switch (iface->conf->vht_oper_chwidth) {
- case VHT_CHANWIDTH_USE_HT:
+ case CHANWIDTH_USE_HT:
if (secondary_channel == 1)
*vht_oper_centr_freq_seg0_idx = chan->chan + 2;
else if (secondary_channel == -1)
@@ -255,10 +255,10 @@ static void dfs_adjust_vht_center_freq(struct hostapd_iface *iface,
else
*vht_oper_centr_freq_seg0_idx = chan->chan;
break;
- case VHT_CHANWIDTH_80MHZ:
+ case CHANWIDTH_80MHZ:
*vht_oper_centr_freq_seg0_idx = chan->chan + 6;
break;
- case VHT_CHANWIDTH_160MHZ:
+ case CHANWIDTH_160MHZ:
*vht_oper_centr_freq_seg0_idx = chan->chan + 14;
break;
default:
@@ -291,17 +291,17 @@ static int dfs_get_start_chan_idx(struct hostapd_iface *iface, int *seg1_start)
/* VHT */
if (iface->conf->ieee80211ac) {
switch (iface->conf->vht_oper_chwidth) {
- case VHT_CHANWIDTH_USE_HT:
+ case CHANWIDTH_USE_HT:
break;
- case VHT_CHANWIDTH_80MHZ:
+ case CHANWIDTH_80MHZ:
channel_no =
iface->conf->vht_oper_centr_freq_seg0_idx - 6;
break;
- case VHT_CHANWIDTH_160MHZ:
+ case CHANWIDTH_160MHZ:
channel_no =
iface->conf->vht_oper_centr_freq_seg0_idx - 14;
break;
- case VHT_CHANWIDTH_80P80MHZ:
+ case CHANWIDTH_80P80MHZ:
channel_no =
iface->conf->vht_oper_centr_freq_seg0_idx - 6;
chan_seg1 =
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index 6a40b8f..2882dd6 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -808,19 +808,19 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
switch (width) {
case CHAN_WIDTH_80:
- chwidth = VHT_CHANWIDTH_80MHZ;
+ chwidth = CHANWIDTH_80MHZ;
break;
case CHAN_WIDTH_80P80:
- chwidth = VHT_CHANWIDTH_80P80MHZ;
+ chwidth = CHANWIDTH_80P80MHZ;
break;
case CHAN_WIDTH_160:
- chwidth = VHT_CHANWIDTH_160MHZ;
+ chwidth = CHANWIDTH_160MHZ;
break;
case CHAN_WIDTH_20_NOHT:
case CHAN_WIDTH_20:
case CHAN_WIDTH_40:
default:
- chwidth = VHT_CHANWIDTH_USE_HT;
+ chwidth = CHANWIDTH_USE_HT;
break;
}
@@ -964,24 +964,24 @@ void hostapd_acs_channel_selected(struct hostapd_data *hapd,
/* set defaults for backwards compatibility */
hapd->iconf->vht_oper_centr_freq_seg1_idx = 0;
hapd->iconf->vht_oper_centr_freq_seg0_idx = 0;
- hapd->iconf->vht_oper_chwidth = VHT_CHANWIDTH_USE_HT;
+ hapd->iconf->vht_oper_chwidth = CHANWIDTH_USE_HT;
if (acs_res->ch_width == 80) {
hapd->iconf->vht_oper_centr_freq_seg0_idx =
acs_res->vht_seg0_center_ch;
- hapd->iconf->vht_oper_chwidth = VHT_CHANWIDTH_80MHZ;
+ hapd->iconf->vht_oper_chwidth = CHANWIDTH_80MHZ;
} else if (acs_res->ch_width == 160) {
if (acs_res->vht_seg1_center_ch == 0) {
hapd->iconf->vht_oper_centr_freq_seg0_idx =
acs_res->vht_seg0_center_ch;
hapd->iconf->vht_oper_chwidth =
- VHT_CHANWIDTH_160MHZ;
+ CHANWIDTH_160MHZ;
} else {
hapd->iconf->vht_oper_centr_freq_seg0_idx =
acs_res->vht_seg0_center_ch;
hapd->iconf->vht_oper_centr_freq_seg1_idx =
acs_res->vht_seg1_center_ch;
hapd->iconf->vht_oper_chwidth =
- VHT_CHANWIDTH_80P80MHZ;
+ CHANWIDTH_80P80MHZ;
}
}
}
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index d0fecc8..9fce748 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -3227,16 +3227,16 @@ static int hostapd_change_config_freq(struct hostapd_data *hapd,
case 0:
case 20:
case 40:
- conf->vht_oper_chwidth = VHT_CHANWIDTH_USE_HT;
+ conf->vht_oper_chwidth = CHANWIDTH_USE_HT;
break;
case 80:
if (params->center_freq2)
- conf->vht_oper_chwidth = VHT_CHANWIDTH_80P80MHZ;
+ conf->vht_oper_chwidth = CHANWIDTH_80P80MHZ;
else
- conf->vht_oper_chwidth = VHT_CHANWIDTH_80MHZ;
+ conf->vht_oper_chwidth = CHANWIDTH_80MHZ;
break;
case 160:
- conf->vht_oper_chwidth = VHT_CHANWIDTH_160MHZ;
+ conf->vht_oper_chwidth = CHANWIDTH_160MHZ;
break;
default:
return -1;
@@ -3271,15 +3271,15 @@ static int hostapd_fill_csa_settings(struct hostapd_data *hapd,
switch (settings->freq_params.bandwidth) {
case 80:
if (settings->freq_params.center_freq2)
- vht_bandwidth = VHT_CHANWIDTH_80P80MHZ;
+ vht_bandwidth = CHANWIDTH_80P80MHZ;
else
- vht_bandwidth = VHT_CHANWIDTH_80MHZ;
+ vht_bandwidth = CHANWIDTH_80MHZ;
break;
case 160:
- vht_bandwidth = VHT_CHANWIDTH_160MHZ;
+ vht_bandwidth = CHANWIDTH_160MHZ;
break;
default:
- vht_bandwidth = VHT_CHANWIDTH_USE_HT;
+ vht_bandwidth = CHANWIDTH_USE_HT;
break;
}
@@ -3393,7 +3393,7 @@ void
hostapd_switch_channel_fallback(struct hostapd_iface *iface,
const struct hostapd_freq_params *freq_params)
{
- int vht_seg0_idx = 0, vht_seg1_idx = 0, vht_bw = VHT_CHANWIDTH_USE_HT;
+ int vht_seg0_idx = 0, vht_seg1_idx = 0, vht_bw = CHANWIDTH_USE_HT;
wpa_printf(MSG_DEBUG, "Restarting all CSA-related BSSes");
@@ -3406,16 +3406,16 @@ hostapd_switch_channel_fallback(struct hostapd_iface *iface,
case 0:
case 20:
case 40:
- vht_bw = VHT_CHANWIDTH_USE_HT;
+ vht_bw = CHANWIDTH_USE_HT;
break;
case 80:
if (freq_params->center_freq2)
- vht_bw = VHT_CHANWIDTH_80P80MHZ;
+ vht_bw = CHANWIDTH_80P80MHZ;
else
- vht_bw = VHT_CHANWIDTH_80MHZ;
+ vht_bw = CHANWIDTH_80MHZ;
break;
case 160:
- vht_bw = VHT_CHANWIDTH_160MHZ;
+ vht_bw = CHANWIDTH_160MHZ;
break;
default:
wpa_printf(MSG_WARNING, "Unknown CSA bandwidth: %d",
diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
index 8ac33bb..55244f9 100644
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
@@ -331,7 +331,7 @@ static void ieee80211n_check_scan(struct hostapd_iface *iface)
iface->conf->secondary_channel = 0;
iface->conf->vht_oper_centr_freq_seg0_idx = 0;
iface->conf->vht_oper_centr_freq_seg1_idx = 0;
- iface->conf->vht_oper_chwidth = VHT_CHANWIDTH_USE_HT;
+ iface->conf->vht_oper_chwidth = CHANWIDTH_USE_HT;
res = 1;
wpa_printf(MSG_INFO, "Fallback to 20 MHz");
}
diff --git a/src/ap/ieee802_11_vht.c b/src/ap/ieee802_11_vht.c
index 54ee080..269345f 100644
--- a/src/ap/ieee802_11_vht.c
+++ b/src/ap/ieee802_11_vht.c
@@ -242,7 +242,7 @@ u8 * hostapd_eid_txpower_envelope(struct hostapd_data *hapd, u8 *eid)
return eid;
switch (iface->conf->vht_oper_chwidth) {
- case VHT_CHANWIDTH_USE_HT:
+ case CHANWIDTH_USE_HT:
if (iconf->secondary_channel == 0) {
/* Max Transmit Power count = 0 (20 MHz) */
tx_pwr_count = 0;
@@ -251,12 +251,12 @@ u8 * hostapd_eid_txpower_envelope(struct hostapd_data *hapd, u8 *eid)
tx_pwr_count = 1;
}
break;
- case VHT_CHANWIDTH_80MHZ:
+ case CHANWIDTH_80MHZ:
/* Max Transmit Power count = 2 (20, 40, and 80 MHz) */
tx_pwr_count = 2;
break;
- case VHT_CHANWIDTH_80P80MHZ:
- case VHT_CHANWIDTH_160MHZ:
+ case CHANWIDTH_80P80MHZ:
+ case CHANWIDTH_160MHZ:
/* Max Transmit Power count = 3 (20, 40, 80, 160/80+80 MHz) */
tx_pwr_count = 3;
break;
diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c
index 2b6f727..37ec783 100644
--- a/src/ap/neighbor_db.c
+++ b/src/ap/neighbor_db.c
@@ -145,13 +145,13 @@ static enum nr_chan_width hostapd_get_nr_chan_width(struct hostapd_data *hapd,
return NR_CHAN_WIDTH_20;
if (!hapd->iconf->secondary_channel)
return NR_CHAN_WIDTH_20;
- if (!vht || hapd->iconf->vht_oper_chwidth == VHT_CHANWIDTH_USE_HT)
+ if (!vht || hapd->iconf->vht_oper_chwidth == CHANWIDTH_USE_HT)
return NR_CHAN_WIDTH_40;
- if (hapd->iconf->vht_oper_chwidth == VHT_CHANWIDTH_80MHZ)
+ if (hapd->iconf->vht_oper_chwidth == CHANWIDTH_80MHZ)
return NR_CHAN_WIDTH_80;
- if (hapd->iconf->vht_oper_chwidth == VHT_CHANWIDTH_160MHZ)
+ if (hapd->iconf->vht_oper_chwidth == CHANWIDTH_160MHZ)
return NR_CHAN_WIDTH_160;
- if (hapd->iconf->vht_oper_chwidth == VHT_CHANWIDTH_80P80MHZ)
+ if (hapd->iconf->vht_oper_chwidth == CHANWIDTH_80P80MHZ)
return NR_CHAN_WIDTH_80P80;
return NR_CHAN_WIDTH_20;
}
diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c
index 49ed806..1df6296 100644
--- a/src/common/hw_features_common.c
+++ b/src/common/hw_features_common.c
@@ -377,14 +377,14 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data,
data->bandwidth = sec_channel_offset ? 40 : 20;
if (data->vht_enabled) switch (vht_oper_chwidth) {
- case VHT_CHANWIDTH_USE_HT:
+ case CHANWIDTH_USE_HT:
if (center_segment1 ||
(center_segment0 != 0 &&
5000 + center_segment0 * 5 != data->center_freq1 &&
2407 + center_segment0 * 5 != data->center_freq1))
return -1;
break;
- case VHT_CHANWIDTH_80P80MHZ:
+ case CHANWIDTH_80P80MHZ:
if (!(vht_caps & VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ)) {
wpa_printf(MSG_ERROR,
"80+80 channel width is not supported!");
@@ -395,11 +395,11 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data,
return -1;
data->center_freq2 = 5000 + center_segment1 * 5;
/* fall through */
- case VHT_CHANWIDTH_80MHZ:
+ case CHANWIDTH_80MHZ:
data->bandwidth = 80;
- if ((vht_oper_chwidth == VHT_CHANWIDTH_80MHZ &&
+ if ((vht_oper_chwidth == CHANWIDTH_80MHZ &&
center_segment1) ||
- (vht_oper_chwidth == VHT_CHANWIDTH_80P80MHZ &&
+ (vht_oper_chwidth == CHANWIDTH_80P80MHZ &&
!center_segment1) ||
!sec_channel_offset)
return -1;
@@ -432,7 +432,7 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data,
return -1;
}
break;
- case VHT_CHANWIDTH_160MHZ:
+ case CHANWIDTH_160MHZ:
data->bandwidth = 160;
if (!(vht_caps & (VHT_CAP_SUPP_CHAN_WIDTH_160MHZ |
VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ))) {
diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c
index 4de5399..a081f87 100644
--- a/src/common/ieee802_11_common.c
+++ b/src/common/ieee802_11_common.c
@@ -706,7 +706,7 @@ enum hostapd_hw_mode ieee80211_freq_to_chan(int freq, u8 *channel)
{
u8 op_class;
- return ieee80211_freq_to_channel_ext(freq, 0, VHT_CHANWIDTH_USE_HT,
+ return ieee80211_freq_to_channel_ext(freq, 0, CHANWIDTH_USE_HT,
&op_class, channel);
}
@@ -716,7 +716,7 @@ enum hostapd_hw_mode ieee80211_freq_to_chan(int freq, u8 *channel)
* for HT40 and VHT. DFS channels are not covered.
* @freq: Frequency (MHz) to convert
* @sec_channel: 0 = non-HT40, 1 = sec. channel above, -1 = sec. channel below
- * @vht: VHT channel width (VHT_CHANWIDTH_*)
+ * @vht: VHT channel width (CHANWIDTH_*)
* @op_class: Buffer for returning operating class
* @channel: Buffer for returning channel number
* Returns: hw_mode on success, NUM_HOSTAPD_MODES on failure
@@ -771,13 +771,13 @@ enum hostapd_hw_mode ieee80211_freq_to_channel_ext(unsigned int freq,
}
switch (vht) {
- case VHT_CHANWIDTH_80MHZ:
+ case CHANWIDTH_80MHZ:
vht_opclass = 128;
break;
- case VHT_CHANWIDTH_160MHZ:
+ case CHANWIDTH_160MHZ:
vht_opclass = 129;
break;
- case VHT_CHANWIDTH_80P80MHZ:
+ case CHANWIDTH_80P80MHZ:
vht_opclass = 130;
break;
default:
@@ -896,16 +896,16 @@ int ieee80211_chaninfo_to_channel(unsigned int freq, enum chan_width chanwidth,
case CHAN_WIDTH_20_NOHT:
case CHAN_WIDTH_20:
case CHAN_WIDTH_40:
- vht = VHT_CHANWIDTH_USE_HT;
+ vht = CHANWIDTH_USE_HT;
break;
case CHAN_WIDTH_80:
- vht = VHT_CHANWIDTH_80MHZ;
+ vht = CHANWIDTH_80MHZ;
break;
case CHAN_WIDTH_80P80:
- vht = VHT_CHANWIDTH_80P80MHZ;
+ vht = CHANWIDTH_80P80MHZ;
break;
case CHAN_WIDTH_160:
- vht = VHT_CHANWIDTH_160MHZ;
+ vht = CHANWIDTH_160MHZ;
break;
}
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index 7eadc77..64b6167 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -1275,10 +1275,10 @@ struct ieee80211_ampe_ie {
#define VHT_RX_NSS_MAX_STREAMS 8
/* VHT channel widths */
-#define VHT_CHANWIDTH_USE_HT 0
-#define VHT_CHANWIDTH_80MHZ 1
-#define VHT_CHANWIDTH_160MHZ 2
-#define VHT_CHANWIDTH_80P80MHZ 3
+#define CHANWIDTH_USE_HT 0
+#define CHANWIDTH_80MHZ 1
+#define CHANWIDTH_160MHZ 2
+#define CHANWIDTH_80P80MHZ 3
#define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
* 00:50:F2 */
@@ -2092,7 +2092,7 @@ enum phy_type {
/*
* IEEE P802.11-REVmc/D5.0 Table 9-152 - HT/VHT Operation Information
* subfields.
- * Note: These definitions are not the same as other VHT_CHANWIDTH_*.
+ * Note: These definitions are not the same as other CHANWIDTH_*.
*/
enum nr_chan_width {
NR_CHAN_WIDTH_20 = 0,
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 7a3ec30..eea5b4e 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -67,7 +67,7 @@ static void wpas_conf_ap_vht(struct wpa_supplicant *wpa_s,
if (!ssid->p2p_group) {
if (!ssid->vht_center_freq1 ||
- conf->vht_oper_chwidth == VHT_CHANWIDTH_USE_HT)
+ conf->vht_oper_chwidth == CHANWIDTH_USE_HT)
goto no_vht;
ieee80211_freq_to_chan(ssid->vht_center_freq1,
&conf->vht_oper_centr_freq_seg0_idx);
@@ -78,14 +78,14 @@ static void wpas_conf_ap_vht(struct wpa_supplicant *wpa_s,
#ifdef CONFIG_P2P
switch (conf->vht_oper_chwidth) {
- case VHT_CHANWIDTH_80MHZ:
- case VHT_CHANWIDTH_80P80MHZ:
+ case CHANWIDTH_80MHZ:
+ case CHANWIDTH_80P80MHZ:
center_chan = wpas_p2p_get_vht80_center(wpa_s, mode, channel);
wpa_printf(MSG_DEBUG,
"VHT center channel %u for 80 or 80+80 MHz bandwidth",
center_chan);
break;
- case VHT_CHANWIDTH_160MHZ:
+ case CHANWIDTH_160MHZ:
center_chan = wpas_p2p_get_vht160_center(wpa_s, mode, channel);
wpa_printf(MSG_DEBUG,
"VHT center channel %u for 160 MHz bandwidth",
@@ -97,14 +97,14 @@ static void wpas_conf_ap_vht(struct wpa_supplicant *wpa_s,
* try oper_cwidth 160 MHz first then VHT 80 MHz, if 160 MHz is
* not supported.
*/
- conf->vht_oper_chwidth = VHT_CHANWIDTH_160MHZ;
+ conf->vht_oper_chwidth = CHANWIDTH_160MHZ;
center_chan = wpas_p2p_get_vht160_center(wpa_s, mode, channel);
if (center_chan) {
wpa_printf(MSG_DEBUG,
"VHT center channel %u for auto-selected 160 MHz bandwidth",
center_chan);
} else {
- conf->vht_oper_chwidth = VHT_CHANWIDTH_80MHZ;
+ conf->vht_oper_chwidth = CHANWIDTH_80MHZ;
center_chan = wpas_p2p_get_vht80_center(wpa_s, mode,
channel);
wpa_printf(MSG_DEBUG,
@@ -128,7 +128,7 @@ no_vht:
conf->channel);
conf->vht_oper_centr_freq_seg0_idx =
conf->channel + conf->secondary_channel * 2;
- conf->vht_oper_chwidth = VHT_CHANWIDTH_USE_HT;
+ conf->vht_oper_chwidth = CHANWIDTH_USE_HT;
}
#endif /* CONFIG_IEEE80211N */
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index d33ad9a..e7cba48 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -2240,8 +2240,8 @@ static const struct parse_data ssid_fields[] = {
{ INT_RANGE(ht, 0, 1) },
{ INT_RANGE(vht, 0, 1) },
{ INT_RANGE(ht40, -1, 1) },
- { INT_RANGE(max_oper_chwidth, VHT_CHANWIDTH_USE_HT,
- VHT_CHANWIDTH_80P80MHZ) },
+ { INT_RANGE(max_oper_chwidth, CHANWIDTH_USE_HT,
+ CHANWIDTH_80P80MHZ) },
{ INT(vht_center_freq1) },
{ INT(vht_center_freq2) },
#ifdef IEEE8021X_EAPOL
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index c1664d0..05b7d5f 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -5548,17 +5548,17 @@ static int parse_freq(int chwidth, int freq2)
if (freq2 < 0)
return -1;
if (freq2)
- return VHT_CHANWIDTH_80P80MHZ;
+ return CHANWIDTH_80P80MHZ;
switch (chwidth) {
case 0:
case 20:
case 40:
- return VHT_CHANWIDTH_USE_HT;
+ return CHANWIDTH_USE_HT;
case 80:
- return VHT_CHANWIDTH_80MHZ;
+ return CHANWIDTH_80MHZ;
case 160:
- return VHT_CHANWIDTH_160MHZ;
+ return CHANWIDTH_160MHZ;
default:
wpa_printf(MSG_DEBUG, "Unknown max oper bandwidth: %d",
chwidth);
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index 9db56f2..1068a55 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -334,14 +334,14 @@ static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
if (ssid->max_oper_chwidth != DEFAULT_MAX_OPER_CHWIDTH)
conf->vht_oper_chwidth = ssid->max_oper_chwidth;
switch (conf->vht_oper_chwidth) {
- case VHT_CHANWIDTH_80MHZ:
- case VHT_CHANWIDTH_80P80MHZ:
+ case CHANWIDTH_80MHZ:
+ case CHANWIDTH_80P80MHZ:
ieee80211_freq_to_chan(
frequency,
&conf->vht_oper_centr_freq_seg0_idx);
conf->vht_oper_centr_freq_seg0_idx += ssid->ht40 * 2;
break;
- case VHT_CHANWIDTH_160MHZ:
+ case CHANWIDTH_160MHZ:
ieee80211_freq_to_chan(
frequency,
&conf->vht_oper_centr_freq_seg0_idx);
@@ -465,18 +465,18 @@ int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s,
switch (params->freq.bandwidth) {
case 80:
if (params->freq.center_freq2) {
- ssid->max_oper_chwidth = VHT_CHANWIDTH_80P80MHZ;
+ ssid->max_oper_chwidth = CHANWIDTH_80P80MHZ;
ssid->vht_center_freq2 =
params->freq.center_freq2;
} else {
- ssid->max_oper_chwidth = VHT_CHANWIDTH_80MHZ;
+ ssid->max_oper_chwidth = CHANWIDTH_80MHZ;
}
break;
case 160:
- ssid->max_oper_chwidth = VHT_CHANWIDTH_160MHZ;
+ ssid->max_oper_chwidth = CHANWIDTH_160MHZ;
break;
default:
- ssid->max_oper_chwidth = VHT_CHANWIDTH_USE_HT;
+ ssid->max_oper_chwidth = CHANWIDTH_USE_HT;
break;
}
}
diff --git a/wpa_supplicant/op_classes.c b/wpa_supplicant/op_classes.c
index 947917b..6a85af4 100644
--- a/wpa_supplicant/op_classes.c
+++ b/wpa_supplicant/op_classes.c
@@ -348,7 +348,7 @@ size_t wpas_supp_op_class_ie(struct wpa_supplicant *wpa_s,
* TODO: Use the secondary channel and VHT channel width that will be
* used after association.
*/
- if (ieee80211_freq_to_channel_ext(freq, 0, VHT_CHANWIDTH_USE_HT,
+ if (ieee80211_freq_to_channel_ext(freq, 0, CHANWIDTH_USE_HT,
&current, &chan) == NUM_HOSTAPD_MODES)
return 0;
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index e7c1f5d..a56cdd0 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -5476,7 +5476,7 @@ exit_free:
* @ht40: Start GO with 40 MHz channel width
* @vht: Start GO with VHT support
* @vht_chwidth: Channel width supported by GO operating with VHT support
- * (VHT_CHANWIDTH_*).
+ * (CHANWIDTH_*).
* @group_ssid: Specific Group SSID for join or %NULL if not set
* @group_ssid_len: Length of @group_ssid in octets
* Returns: 0 or new PIN (if pin was %NULL) on success, -1 on unspecified
@@ -9193,11 +9193,11 @@ static int wpas_p2p_move_go_csa(struct wpa_supplicant *wpa_s)
csa_settings.freq_params.center_freq2 = freq2;
switch (conf->vht_oper_chwidth) {
- case VHT_CHANWIDTH_80MHZ:
- case VHT_CHANWIDTH_80P80MHZ:
+ case CHANWIDTH_80MHZ:
+ case CHANWIDTH_80P80MHZ:
csa_settings.freq_params.bandwidth = 80;
break;
- case VHT_CHANWIDTH_160MHZ:
+ case CHANWIDTH_160MHZ:
csa_settings.freq_params.bandwidth = 160;
break;
}
diff --git a/wpa_supplicant/rrm.c b/wpa_supplicant/rrm.c
index cb3c6c9..8468b2f 100644
--- a/wpa_supplicant/rrm.c
+++ b/wpa_supplicant/rrm.c
@@ -717,20 +717,20 @@ static int wpas_get_op_chan_phy(int freq, const u8 *ies, size_t ies_len,
seg0 = vht_oper->vht_op_info_chan_center_freq_seg0_idx;
seg1 = vht_oper->vht_op_info_chan_center_freq_seg1_idx;
if (seg1 && abs(seg1 - seg0) == 8)
- vht = VHT_CHANWIDTH_160MHZ;
+ vht = CHANWIDTH_160MHZ;
else if (seg1)
- vht = VHT_CHANWIDTH_80P80MHZ;
+ vht = CHANWIDTH_80P80MHZ;
else
- vht = VHT_CHANWIDTH_80MHZ;
+ vht = CHANWIDTH_80MHZ;
break;
case 2:
- vht = VHT_CHANWIDTH_160MHZ;
+ vht = CHANWIDTH_160MHZ;
break;
case 3:
- vht = VHT_CHANWIDTH_80P80MHZ;
+ vht = CHANWIDTH_80P80MHZ;
break;
default:
- vht = VHT_CHANWIDTH_USE_HT;
+ vht = CHANWIDTH_USE_HT;
break;
}
}
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index e6d7d66..f5a4cb7 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -925,9 +925,9 @@ static int wnm_nei_rep_add_bss(struct wpa_supplicant *wpa_s,
if (ie && ie[1] >= 1) {
vht_oper = (struct ieee80211_vht_operation *) (ie + 2);
- if (vht_oper->vht_op_info_chwidth == VHT_CHANWIDTH_80MHZ ||
- vht_oper->vht_op_info_chwidth == VHT_CHANWIDTH_160MHZ ||
- vht_oper->vht_op_info_chwidth == VHT_CHANWIDTH_80P80MHZ)
+ if (vht_oper->vht_op_info_chwidth == CHANWIDTH_80MHZ ||
+ vht_oper->vht_op_info_chwidth == CHANWIDTH_160MHZ ||
+ vht_oper->vht_op_info_chwidth == CHANWIDTH_80P80MHZ)
vht = vht_oper->vht_op_info_chwidth;
}
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 799e215..2b92fcb 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2355,11 +2355,11 @@ skip_ht40:
return;
}
- chwidth = VHT_CHANWIDTH_80MHZ;
+ chwidth = CHANWIDTH_80MHZ;
seg0 = vht80[j] + 6;
seg1 = 0;
- if (ssid->max_oper_chwidth == VHT_CHANWIDTH_80P80MHZ) {
+ if (ssid->max_oper_chwidth == CHANWIDTH_80P80MHZ) {
/* setup center_freq2, bandwidth */
for (k = 0; k < ARRAY_SIZE(vht80); k++) {
/* Only accept 80 MHz segments separated by a gap */
@@ -2378,27 +2378,27 @@ skip_ht40:
continue;
/* Found a suitable second segment for 80+80 */
- chwidth = VHT_CHANWIDTH_80P80MHZ;
+ chwidth = CHANWIDTH_80P80MHZ;
vht_caps |=
VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ;
seg1 = vht80[k] + 6;
}
- if (chwidth == VHT_CHANWIDTH_80P80MHZ)
+ if (chwidth == CHANWIDTH_80P80MHZ)
break;
}
- } else if (ssid->max_oper_chwidth == VHT_CHANWIDTH_160MHZ) {
+ } else if (ssid->max_oper_chwidth == CHANWIDTH_160MHZ) {
if (freq->freq == 5180) {
- chwidth = VHT_CHANWIDTH_160MHZ;
+ chwidth = CHANWIDTH_160MHZ;
vht_caps |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ;
seg0 = 50;
} else if (freq->freq == 5520) {
- chwidth = VHT_CHANWIDTH_160MHZ;
+ chwidth = CHANWIDTH_160MHZ;
vht_caps |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ;
seg0 = 114;
}
- } else if (ssid->max_oper_chwidth == VHT_CHANWIDTH_USE_HT) {
- chwidth = VHT_CHANWIDTH_USE_HT;
+ } else if (ssid->max_oper_chwidth == CHANWIDTH_USE_HT) {
+ chwidth = CHANWIDTH_USE_HT;
seg0 = vht80[j] + 2;
#ifdef CONFIG_HT_OVERRIDES
if (ssid->disable_ht40)