hostapd: Add support for OWE offload for STA/AP interface
The driver advertising OWE offload support would take care of Diffie-Hellman Parameter element generation and processing part. The driver would be responsible for OWE PMK generation in this case. Avoid the Diffie-Hellman Parameter element handling in wpa_supplicant/hostapd for drivers advertising OWE offload support. This change is applicable only for drivers supporting 4-way handshake offload. Signed-off-by: Vinayak Yadawad <vinayak.yadawad@broadcom.com>
This commit is contained in:
parent
da364180fb
commit
d984c7b298
5 changed files with 19 additions and 1 deletions
|
@ -260,6 +260,9 @@ int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
|
|||
u16 reason = WLAN_REASON_UNSPECIFIED;
|
||||
int status = WLAN_STATUS_SUCCESS;
|
||||
const u8 *p2p_dev_addr = NULL;
|
||||
#ifdef CONFIG_OWE
|
||||
struct hostapd_iface *iface = hapd->iface;
|
||||
#endif /* CONFIG_OWE */
|
||||
|
||||
if (addr == NULL) {
|
||||
/*
|
||||
|
@ -772,6 +775,7 @@ skip_wpa_check:
|
|||
|
||||
#ifdef CONFIG_OWE
|
||||
if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE) &&
|
||||
!(iface->drv_flags & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_AP) &&
|
||||
wpa_auth_sta_key_mgmt(sta->wpa_sm) == WPA_KEY_MGMT_OWE &&
|
||||
elems.owe_dh) {
|
||||
u8 *npos;
|
||||
|
|
|
@ -2296,6 +2296,10 @@ struct wpa_driver_capa {
|
|||
#define WPA_DRIVER_FLAGS2_SAE_OFFLOAD_STA 0x0000000000010000ULL
|
||||
/** Driver support AP_PSK authentication offload */
|
||||
#define WPA_DRIVER_FLAGS2_4WAY_HANDSHAKE_AP_PSK 0x0000000000020000ULL
|
||||
/** Driver supports OWE STA offload */
|
||||
#define WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA 0x0000000000040000ULL
|
||||
/** Driver supports OWE AP offload */
|
||||
#define WPA_DRIVER_FLAGS2_OWE_OFFLOAD_AP 0x0000000000080000ULL
|
||||
u64 flags2;
|
||||
|
||||
#define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \
|
||||
|
|
|
@ -709,6 +709,14 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info,
|
|||
if (ext_feature_isset(ext_features, len,
|
||||
NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK))
|
||||
capa->flags2 |= WPA_DRIVER_FLAGS2_4WAY_HANDSHAKE_AP_PSK;
|
||||
|
||||
if (ext_feature_isset(ext_features, len,
|
||||
NL80211_EXT_FEATURE_OWE_OFFLOAD))
|
||||
capa->flags2 |= WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA;
|
||||
|
||||
if (ext_feature_isset(ext_features, len,
|
||||
NL80211_EXT_FEATURE_OWE_OFFLOAD_AP))
|
||||
capa->flags2 |= WPA_DRIVER_FLAGS2_OWE_OFFLOAD_AP;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3376,6 +3376,7 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
|
|||
|
||||
#ifdef CONFIG_OWE
|
||||
if (wpa_s->key_mgmt == WPA_KEY_MGMT_OWE &&
|
||||
!(wpa_s->drv_flags & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA) &&
|
||||
(!bssid_known ||
|
||||
owe_process_assoc_resp(wpa_s->wpa,
|
||||
wpa_s->valid_links ?
|
||||
|
|
|
@ -3616,7 +3616,8 @@ static u8 * wpas_populate_assoc_ies(
|
|||
} else
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
if (algs == WPA_AUTH_ALG_OPEN &&
|
||||
ssid->key_mgmt == WPA_KEY_MGMT_OWE) {
|
||||
ssid->key_mgmt == WPA_KEY_MGMT_OWE &&
|
||||
!(wpa_s->drv_flags & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA)) {
|
||||
struct wpabuf *owe_ie;
|
||||
u16 group;
|
||||
|
||||
|
|
Loading…
Reference in a new issue