@@ -775,7 +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) &&
+ !(iface->drv_flags2 & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_AP) &&
wpa_auth_sta_key_mgmt(sta->wpa_sm) == WPA_KEY_MGMT_OWE &&
elems.owe_dh) {
u8 *npos;
@@ -5111,17 +5111,25 @@ static int wpa_driver_nl80211_set_ap(void *priv,
goto fail;
if ((params->key_mgmt_suites & WPA_KEY_MGMT_PSK) &&
- (drv->capa.flags & WPA_DRIVER_FLAGS2_4WAY_HANDSHAKE_AP_PSK) &&
- params->psk_len &&
- nla_put(msg, NL80211_ATTR_PMK, params->psk_len, params->psk))
- goto fail;
+ (drv->capa.flags2 & WPA_DRIVER_FLAGS2_4WAY_HANDSHAKE_AP_PSK) &&
+ params->psk_len) {
+ if (nla_put(msg, NL80211_ATTR_PMK, params->psk_len, params->psk)) {
+ wpa_printf(MSG_ERROR, "nl80211: Setting PSK failed");
+ goto fail;
+ } else
+ wpa_printf(MSG_DEBUG, "nl80211: Setting PSK for offload");
+ }
if (wpa_key_mgmt_sae(params->key_mgmt_suites) &&
(drv->capa.flags2 & WPA_DRIVER_FLAGS2_SAE_OFFLOAD_AP) &&
- params->sae_password &&
- nla_put(msg, NL80211_ATTR_SAE_PASSWORD,
- os_strlen(params->sae_password), params->sae_password))
- goto fail;
+ params->sae_password) {
+ if (nla_put(msg, NL80211_ATTR_SAE_PASSWORD,
+ os_strlen(params->sae_password), params->sae_password)) {
+ wpa_printf(MSG_ERROR, "nl80211: Setting SAE password failed");
+ goto fail;
+ } else
+ wpa_printf(MSG_DEBUG, "nl80211: SAE password for offload");
+ }
if (params->key_mgmt_suites & WPA_KEY_MGMT_IEEE8021X_NO_WPA &&
(!params->pairwise_ciphers ||
@@ -3376,7 +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) &&
+ !(wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA) &&
(!bssid_known ||
owe_process_assoc_resp(wpa_s->wpa,
wpa_s->valid_links ?
@@ -3617,7 +3617,7 @@ static u8 * wpas_populate_assoc_ies(
#endif /* CONFIG_TESTING_OPTIONS */
if (algs == WPA_AUTH_ALG_OPEN &&
ssid->key_mgmt == WPA_KEY_MGMT_OWE &&
- !(wpa_s->drv_flags & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA)) {
+ !(wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA)) {
struct wpabuf *owe_ie;
u16 group;
Current change fixes reference to the appropriate driver capability flags2. Additional debug prints are added for the purpose of debuggability. Signed-off-by: Vinayak Yadawad <vinayak.yadawad@broadcom.com> --- v1->v2: More bug fixes identified --- src/ap/drv_callbacks.c | 2 +- src/drivers/driver_nl80211.c | 24 ++++++++++++++++-------- wpa_supplicant/events.c | 2 +- wpa_supplicant/wpa_supplicant.c | 2 +- 4 files changed, 19 insertions(+), 11 deletions(-)