From 5d285040d62626ac7706b7ae4b0887cda02b750f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 26 Apr 2023 21:15:25 +0300 Subject: [PATCH] Rename VHT elements to match the standard Some of the information elements added in IEEE Std 802.11ax-2013 for VHT purposes have since then been taken into use for other cases and renamed to remove the "VHT" prefix in the standard. Update the defines for those elements in the implementation to match the names used in the current standard. Signed-off-by: Jouni Malinen --- src/ap/ieee802_11.c | 6 +++--- src/common/ieee802_11_common.c | 8 ++++---- src/common/ieee802_11_common.h | 2 +- src/common/ieee802_11_defs.h | 12 ++++++------ src/common/wpa_common.c | 2 +- wpa_supplicant/mesh_mpm.c | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 908e97105..f795c06a6 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -3696,7 +3696,7 @@ static int __check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta, if (resp != WLAN_STATUS_SUCCESS) return resp; - resp = set_sta_vht_opmode(hapd, sta, elems->vht_opmode_notif); + resp = set_sta_vht_opmode(hapd, sta, elems->opmode_notif); if (resp != WLAN_STATUS_SUCCESS) return resp; } @@ -6382,9 +6382,9 @@ u8 * hostapd_eid_wb_chsw_wrapper(struct hostapd_data *hapd, u8 *eid) &chan2) != HOSTAPD_MODE_IEEE80211A) return eid; - *eid++ = WLAN_EID_VHT_CHANNEL_SWITCH_WRAPPER; + *eid++ = WLAN_EID_CHANNEL_SWITCH_WRAPPER; *eid++ = 5; /* Length of Channel Switch Wrapper */ - *eid++ = WLAN_EID_VHT_WIDE_BW_CHSWITCH; + *eid++ = WLAN_EID_WIDE_BW_CHSWITCH; *eid++ = 3; /* Length of Wide Bandwidth Channel Switch element */ *eid++ = bw; /* New Channel Width */ *eid++ = chan1; /* New Channel Center Frequency Segment 0 */ diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index 22f65affa..a8f16b3d1 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -542,10 +542,10 @@ static ParseRes __ieee802_11_parse_elems(const u8 *start, size_t len, break; elems->vht_operation = pos; break; - case WLAN_EID_VHT_OPERATING_MODE_NOTIFICATION: + case WLAN_EID_OPERATING_MODE_NOTIFICATION: if (elen != 1) break; - elems->vht_opmode_notif = pos; + elems->opmode_notif = pos; break; case WLAN_EID_LINK_ID: if (elen < 18) @@ -769,8 +769,8 @@ void ieee802_11_elems_clear_ids(struct ieee802_11_elems *elems, case WLAN_EID_VHT_OPERATION: elems->vht_operation = NULL; break; - case WLAN_EID_VHT_OPERATING_MODE_NOTIFICATION: - elems->vht_opmode_notif = NULL; + case WLAN_EID_OPERATING_MODE_NOTIFICATION: + elems->opmode_notif = NULL; break; case WLAN_EID_LINK_ID: elems->link_id = NULL; diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h index 8e730440a..785fe608a 100644 --- a/src/common/ieee802_11_common.h +++ b/src/common/ieee802_11_common.h @@ -55,7 +55,7 @@ struct ieee802_11_elems { const u8 *peer_mgmt; const u8 *vht_capabilities; const u8 *vht_operation; - const u8 *vht_opmode_notif; + const u8 *opmode_notif; const u8 *vendor_ht_cap; const u8 *vendor_vht; const u8 *p2p; diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index dfad0b7b8..12789227c 100644 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -435,13 +435,13 @@ #define WLAN_EID_ANTENNA_SECTOR_ID_PATTERN 190 #define WLAN_EID_VHT_CAP 191 #define WLAN_EID_VHT_OPERATION 192 -#define WLAN_EID_VHT_EXTENDED_BSS_LOAD 193 -#define WLAN_EID_VHT_WIDE_BW_CHSWITCH 194 +#define WLAN_EID_EXTENDED_BSS_LOAD 193 +#define WLAN_EID_WIDE_BW_CHSWITCH 194 #define WLAN_EID_TRANSMIT_POWER_ENVELOPE 195 -#define WLAN_EID_VHT_CHANNEL_SWITCH_WRAPPER 196 -#define WLAN_EID_VHT_AID 197 -#define WLAN_EID_VHT_QUIET_CHANNEL 198 -#define WLAN_EID_VHT_OPERATING_MODE_NOTIFICATION 199 +#define WLAN_EID_CHANNEL_SWITCH_WRAPPER 196 +#define WLAN_EID_AID 197 +#define WLAN_EID_QUIET_CHANNEL 198 +#define WLAN_EID_OPERATING_MODE_NOTIFICATION 199 #define WLAN_EID_UPSIM 200 #define WLAN_EID_REDUCED_NEIGHBOR_REPORT 201 #define WLAN_EID_TVHT_OPERATION 202 diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c index 15ebcabb6..367af8f63 100644 --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c @@ -3567,7 +3567,7 @@ int wpa_parse_kde_ies(const u8 *buf, size_t len, struct wpa_eapol_ie_parse *ie) } else if (*pos == WLAN_EID_HT_CAP && pos[1] >= sizeof(struct ieee80211_ht_capabilities)) { ie->ht_capabilities = pos + 2; - } else if (*pos == WLAN_EID_VHT_AID) { + } else if (*pos == WLAN_EID_AID) { if (pos[1] >= 2) ie->aid = WPA_GET_LE16(pos + 2) & 0x3fff; } else if (*pos == WLAN_EID_VHT_CAP && diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c index da6d9db05..c9e14d5c2 100644 --- a/wpa_supplicant/mesh_mpm.c +++ b/wpa_supplicant/mesh_mpm.c @@ -771,7 +771,7 @@ static struct sta_info * mesh_mpm_add_peer(struct wpa_supplicant *wpa_s, #ifdef CONFIG_IEEE80211AC copy_sta_vht_capab(data, sta, elems->vht_capabilities); copy_sta_vht_oper(data, sta, elems->vht_operation); - set_sta_vht_opmode(data, sta, elems->vht_opmode_notif); + set_sta_vht_opmode(data, sta, elems->opmode_notif); #endif /* CONFIG_IEEE80211AC */ #ifdef CONFIG_IEEE80211AX