Send the status code from the AP authentication response instead of
sending the hardcoded WLAN_STATUS_UNSPECIFIED_FAILURE when the external
SAE authentication failure is due to an explicit rejection by the AP.
This will allow the driver to indicate the correct status in connect
response.
For example, an AP can send WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA in
SAE authentication response. With this change the driver gets the real
status for the SAE authentication failure and it can fill the correct
status in the connect response event.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
" auth_type=%u auth_transaction=%u status_code=%u",
MAC2STR(bssid), WLAN_AUTH_SAE,
auth_transaction, status_code);
- return -1;
+ return -2;
}
if (auth_transaction == 1) {
if (res < 0) {
/* Notify failure to the driver */
sme_send_external_auth_status(
- wpa_s, WLAN_STATUS_UNSPECIFIED_FAILURE);
+ wpa_s,
+ res == -2 ?
+ le_to_host16(header->u.auth.status_code) :
+ WLAN_STATUS_UNSPECIFIED_FAILURE);
return;
}
if (res != 1)