Skip to content

Commit

Permalink
radio_test: Add frame dependent Kconfigs edge backoffs
Browse files Browse the repository at this point in the history
Add Kconfigs for edge backoff parameters into Makefile
and also corresponding change in main.

Signed-off-by: Kapil Bhatt <[email protected]>
  • Loading branch information
kapbh committed Mar 14, 2024
1 parent 9a02daa commit 1d8ce6b
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 39 deletions.
38 changes: 26 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 1 addition & 3 deletions src/debugfs/radio_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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;
}
Expand Down
76 changes: 52 additions & 24 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) || \
Expand Down

0 comments on commit 1d8ce6b

Please sign in to comment.