From 1d8ce6b22268e2b1b164e4847af7f0fa6bd5a8d6 Mon Sep 17 00:00:00 2001 From: Kapil Bhatt Date: Wed, 13 Mar 2024 17:45:27 +0530 Subject: [PATCH] radio_test: Add frame dependent Kconfigs edge backoffs Add Kconfigs for edge backoff parameters into Makefile and also corresponding change in main. Signed-off-by: Kapil Bhatt --- Makefile | 38 +++++++++++++------- src/debugfs/radio_test.c | 4 +-- src/main.c | 76 +++++++++++++++++++++++++++------------- 3 files changed, 79 insertions(+), 39 deletions(-) diff --git a/Makefile b/Makefile index 60accc7..560c350 100644 --- a/Makefile +++ b/Makefile @@ -114,18 +114,32 @@ ccflags-y += \ -DCONFIG_NRF700X_ANT_GAIN_5G_BAND1=0 \ -DCONFIG_NRF700X_ANT_GAIN_5G_BAND2=0 \ -DCONFIG_NRF700X_ANT_GAIN_5G_BAND3=0 \ - -DCONFIG_NRF700X_BAND_2G_LOWER_EDGE_BACKOFF=0 \ - -DCONFIG_NRF700X_BAND_2G_UPPER_EDGE_BACKOFF=0 \ - -DCONFIG_NRF700X_BAND_UNII_1_LOWER_EDGE_BACKOFF=0 \ - -DCONFIG_NRF700X_BAND_UNII_1_UPPER_EDGE_BACKOFF=0 \ - -DCONFIG_NRF700X_BAND_UNII_2A_LOWER_EDGE_BACKOFF=0 \ - -DCONFIG_NRF700X_BAND_UNII_2A_UPPER_EDGE_BACKOFF=0 \ - -DCONFIG_NRF700X_BAND_UNII_2C_LOWER_EDGE_BACKOFF=0 \ - -DCONFIG_NRF700X_BAND_UNII_2C_UPPER_EDGE_BACKOFF=0 \ - -DCONFIG_NRF700X_BAND_UNII_3_LOWER_EDGE_BACKOFF=0 \ - -DCONFIG_NRF700X_BAND_UNII_3_UPPER_EDGE_BACKOFF=0 \ - -DCONFIG_NRF700X_BAND_UNII_4_LOWER_EDGE_BACKOFF=0 \ - -DCONFIG_NRF700X_BAND_UNII_4_UPPER_EDGE_BACKOFF=0 \ + -DCONFIG_NRF700X_BAND_2G_LOWER_EDGE_BACKOFF_DSSS=0 \ + -DCONFIG_NRF700X_BAND_2G_LOWER_EDGE_BACKOFF_HT=0 \ + -DCONFIG_NRF700X_BAND_2G_LOWER_EDGE_BACKOFF_HE=0 \ + -DCONFIG_NRF700X_BAND_2G_UPPER_EDGE_BACKOFF_DSSS=0 \ + -DCONFIG_NRF700X_BAND_2G_UPPER_EDGE_BACKOFF_HT=0 \ + -DCONFIG_NRF700X_BAND_2G_UPPER_EDGE_BACKOFF_HE=0 \ + -DCONFIG_NRF700X_BAND_UNII_1_LOWER_EDGE_BACKOFF_HT=0 \ + -DCONFIG_NRF700X_BAND_UNII_1_LOWER_EDGE_BACKOFF_HE=0 \ + -DCONFIG_NRF700X_BAND_UNII_1_UPPER_EDGE_BACKOFF_HT=0 \ + -DCONFIG_NRF700X_BAND_UNII_1_UPPER_EDGE_BACKOFF_HE=0 \ + -DCONFIG_NRF700X_BAND_UNII_2A_LOWER_EDGE_BACKOFF_HT=0 \ + -DCONFIG_NRF700X_BAND_UNII_2A_LOWER_EDGE_BACKOFF_HE=0 \ + -DCONFIG_NRF700X_BAND_UNII_2A_UPPER_EDGE_BACKOFF_HT=0 \ + -DCONFIG_NRF700X_BAND_UNII_2A_UPPER_EDGE_BACKOFF_HE=0 \ + -DCONFIG_NRF700X_BAND_UNII_2C_LOWER_EDGE_BACKOFF_HT=0 \ + -DCONFIG_NRF700X_BAND_UNII_2C_LOWER_EDGE_BACKOFF_HE=0 \ + -DCONFIG_NRF700X_BAND_UNII_2C_UPPER_EDGE_BACKOFF_HT=0 \ + -DCONFIG_NRF700X_BAND_UNII_2C_UPPER_EDGE_BACKOFF_HE=0 \ + -DCONFIG_NRF700X_BAND_UNII_3_LOWER_EDGE_BACKOFF_HT=0 \ + -DCONFIG_NRF700X_BAND_UNII_3_LOWER_EDGE_BACKOFF_HE=0 \ + -DCONFIG_NRF700X_BAND_UNII_3_UPPER_EDGE_BACKOFF_HT=0 \ + -DCONFIG_NRF700X_BAND_UNII_3_UPPER_EDGE_BACKOFF_HE=0 \ + -DCONFIG_NRF700X_BAND_UNII_4_LOWER_EDGE_BACKOFF_HT=0 \ + -DCONFIG_NRF700X_BAND_UNII_4_LOWER_EDGE_BACKOFF_HE=0 \ + -DCONFIG_NRF700X_BAND_UNII_4_UPPER_EDGE_BACKOFF_HT=0 \ + -DCONFIG_NRF700X_BAND_UNII_4_UPPER_EDGE_BACKOFF_HE=0 \ -DCONFIG_NRF700X_REG_DOMAIN=\"00\" \ -DCONFIG_NRF700X_TX_MAX_DATA_SIZE=1600 \ -DCONFIG_NRF_WIFI_IFACE_MTU=1500 \ diff --git a/src/debugfs/radio_test.c b/src/debugfs/radio_test.c index af8bcfd..9e75196 100644 --- a/src/debugfs/radio_test.c +++ b/src/debugfs/radio_test.c @@ -167,7 +167,6 @@ nrf_wifi_radio_test_conf_init(struct rpu_conf_params *conf_params) { enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL; unsigned char country_code[NRF_WIFI_COUNTRY_CODE_LEN] = { 0 }; - struct nrf_wifi_tx_pwr_ceil_params tx_pwr_ceil_params; /* Check and save regulatory country code currently set */ if (strlen(conf_params->country_code)) { @@ -182,8 +181,7 @@ nrf_wifi_radio_test_conf_init(struct rpu_conf_params *conf_params) status = nrf_wifi_fmac_rf_params_get( ctx->rpu_ctx, - (struct nrf_wifi_phy_rf_params *)conf_params->rf_params, - &tx_pwr_ceil_params); + (struct nrf_wifi_phy_rf_params *)conf_params->rf_params); if (status != NRF_WIFI_STATUS_SUCCESS) { goto out; } diff --git a/src/main.c b/src/main.c index 1a7aaaa..c21f61e 100644 --- a/src/main.c +++ b/src/main.c @@ -294,30 +294,58 @@ void configure_tx_pwr_settings( CONFIG_NRF700X_ANT_GAIN_5G_BAND2; tx_pwr_ctrl_params->ant_gain_5g_band3 = CONFIG_NRF700X_ANT_GAIN_5G_BAND3; - tx_pwr_ctrl_params->band_edge_2g_lo = - CONFIG_NRF700X_BAND_2G_LOWER_EDGE_BACKOFF; - tx_pwr_ctrl_params->band_edge_2g_hi = - CONFIG_NRF700X_BAND_2G_UPPER_EDGE_BACKOFF; - tx_pwr_ctrl_params->band_edge_5g_unii_1_lo = - CONFIG_NRF700X_BAND_UNII_1_LOWER_EDGE_BACKOFF; - tx_pwr_ctrl_params->band_edge_5g_unii_1_hi = - CONFIG_NRF700X_BAND_UNII_1_UPPER_EDGE_BACKOFF; - tx_pwr_ctrl_params->band_edge_5g_unii_2a_lo = - CONFIG_NRF700X_BAND_UNII_2A_LOWER_EDGE_BACKOFF; - tx_pwr_ctrl_params->band_edge_5g_unii_2a_hi = - CONFIG_NRF700X_BAND_UNII_2A_UPPER_EDGE_BACKOFF; - tx_pwr_ctrl_params->band_edge_5g_unii_2c_lo = - CONFIG_NRF700X_BAND_UNII_2C_LOWER_EDGE_BACKOFF; - tx_pwr_ctrl_params->band_edge_5g_unii_2c_hi = - CONFIG_NRF700X_BAND_UNII_2C_UPPER_EDGE_BACKOFF; - tx_pwr_ctrl_params->band_edge_5g_unii_3_lo = - CONFIG_NRF700X_BAND_UNII_3_LOWER_EDGE_BACKOFF; - tx_pwr_ctrl_params->band_edge_5g_unii_3_hi = - CONFIG_NRF700X_BAND_UNII_3_UPPER_EDGE_BACKOFF; - tx_pwr_ctrl_params->band_edge_5g_unii_4_lo = - CONFIG_NRF700X_BAND_UNII_4_LOWER_EDGE_BACKOFF; - tx_pwr_ctrl_params->band_edge_5g_unii_4_hi = - CONFIG_NRF700X_BAND_UNII_4_UPPER_EDGE_BACKOFF; + tx_pwr_ctrl_params->band_edge_2g_lo_dss = + CONFIG_NRF700X_BAND_2G_LOWER_EDGE_BACKOFF_DSSS; + tx_pwr_ctrl_params->band_edge_2g_lo_ht = + CONFIG_NRF700X_BAND_2G_LOWER_EDGE_BACKOFF_HT; + tx_pwr_ctrl_params->band_edge_2g_lo_he = + CONFIG_NRF700X_BAND_2G_LOWER_EDGE_BACKOFF_HE; + tx_pwr_ctrl_params->band_edge_2g_hi_dsss = + CONFIG_NRF700X_BAND_2G_UPPER_EDGE_BACKOFF_DSSS; + tx_pwr_ctrl_params->band_edge_2g_hi_ht = + CONFIG_NRF700X_BAND_2G_UPPER_EDGE_BACKOFF_HT; + tx_pwr_ctrl_params->band_edge_2g_hi_he = + CONFIG_NRF700X_BAND_2G_UPPER_EDGE_BACKOFF_HE; + tx_pwr_ctrl_params->band_edge_5g_unii_1_lo_ht = + CONFIG_NRF700X_BAND_UNII_1_LOWER_EDGE_BACKOFF_HT; + tx_pwr_ctrl_params->band_edge_5g_unii_1_lo_he = + CONFIG_NRF700X_BAND_UNII_1_LOWER_EDGE_BACKOFF_HE; + tx_pwr_ctrl_params->band_edge_5g_unii_1_hi_ht = + CONFIG_NRF700X_BAND_UNII_1_UPPER_EDGE_BACKOFF_HT; + tx_pwr_ctrl_params->band_edge_5g_unii_1_hi_he = + CONFIG_NRF700X_BAND_UNII_1_UPPER_EDGE_BACKOFF_HE; + tx_pwr_ctrl_params->band_edge_5g_unii_2a_lo_ht = + CONFIG_NRF700X_BAND_UNII_2A_LOWER_EDGE_BACKOFF_HT; + tx_pwr_ctrl_params->band_edge_5g_unii_2a_lo_he = + CONFIG_NRF700X_BAND_UNII_2A_LOWER_EDGE_BACKOFF_HE; + tx_pwr_ctrl_params->band_edge_5g_unii_2a_hi_ht = + CONFIG_NRF700X_BAND_UNII_2A_UPPER_EDGE_BACKOFF_HT; + tx_pwr_ctrl_params->band_edge_5g_unii_2a_hi_he = + CONFIG_NRF700X_BAND_UNII_2A_UPPER_EDGE_BACKOFF_HE; + tx_pwr_ctrl_params->band_edge_5g_unii_2c_lo_ht = + CONFIG_NRF700X_BAND_UNII_2C_LOWER_EDGE_BACKOFF_HT; + tx_pwr_ctrl_params->band_edge_5g_unii_2c_lo_he = + CONFIG_NRF700X_BAND_UNII_2C_LOWER_EDGE_BACKOFF_HE; + tx_pwr_ctrl_params->band_edge_5g_unii_2c_hi_ht = + CONFIG_NRF700X_BAND_UNII_2C_UPPER_EDGE_BACKOFF_HT; + tx_pwr_ctrl_params->band_edge_5g_unii_2c_hi_he = + CONFIG_NRF700X_BAND_UNII_2C_UPPER_EDGE_BACKOFF_HE; + tx_pwr_ctrl_params->band_edge_5g_unii_3_lo_ht = + CONFIG_NRF700X_BAND_UNII_3_LOWER_EDGE_BACKOFF_HT; + tx_pwr_ctrl_params->band_edge_5g_unii_3_lo_he = + CONFIG_NRF700X_BAND_UNII_3_LOWER_EDGE_BACKOFF_HE; + tx_pwr_ctrl_params->band_edge_5g_unii_3_hi_ht = + CONFIG_NRF700X_BAND_UNII_3_UPPER_EDGE_BACKOFF_HT; + tx_pwr_ctrl_params->band_edge_5g_unii_3_hi_he = + CONFIG_NRF700X_BAND_UNII_3_UPPER_EDGE_BACKOFF_HE; + tx_pwr_ctrl_params->band_edge_5g_unii_4_lo_ht = + CONFIG_NRF700X_BAND_UNII_4_LOWER_EDGE_BACKOFF_HT; + tx_pwr_ctrl_params->band_edge_5g_unii_4_lo_he = + CONFIG_NRF700X_BAND_UNII_4_LOWER_EDGE_BACKOFF_HE; + tx_pwr_ctrl_params->band_edge_5g_unii_4_hi_ht = + CONFIG_NRF700X_BAND_UNII_4_UPPER_EDGE_BACKOFF_HT; + tx_pwr_ctrl_params->band_edge_5g_unii_4_hi_he = + CONFIG_NRF700X_BAND_UNII_4_UPPER_EDGE_BACKOFF_HE; #if defined(CONFIG_BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP) || \ defined(CONFIG_BOARD_NRF7002DK_NRF5340_CPUAPP) || \