wifi: handle association failed in driver

Currently, there is no notification from supplicant to
framework when association failure on driver layer.

In this commit we report the association failure with
status code (WLAN_STATUS_UNSPECIFIED_FAILURE) to framework.
Hence, framework can handle association failure on driver.

Bug: 169770508
Test: manually.
      Force driver return association failure and
      check framework is able to handle it.
Change-Id: Id539ede2da7028dbd08d86d62aa5d3329fc48e42
This commit is contained in:
Roger Wang
2020-11-05 18:57:12 +08:00
parent 0dd95e4eec
commit 4c09cc9c46

View File

@@ -3844,6 +3844,8 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
* succeed.
*/
wpas_connection_failed(wpa_s, wpa_s->pending_bssid);
wpa_s->assoc_status_code = WLAN_STATUS_UNSPECIFIED_FAILURE;
wpas_notify_assoc_status_code(wpa_s, wpa_s->pending_bssid, 0);
wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
os_memset(wpa_s->pending_bssid, 0, ETH_ALEN);
return;