mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/atwinc15x0: reset device if m2m_wifi_handle_events() fails
Currently when m2m_wifi_handle_events() fails, we end up in a busy loop and the netdev thread becomes unusable. Instead, reset (re-init) the WiFi module if this condition occurs. While not ideal, it's certainly an improvement to the current situation.
This commit is contained in:
parent
2dd59236c8
commit
b27cd86d2b
@ -588,7 +588,10 @@ static void _atwinc15x0_isr(netdev_t *netdev)
|
||||
DEBUG("%s dev=%p\n", __func__, (void *)dev);
|
||||
|
||||
/* handle pending ATWINC15x0 module events */
|
||||
while (m2m_wifi_handle_events(NULL) != M2M_SUCCESS) { }
|
||||
if (m2m_wifi_handle_events(NULL) != M2M_SUCCESS) {
|
||||
DEBUG("%s handle events failed, reset device\n", __func__);
|
||||
_atwinc15x0_init(netdev);
|
||||
}
|
||||
}
|
||||
|
||||
const netdev_driver_t atwinc15x0_netdev_driver = {
|
||||
|
Loading…
Reference in New Issue
Block a user