fix(wifi): Fix issue of supplicant using wrong parameters to configure bss

- Ensure that wpa_supplicant's state machine registers the requirement for rsnxe
  before deciding to add rsnxe to a assoc request.

Co-authored-by: jgujarathi <jash.gujarathi@espressif.com>
This commit is contained in:
Sarvesh Bodakhe
2024-05-23 14:49:35 +05:30
parent 101161980f
commit ac508b5778
4 changed files with 6 additions and 3 deletions

View File

@@ -2434,6 +2434,11 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher,
if (res < 0)
return -1;
sm->assoc_wpa_ie_len = res;
const u8 *rsnxe;
rsnxe = esp_wifi_sta_get_rsnxe((u8*)bssid);
wpa_sm_set_ap_rsnxe(rsnxe, rsnxe ? (rsnxe[1] + 2) : 0);
res = wpa_gen_rsnxe(sm, assoc_rsnxe, assoc_rsnxe_len);
if (res < 0)
return -1;