esp32_wifi_adapter.c: Don't hold another spinlock when calling
enter_critical_section, we already hold the global IRQ spinlock. Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
parent
11216257cf
commit
a50d673df7
@ -977,9 +977,9 @@ static uint32_t IRAM_ATTR esp_wifi_int_disable(void *wifi_int_mux)
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
spin_lock((volatile spinlock_t *)wifi_int_mux);
|
||||
#endif
|
||||
/* In SMP mode enter_critical_section already hold the global IRQ spinlock.
|
||||
* We don't need another spinlock, so wifi_int_mux is unused here.
|
||||
*/
|
||||
|
||||
return (uint32_t)flags;
|
||||
}
|
||||
@ -1004,10 +1004,6 @@ static void IRAM_ATTR esp_wifi_int_restore(void *wifi_int_mux, uint32_t tmp)
|
||||
{
|
||||
irqstate_t flags = (irqstate_t)tmp;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
spin_unlock((volatile spinlock_t *)wifi_int_mux);
|
||||
#endif
|
||||
|
||||
leave_critical_section(flags);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user