drivers: wifi: Add changes for regulatory domain
Add changes for offloaded raw tx regulatory domain. Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
This commit is contained in:
parent
e7db0f8aff
commit
7161a7a06a
3 changed files with 11 additions and 6 deletions
|
|
@ -128,7 +128,7 @@ static int bytes_from_str(uint8_t *buf, int buf_len, const char *src)
|
|||
}
|
||||
#endif /* CONFIG_WIFI_FIXED_MAC_ADDRESS_ENABLED */
|
||||
|
||||
int nrf70_off_raw_tx_init(uint8_t *mac_addr)
|
||||
int nrf70_off_raw_tx_init(uint8_t *mac_addr, unsigned char *country_code)
|
||||
{
|
||||
enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL;
|
||||
struct nrf_wifi_ctx_zep *rpu_ctx_zep = NULL;
|
||||
|
|
@ -206,7 +206,8 @@ int nrf70_off_raw_tx_init(uint8_t *mac_addr)
|
|||
IS_ENABLED(CONFIG_NRF_WIFI_BEAMFORMING),
|
||||
&ctrl_params,
|
||||
&ceil_params,
|
||||
&board_params);
|
||||
&board_params,
|
||||
country_code);
|
||||
if (status != NRF_WIFI_STATUS_SUCCESS) {
|
||||
LOG_ERR("%s: nRF70 firmware initialization failed", __func__);
|
||||
goto err;
|
||||
|
|
|
|||
|
|
@ -644,7 +644,8 @@ enum nrf_wifi_status nrf_wifi_fmac_dev_add_zep(struct nrf_wifi_drv_priv_zep *drv
|
|||
IS_ENABLED(CONFIG_NRF_WIFI_BEAMFORMING),
|
||||
&tx_pwr_ctrl_params,
|
||||
&tx_pwr_ceil_params,
|
||||
&board_params);
|
||||
&board_params,
|
||||
STRINGIFY(CONFIG_NRF70_REG_DOMAIN));
|
||||
#else
|
||||
status = nrf_wifi_fmac_dev_init(rpu_ctx_zep->rpu_ctx,
|
||||
#ifdef CONFIG_NRF_WIFI_LOW_POWER
|
||||
|
|
@ -655,7 +656,8 @@ enum nrf_wifi_status nrf_wifi_fmac_dev_add_zep(struct nrf_wifi_drv_priv_zep *drv
|
|||
IS_ENABLED(CONFIG_NRF_WIFI_BEAMFORMING),
|
||||
&tx_pwr_ctrl_params,
|
||||
&tx_pwr_ceil_params,
|
||||
&board_params);
|
||||
&board_params,
|
||||
STRINGIFY(CONFIG_NRF70_REG_DOMAIN));
|
||||
#endif /* CONFIG_NRF70_RADIO_TEST */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@
|
|||
#define NRF_WIFI_OFF_RAW_TX_FRAME_SIZE_MIN 26
|
||||
/* Maximum frame size for raw packet transmission */
|
||||
#define NRF_WIFI_OFF_RAW_TX_FRAME_SIZE_MAX 600
|
||||
|
||||
/* Maximum length of country code*/
|
||||
#define NRF_WIFI_COUNTRY_CODE_LEN 2
|
||||
/**
|
||||
* @brief- Transmission rates
|
||||
* Rate to be used for transmitting a packet.
|
||||
|
|
@ -167,6 +168,7 @@ struct nrf_wifi_off_raw_tx_conf {
|
|||
/**
|
||||
* @brief Initialize the nRF70 for operating in the offloaded raw TX mode.
|
||||
* @param mac_addr MAC address to be used for the nRF70 device.
|
||||
* @param country_code Country code to be set for regularity domain.
|
||||
*
|
||||
* This function is initializes the nRF70 device for offloaded raw TX mode by:
|
||||
* - Powering it up,
|
||||
|
|
@ -184,7 +186,7 @@ struct nrf_wifi_off_raw_tx_conf {
|
|||
* @retval 0 If the operation was successful.
|
||||
* @retval -1 If the operation failed.
|
||||
*/
|
||||
int nrf70_off_raw_tx_init(uint8_t *mac_addr);
|
||||
int nrf70_off_raw_tx_init(uint8_t *mac_addr, unsigned char *country_code);
|
||||
|
||||
/**
|
||||
* @brief Initialize the nRF70 for operating in the offloaded raw TX mode.
|
||||
|
|
|
|||
Loading…
Reference in a new issue