Skip to content

Commit f7d4778

Browse files
committed
Pull request project-chip#1814: Updating the WiFi SDK to v3.3.0-ifc2
Merge in WMN_TOOLS/matter from update/wifi_sdk_v3_3_0_ifc2 to silabs_slc_1.3 Squashed commit of the following: commit 28fc7b61a96416b365672034a3ca35c90ca38e58 Author: chbansal <chirag.bansal@silabs.com> Date: Mon May 6 23:06:25 2024 +0530 removing the unused apis from the wfx_host_events.h commit e9da48281bcc995dd3e5f3790bf6d1fb77d5bae5 Author: chbansal <chirag.bansal@silabs.com> Date: Mon May 6 23:02:29 2024 +0530 updating the wifi sdk to v3.3.0-ifc2 commit c6a2a56a18b68b858c96de7a6f5030732e26529f Author: chbansal <chirag.bansal@silabs.com> Date: Mon May 6 22:58:18 2024 +0530 upgrading the projects to wifi sdk v3.3.0 ... and 1 more commit
1 parent f4df649 commit f7d4778

File tree

22 files changed

+34
-180
lines changed

22 files changed

+34
-180
lines changed

.gitmodules

+2-2
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@
249249
[submodule "third_party/silabs/wifi_sdk"]
250250
path = third_party/silabs/wifi_sdk
251251
url = ssh://git@stash.silabs.com/redpine/wifi_sdk.git
252-
branch = release/v3.1.4
253-
tag = v3.1.4
252+
branch = release/v3.3.0
253+
tag = v3.3.0-ifc2
254254
platforms = silabs
255255
[submodule "editline"]
256256
path = third_party/editline/repo

examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp

+1-45
Original file line numberDiff line numberDiff line change
@@ -983,48 +983,4 @@ void wfx_dhcp_got_ipv4(uint32_t ip)
983983
wfx_ip_changed_notify(IP_STATUS_SUCCESS);
984984
wfx_rsi.dev_state |= WFX_RSI_ST_STA_READY;
985985
}
986-
#endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */
987-
988-
/********************************************************************************************
989-
* @fn void wfx_rsi_pkt_add_data(void *p, uint8_t *buf, uint16_t len, uint16_t off)
990-
* @brief
991-
* add the data into packet
992-
* @param[in] p:
993-
* @param[in] buf:
994-
* @param[in] len:
995-
* @param[in] off:
996-
* @return
997-
* None
998-
**********************************************************************************************/
999-
void wfx_rsi_pkt_add_data(void * p, uint8_t * buf, uint16_t len, uint16_t off)
1000-
{
1001-
sl_si91x_packet_t * pkt;
1002-
pkt = (sl_si91x_packet_t *) p;
1003-
memcpy(((char *) pkt->data) + off, buf, len);
1004-
}
1005-
1006-
#if !EXP_BOARD
1007-
/********************************************************************************************
1008-
* @fn int32_t wfx_rsi_send_data(void *p, uint16_t len)
1009-
* @brief
1010-
* Driver send a data
1011-
* @param[in] p:
1012-
* @param[in] len:
1013-
* @return
1014-
* None
1015-
**********************************************************************************************/
1016-
int32_t wfx_rsi_send_data(void * p, uint16_t len)
1017-
{
1018-
int32_t status;
1019-
sl_wifi_buffer_t * buffer;
1020-
buffer = (sl_wifi_buffer_t *) p;
1021-
1022-
if (sl_si91x_driver_send_data_packet(SI91X_WLAN_CMD_QUEUE, buffer, RSI_SEND_RAW_DATA_RESPONSE_WAIT_TIME))
1023-
{
1024-
SILABS_LOG("*ERR*EN-RSI:Send fail");
1025-
return ERR_IF;
1026-
}
1027-
return status;
1028-
}
1029-
1030-
#endif
986+
#endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */

pipeline_metadata.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
browserUrl: 'https://stash.silabs.com/projects/WMN_TOOLS/repos/zap'
1818
gitUrl: 'ssh://git@stash.silabs.com/wmn_tools/zap.git'
1919
wifi_sdk:
20-
wifi_sdk_branch: 'v3.1.4'
20+
wifi_sdk_branch: 'release/v3.3.0'
2121
browserUrl: 'https://stash.silabs.com/projects/REDPINE/repos/wifi_sdk'
2222
gitUrl: 'ssh://git@stash.silabs.com/redpine/wifi_sdk.git'
2323
simplicityCommanderPath: '/home/buildengineer/tools/simplicity_commander_linux_x64'

slc/sample-app/dishwasher-app/efr32/dishwasher-app-917-ncp.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
component:
1515
- id: device_init

slc/sample-app/dishwasher-app/siwx917/dishwasher-app-917-soc.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
component:
1515
- id: matter_wstk_leds

slc/sample-app/light-switch-app/siwx917/light-switch-app-917-soc.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
component:
1515

slc/sample-app/lighting-app/efr32/lighting-app-917-ncp.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
component:
1515
- id: device_init

slc/sample-app/lighting-app/siwx917/lighting-app-917-soc.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
component:
1515
- id: matter_wstk_leds

slc/sample-app/lock-app/efr32/lock-app-917-ncp.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
component:
1515
- id: device_init

slc/sample-app/lock-app/siwx917/lock-app-917-soc.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
component:
1515
- id: matter_wstk_leds

slc/sample-app/onoff-plug-app/efr32/onoff-plug-app-917-ncp.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
component:
1515
- id: device_init

slc/sample-app/onoff-plug-app/siwx917/onoff-plug-app-917-soc.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
component:
1515
- id: matter_wstk_leds

slc/sample-app/sensor-app/efr32/sensor-app-917-ncp.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
component:
1515
- id: device_init

slc/sample-app/thermostat/efr32/thermostat-917-ncp.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
component:
1515
- id: device_init

slc/sample-app/thermostat/siwx917/thermostat-917-soc.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
component:
1515
- id: matter_wstk_leds

slc/sample-app/window-app/efr32/window-app-917-ncp.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
provides:
1515
- name: window_app

slc/sample-app/window-app/siwx917/window-app-917-soc.slcp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sdk_extension:
99
- id: matter
1010
version: "2.2.1"
1111
- id: wiseconnect3_sdk
12-
version: "3.1.4"
12+
version: "3.3.0"
1313

1414
provides:
1515
- name: window_app

src/platform/silabs/SiWx917/wifi/ethernetif.cpp

+5-76
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ extern "C" {
3535
#include "sl_wifi_callback_framework.h"
3636
#include "sl_wifi_constants.h"
3737
#include "sl_wifi_types.h"
38+
#include "sl_wifi.h"
3839
#ifdef __cplusplus
3940
}
4041
#endif
@@ -190,84 +191,12 @@ static SemaphoreHandle_t ethout_sem;
190191
******************************************************************************/
191192
static err_t low_level_output(struct netif * netif, struct pbuf * p)
192193
{
193-
sl_wifi_buffer_t * buffer;
194-
sl_si91x_packet_t * packet;
195-
sl_status_t status = SL_STATUS_OK;
196-
void * rsipkt;
197-
struct pbuf * q;
198-
uint16_t framelength = 0;
199-
uint16_t datalength = 0;
200-
201-
#ifdef WIFI_DEBUG_ENABLED
202-
SILABS_LOG("LWIP : low_level_output");
203-
#endif
204-
if (xSemaphoreTake(ethout_sem, portMAX_DELAY) != pdTRUE)
205-
{
206-
return ERR_IF;
207-
}
208-
/* Calculate total packet size */
209-
for (q = p, framelength = 0; q != NULL; q = q->next)
210-
{
211-
framelength += q->len;
212-
}
213-
if (framelength < LWIP_FRAME_ALIGNMENT)
214-
{
215-
framelength = LWIP_FRAME_ALIGNMENT;
216-
}
217-
218-
/* Confirm if packet is allocated */
219-
status = sl_si91x_allocate_command_buffer(&buffer, (void **) &packet, sizeof(sl_si91x_packet_t) + framelength,
220-
SL_WIFI_ALLOCATE_COMMAND_BUFFER_WAIT_TIME_MS);
221-
VERIFY_STATUS_AND_RETURN(status);
222-
if (packet == NULL)
223-
{
224-
SILABS_LOG("EN-RSI:No buf");
225-
xSemaphoreGive(ethout_sem);
226-
return SL_STATUS_ALLOCATION_FAILED;
227-
}
228-
memset(packet->desc, 0, sizeof(packet->desc));
229-
#ifdef WIFI_DEBUG_ENABLED
230-
SILABS_LOG("EN-RSI: Output");
231-
#endif
232-
if ((netif->flags & (NETIF_FLAG_LINK_UP | NETIF_FLAG_UP)) != (NETIF_FLAG_LINK_UP | NETIF_FLAG_UP))
233-
{
234-
SILABS_LOG("EN-RSI:NOT UP");
235-
xSemaphoreGive(ethout_sem);
194+
UNUSED_PARAMETER(netif);
195+
sl_status_t status;
196+
status = sl_wifi_send_raw_data_frame(SL_WIFI_CLIENT_INTERFACE, (uint8_t *)p->payload, p->len);
197+
if (status != SL_STATUS_OK) {
236198
return ERR_IF;
237199
}
238-
#ifdef WIFI_DEBUG_ENABLED
239-
uint8_t * b = (uint8_t *) p->payload;
240-
SILABS_LOG("EN-RSI: Out [%02x:%02x:%02x:%02x:%02x:%02x][%02x:%02x:%02x:%02x:%02x:%02x]type=%02x%02x", b[0], b[1], b[2], b[3],
241-
b[4], b[5], b[6], b[7], b[8], b[9], b[10], b[11], b[12], b[13]);
242-
#endif
243-
/* Generate the packet */
244-
for (q = p, datalength = 0; q != NULL; q = q->next)
245-
{
246-
wfx_rsi_pkt_add_data(packet, (uint8_t *) (q->payload), (uint16_t) q->len, datalength);
247-
datalength += q->len;
248-
}
249-
if (datalength < LWIP_FRAME_ALIGNMENT)
250-
{
251-
/* Add junk data to the end for frame alignment if framelength is less than 60 */
252-
wfx_rsi_pkt_add_data(packet, (uint8_t *) (p->payload), LWIP_FRAME_ALIGNMENT - datalength, datalength);
253-
}
254-
#ifdef WIFI_DEBUG_ENABLED
255-
SILABS_LOG("EN-RSI: Sending %d", framelength);
256-
#endif
257-
packet->length = framelength & 0xFFF;
258-
packet->command = RSI_SEND_RAW_DATA;
259-
if (sl_si91x_driver_send_data_packet(SI91X_WLAN_CMD_QUEUE, buffer, 1000))
260-
{
261-
SILABS_LOG("*ERR*EN-RSI:Send fail");
262-
xSemaphoreGive(ethout_sem);
263-
return ERR_IF;
264-
}
265-
/*
266-
* forward the generated packet to RSI to
267-
* send the data over wifi network
268-
*/
269-
xSemaphoreGive(ethout_sem);
270-
271200
return ERR_OK;
272201
}
273202

src/platform/silabs/SiWx917/wifi/wfx_host_events.h

-8
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,6 @@ void sl_button_on_change(uint8_t btn, uint8_t btnAction);
251251
#endif /* SL_ICD_ENABLED */
252252

253253
void wfx_ipv6_notify(int got_ip);
254-
255-
/* RSI for LWIP */
256-
void wfx_rsi_pkt_add_data(void * p, uint8_t * buf, uint16_t len, uint16_t off);
257-
int32_t wfx_rsi_send_data(void * p, uint16_t len);
258-
sl_status_t sl_si91x_driver_send_data_packet(sl_si91x_queue_type_t queue_type, sl_wifi_buffer_t * buffer, uint32_t wait_time);
259-
sl_status_t sl_si91x_allocate_command_buffer(sl_wifi_buffer_t ** host_buffer, void ** buffer, uint32_t requested_buffer_size,
260-
uint32_t wait_duration_ms);
261-
262254
void wfx_retry_interval_handler(bool is_wifi_disconnection_event, uint16_t retryJoin);
263255

264256
#ifdef __cplusplus

src/platform/silabs/efr32/wifi/ethernetif.cpp

+10-27
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ extern "C" {
4343
#include "sl_wifi_callback_framework.h"
4444
#include "sl_wifi_constants.h"
4545
#include "sl_wifi_types.h"
46+
#include "sl_wifi.h"
4647
#ifdef __cplusplus
4748
}
4849
#endif
@@ -350,12 +351,15 @@ static SemaphoreHandle_t ethout_sem;
350351
static err_t low_level_output(struct netif * netif, struct pbuf * p)
351352
{
352353
#if (SLI_SI91X_MCU_INTERFACE | EXP_BOARD)
353-
sl_wifi_buffer_t * buffer;
354-
sl_si91x_packet_t * packet;
355-
sl_status_t status = SL_STATUS_OK;
354+
UNUSED_PARAMETER(netif);
355+
sl_status_t status;
356+
status = sl_wifi_send_raw_data_frame(SL_WIFI_CLIENT_INTERFACE, (uint8_t *)p->payload, p->len);
357+
if (status != SL_STATUS_OK) {
358+
return ERR_IF;
359+
}
360+
return ERR_OK;
356361
#else
357362
void * packet;
358-
#endif
359363
struct pbuf * q;
360364
uint16_t framelength = 0;
361365
uint16_t datalength = 0;
@@ -384,27 +388,14 @@ static err_t low_level_output(struct netif * netif, struct pbuf * p)
384388
xSemaphoreGive(ethout_sem);
385389
return ERR_IF;
386390
}
387-
/* Confirm if packet is allocated */
388-
#if (SLI_SI91X_MCU_INTERFACE | EXP_BOARD)
389-
status = sl_si91x_allocate_command_buffer(&buffer, (void **) &packet, sizeof(sl_si91x_packet_t) + framelength,
390-
SL_WIFI_ALLOCATE_COMMAND_BUFFER_WAIT_TIME_MS);
391-
VERIFY_STATUS_AND_RETURN(status);
392-
if (packet == NULL)
393-
#else // RS9116
394391
packet = wfx_rsi_alloc_pkt();
395392
if (!packet)
396-
#endif // SLI_SI91X_MCU_INTERFACE
397393
{
398394
SILABS_LOG("EN-RSI:No buf");
399395
xSemaphoreGive(ethout_sem);
400-
#if (SLI_SI91X_MCU_INTERFACE | EXP_BOARD)
401-
return SL_STATUS_ALLOCATION_FAILED;
402-
}
403-
memset(packet->desc, 0, sizeof(packet->desc));
404-
#else // RS9116
405396
return ERR_IF;
406397
}
407-
#endif // SLI_SI91X_MCU_INTERFACE
398+
408399
#ifdef WIFI_DEBUG_ENABLED
409400
uint8_t * b = (uint8_t *) p->payload;
410401
SILABS_LOG("EN-RSI: Out [%02x:%02x:%02x:%02x:%02x:%02x][%02x:%02x:%02x:%02x:%02x:%02x]type=%02x%02x", b[0], b[1], b[2], b[3],
@@ -425,19 +416,10 @@ static err_t low_level_output(struct netif * netif, struct pbuf * p)
425416
SILABS_LOG("EN-RSI: Sending %d", framelength);
426417
#endif
427418

428-
/* forward the generated packet to RSI to
429-
* send the data over wifi network
430-
*/
431-
#if (SLI_SI91X_MCU_INTERFACE | EXP_BOARD)
432-
packet->length = framelength & 0xFFF;
433-
packet->command = RSI_SEND_RAW_DATA;
434-
if (sl_si91x_driver_send_data_packet(SI91X_WLAN_CMD_QUEUE, buffer, 1000))
435-
#else
436419
/* forward the generated packet to RSI to
437420
* send the data over wifi network
438421
*/
439422
if (wfx_rsi_send_data(packet, datalength))
440-
#endif
441423
{
442424
SILABS_LOG("*ERR*EN-RSI:Send fail");
443425
xSemaphoreGive(ethout_sem);
@@ -450,6 +432,7 @@ static err_t low_level_output(struct netif * netif, struct pbuf * p)
450432
xSemaphoreGive(ethout_sem);
451433

452434
return ERR_OK;
435+
#endif // RS9116
453436
}
454437

455438
#if (SLI_SI91X_MCU_INTERFACE | EXP_BOARD)

0 commit comments

Comments
 (0)