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@xxxxxxxxxxxx> --- src/drivers/driver_nl80211.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index ac63e6405..bce9220de 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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 || -- 2.32.0
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap