@@ -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 ,
@@ -3722,13 +3743,14 @@ static int nrf_wifi_sys_fmac_phy_rf_params_init(struct nrf_wifi_phy_rf_params *p
37223743 unsigned char * str )
37233744{
37243745 int ret = -1 ;
3746+ #ifndef WIFI_NRF71
37253747 unsigned int rf_param_offset = BAND_2G_LW_ED_BKF_DSSS_OFST - NRF_WIFI_RF_PARAMS_CONF_SIZE ;
3726-
3748+ #endif /* !WIFI_NRF71 */
37273749 /* Initilaize reserved bytes */
37283750 nrf_wifi_osal_mem_set (prf ,
37293751 0x0 ,
37303752 sizeof (prf ));
3731-
3753+ #ifndef WIFI_NRF71
37323754 /* Initialize PD adjust values for MCS7. Currently these 4 bytes are not being used */
37333755 prf -> pd_adjust_val .pd_adjt_lb_chan = PD_ADJUST_VAL ;
37343756 prf -> pd_adjust_val .pd_adjt_hb_low_chan = PD_ADJUST_VAL ;
@@ -3849,7 +3871,7 @@ static int nrf_wifi_sys_fmac_phy_rf_params_init(struct nrf_wifi_phy_rf_params *p
38493871 prf -> phy_params [rf_param_offset + 31 ] = NRF70_PCB_LOSS_5G_BAND1 ;
38503872 prf -> phy_params [rf_param_offset + 32 ] = NRF70_PCB_LOSS_5G_BAND2 ;
38513873 prf -> phy_params [rf_param_offset + 33 ] = NRF70_PCB_LOSS_5G_BAND3 ;
3852-
3874+ #endif /* !WIFI_NRF71 */
38533875 return (ret );
38543876}
38553877
@@ -3864,9 +3886,10 @@ enum nrf_wifi_status nrf_wifi_sys_fmac_rf_params_get(struct nrf_wifi_fmac_dev_ct
38643886 /* If package_info is not written to OTP then the default value will be 0xFF. */
38653887 unsigned int package_info = 0xFFFFFFFF ;
38663888 struct nrf_wifi_tx_pwr_ceil_params * tx_pwr_ceil_params ;
3889+ #ifndef WIFI_NRF71
38673890 unsigned char backoff_2g_dsss = 0 , backoff_2g_ofdm = 0 ;
38683891 unsigned char backoff_5g_lowband = 0 , backoff_5g_midband = 0 , backoff_5g_highband = 0 ;
3869-
3892+ #endif /* !WIFI_NRF71 */
38703893 if (!fmac_dev_ctx || !phy_rf_params ) {
38713894 nrf_wifi_osal_log_err ("%s: Invalid parameters" ,
38723895 __func__ );
@@ -3920,7 +3943,7 @@ enum nrf_wifi_status nrf_wifi_sys_fmac_rf_params_get(struct nrf_wifi_fmac_dev_ct
39203943 status = NRF_WIFI_STATUS_FAIL ;
39213944 goto out ;
39223945 }
3923-
3946+ #ifndef WIFI_NRF71
39243947 if (!(otp_info .flags & (~CALIB_XO_FLAG_MASK ))) {
39253948 nrf_wifi_osal_mem_cpy (& phy_rf_params -> xo_offset .xo_freq_offset ,
39263949 (char * )otp_info .info .calib + OTP_OFF_CALIB_XO ,
@@ -3977,7 +4000,7 @@ enum nrf_wifi_status nrf_wifi_sys_fmac_rf_params_get(struct nrf_wifi_fmac_dev_ct
39774000 MIN (tx_pwr_ceil_params -> max_pwr_5g_high_mcs0 ,
39784001 phy_rf_params -> max_pwr_ceil .max_hb_high_chan_mcs0_pwr ) - backoff_5g_highband ;
39794002#endif /* NRF70_2_4G_ONLY */
3980-
4003+ #endif /* !WIFI_NRF71 */
39814004 status = NRF_WIFI_STATUS_SUCCESS ;
39824005out :
39834006 return status ;
0 commit comments