mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 01:39:44 +08:00
esp32: apply wifi deadlock fix from esp32s3
cf. https://github.com/apache/nuttx/pull/15445
This commit is contained in:
committed by
Xiang Xiao
parent
7a54488dbb
commit
c954af0de1
@@ -2122,6 +2122,13 @@ static void esp_evt_work_cb(void *arg)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Some of the following logic (eg. esp32_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)
|
||||
@@ -2265,6 +2272,7 @@ static void esp_evt_work_cb(void *arg)
|
||||
}
|
||||
|
||||
esp_wifi_lock(false);
|
||||
net_unlock();
|
||||
|
||||
kmm_free(evt_adpt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user