hostapd: Update HE capabilities and HE operation definition

Replace vendor-specific elements for HE capabilities and HE operation
elements with the P802.11ax defined element values. This version is
based on P802.11ax/D1.4.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Peng Xu 2017-09-29 16:32:44 -07:00 committed by Jouni Malinen
parent e0e1fde8a8
commit 4a37463416
4 changed files with 37 additions and 49 deletions

View file

@ -394,10 +394,10 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
#ifdef CONFIG_IEEE80211AX #ifdef CONFIG_IEEE80211AX
if (hapd->iconf->ieee80211ax) { if (hapd->iconf->ieee80211ax) {
buflen += 4 + sizeof (struct ieee80211_he_capabilities) + buflen += 3 + sizeof(struct ieee80211_he_capabilities) +
4 + sizeof (struct ieee80211_he_operation); 3 + sizeof(struct ieee80211_he_operation);
} }
#endif #endif /* CONFIG_IEEE80211AX */
buflen += hostapd_mbo_ie_len(hapd); buflen += hostapd_mbo_ie_len(hapd);
@ -502,18 +502,18 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
pos = hostapd_eid_fils_indic(hapd, pos, 0); pos = hostapd_eid_fils_indic(hapd, pos, 0);
#ifdef CONFIG_IEEE80211AX
if (hapd->iconf->ieee80211ax) {
pos = hostapd_eid_he_capab(hapd, pos);
pos = hostapd_eid_he_operation(hapd, pos);
}
#endif /* CONFIG_IEEE80211AX */
#ifdef CONFIG_IEEE80211AC #ifdef CONFIG_IEEE80211AC
if (hapd->conf->vendor_vht) if (hapd->conf->vendor_vht)
pos = hostapd_eid_vendor_vht(hapd, pos); pos = hostapd_eid_vendor_vht(hapd, pos);
#endif /* CONFIG_IEEE80211AC */ #endif /* CONFIG_IEEE80211AC */
#ifdef CONFIG_IEEE80211AX
if (hapd->iconf->ieee80211ax) {
pos = hostapd_eid_vendor_he_capab(hapd, pos);
pos = hostapd_eid_vendor_he_operation(hapd, pos);
}
#endif /* CONFIG_IEEE80211AX */
/* Wi-Fi Alliance WMM */ /* Wi-Fi Alliance WMM */
pos = hostapd_eid_wmm(hapd, pos); pos = hostapd_eid_wmm(hapd, pos);
@ -1056,10 +1056,10 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
#ifdef CONFIG_IEEE80211AX #ifdef CONFIG_IEEE80211AX
if (hapd->iconf->ieee80211ax) { if (hapd->iconf->ieee80211ax) {
tail_len += 4 + sizeof (struct ieee80211_he_capabilities) + tail_len += 3 + sizeof(struct ieee80211_he_capabilities) +
4 + sizeof (struct ieee80211_he_operation); 3 + sizeof(struct ieee80211_he_operation);
} }
#endif #endif /* CONFIG_IEEE80211AX */
tail_len += hostapd_mbo_ie_len(hapd); tail_len += hostapd_mbo_ie_len(hapd);
@ -1187,18 +1187,18 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
tailpos = hostapd_eid_fils_indic(hapd, tailpos, 0); tailpos = hostapd_eid_fils_indic(hapd, tailpos, 0);
#ifdef CONFIG_IEEE80211AX
if (hapd->iconf->ieee80211ax) {
tailpos = hostapd_eid_he_capab(hapd, tailpos);
tailpos = hostapd_eid_he_operation(hapd, tailpos);
}
#endif /* CONFIG_IEEE80211AX */
#ifdef CONFIG_IEEE80211AC #ifdef CONFIG_IEEE80211AC
if (hapd->conf->vendor_vht) if (hapd->conf->vendor_vht)
tailpos = hostapd_eid_vendor_vht(hapd, tailpos); tailpos = hostapd_eid_vendor_vht(hapd, tailpos);
#endif /* CONFIG_IEEE80211AC */ #endif /* CONFIG_IEEE80211AC */
#ifdef CONFIG_IEEE80211AX
if (hapd->iconf->ieee80211ax) {
tailpos = hostapd_eid_vendor_he_capab(hapd, tailpos);
tailpos = hostapd_eid_vendor_he_operation(hapd, tailpos);
}
#endif /* CONFIG_IEEE80211AX */
/* Wi-Fi Alliance WMM */ /* Wi-Fi Alliance WMM */
tailpos = hostapd_eid_wmm(hapd, tailpos); tailpos = hostapd_eid_wmm(hapd, tailpos);

View file

@ -55,8 +55,8 @@ u8 * hostapd_eid_vht_operation(struct hostapd_data *hapd, u8 *eid);
u8 * hostapd_eid_vendor_vht(struct hostapd_data *hapd, u8 *eid); u8 * hostapd_eid_vendor_vht(struct hostapd_data *hapd, u8 *eid);
u8 * hostapd_eid_wb_chsw_wrapper(struct hostapd_data *hapd, u8 *eid); u8 * hostapd_eid_wb_chsw_wrapper(struct hostapd_data *hapd, u8 *eid);
u8 * hostapd_eid_txpower_envelope(struct hostapd_data *hapd, u8 *eid); u8 * hostapd_eid_txpower_envelope(struct hostapd_data *hapd, u8 *eid);
u8 * hostapd_eid_vendor_he_capab(struct hostapd_data *hapd, u8 *eid); u8 * hostapd_eid_he_capab(struct hostapd_data *hapd, u8 *eid);
u8 * hostapd_eid_vendor_he_operation(struct hostapd_data *hapd, u8 *eid); u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid);
int hostapd_ht_operation_update(struct hostapd_iface *iface); int hostapd_ht_operation_update(struct hostapd_iface *iface);
void ieee802_11_send_sa_query_req(struct hostapd_data *hapd, void ieee802_11_send_sa_query_req(struct hostapd_data *hapd,

View file

@ -10,14 +10,13 @@
#include "utils/common.h" #include "utils/common.h"
#include "common/ieee802_11_defs.h" #include "common/ieee802_11_defs.h"
#include "common/qca-vendor.h"
#include "hostapd.h" #include "hostapd.h"
#include "ap_config.h" #include "ap_config.h"
#include "beacon.h" #include "beacon.h"
#include "ieee802_11.h" #include "ieee802_11.h"
#include "dfs.h" #include "dfs.h"
u8 * hostapd_eid_vendor_he_capab(struct hostapd_data *hapd, u8 *eid) u8 * hostapd_eid_he_capab(struct hostapd_data *hapd, u8 *eid)
{ {
struct ieee80211_he_capabilities *cap; struct ieee80211_he_capabilities *cap;
u8 *pos = eid; u8 *pos = eid;
@ -25,17 +24,10 @@ u8 * hostapd_eid_vendor_he_capab(struct hostapd_data *hapd, u8 *eid)
if (!hapd->iface->current_mode) if (!hapd->iface->current_mode)
return eid; return eid;
/* For now, use a vendor specific element since the P802.11ax draft is *pos++ = WLAN_EID_EXTENSION;
* still subject to changes and the contents of this element may change. *pos++ = 1 + sizeof(struct ieee80211_he_capabilities);
* This can be replaced with the actual element once P802.11ax is *pos++ = WLAN_EID_EXT_HE_CAPABILITIES;
* finalized. */
/* Vendor HE Capabilities element */
*pos++ = WLAN_EID_VENDOR_SPECIFIC;
*pos++ = 4 /* The Vendor OUI, subtype */ +
sizeof(struct ieee80211_he_capabilities);
WPA_PUT_BE32(pos, (OUI_QCA << 8) | QCA_VENDOR_ELEM_HE_CAPAB);
pos += 4;
cap = (struct ieee80211_he_capabilities *) pos; cap = (struct ieee80211_he_capabilities *) pos;
os_memset(cap, 0, sizeof(*cap)); os_memset(cap, 0, sizeof(*cap));
@ -57,7 +49,7 @@ u8 * hostapd_eid_vendor_he_capab(struct hostapd_data *hapd, u8 *eid)
} }
u8 * hostapd_eid_vendor_he_operation(struct hostapd_data *hapd, u8 *eid) u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid)
{ {
struct ieee80211_he_operation *oper; struct ieee80211_he_operation *oper;
u8 *pos = eid; u8 *pos = eid;
@ -65,17 +57,10 @@ u8 * hostapd_eid_vendor_he_operation(struct hostapd_data *hapd, u8 *eid)
if (!hapd->iface->current_mode) if (!hapd->iface->current_mode)
return eid; return eid;
/* For now, use a vendor specific element since the P802.11ax draft is *pos++ = WLAN_EID_EXTENSION;
* still subject to changes and the contents of this element may change. *pos++ = 1 + sizeof(struct ieee80211_he_operation);
* This can be replaced with the actual element once P802.11ax is *pos++ = WLAN_EID_EXT_HE_OPERATION;
* finalized. */
/* Vendor HE Operation element */
*pos++ = WLAN_EID_VENDOR_SPECIFIC;
*pos++ = 4 /* The Vendor OUI, subtype */ +
sizeof(struct ieee80211_he_operation);
WPA_PUT_BE32(pos, (OUI_QCA << 8) | QCA_VENDOR_ELEM_HE_OPER);
pos += 4;
oper = (struct ieee80211_he_operation *) pos; oper = (struct ieee80211_he_operation *) pos;
os_memset(oper, 0, sizeof(*oper)); os_memset(oper, 0, sizeof(*oper));
@ -95,6 +80,8 @@ u8 * hostapd_eid_vendor_he_operation(struct hostapd_data *hapd, u8 *eid)
(hapd->iface->conf->he_op.he_rts_threshold << (hapd->iface->conf->he_op.he_rts_threshold <<
HE_OPERATION_RTS_THRESHOLD_OFFSET); HE_OPERATION_RTS_THRESHOLD_OFFSET);
/* TODO: conditional MaxBSSID Indicator subfield */
pos += sizeof(*oper); pos += sizeof(*oper);
return pos; return pos;

View file

@ -463,6 +463,8 @@
#define WLAN_EID_EXT_FILS_NONCE 13 #define WLAN_EID_EXT_FILS_NONCE 13
#define WLAN_EID_EXT_FUTURE_CHANNEL_GUIDANCE 14 #define WLAN_EID_EXT_FUTURE_CHANNEL_GUIDANCE 14
#define WLAN_EID_EXT_OWE_DH_PARAM 32 #define WLAN_EID_EXT_OWE_DH_PARAM 32
#define WLAN_EID_EXT_HE_CAPABILITIES 35
#define WLAN_EID_EXT_HE_OPERATION 36
/* Action frame categories (IEEE Std 802.11-2016, 9.4.1.11, Table 9-76) */ /* Action frame categories (IEEE Std 802.11-2016, 9.4.1.11, Table 9-76) */
@ -1980,18 +1982,17 @@ enum nr_chan_width {
struct ieee80211_he_capabilities { struct ieee80211_he_capabilities {
u8 he_mac_capab_info[5]; u8 he_mac_capab_info[5];
u8 he_phy_capab_info[9]; u8 he_phy_capab_info[9];
u16 he_txrx_mcs_support; u8 he_txrx_mcs_support[12]; /* TODO: 4, 8, or 12 octets */
/* possibly followed by Tx Rx MCS NSS descriptor */
u8 variable[];
/* PPE Thresholds (optional) */ /* PPE Thresholds (optional) */
} STRUCT_PACKED; } STRUCT_PACKED;
struct ieee80211_he_operation { struct ieee80211_he_operation {
u32 he_oper_params; u32 he_oper_params;
u8 he_mcs_nss_set[3]; u8 he_mcs_nss_set[2];
u8 vht_op_info_chwidth; u8 vht_op_info_chwidth;
u8 vht_op_info_chan_center_freq_seg0_idx; u8 vht_op_info_chan_center_freq_seg0_idx;
u8 vht_op_info_chan_center_freq_seg1_idx; u8 vht_op_info_chan_center_freq_seg1_idx;
/* Followed by conditional MaxBSSID Indicator subfield (u8) */
} STRUCT_PACKED; } STRUCT_PACKED;
/* HE Capabilities Information defines */ /* HE Capabilities Information defines */