Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mirror a wifi deadlock fix to espressif variants #15532

Merged
merged 5 commits into from
Jan 14, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
esp32s2: apply wifi deadlock fix from esp32s3
cf. #15445
yamt committed Jan 14, 2025
commit f22b3e17daf82b545590f3cb9e9ce63bd9eaf3cc
8 changes: 8 additions & 0 deletions arch/xtensa/src/esp32s2/esp32s2_wifi_adapter.c
Original file line number Diff line number Diff line change
@@ -2081,6 +2081,13 @@ static void esp_evt_work_cb(void *arg)
break;
}

/* Some of the following logic (eg. esp_wlan_sta_set_linkstatus)
* can take net_lock(). To maintain the consistent locking order,
* we take net_lock() here before taking esp_wifi_lock. Note that
* net_lock() is a recursive lock.
*/

net_lock();
esp_wifi_lock(true);

switch (evt_adpt->id)
@@ -2203,6 +2210,7 @@ static void esp_evt_work_cb(void *arg)
}

esp_wifi_lock(false);
net_unlock();

kmm_free(evt_adpt);
}