zephyr/drivers/wifi
Marcin Niestroj 301243ed06 drivers: wifi: esp_at: fix race condition when waiting for 'SEND OK'
This is more or less the flow of AT+CIPSEND:

  RX                         TX
  --                         --
                             AT+CIPSEND=<...>
  OK
  >
                             <data to be sent>
  SEND OK / SEND FAIL

'sem_response' semaphore is released by receiving 'OK'. Then after
receiving '>' (which releases 'sem_tx_ready' semaphore) actual data is
sent. Waiting for 'SEND OK' or 'SEND FAIL' is implemented by waiting on
'sem_response' (the same as for 'OK'), which mean that resetting this
semaphore just after sending all data is racy.

Fix that race condition by resetting 'sem_response' just after receiving
'OK', so that neither 'SEND OK' nor 'SEND FAIL' will appear yet (they
will not be sent as long as we won't send whole payload).

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-07-28 21:08:51 -04:00
..
esp32 driver: wifi: add esp event task name 2021-07-16 18:59:57 -04:00
esp_at drivers: wifi: esp_at: fix race condition when waiting for 'SEND OK' 2021-07-28 21:08:51 -04:00
eswifi drivers: wifi: eswifi: Fix err log & NET_SOCKETS_OFFLOAD=n config 2021-06-17 12:41:03 +02:00
simplelink drivers: wifi: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
winc1500 drivers: wifi: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
CMakeLists.txt drivers: wifi: esp_at: rename driver from esp 2021-05-06 13:21:39 -04:00
Kconfig drivers: wifi: esp_at: rename driver from esp 2021-05-06 13:21:39 -04:00