@@ -384,8 +384,13 @@ enum nrf_wifi_status nrf_wifi_sys_fmac_dev_init(struct nrf_wifi_fmac_dev_ctx *fm
384384{
385385 enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL ;
386386#ifndef NRF71_ON_IPC
387+ #ifdef WIFI_NRF71
388+ struct nrf_wifi_phy_rf_params phy_rf_params = { 0 };
389+ int ret = -1 ;
390+ #else /* WIFI_NRF71 */
387391 struct nrf_wifi_fmac_otp_info otp_info ;
388392 struct nrf_wifi_phy_rf_params phy_rf_params ;
393+ #endif /* !WIFI_NRF71 */
389394#endif /* !NRF71_ON_IPC */
390395
391396 if (!fmac_dev_ctx ) {
@@ -414,6 +419,21 @@ enum nrf_wifi_status nrf_wifi_sys_fmac_dev_init(struct nrf_wifi_fmac_dev_ctx *fm
414419 }
415420
416421#ifndef NRF71_ON_IPC
422+ #ifdef WIFI_NRF71
423+ nrf_wifi_osal_mem_set (& phy_rf_params ,
424+ 0x0 ,
425+ sizeof (phy_rf_params ));
426+
427+ ret = nrf_wifi_utils_hex_str_to_val (
428+ (unsigned char * )& phy_rf_params .phy_params ,
429+ sizeof (phy_rf_params .phy_params ),
430+ NRF_WIFI_SYS_DEF_RF_PARAMS );
431+ if (ret == -1 ) {
432+ nrf_wifi_osal_log_err ("%s: Initialization of RF params with default values failed" , __func__ );
433+ status = NRF_WIFI_STATUS_FAIL ;
434+ goto out ;
435+ }
436+ #else /* WIFI_NRF71 */
417437 nrf_wifi_osal_mem_set (& otp_info ,
418438 0xFF ,
419439 sizeof (otp_info ));
@@ -435,6 +455,7 @@ enum nrf_wifi_status nrf_wifi_sys_fmac_dev_init(struct nrf_wifi_fmac_dev_ctx *fm
435455 __func__ );
436456 goto out ;
437457 }
458+ #endif /* !WIFI_NRF71 */
438459#endif /* !NRF71_ON_IPC */
439460
440461 status = nrf_wifi_sys_fmac_fw_init (fmac_dev_ctx ,
@@ -3727,13 +3748,14 @@ static int nrf_wifi_sys_fmac_phy_rf_params_init(struct nrf_wifi_phy_rf_params *p
37273748 unsigned char * str )
37283749{
37293750 int ret = -1 ;
3751+ #ifndef WIFI_NRF71
37303752 unsigned int rf_param_offset = BAND_2G_LW_ED_BKF_DSSS_OFST - NRF_WIFI_RF_PARAMS_CONF_SIZE ;
3731-
3753+ #endif /* !WIFI_NRF71 */
37323754 /* Initilaize reserved bytes */
37333755 nrf_wifi_osal_mem_set (prf ,
37343756 0x0 ,
37353757 sizeof (prf ));
3736-
3758+ #ifndef WIFI_NRF71
37373759 /* Initialize PD adjust values for MCS7. Currently these 4 bytes are not being used */
37383760 prf -> pd_adjust_val .pd_adjt_lb_chan = PD_ADJUST_VAL ;
37393761 prf -> pd_adjust_val .pd_adjt_hb_low_chan = PD_ADJUST_VAL ;
@@ -3854,7 +3876,7 @@ static int nrf_wifi_sys_fmac_phy_rf_params_init(struct nrf_wifi_phy_rf_params *p
38543876 prf -> phy_params [rf_param_offset + 31 ] = NRF70_PCB_LOSS_5G_BAND1 ;
38553877 prf -> phy_params [rf_param_offset + 32 ] = NRF70_PCB_LOSS_5G_BAND2 ;
38563878 prf -> phy_params [rf_param_offset + 33 ] = NRF70_PCB_LOSS_5G_BAND3 ;
3857-
3879+ #endif /* !WIFI_NRF71 */
38583880 return (ret );
38593881}
38603882
@@ -3869,9 +3891,10 @@ enum nrf_wifi_status nrf_wifi_sys_fmac_rf_params_get(struct nrf_wifi_fmac_dev_ct
38693891 /* If package_info is not written to OTP then the default value will be 0xFF. */
38703892 unsigned int package_info = 0xFFFFFFFF ;
38713893 struct nrf_wifi_tx_pwr_ceil_params * tx_pwr_ceil_params ;
3894+ #ifndef WIFI_NRF71
38723895 unsigned char backoff_2g_dsss = 0 , backoff_2g_ofdm = 0 ;
38733896 unsigned char backoff_5g_lowband = 0 , backoff_5g_midband = 0 , backoff_5g_highband = 0 ;
3874-
3897+ #endif /* !WIFI_NRF71 */
38753898 if (!fmac_dev_ctx || !phy_rf_params ) {
38763899 nrf_wifi_osal_log_err ("%s: Invalid parameters" ,
38773900 __func__ );
@@ -3925,7 +3948,7 @@ enum nrf_wifi_status nrf_wifi_sys_fmac_rf_params_get(struct nrf_wifi_fmac_dev_ct
39253948 status = NRF_WIFI_STATUS_FAIL ;
39263949 goto out ;
39273950 }
3928-
3951+ #ifndef WIFI_NRF71
39293952 if (!(otp_info .flags & (~CALIB_XO_FLAG_MASK ))) {
39303953 nrf_wifi_osal_mem_cpy (& phy_rf_params -> xo_offset .xo_freq_offset ,
39313954 (char * )otp_info .info .calib + OTP_OFF_CALIB_XO ,
@@ -3982,7 +4005,7 @@ enum nrf_wifi_status nrf_wifi_sys_fmac_rf_params_get(struct nrf_wifi_fmac_dev_ct
39824005 MIN (tx_pwr_ceil_params -> max_pwr_5g_high_mcs0 ,
39834006 phy_rf_params -> max_pwr_ceil .max_hb_high_chan_mcs0_pwr ) - backoff_5g_highband ;
39844007#endif /* NRF70_2_4G_ONLY */
3985-
4008+ #endif /* !WIFI_NRF71 */
39864009 status = NRF_WIFI_STATUS_SUCCESS ;
39874010out :
39884011 return status ;
0 commit comments