@@ -205,11 +205,7 @@ static void wfx_rsi_join_cb(uint16_t status, const uint8_t * buf, const uint16_t
205
205
* Join was complete - Do the DHCP
206
206
*/
207
207
WFX_RSI_LOG ("%s: join completed." , __func__ );
208
- #ifdef RS911X_SOCKETS
209
- xEventGroupSetBits (wfx_rsi .events , WFX_EVT_STA_DO_DHCP );
210
- #else
211
208
xEventGroupSetBits (wfx_rsi .events , WFX_EVT_STA_CONN );
212
- #endif
213
209
wfx_rsi .join_retries = 0 ;
214
210
retryInterval = WLAN_MIN_RETRY_TIMER_MS ;
215
211
if (is_wifi_disconnection_event )
@@ -235,34 +231,7 @@ static void wfx_rsi_join_fail_cb(uint16_t status, uint8_t * buf, uint32_t len)
235
231
is_wifi_disconnection_event = true;
236
232
xEventGroupSetBits (wfx_rsi .events , WFX_EVT_STA_START_JOIN );
237
233
}
238
- #ifdef RS911X_SOCKETS
239
-
240
- /******************************************************************
241
- * @fn wfx_rsi_ipchange_cb(uint16_t status, uint8_t *buf, uint32_t len)
242
- * @brief
243
- * DHCP should end up here
244
- * @param[in] status:
245
- * @param[in] buf:
246
- * @param[in] len:
247
- * @return
248
- * None
249
- *********************************************************************/
250
- static void wfx_rsi_ipchange_cb (uint16_t status , uint8_t * buf , uint32_t len )
251
- {
252
- WFX_RSI_LOG ("%s: status: %02x" , __func__ , status );
253
- if (status != RSI_SUCCESS )
254
- {
255
- /* Restart DHCP? */
256
- xEventGroupSetBits (wfx_rsi .events , WFX_EVT_STA_DO_DHCP );
257
- }
258
- else
259
- {
260
- wfx_rsi .dev_state |= WFX_RSI_ST_STA_DHCP_DONE ;
261
- xEventGroupSetBits (wfx_rsi .events , WFX_EVT_STA_DHCP_DONE );
262
- }
263
- }
264
234
265
- #else
266
235
/*************************************************************************************
267
236
* @fn wfx_rsi_wlan_pkt_cb(uint16_t status, uint8_t *buf, uint32_t len)
268
237
* @brief
@@ -282,7 +251,6 @@ static void wfx_rsi_wlan_pkt_cb(uint16_t status, uint8_t * buf, uint32_t len)
282
251
}
283
252
wfx_host_received_sta_frame_cb (buf , len );
284
253
}
285
- #endif /* !Socket support */
286
254
287
255
/*************************************************************************************
288
256
* @fn static int32_t wfx_rsi_init(void)
@@ -357,15 +325,11 @@ static int32_t wfx_rsi_init(void)
357
325
WFX_RSI_LOG ("%s: RSI callback register join failed with status: %02x" , __func__ , status );
358
326
return status ;
359
327
}
360
- #ifdef RS911X_SOCKETS
361
- (void ) rsi_wlan_register_callbacks (RSI_IP_CHANGE_NOTIFY_CB , wfx_rsi_ipchange_cb );
362
- #else
363
328
if ((status = rsi_wlan_register_callbacks (RSI_WLAN_DATA_RECEIVE_NOTIFY_CB , wfx_rsi_wlan_pkt_cb )) != RSI_SUCCESS )
364
329
{
365
330
WFX_RSI_LOG ("%s: RSI callback register data-notify failed with status: %02x" , __func__ , status );
366
331
return status ;
367
332
}
368
- #endif
369
333
wfx_rsi .dev_state |= WFX_RSI_ST_DEV_READY ;
370
334
rsi_semaphore_post (& sl_rs_ble_init_sem );
371
335
WFX_RSI_LOG ("%s: RSI: OK" , __func__ );
@@ -538,22 +502,18 @@ void wfx_rsi_task(void * arg)
538
502
{
539
503
EventBits_t flags ;
540
504
int32_t status = 0 ;
541
- #ifndef RS911X_SOCKETS
542
505
TickType_t last_dhcp_poll , now ;
543
506
struct netif * sta_netif ;
544
- #endif
545
507
(void ) arg ;
546
508
uint32_t rsi_status = wfx_rsi_init ();
547
509
if (rsi_status != RSI_SUCCESS )
548
510
{
549
511
WFX_RSI_LOG ("%s: error: wfx_rsi_init with status: %02x" , __func__ , rsi_status );
550
512
return ;
551
513
}
552
- #ifndef RS911X_SOCKETS
553
514
wfx_lwip_start ();
554
515
last_dhcp_poll = xTaskGetTickCount ();
555
516
sta_netif = wfx_get_netif (SL_WFX_STA_INTERFACE );
556
- #endif
557
517
wfx_started_notify ();
558
518
559
519
WFX_RSI_LOG ("%s: starting event wait" , __func__ );
@@ -566,9 +526,6 @@ void wfx_rsi_task(void * arg)
566
526
*/
567
527
flags = xEventGroupWaitBits (wfx_rsi .events ,
568
528
WFX_EVT_STA_CONN | WFX_EVT_STA_DISCONN | WFX_EVT_STA_START_JOIN
569
- #ifdef RS911X_SOCKETS
570
- | WFX_EVT_STA_DO_DHCP | WFX_EVT_STA_DHCP_DONE
571
- #endif /* RS911X_SOCKETS */
572
529
#ifdef SL_WFX_CONFIG_SOFTAP
573
530
| WFX_EVT_AP_START | WFX_EVT_AP_STOP
574
531
#endif /* SL_WFX_CONFIG_SOFTAP */
@@ -584,20 +541,6 @@ void wfx_rsi_task(void * arg)
584
541
{
585
542
WFX_RSI_LOG ("%s: wait event encountered: %x" , __func__ , flags );
586
543
}
587
- #ifdef RS911X_SOCKETS
588
- if (flags & WFX_EVT_STA_DO_DHCP )
589
- {
590
- /*
591
- * Do DHCP -
592
- */
593
- if ((status = rsi_config_ipaddress (RSI_IP_VERSION_4 , RSI_DHCP | RSI_DHCP_UNICAST_OFFER , NULL , NULL , NULL ,
594
- & wfx_rsi .ip4_addr [0 ], IP_CONF_RSP_BUFF_LENGTH_4 , STATION )) != RSI_SUCCESS )
595
- {
596
- /* We should try this again.. (perhaps sleep) */
597
- /* TODO - Figure out what to do here */
598
- }
599
- }
600
- #else /* !RS911X_SOCKET - using LWIP */
601
544
/*
602
545
* Let's handle DHCP polling here
603
546
*/
@@ -639,7 +582,6 @@ void wfx_rsi_task(void * arg)
639
582
last_dhcp_poll = now ;
640
583
}
641
584
}
642
- #endif /* RS911X_SOCKETS */
643
585
if (flags & WFX_EVT_STA_START_JOIN )
644
586
{
645
587
// saving the AP related info
@@ -654,14 +596,12 @@ void wfx_rsi_task(void * arg)
654
596
*/
655
597
WFX_RSI_LOG ("%s: starting LwIP STA" , __func__ );
656
598
wfx_rsi .dev_state |= WFX_RSI_ST_STA_CONNECTED ;
657
- #ifndef RS911X_SOCKETS
658
599
hasNotifiedWifiConnectivity = false;
659
600
#if (CHIP_DEVICE_CONFIG_ENABLE_IPV4 )
660
601
hasNotifiedIPV4 = false;
661
602
#endif // CHIP_DEVICE_CONFIG_ENABLE_IPV4
662
603
hasNotifiedIPV6 = false;
663
604
wfx_lwip_set_sta_link_up ();
664
- #endif /* !RS911X_SOCKETS */
665
605
/* We need to get AP Mac - TODO */
666
606
// Uncomment once the hook into MATTER is moved to IP connectivity instead
667
607
// of AP connectivity. wfx_connected_notify(0, &wfx_rsi.ap_mac); // This
@@ -673,7 +613,6 @@ void wfx_rsi_task(void * arg)
673
613
~(WFX_RSI_ST_STA_READY | WFX_RSI_ST_STA_CONNECTING | WFX_RSI_ST_STA_CONNECTED | WFX_RSI_ST_STA_DHCP_DONE );
674
614
WFX_RSI_LOG ("%s: disconnect notify" , __func__ );
675
615
/* TODO: Implement disconnect notify */
676
- #ifndef RS911X_SOCKETS
677
616
wfx_lwip_set_sta_link_down (); // Internally dhcpclient_poll(netif) ->
678
617
// wfx_ip_changed_notify(0) for IPV4
679
618
#if (CHIP_DEVICE_CONFIG_ENABLE_IPV4 )
@@ -683,7 +622,6 @@ void wfx_rsi_task(void * arg)
683
622
wfx_ipv6_notify (GET_IPV6_FAIL );
684
623
hasNotifiedIPV6 = false;
685
624
hasNotifiedWifiConnectivity = false;
686
- #endif /* !RS911X_SOCKETS */
687
625
}
688
626
#ifdef SL_WFX_CONFIG_SCAN
689
627
if (flags & WFX_EVT_SCAN )
0 commit comments