@@ -299,6 +299,9 @@ struct nwb {
299
299
void (* cleanup_cb )();
300
300
unsigned char priority ;
301
301
bool chksum_done ;
302
+ #ifdef CONFIG_NRF70_RAW_DATA_TX
303
+ void * raw_tx_hdr ;
304
+ #endif /* CONFIG_NRF70_RAW_DATA_TX */
302
305
#ifdef CONFIG_NRF_WIFI_ZERO_COPY_TX
303
306
struct net_pkt * pkt ;
304
307
#endif
@@ -424,6 +427,55 @@ static void zep_shim_nbuf_set_chksum_done(void *nbuf, unsigned char chksum_done)
424
427
nwb -> chksum_done = (bool )chksum_done ;
425
428
}
426
429
430
+ #ifdef CONFIG_NRF70_RAW_DATA_TX
431
+ static void * zep_shim_nbuf_set_raw_tx_hdr (void * nbuf , unsigned short raw_hdr_len )
432
+ {
433
+ struct nwb * nwb = (struct nwb * )nbuf ;
434
+
435
+ if (!nwb ) {
436
+ LOG_ERR ("%s: Received network buffer is NULL" , __func__ );
437
+ return NULL ;
438
+ }
439
+
440
+ nwb -> raw_tx_hdr = zep_shim_nbuf_data_get (nwb );
441
+ if (!nwb -> raw_tx_hdr ) {
442
+ LOG_ERR ("%s: Unable to set raw Tx header in network buffer" , __func__ );
443
+ return NULL ;
444
+ }
445
+
446
+ zep_shim_nbuf_data_pull (nwb , raw_hdr_len );
447
+
448
+ return nwb -> raw_tx_hdr ;
449
+ }
450
+
451
+ static void * zep_shim_nbuf_get_raw_tx_hdr (void * nbuf )
452
+ {
453
+ struct nwb * nwb = (struct nwb * )nbuf ;
454
+
455
+ if (!nwb ) {
456
+ LOG_ERR ("%s: Received network buffer is NULL" , __func__ );
457
+ return NULL ;
458
+ }
459
+
460
+ return nwb -> raw_tx_hdr ;
461
+ }
462
+
463
+ static bool zep_shim_nbuf_is_raw_tx (void * nbuf )
464
+ {
465
+ struct nwb * nwb = (struct nwb * )nbuf ;
466
+
467
+ if (!nwb ) {
468
+ LOG_ERR ("%s: Received network buffer is NULL" , __func__ );
469
+ return false;
470
+ }
471
+
472
+ return (nwb -> raw_tx_hdr != NULL );
473
+ }
474
+ #endif /* CONFIG_NRF70_RAW_DATA_TX */
475
+
476
+
477
+
478
+
427
479
#include <zephyr/net/ethernet.h>
428
480
#include <zephyr/net/net_core.h>
429
481
@@ -1216,6 +1268,11 @@ const struct nrf_wifi_osal_ops nrf_wifi_os_zep_ops = {
1216
1268
.nbuf_get_priority = zep_shim_nbuf_get_priority ,
1217
1269
.nbuf_get_chksum_done = zep_shim_nbuf_get_chksum_done ,
1218
1270
.nbuf_set_chksum_done = zep_shim_nbuf_set_chksum_done ,
1271
+ #ifdef CONFIG_NRF70_RAW_DATA_TX
1272
+ .nbuf_set_raw_tx_hdr = zep_shim_nbuf_set_raw_tx_hdr ,
1273
+ .nbuf_get_raw_tx_hdr = zep_shim_nbuf_get_raw_tx_hdr ,
1274
+ .nbuf_is_raw_tx = zep_shim_nbuf_is_raw_tx ,
1275
+ #endif /* CONFIG_NRF70_RAW_DATA_TX */
1219
1276
1220
1277
.tasklet_alloc = zep_shim_work_alloc ,
1221
1278
.tasklet_free = zep_shim_work_free ,
0 commit comments