bugfix(wifi): Fix incorrect SAE-PK advertisement in assoc request

This commit is contained in:
akshat
2025-04-08 14:31:45 +05:30
parent a8128adc92
commit 1b9fe2142d
2 changed files with 10 additions and 6 deletions

View File

@@ -295,6 +295,8 @@ static void wpa_sta_connected_cb(uint8_t *bssid)
static void wpa_sta_disconnected_cb(uint8_t reason_code)
{
struct wpa_sm *sm = &gWpaSm;
switch (reason_code) {
case WIFI_REASON_AUTH_EXPIRE:
case WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA:
@@ -308,7 +310,7 @@ static void wpa_sta_disconnected_cb(uint8_t reason_code)
case WIFI_REASON_INVALID_MDE:
case WIFI_REASON_INVALID_FTE:
wpa_sta_clear_curr_pmksa();
wpa_sm_notify_disassoc(&gWpaSm);
wpa_sm_notify_disassoc(sm);
#if defined(CONFIG_IEEE80211R)
/* clear all ft auth related IEs so that next will be open auth */
wpa_sta_clear_ft_auth_ie();
@@ -321,6 +323,13 @@ static void wpa_sta_disconnected_cb(uint8_t reason_code)
break;
}
sm->rx_replay_counter_set = 0; //init state not intall replay counter value
memset(sm->rx_replay_counter, 0, WPA_REPLAY_COUNTER_LEN);
sm->wpa_ptk_rekey = 0;
pmksa_cache_clear_current(sm);
sm->sae_pk = false;
sm->eapol1_count = 0;
struct wps_sm_funcs *wps_sm_cb = wps_get_wps_sm_cb();
if (wps_sm_cb && wps_sm_cb->wps_sm_notify_deauth) {
wps_sm_cb->wps_sm_notify_deauth();