Skip to content

Commit

Permalink
Update hal_wifi_rtl87x0c.c
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Jan 5, 2025
1 parent 9b84004 commit 4bb2eeb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/hal/rtl87x0c/hal_wifi_rtl87x0c.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,13 @@ void HAL_ConnectToWiFi(const char* oob_ssid, const char* connect_key, obkStaticI

netif_set_hostname(&xnetif[0], CFG_GetDeviceName());
wifi_reg_event_handler(WIFI_EVENT_DISCONNECT, (rtw_event_handler_t)wifi_dis_hdl, NULL);
//wifi_reg_event_handler(WIFI_EVENT_CONNECT, (rtw_event_handler_t)wifi_con_hdl, NULL);
wifi_reg_event_handler(WIFI_EVENT_STA_GOT_IP, (rtw_event_handler_t)wifi_conned_hdl, NULL);
if (g_bStaticIP) {
wifi_reg_event_handler(WIFI_EVENT_CONNECT, (rtw_event_handler_t)wifi_con_hdl, NULL);
}
else {
// GOT IP won't get called if DHCP is off
wifi_reg_event_handler(WIFI_EVENT_STA_GOT_IP, (rtw_event_handler_t)wifi_conned_hdl, NULL);
}
wifi_reg_event_handler(WIFI_EVENT_CHALLENGE_FAIL, (rtw_event_handler_t)wifi_af_hdl, NULL);

xTaskCreate(
Expand Down

0 comments on commit 4bb2eeb

Please sign in to comment.