mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/install_key_refactor_v4.2' into 'release/v4.2'
esp_wifi: backported some wifi fixes (19472381) See merge request espressif/esp-idf!19385
This commit is contained in:
commit
be26894259
@ -1 +1 @@
|
||||
Subproject commit 2c41e8021e8a9ad3975dea04d20194f58d9f98e5
|
||||
Subproject commit e4d5af0c67a282015c4b933f0b060f89ffa0578e
|
@ -654,7 +654,7 @@ failed:
|
||||
}
|
||||
|
||||
|
||||
int wpa_supplicant_install_ptk(struct wpa_sm *sm)
|
||||
int wpa_supplicant_install_ptk(struct wpa_sm *sm, int set_tx)
|
||||
{
|
||||
int keylen;
|
||||
enum wpa_alg alg;
|
||||
@ -689,7 +689,7 @@ int wpa_supplicant_install_ptk(struct wpa_sm *sm)
|
||||
//now only use keyentry 0 for pairwise key
|
||||
sm->key_entry_valid = 5;
|
||||
|
||||
if (wpa_sm_set_key(&(sm->install_ptk), alg, sm->bssid, 0, 1, (sm->install_ptk).seq, WPA_KEY_RSC_LEN,
|
||||
if (wpa_sm_set_key(&(sm->install_ptk), alg, sm->bssid, 0, set_tx, (sm->install_ptk).seq, WPA_KEY_RSC_LEN,
|
||||
(u8 *) sm->ptk.tk1, keylen,sm->key_entry_valid) < 0) {
|
||||
#ifdef DEBUG_PRINT
|
||||
wpa_printf(MSG_DEBUG, "WPA: Failed to set PTK to the "
|
||||
@ -1271,6 +1271,10 @@ int ieee80211w_set_keys(struct wpa_sm *sm,
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (sm->key_install && sm->key_info & WPA_KEY_INFO_INSTALL) {
|
||||
wpa_supplicant_install_ptk(sm, 0);
|
||||
}
|
||||
|
||||
/*after txover, callback will continue run remain task*/
|
||||
if (wpa_supplicant_send_4_of_4(sm, sm->bssid, key, ver, key_info,
|
||||
NULL, 0, &sm->ptk)) {
|
||||
@ -1289,7 +1293,7 @@ failed:
|
||||
u16 key_info=sm->key_info;
|
||||
|
||||
if (sm->key_install && key_info & WPA_KEY_INFO_INSTALL) {
|
||||
if (wpa_supplicant_install_ptk(sm))
|
||||
if (wpa_supplicant_install_ptk(sm, 2))
|
||||
goto failed;
|
||||
}
|
||||
else if (sm->key_install == false) {
|
||||
|
Loading…
Reference in New Issue
Block a user