Skip to content

Commit e6b1f65

Browse files
committed
wifi: nrf_wifi: Add control pool specific APIs
Memory allocations in HAL are using data pool. These operations are in control plane. Add APIs for allocation/free operations on control pool. Signed-off-by: Ravi Dondaputi <[email protected]>
1 parent 4f7b493 commit e6b1f65

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

drivers/wifi/nrf_wifi/Kconfig.nrfwifi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ config NRF_WIFI_CTRL_HEAP_SIZE
546546

547547
config NRF_WIFI_DATA_HEAP_SIZE
548548
int "Dedicated memory pool for data plane"
549-
default 8000 if NRF70_SCAN_ONLY || NRF70_RADIO_TEST #TODO: Need to optimize this.
549+
default 6000 if NRF70_SCAN_ONLY
550550
default 110000 if !SOC_FAMILY_NORDIC_NRF
551551
default 130000
552552

modules/nrf_wifi/os/shim.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,11 +575,32 @@ static void *zep_shim_llist_node_alloc(void)
575575
return llist_node;
576576
}
577577

578+
static void *zep_shim_ctrl_llist_node_alloc(void)
579+
{
580+
struct zep_shim_llist_node *llist_node = NULL;
581+
582+
llist_node = zep_shim_mem_zalloc(sizeof(*llist_node));
583+
584+
if (!llist_node) {
585+
LOG_ERR("%s: Unable to allocate memory for linked list node", __func__);
586+
return NULL;
587+
}
588+
589+
sys_dnode_init(&llist_node->head);
590+
591+
return llist_node;
592+
}
593+
578594
static void zep_shim_llist_node_free(void *llist_node)
579595
{
580596
zep_shim_data_mem_free(llist_node);
581597
}
582598

599+
static void zep_shim_ctrl_llist_node_free(void *llist_node)
600+
{
601+
zep_shim_mem_free(llist_node);
602+
}
603+
583604
static void *zep_shim_llist_node_data_get(void *llist_node)
584605
{
585606
struct zep_shim_llist_node *zep_llist_node = NULL;
@@ -1071,7 +1092,9 @@ const struct nrf_wifi_osal_ops nrf_wifi_os_zep_ops = {
10711092
.log_err = zep_shim_pr_err,
10721093

10731094
.llist_node_alloc = zep_shim_llist_node_alloc,
1095+
.ctrl_llist_node_alloc = zep_shim_ctrl_llist_node_alloc,
10741096
.llist_node_free = zep_shim_llist_node_free,
1097+
.ctrl_llist_node_free = zep_shim_ctrl_llist_node_free,
10751098
.llist_node_data_get = zep_shim_llist_node_data_get,
10761099
.llist_node_data_set = zep_shim_llist_node_data_set,
10771100

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ manifest:
318318
revision: b84bd7314a239f818e78f6927f5673247816df53
319319
path: modules/bsim_hw_models/nrf_hw_models
320320
- name: nrf_wifi
321-
revision: pull/46/head
321+
revision: eeceee739252cf2d56a5ad9356553d87aae8c57d
322322
path: modules/lib/nrf_wifi
323323
- name: open-amp
324324
revision: f7f4d083c7909a39d86e217376c69b416ec4faf3

0 commit comments

Comments
 (0)