OCV: Advertise OCV capability in RSN capabilities (AP)
Set the OCV bit in RSN capabilities (RSNE) based on AP mode configuration. Do the same for OSEN since it follows the RSNE field definitions. Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
This commit is contained in:
parent
ce6829c284
commit
875ab60d73
5 changed files with 23 additions and 1 deletions
|
@ -87,6 +87,10 @@ u8 * hostapd_eid_osen(struct hostapd_data *hapd, u8 *eid)
|
||||||
capab |= WPA_CAPABILITY_MFPR;
|
capab |= WPA_CAPABILITY_MFPR;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211W */
|
#endif /* CONFIG_IEEE80211W */
|
||||||
|
#ifdef CONFIG_OCV
|
||||||
|
if (hapd->conf->ocv)
|
||||||
|
capab |= WPA_CAPABILITY_OCVC;
|
||||||
|
#endif /* CONFIG_OCV */
|
||||||
WPA_PUT_LE16(eid, capab);
|
WPA_PUT_LE16(eid, capab);
|
||||||
eid += 2;
|
eid += 2;
|
||||||
|
|
||||||
|
|
|
@ -192,6 +192,9 @@ struct wpa_auth_config {
|
||||||
int group_mgmt_cipher;
|
int group_mgmt_cipher;
|
||||||
int sae_require_mfp;
|
int sae_require_mfp;
|
||||||
#endif /* CONFIG_IEEE80211W */
|
#endif /* CONFIG_IEEE80211W */
|
||||||
|
#ifdef CONFIG_OCV
|
||||||
|
int ocv; /* Operating Channel Validation */
|
||||||
|
#endif /* CONFIG_OCV */
|
||||||
#ifdef CONFIG_IEEE80211R_AP
|
#ifdef CONFIG_IEEE80211R_AP
|
||||||
u8 ssid[SSID_MAX_LEN];
|
u8 ssid[SSID_MAX_LEN];
|
||||||
size_t ssid_len;
|
size_t ssid_len;
|
||||||
|
|
|
@ -55,6 +55,9 @@ static void hostapd_wpa_auth_conf(struct hostapd_bss_config *conf,
|
||||||
wconf->wmm_enabled = conf->wmm_enabled;
|
wconf->wmm_enabled = conf->wmm_enabled;
|
||||||
wconf->wmm_uapsd = conf->wmm_uapsd;
|
wconf->wmm_uapsd = conf->wmm_uapsd;
|
||||||
wconf->disable_pmksa_caching = conf->disable_pmksa_caching;
|
wconf->disable_pmksa_caching = conf->disable_pmksa_caching;
|
||||||
|
#ifdef CONFIG_OCV
|
||||||
|
wconf->ocv = conf->ocv;
|
||||||
|
#endif /* CONFIG_OCV */
|
||||||
wconf->okc = conf->okc;
|
wconf->okc = conf->okc;
|
||||||
#ifdef CONFIG_IEEE80211W
|
#ifdef CONFIG_IEEE80211W
|
||||||
wconf->ieee80211w = conf->ieee80211w;
|
wconf->ieee80211w = conf->ieee80211w;
|
||||||
|
|
|
@ -293,9 +293,13 @@ int wpa_write_rsn_ie(struct wpa_auth_config *conf, u8 *buf, size_t len,
|
||||||
capab |= WPA_CAPABILITY_MFPR;
|
capab |= WPA_CAPABILITY_MFPR;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211W */
|
#endif /* CONFIG_IEEE80211W */
|
||||||
|
#ifdef CONFIG_OCV
|
||||||
|
if (conf->ocv)
|
||||||
|
capab |= WPA_CAPABILITY_OCVC;
|
||||||
|
#endif /* CONFIG_OCV */
|
||||||
#ifdef CONFIG_RSN_TESTING
|
#ifdef CONFIG_RSN_TESTING
|
||||||
if (rsn_testing)
|
if (rsn_testing)
|
||||||
capab |= BIT(8) | BIT(14) | BIT(15);
|
capab |= BIT(8) | BIT(15);
|
||||||
#endif /* CONFIG_RSN_TESTING */
|
#endif /* CONFIG_RSN_TESTING */
|
||||||
WPA_PUT_LE16(pos, capab);
|
WPA_PUT_LE16(pos, capab);
|
||||||
pos += 2;
|
pos += 2;
|
||||||
|
@ -414,6 +418,10 @@ static u8 * wpa_write_osen(struct wpa_auth_config *conf, u8 *eid)
|
||||||
capab |= WPA_CAPABILITY_MFPR;
|
capab |= WPA_CAPABILITY_MFPR;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211W */
|
#endif /* CONFIG_IEEE80211W */
|
||||||
|
#ifdef CONFIG_OCV
|
||||||
|
if (conf->ocv)
|
||||||
|
capab |= WPA_CAPABILITY_OCVC;
|
||||||
|
#endif /* CONFIG_OCV */
|
||||||
WPA_PUT_LE16(eid, capab);
|
WPA_PUT_LE16(eid, capab);
|
||||||
eid += 2;
|
eid += 2;
|
||||||
|
|
||||||
|
|
|
@ -494,6 +494,10 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
|
||||||
bss->ieee80211w = ssid->ieee80211w;
|
bss->ieee80211w = ssid->ieee80211w;
|
||||||
#endif /* CONFIG_IEEE80211W */
|
#endif /* CONFIG_IEEE80211W */
|
||||||
|
|
||||||
|
#ifdef CONFIG_OCV
|
||||||
|
bss->ocv = ssid->ocv;
|
||||||
|
#endif /* CONFIG_OCV */
|
||||||
|
|
||||||
#ifdef CONFIG_WPS
|
#ifdef CONFIG_WPS
|
||||||
/*
|
/*
|
||||||
* Enable WPS by default for open and WPA/WPA2-Personal network, but
|
* Enable WPS by default for open and WPA/WPA2-Personal network, but
|
||||||
|
|
Loading…
Reference in a new issue