mbed-os/features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_WHD/interface
Arun S 9b87551d40 Remove ethernet interface logic for SoftAP and STA
Issue: The problem is that there is a race condition introduced in that the LWIP thread is relying on the
interface as it is taken down by a application thread while calling disconnect.
In disconnect api called from application context, whd_emac_wifi_link_state_changed() will refer to netif interface
structure in its callback api netif_link_irq(netif). This netif will be cleared by remove_etherent_interface().
whd_emac_wifi_link_state_changed will post message to tcpip_thread. tcpip_thread will process the message and
call the callback api netif_link_irq(netif)
Calling sequence is whd_emac_wifi_link_state_changed -> remove_etherent_interface(). Hence there is a timing issue
that netif might be cleared first before tcpip thread process the message netif_link_irq(netif)

Fix: remove_etherent_interface() will post message to tcpip thread and tcpip:
thread process the message delete_interface()
which will actually remove the inferface from the netif_list.
Calling sequence is whd_emac_wifi_link_state_changed() message post -> remove_etherent_interface() message post.
message processing order netif_link_irq(netif) -> delete_interface().
Since both the processing is handled in single thread, processing of message is handled sequentially.
2020-04-21 22:15:25 +05:30
..
CyDhcpServer.cpp Move WHD from being a Target to being a Component 2019-11-11 15:12:02 -08:00
CyDhcpServer.h Move WHD from being a Target to being a Component 2019-11-11 15:12:02 -08:00
WhdAccessPoint.cpp Move WHD from being a Target to being a Component 2019-11-11 15:12:02 -08:00
WhdAccessPoint.h Move WHD from being a Target to being a Component 2019-11-11 15:12:02 -08:00
WhdSTAInterface.cpp Remove ethernet interface logic for SoftAP and STA 2020-04-21 22:15:25 +05:30
WhdSTAInterface.h Cypress Target update to support Manufacturing Test. (#11868) 2019-11-21 10:12:35 +01:00
WhdSoftAPInterface.cpp Remove ethernet interface logic for SoftAP and STA 2020-04-21 22:15:25 +05:30
WhdSoftAPInterface.h Move WHD from being a Target to being a Component 2019-11-11 15:12:02 -08:00
emac_eapol.h Move WHD from being a Target to being a Component 2019-11-11 15:12:02 -08:00
whd_emac.cpp Cypress Target update to support Manufacturing Test. (#11868) 2019-11-21 10:12:35 +01:00
whd_emac.h Move WHD from being a Target to being a Component 2019-11-11 15:12:02 -08:00
whd_interface.cpp Move WHD from being a Target to being a Component 2019-11-11 15:12:02 -08:00
whd_interface.h Move WHD from being a Target to being a Component 2019-11-11 15:12:02 -08:00