winc1500: WIFI_DISCONNECT request doesn't raise DISCONNECT_RESULT event

Internal flag (w1500_data.connecting) was not being set to false after
connection. Interface raises NET_EVENT_WIFI_CONNECT_RESULT event with
error status instead of NET_EVENT_WIFI_DISCONNECT_RESULT when
disconnection is manually requested (NET_REQUEST_WIFI_DISCONNECT).

Signed-off-by: Diogo Correia <diogo.correia@fraunhofer.pt>
This commit is contained in:
Diogo Correia 2023-08-21 16:06:09 +01:00 committed by Fabio Baltieri
parent 15cbe0f890
commit 21505c2c28

View File

@ -639,6 +639,7 @@ static void handle_wifi_con_state_changed(void *pvMsg)
LOG_DBG("Connected (%u)", pstrWifiState->u8ErrCode);
w1500_data.connected = true;
w1500_data.connecting = false;
wifi_mgmt_raise_connect_result_event(w1500_data.iface, 0);
break;