Skip to content

Commit

Permalink
Add SET regulatory API
Browse files Browse the repository at this point in the history
Useful for runtime regulatory change without re-initialization.

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 committed Dec 11, 2024
1 parent 4a4018f commit c39a02f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions nrf70_bm_lib/include/nrf70_bm_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,19 @@ int nrf70_bm_init(uint8_t *mac_addr, struct nrf70_regulatory_info *reg_info);
int nrf70_bm_scan_start(struct nrf70_scan_params *scan_params,
nrf70_scan_result_cb_t cb);

/** @brief Set nRF70 regulatory information.
*
* This function sets the regulatory information of the nRF70 device.
* The regulatory information includes the country code, the number of channels
* supported and the channel information.
*
* @param[in] reg_info Regulatory information.
*
* @retval 0 If the operation was successful.
* @retval -1 If the operation failed.
*/
int nrf70_bm_set_reg(struct nrf70_regulatory_info *reg_info);

/** @brief Get nRF70 regulatory information.
*
* This function retrieves the regulatory information of the nRF70 device.
Expand Down
5 changes: 5 additions & 0 deletions nrf70_bm_lib/source/nrf70_bm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ int nrf70_bm_init(uint8_t *mac_addr, struct nrf70_regulatory_info *reg_info)
}

#ifndef CONFIG_NRF700X_RADIO_TEST
int nrf70_bm_set_reg(struct nrf70_regulatory_info *reg_info)
{
return nrf70_fmac_set_reg(reg_info);
}

int nrf70_bm_get_reg(struct nrf70_regulatory_info *reg_info)
{
return nrf70_fmac_get_reg(reg_info);
Expand Down

0 comments on commit c39a02f

Please sign in to comment.