@@ -45,6 +45,8 @@ extern "C" {
45
45
#include " netif/etharp.h"
46
46
#include " silabs_utils.h"
47
47
48
+ #include < lib/support/logging/CHIPLogging.h>
49
+
48
50
StaticSemaphore_t xEthernetIfSemaBuffer;
49
51
50
52
/* ****************************************************************************
@@ -130,13 +132,14 @@ static void low_level_input(struct netif * netif, uint8_t * b, uint16_t len)
130
132
(memcmp (netif->hwaddr , dst_mac, netif->hwaddr_len ) != 0 ))
131
133
{
132
134
#ifdef WIFI_DEBUG_ENABLED
133
- SILABS_LOG (" %s: DROP, [%02x:%02x:%02x:%02x:%02x:%02x]<-[%02x:%02x:%02x:%02x:%02x:%02x] type=%02x%02x" , __func__,
135
+ ChipLogProgress (DeviceLayer, " %s: DROP, [%02x:%02x:%02x:%02x:%02x:%02x]<-[%02x:%02x:%02x:%02x:%02x:%02x] type=%02x%02x" ,
136
+ __func__,
134
137
135
- dst_mac[0 ], dst_mac[1 ], dst_mac[2 ], dst_mac[3 ], dst_mac[4 ], dst_mac[5 ],
138
+ dst_mac[0 ], dst_mac[1 ], dst_mac[2 ], dst_mac[3 ], dst_mac[4 ], dst_mac[5 ],
136
139
137
- src_mac[0 ], src_mac[1 ], src_mac[2 ], src_mac[3 ], src_mac[4 ], src_mac[5 ],
140
+ src_mac[0 ], src_mac[1 ], src_mac[2 ], src_mac[3 ], src_mac[4 ], src_mac[5 ],
138
141
139
- b[12 ], b[13 ]);
142
+ b[12 ], b[13 ]);
140
143
#endif
141
144
return ;
142
145
}
@@ -152,14 +155,15 @@ static void low_level_input(struct netif * netif, uint8_t * b, uint16_t len)
152
155
bufferoffset += q->len ;
153
156
}
154
157
#ifdef WIFI_DEBUG_ENABLED
155
- SILABS_LOG (" %s: ACCEPT %d, [%02x:%02x:%02x:%02x:%02x:%02x]<-[%02x:%02x:%02x:%02x:%02x:%02x] type=%02x%02x" , __func__,
156
- bufferoffset,
158
+ ChipLogProgress (DeviceLayer,
159
+ " %s: ACCEPT %d, [%02x:%02x:%02x:%02x:%02x:%02x]<-[%02x:%02x:%02x:%02x:%02x:%02x] type=%02x%02x" , __func__,
160
+ bufferoffset,
157
161
158
- dst_mac[0 ], dst_mac[1 ], dst_mac[2 ], dst_mac[3 ], dst_mac[4 ], dst_mac[5 ],
162
+ dst_mac[0 ], dst_mac[1 ], dst_mac[2 ], dst_mac[3 ], dst_mac[4 ], dst_mac[5 ],
159
163
160
- src_mac[0 ], src_mac[1 ], src_mac[2 ], src_mac[3 ], src_mac[4 ], src_mac[5 ],
164
+ src_mac[0 ], src_mac[1 ], src_mac[2 ], src_mac[3 ], src_mac[4 ], src_mac[5 ],
161
165
162
- b[12 ], b[13 ]);
166
+ b[12 ], b[13 ]);
163
167
#endif
164
168
165
169
if (netif->input (p, netif) != ERR_OK)
@@ -199,7 +203,7 @@ static err_t low_level_output(struct netif * netif, struct pbuf * p)
199
203
uint16_t datalength = 0 ;
200
204
201
205
#ifdef WIFI_DEBUG_ENABLED
202
- SILABS_LOG ( " LWIP : low_level_output" );
206
+ ChipLogProgress (DeviceLayer, " LWIP : low_level_output" );
203
207
#endif
204
208
if (xSemaphoreTake (ethout_sem, portMAX_DELAY) != pdTRUE)
205
209
{
@@ -221,24 +225,24 @@ static err_t low_level_output(struct netif * netif, struct pbuf * p)
221
225
VERIFY_STATUS_AND_RETURN (status);
222
226
if (packet == NULL )
223
227
{
224
- SILABS_LOG ( " EN-RSI:No buf" );
228
+ ChipLogProgress (DeviceLayer, " EN-RSI:No buf" );
225
229
xSemaphoreGive (ethout_sem);
226
230
return SL_STATUS_ALLOCATION_FAILED;
227
231
}
228
232
memset (packet->desc , 0 , sizeof (packet->desc ));
229
233
#ifdef WIFI_DEBUG_ENABLED
230
- SILABS_LOG ( " EN-RSI: Output" );
234
+ ChipLogProgress (DeviceLayer, " EN-RSI: Output" );
231
235
#endif
232
236
if ((netif->flags & (NETIF_FLAG_LINK_UP | NETIF_FLAG_UP)) != (NETIF_FLAG_LINK_UP | NETIF_FLAG_UP))
233
237
{
234
- SILABS_LOG ( " EN-RSI:NOT UP" );
238
+ ChipLogProgress (DeviceLayer, " EN-RSI:NOT UP" );
235
239
xSemaphoreGive (ethout_sem);
236
240
return ERR_IF;
237
241
}
238
242
#ifdef WIFI_DEBUG_ENABLED
239
243
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 ]);
244
+ ChipLogProgress (DeviceLayer, " EN-RSI: Out [%02x:%02x:%02x:%02x:%02x:%02x][%02x:%02x:%02x:%02x:%02x:%02x]type=%02x%02x" , b[0 ],
245
+ b[ 1 ], b[ 2 ], b[ 3 ], b[4 ], b[5 ], b[6 ], b[7 ], b[8 ], b[9 ], b[10 ], b[11 ], b[12 ], b[13 ]);
242
246
#endif
243
247
/* Generate the packet */
244
248
for (q = p, datalength = 0 ; q != NULL ; q = q->next )
@@ -252,13 +256,13 @@ static err_t low_level_output(struct netif * netif, struct pbuf * p)
252
256
wfx_rsi_pkt_add_data (packet, (uint8_t *) (p->payload ), LWIP_FRAME_ALIGNMENT - datalength, datalength);
253
257
}
254
258
#ifdef WIFI_DEBUG_ENABLED
255
- SILABS_LOG ( " EN-RSI: Sending %d" , framelength);
259
+ ChipLogProgress (DeviceLayer, " EN-RSI: Sending %d" , framelength);
256
260
#endif
257
261
packet->length = framelength & 0xFFF ;
258
262
packet->command = RSI_SEND_RAW_DATA;
259
263
if (sl_si91x_driver_send_data_packet (SI91X_WLAN_CMD_QUEUE, buffer, 1000 ))
260
264
{
261
- SILABS_LOG ( " *ERR*EN-RSI:Send fail" );
265
+ ChipLogProgress (DeviceLayer, " *ERR*EN-RSI:Send fail" );
262
266
xSemaphoreGive (ethout_sem);
263
267
return ERR_IF;
264
268
}
0 commit comments