SAE: Advertise Extended RSN Capabilities when H2E is enabled
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
293a01f3b3
commit
3134bb13a8
2 changed files with 26 additions and 0 deletions
|
@ -267,6 +267,7 @@ struct ft_remote_seq {
|
|||
|
||||
int wpa_write_rsn_ie(struct wpa_auth_config *conf, u8 *buf, size_t len,
|
||||
const u8 *pmkid);
|
||||
int wpa_write_rsnxe(struct wpa_auth_config *conf, u8 *buf, size_t len);
|
||||
void wpa_auth_logger(struct wpa_authenticator *wpa_auth, const u8 *addr,
|
||||
logger_level level, const char *txt);
|
||||
void wpa_auth_vlogger(struct wpa_authenticator *wpa_auth, const u8 *addr,
|
||||
|
|
|
@ -372,6 +372,26 @@ int wpa_write_rsn_ie(struct wpa_auth_config *conf, u8 *buf, size_t len,
|
|||
}
|
||||
|
||||
|
||||
int wpa_write_rsnxe(struct wpa_auth_config *conf, u8 *buf, size_t len)
|
||||
{
|
||||
u8 *pos = buf;
|
||||
|
||||
if (conf->sae_pwe != 1 && conf->sae_pwe != 2)
|
||||
return 0; /* no supported extended RSN capabilities */
|
||||
|
||||
if (len < 3)
|
||||
return -1;
|
||||
|
||||
*pos++ = WLAN_EID_RSNX;
|
||||
*pos++ = 1;
|
||||
/* bits 0-3 = 0 since only one octet of Extended RSN Capabilities is
|
||||
* used for now */
|
||||
*pos++ = BIT(WLAN_RSNX_CAPAB_SAE_H2E);
|
||||
|
||||
return pos - buf;
|
||||
}
|
||||
|
||||
|
||||
static u8 * wpa_write_osen(struct wpa_auth_config *conf, u8 *eid)
|
||||
{
|
||||
u8 *len;
|
||||
|
@ -456,6 +476,11 @@ int wpa_auth_gen_wpa_ie(struct wpa_authenticator *wpa_auth)
|
|||
if (res < 0)
|
||||
return res;
|
||||
pos += res;
|
||||
res = wpa_write_rsnxe(&wpa_auth->conf, pos,
|
||||
buf + sizeof(buf) - pos);
|
||||
if (res < 0)
|
||||
return res;
|
||||
pos += res;
|
||||
}
|
||||
#ifdef CONFIG_IEEE80211R_AP
|
||||
if (wpa_key_mgmt_ft(wpa_auth->conf.wpa_key_mgmt)) {
|
||||
|
|
Loading…
Reference in a new issue