mirror of
https://github.com/apache/nuttx.git
synced 2026-08-08 05:57:16 +00:00
esp32c3: apply wifi deadlock fix from esp32s3
cf. https://github.com/apache/nuttx/pull/15445
This commit is contained in:
parent
847c1a6151
commit
93dbdd4a62
1 changed files with 8 additions and 0 deletions
|
|
@ -2576,6 +2576,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)
|
||||
|
|
@ -2697,6 +2704,7 @@ static void esp_evt_work_cb(void *arg)
|
|||
}
|
||||
|
||||
esp_wifi_lock(false);
|
||||
net_unlock();
|
||||
|
||||
kmm_free(evt_adpt);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue