13
13
#include "system/fmac_api.h"
14
14
#include "common/fmac_util.h"
15
15
16
- struct nrf70_bm_sys_wifi_drv_priv nrf70_bm_priv ;
16
+ struct nrf70_bm_sys_wifi_drv_priv nrf70_bm_sys_priv ;
17
17
extern const struct nrf_wifi_osal_ops nrf_wifi_os_bm_ops ;
18
18
INCBIN (_bin , nrf70_bm_sys_fw , STR (CONFIG_NRF_WIFI_SYS_FW_BIN ));
19
19
@@ -38,7 +38,7 @@ static enum nrf_wifi_status nrf70_bm_sys_get_mac_addr(struct nrf70_bm_sys_wifi_v
38
38
{
39
39
enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL ;
40
40
#ifdef CONFIG_NRF70_OTP_MAC_ADDRESS
41
- void * rpu_ctx = nrf70_bm_priv .rpu_ctx_bm .rpu_ctx ;
41
+ void * rpu_ctx = nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx ;
42
42
#endif /* CONFIG_NRF70_OTP_MAC_ADDRESS */
43
43
unsigned char mac_addr_str [13 ];
44
44
#ifdef CONFIG_NRF70_FIXED_MAC_ADDRESS_ENABLED
@@ -110,7 +110,7 @@ static void reg_change_callbk_fn(void *vif_ctx,
110
110
111
111
NRF70_LOG_DBG ("Regulatory change event received" );
112
112
113
- fmac_dev_ctx = nrf70_bm_priv .rpu_ctx_bm .rpu_ctx ;
113
+ fmac_dev_ctx = nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx ;
114
114
115
115
if (!fmac_dev_ctx ) {
116
116
NRF70_LOG_ERR ("%s: Invalid FMAC device context" , __func__ );
@@ -149,7 +149,7 @@ static void nrf_wifi_event_proc_scan_done_zep(void *vif_ctx,
149
149
{
150
150
enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL ;
151
151
struct nrf70_bm_sys_wifi_vif * vif = vif_ctx ;
152
- void * rpu_ctx = nrf70_bm_priv .rpu_ctx_bm .rpu_ctx ;
152
+ void * rpu_ctx = nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx ;
153
153
NRF70_LOG_DBG ("Scan done event received" );
154
154
155
155
status = nrf_wifi_sys_fmac_scan_res_get (rpu_ctx ,
@@ -274,7 +274,7 @@ static void nrf70_bm_event_get_reg(void *vif_ctx,
274
274
get_reg_event -> nrf_wifi_alpha2 [0 ],
275
275
get_reg_event -> nrf_wifi_alpha2 [1 ]);
276
276
277
- fmac_dev_ctx = nrf70_bm_priv .rpu_ctx_bm .rpu_ctx ;
277
+ fmac_dev_ctx = nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx ;
278
278
279
279
if (fmac_dev_ctx -> alpha2_valid ) {
280
280
NRF70_LOG_ERR ("%s: Unsolicited regulatory get!" , __func__ );
@@ -301,9 +301,9 @@ int nrf70_bm_sys_fmac_init(void)
301
301
struct nrf_wifi_fmac_callbk_fns callbk_fns = { 0 };
302
302
struct nrf_wifi_data_config_params data_config = { 0 };
303
303
struct rx_buf_pool_params rx_buf_pools [MAX_NUM_OF_RX_QUEUES ] = { 0 };
304
- struct nrf70_bm_sys_wifi_vif * vif = & nrf70_bm_priv .rpu_ctx_bm .vifs [0 ];
304
+ struct nrf70_bm_sys_wifi_vif * vif = & nrf70_bm_sys_priv .rpu_ctx_bm .vifs [0 ];
305
305
unsigned int fw_ver = 0 ;
306
- void * rpu_ctx = nrf70_bm_priv .rpu_ctx_bm .rpu_ctx ;
306
+ void * rpu_ctx = nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx ;
307
307
struct nrf_wifi_tx_pwr_ctrl_params tx_pwr_ctrl_params = { 0 };
308
308
/* TODO: Hardcoded to 10 dBm, take as parameter */
309
309
struct nrf_wifi_tx_pwr_ceil_params tx_pwr_ceil_params ;
@@ -336,22 +336,22 @@ int nrf70_bm_sys_fmac_init(void)
336
336
nrf_wifi_osal_init (& nrf_wifi_os_bm_ops );
337
337
338
338
// Initialize the FMAC module
339
- nrf70_bm_priv .fmac_priv = nrf_wifi_sys_fmac_init (& data_config ,
339
+ nrf70_bm_sys_priv .fmac_priv = nrf_wifi_sys_fmac_init (& data_config ,
340
340
rx_buf_pools ,
341
341
& callbk_fns );
342
- if (!nrf70_bm_priv .fmac_priv ) {
342
+ if (!nrf70_bm_sys_priv .fmac_priv ) {
343
343
NRF70_LOG_ERR ("Failed to initialize FMAC module\n" );
344
344
goto err ;
345
345
}
346
346
347
- rpu_ctx = nrf_wifi_sys_fmac_dev_add (nrf70_bm_priv .fmac_priv ,
348
- & nrf70_bm_priv .rpu_ctx_bm );
347
+ rpu_ctx = nrf_wifi_sys_fmac_dev_add (nrf70_bm_sys_priv .fmac_priv ,
348
+ & nrf70_bm_sys_priv .rpu_ctx_bm );
349
349
if (!rpu_ctx ) {
350
350
NRF70_LOG_ERR ("Failed to add device\n" );
351
351
goto deinit ;
352
352
}
353
353
354
- nrf70_bm_priv .rpu_ctx_bm .rpu_ctx = rpu_ctx ;
354
+ nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx = rpu_ctx ;
355
355
356
356
status = nrf70_bm_sys_fw_load (rpu_ctx );
357
357
if (status != NRF_WIFI_STATUS_SUCCESS ) {
@@ -412,8 +412,8 @@ int nrf70_bm_sys_fmac_add_vif_sta(uint8_t *mac_addr)
412
412
enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL ;
413
413
struct nrf_wifi_umac_add_vif_info add_vif_info ;
414
414
struct nrf_wifi_umac_chg_vif_state_info vif_info ;
415
- void * rpu_ctx = nrf70_bm_priv .rpu_ctx_bm .rpu_ctx ;
416
- struct nrf70_bm_sys_wifi_vif * vif = & nrf70_bm_priv .rpu_ctx_bm .vifs [0 ];
415
+ void * rpu_ctx = nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx ;
416
+ struct nrf70_bm_sys_wifi_vif * vif = & nrf70_bm_sys_priv .rpu_ctx_bm .vifs [0 ];
417
417
418
418
if (!rpu_ctx ) {
419
419
NRF70_LOG_ERR ("%s: RPU context is NULL" , __func__ );
@@ -475,8 +475,8 @@ int nrf70_bm_sys_fmac_del_vif_sta(void)
475
475
{
476
476
enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL ;
477
477
struct nrf_wifi_umac_chg_vif_state_info vif_info ;
478
- void * rpu_ctx = nrf70_bm_priv .rpu_ctx_bm .rpu_ctx ;
479
- struct nrf70_bm_sys_wifi_vif * vif = & nrf70_bm_priv .rpu_ctx_bm .vifs [0 ];
478
+ void * rpu_ctx = nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx ;
479
+ struct nrf70_bm_sys_wifi_vif * vif = & nrf70_bm_sys_priv .rpu_ctx_bm .vifs [0 ];
480
480
481
481
if (!rpu_ctx ) {
482
482
NRF70_LOG_ERR ("%s: RPU context is NULL" , __func__ );
@@ -509,7 +509,7 @@ int nrf70_bm_sys_fmac_del_vif_sta(void)
509
509
int nrf70_bm_sys_fmac_get_reg (struct nrf70_bm_regulatory_info * reg_info )
510
510
{
511
511
enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL ;
512
- void * rpu_ctx = nrf70_bm_priv .rpu_ctx_bm .rpu_ctx ;
512
+ void * rpu_ctx = nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx ;
513
513
struct nrf_wifi_fmac_reg_info reg_info_fmac = { 0 };
514
514
struct nrf70_bm_reg_chan_info * tmp_chan_info_out = NULL ;
515
515
struct nrf_wifi_get_reg_chn_info * tmp_chan_info_in = NULL ;
@@ -557,7 +557,7 @@ int nrf70_bm_sys_fmac_get_reg(struct nrf70_bm_regulatory_info *reg_info)
557
557
int nrf70_bm_sys_fmac_set_reg (struct nrf70_bm_regulatory_info * reg_info )
558
558
{
559
559
enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL ;
560
- void * rpu_ctx = nrf70_bm_priv .rpu_ctx_bm .rpu_ctx ;
560
+ void * rpu_ctx = nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx ;
561
561
struct nrf_wifi_fmac_reg_info reg_info_fmac = { 0 };
562
562
563
563
if (!rpu_ctx ) {
@@ -583,21 +583,21 @@ int nrf70_bm_sys_fmac_deinit(void)
583
583
{
584
584
NRF70_LOG_DBG ("Deinitializing FMAC module" );
585
585
586
- if (nrf70_bm_priv .rpu_ctx_bm .rpu_ctx ) {
587
- nrf_wifi_sys_fmac_dev_deinit (nrf70_bm_priv .rpu_ctx_bm .rpu_ctx );
586
+ if (nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx ) {
587
+ nrf_wifi_sys_fmac_dev_deinit (nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx );
588
588
}
589
589
590
- if (nrf70_bm_priv .rpu_ctx_bm .rpu_ctx ) {
591
- nrf_wifi_fmac_dev_rem (nrf70_bm_priv .rpu_ctx_bm .rpu_ctx );
590
+ if (nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx ) {
591
+ nrf_wifi_fmac_dev_rem (nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx );
592
592
}
593
593
594
- if (nrf70_bm_priv .fmac_priv ) {
595
- nrf_wifi_fmac_deinit (nrf70_bm_priv .fmac_priv );
594
+ if (nrf70_bm_sys_priv .fmac_priv ) {
595
+ nrf_wifi_fmac_deinit (nrf70_bm_sys_priv .fmac_priv );
596
596
}
597
597
598
598
nrf_wifi_osal_deinit ();
599
- nrf70_bm_priv .fmac_priv = NULL ;
600
- nrf70_bm_priv .rpu_ctx_bm .rpu_ctx = NULL ;
599
+ nrf70_bm_sys_priv .fmac_priv = NULL ;
600
+ nrf70_bm_sys_priv .rpu_ctx_bm .rpu_ctx = NULL ;
601
601
602
602
NRF70_LOG_DBG ("FMAC module deinitialized" );
603
603
0 commit comments