|
44 | 44 | LOG_MODULE_DECLARE(wifi_nrf, CONFIG_WIFI_NRF70_LOG_LEVEL); |
45 | 45 |
|
46 | 46 | struct nrf_wifi_drv_priv_zep rpu_drv_priv_zep; |
| 47 | +extern const struct nrf_wifi_osal_ops nrf_wifi_os_zep_ops; |
47 | 48 |
|
48 | 49 | /* 3 bytes for addreess, 3 bytes for length */ |
49 | 50 | #define MAX_PKT_RAM_TX_ALIGN_OVERHEAD 6 |
@@ -259,7 +260,7 @@ static void nrf_wifi_process_rssi_from_rx(void *vif_ctx, |
259 | 260 |
|
260 | 261 | vif_ctx_zep->rssi = MBM_TO_DBM(signal); |
261 | 262 | vif_ctx_zep->rssi_record_timestamp_us = |
262 | | - nrf_wifi_osal_time_get_curr_us(fmac_dev_ctx->fpriv->opriv); |
| 263 | + nrf_wifi_osal_time_get_curr_us(); |
263 | 264 | } |
264 | 265 | #endif /* CONFIG_NRF70_STA_MODE */ |
265 | 266 |
|
@@ -762,12 +763,22 @@ static int nrf_wifi_drv_main_zep(const struct device *dev) |
762 | 763 | callbk_fns.get_conn_info_callbk_fn = nrf_wifi_supp_event_proc_get_conn_info; |
763 | 764 | #endif /* CONFIG_NRF70_STA_MODE */ |
764 | 765 |
|
| 766 | + /* The OSAL layer needs to be initialized before any other initialization |
| 767 | + * so that other layers (like FW IF,HW IF etc) have access to OS ops |
| 768 | + */ |
| 769 | + nrf_wifi_osal_init(&nrf_wifi_os_zep_ops); |
| 770 | + |
765 | 771 | rpu_drv_priv_zep.fmac_priv = nrf_wifi_fmac_init(&data_config, |
766 | 772 | rx_buf_pools, |
767 | 773 | &callbk_fns); |
768 | 774 | #else /* !CONFIG_NRF70_RADIO_TEST */ |
769 | 775 | enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL; |
770 | 776 |
|
| 777 | + /* The OSAL layer needs to be initialized before any other initialization |
| 778 | + * so that other layers (like FW IF,HW IF etc) have access to OS ops |
| 779 | + */ |
| 780 | + nrf_wifi_osal_init(&nrf_wifi_os_zep_ops); |
| 781 | + |
771 | 782 | rpu_drv_priv_zep.fmac_priv = nrf_wifi_fmac_init_rt(); |
772 | 783 | #endif /* CONFIG_NRF70_RADIO_TEST */ |
773 | 784 |
|
@@ -808,6 +819,7 @@ static int nrf_wifi_drv_main_zep(const struct device *dev) |
808 | 819 | #ifdef CONFIG_NRF70_RADIO_TEST |
809 | 820 | fmac_deinit: |
810 | 821 | nrf_wifi_fmac_deinit_rt(rpu_drv_priv_zep.fmac_priv); |
| 822 | + nrf_wifi_osal_deinit(); |
811 | 823 | #endif /* CONFIG_NRF70_RADIO_TEST */ |
812 | 824 | err: |
813 | 825 | return -1; |
|
0 commit comments