Common
The common API is used for both normal operation and Radio Test mode.
nrf_wifi/fw_if/umac_if/inc/fmac_structs_common.h
nrf_wifi/fw_if/umac_if/src/fmac_api_common.c
- group nrf_wifi_api_common
Header containing API declarations for the FMAC IF Layer of the Wi-Fi driver.
Header containing declarations for utility functions for FMAC IF Layer of the Wi-Fi driver.
Functions
-
struct nrf_wifi_fmac_dev_ctx *nrf_wifi_fmac_dev_add(struct nrf_wifi_fmac_priv *fpriv, void *os_dev_ctx)
Adds a RPU instance.
This function adds an RPU instance. This function will return the pointer to the context of the RPU instance. This pointer will need to be supplied while invoking further device specific APIs, for example, nrf_wifi_fmac_scan() etc.
- Parameters:
fpriv – Pointer to the context of the UMAC IF layer.
os_dev_ctx – Pointer to the OS specific context of the RPU instance.
- Returns:
Pointer to the context of the RPU instance.
-
enum nrf_wifi_status nrf_wifi_fmac_stats_get(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, enum rpu_op_mode op_mode, struct rpu_op_stats *stats)
Issue a request to get stats from the RPU.
This function is used to send a command to instruct the firmware to return the current RPU statistics. The RPU will send the event with the current statistics.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
op_mode – RPU operation mode.
stats – Pointer to memory where the stats are to be copied.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_validate_fw_header(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, struct nrf70_fw_image_info *info)
Validate the firmware header.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
info – Pointer to the address where the firmware information needs to be copied.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_fw_parse(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, const void *fw_data, unsigned int fw_size, struct nrf_wifi_fmac_fw_info *fw_info)
Parse the Firmware(s) to be loaded to the RPU WLAN device.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device, which was passed as
fmac_dev_ctx
parameter via theadd_dev_callbk_fn()
callback function.fw_data – Pointer to the address where the firmware data is available.
fw_size – Size of the firmware data.
fw_info – Pointer to the address where the firmware information needs to be copied.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_fw_reset(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
Reset the processors in the RPU WLAN device.
This function resets the processors in the RPU WLAN device.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device, which was passed as
fmac_dev_ctx
parameter via theadd_dev_callbk_fn()
callback function.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_fw_boot(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
Boot the Firmware(s) to the RPU WLAN device.
This function boots the FullMAC firmware(s) to the RPU WLAN device and waits for the boot to complete and validate the boot signature.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device, which was passed as
fmac_dev_ctx
parameter via theadd_dev_callbk_fn()
callback function.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_fw_chunk_load(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, enum RPU_PROC_TYPE rpu_proc, struct nrf_wifi_fmac_fw_chunk_info *fw_chunk)
Load a chunk of the Firmware to the RPU WLAN device.
This function loads a chunk of the firmware to the RPU WLAN device.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device, which was passed as
fmac_dev_ctx
parameter via theadd_dev_callbk_fn()
callback function.rpu_proc – RPU processor type.
fw_chunk – Pointer to the address where the firmware chunk information is available.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_fw_load(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, struct nrf_wifi_fmac_fw_info *fmac_fw)
Loads the Firmware(s) to the RPU WLAN device.
This function loads the FullMAC firmware(s) to the RPU WLAN device.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device, which was passed as
fmac_dev_ctx
parameter via theadd_dev_callbk_fn()
callback function.fmac_fw – Information about the FullMAC firmware(s) to be loaded.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_ver_get(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, unsigned int *fw_ver)
Get FW versions from the RPU.
This function is used to get Firmware versions from the RPU.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
fw_ver – Pointer to the address where the FW versions needs to be copied.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_conf_ltf_gi(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, unsigned char he_ltf, unsigned char he_gi, unsigned char enabled)
Configure HE LTF and GI parameters.
This function is used to send a command to RPU to configure HE LTF and GI parameters in RPU.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
he_ltf – HE LTF parameter which will be configured in RPU.
he_gi – HE GI parameter which will be configured in RPU.
enabled – enable/disable HE LTF and GI parameter configured.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_conf_srcoex(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, void *cmd, unsigned int cmd_len)
Configure SR coexistence parameters in RPU.
This function is used to send a command to RPU to configure SR coexistence parameters in RPU.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
cmd – SR coexistence parameters which will be configured in RPU.
cmd_len – Command length.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_set_mcast_addr(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, unsigned char if_idx, struct nrf_wifi_umac_mcast_cfg *mcast_info)
Set the Multicast filter address.
This function is used to send a command (NRF_WIFI_UMAC_CMD_MCAST_FILTER) to instruct the firmware to set the multicast filter address to an interface with index
if_idx
and parameters specified bymcast_info
.- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface whose state needs to be changed.
mcast_info – Multicast information to be set.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_otp_mac_addr_get(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, unsigned char vif_idx, unsigned char *mac_addr)
Fetch MAC address from OTP.
This function is used to fetch MAC address from the OTP.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
vif_idx – Interface index for which the MAC address is to be fetched.
mac_addr – Pointer to the address where the MAC address needs to be copied.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_rf_params_get(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, struct nrf_wifi_phy_rf_params *rf_params)
Get the RF parameters to be programmed to the RPU.
This function is used to fetch RF parameters information from the RPU and update the default RF parameter with the OTP values. The updated RF parameters are then returned in the
f_params
.- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
rf_params – Pointer to the address where the RF params information needs to be copied.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_set_reg(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, struct nrf_wifi_fmac_reg_info *reg_info)
Set regulatory domain in RPU.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
reg_info – Pointer to the address where the regulatory domain information. needs to be copied. This function is used to set regulatory domain in the RPU.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_get_reg(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, struct nrf_wifi_fmac_reg_info *reg_info)
Get regulatory domain from RPU.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
reg_info – Pointer to the address where the regulatory domain information. needs to be copied. This function is used to get regulatory domain from the RPU.
- Returns:
Command execution status
-
enum nrf_wifi_status nrf_wifi_fmac_get_power_save_info(void *fmac_dev_ctx, unsigned char if_idx)
Get the current power save information.
This function is used to send a command to RPU to Enable/Disable WLAN Power management.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which power management is to be set.
- Returns:
Command execution status
-
int nrf_wifi_phy_rf_params_init(struct nrf_wifi_osal_priv *opriv, struct nrf_wifi_phy_rf_params *prf, unsigned int package_info, unsigned char *str)
Initialize RF parameters.
This function is used to initialize the RF parameter structure with the XO, power ceiling info, voltage and temperature based backoffs etc.
- Parameters:
opriv – Pointer to the OSAL context.
prf – Pointer to the RF parameter structure.
package_info – Package information, QFN, CSP etc.
str – String of RF params
-
struct rpu_host_stats
- #include <fmac_structs_common.h>
Structure to hold host specific statistics.
Public Members
-
unsigned long long total_tx_pkts
Total number of TX frames transmitted.
-
unsigned long long total_tx_done_pkts
Total number of TX dones received.
-
unsigned long long total_tx_drop_pkts
Total number of TX frames dropped.
-
unsigned long long total_rx_pkts
Total number of RX frames received.
-
unsigned long long total_rx_drop_pkts
Total number of RX frames dropped.
-
unsigned long long total_tx_pkts
-
struct rpu_op_stats
- #include <fmac_structs_common.h>
Structure to hold per device host and firmware statistics.
Public Members
-
struct rpu_host_stats host
Host statistics.
-
struct rpu_fw_stats fw
Firmware statistics.
-
struct nrf_wifi_fw_info
- #include <fmac_structs_common.h>
Structure to hold FW patch information.
-
struct nrf_wifi_fmac_fw_info
- #include <fmac_structs_common.h>
Structure to hold FW patch information for LMAC and UMAC.
Public Members
-
struct nrf_wifi_fw_info lmac_patch_pri
Primary LMAC FW patch information.
-
struct nrf_wifi_fw_info lmac_patch_sec
Secondary LMAC FW patch information.
-
struct nrf_wifi_fw_info umac_patch_pri
Primary UMAC FW patch information.
-
struct nrf_wifi_fw_info umac_patch_sec
Secondary UMAC FW patch information.
-
struct nrf_wifi_fw_info lmac_patch_pri
-
struct nrf_wifi_fmac_fw_chunk_info
- #include <fmac_structs_common.h>
Structure to hold FW patch chunk information.
Public Members
-
char id_str[NRF_WIFI_FW_CHUNK_ID_STR_LEN]
Pointer to the FW patch chunk ID string.
-
const void *data
Pointer to the FW patch chunk data.
-
unsigned int size
Size of the FW patch chunk data.
-
unsigned int dest_addr
Destination address of the FW patch chunk data.
-
char id_str[NRF_WIFI_FW_CHUNK_ID_STR_LEN]
-
struct nrf_wifi_fmac_otp_info
- #include <fmac_structs_common.h>
Structure to hold OTP region information.
-
struct nrf_wifi_fmac_reg_info
- #include <fmac_structs_common.h>
Structure to hold Regulatory parameter data.
Public Members
-
unsigned char alpha2[NRF_WIFI_COUNTRY_CODE_LEN]
ISO IEC Country code.
-
bool force
Forcefully set regulatory.
-
unsigned int reg_chan_count
Regulatory channels count
-
struct nrf_wifi_get_reg_chn_info reg_chan_info[MAX_NUM_REG_CHANELS]
Regulatory channel attributes
-
unsigned char alpha2[NRF_WIFI_COUNTRY_CODE_LEN]
-
struct nrf_wifi_fmac_priv
- #include <fmac_structs_common.h>
Structure to hold common fmac priv parameter data.
-
struct nrf_wifi_fmac_dev_ctx
- #include <fmac_structs_common.h>
Structure to hold common fmac dev context parameter data.
Public Members
-
struct nrf_wifi_fmac_priv *fpriv
Handle to the FMAC IF abstraction layer.
-
void *os_dev_ctx
Handle to the OS abstraction layer.
-
void *hal_dev_ctx
Handle to the HAL layer.
-
struct rpu_fw_stats *fw_stats
Firmware statistics.
-
bool stats_req
Firmware statistics requested.
-
bool fw_boot_done
Firmware boot done.
-
bool fw_init_done
Firmware init done.
-
bool fw_deinit_done
Firmware deinit done.
-
bool alpha2_valid
Alpha2 valid.
-
unsigned char alpha2[3]
Alpha2 country code, last byte is reserved for null character.
-
unsigned int reg_chan_count
Regulatory channels count
-
struct nrf_wifi_get_reg_chn_info *reg_chan_info
Regulatory channel attributes
-
int reg_set_status
Regulatory set status
-
struct nrf_wifi_event_regulatory_change *reg_change
Regulatory change event
-
struct nrf_wifi_tx_pwr_ceil_params *tx_pwr_ceil_params
TX power ceiling parameters
-
char priv[]
Data pointer to mode specific parameters
-
struct nrf_wifi_fmac_priv *fpriv
-
struct nrf_wifi_fmac_dev_ctx *nrf_wifi_fmac_dev_add(struct nrf_wifi_fmac_priv *fpriv, void *os_dev_ctx)
Wi-Fi mode
The Wi-Fi mode is used for normal operation of the nRF70 Series device in, for example, STA mode or other modes that are supported in the future.
nrf_wifi/fw_if/umac_if/inc/default/fmac_api.h
nrf_wifi/fw_if/umac_if/src/default/fmac_api.c
- group nrf_wifi_api
Header containing API declarations for the FMAC IF Layer of the Wi-Fi driver.
Header containing declarations for utility functions for FMAC IF Layer of the Wi-Fi driver.
Enums
-
enum nrf_wifi_fmac_ac
WLAN access categories.
Values:
-
enumerator NRF_WIFI_FMAC_AC_BK
Background access category.
-
enumerator NRF_WIFI_FMAC_AC_BE
Best-effort access category.
-
enumerator NRF_WIFI_FMAC_AC_VI
Video access category.
-
enumerator NRF_WIFI_FMAC_AC_VO
Voice access category.
-
enumerator NRF_WIFI_FMAC_AC_MC
Multicast access category.
-
enumerator NRF_WIFI_FMAC_AC_MAX
Maximum number of WLAN access categories.
-
enumerator NRF_WIFI_FMAC_AC_BK
-
enum nrf_wifi_fmac_if_op_state
The operational state of an interface.
Values:
-
enumerator NRF_WIFI_FMAC_IF_OP_STATE_DOWN
Interface is non-operational.
-
enumerator NRF_WIFI_FMAC_IF_OP_STATE_UP
Interface is operational.
-
enumerator NRF_WIFI_FMAC_IF_OP_STATE_INVALID
Invalid value. Used for error checks.
-
enumerator NRF_WIFI_FMAC_IF_OP_STATE_DOWN
Functions
-
struct nrf_wifi_fmac_priv *nrf_wifi_fmac_init(struct nrf_wifi_data_config_params *data_config, struct rx_buf_pool_params *rx_buf_pools, struct nrf_wifi_fmac_callbk_fns *callbk_fns)
Initializes the UMAC IF layer.
This function initializes the UMAC IF layer. It does the following:
Creates and initializes the context for the UMAC IF layer.
Initializes the HAL layer.
Initializes the OS abstraction Layer.
Initializes TX queue token sizes.
Initializes the RX buffer pool.
- Parameters:
data_config – Pointer to configuration of data queues.
rx_buf_pools – Pointer to configuration of Rx queue buffers. See rx_buf_pool_params
callbk_fns – Pointer to callback functions for addressing events from the UMAC layer. e.g. callback function to process packet received from RPU firmware, scan result etc
- Returns:
Pointer to the context of the UMAC IF layer.
-
enum nrf_wifi_status nrf_wifi_fmac_scan(void *fmac_dev_ctx, unsigned char if_idx, struct nrf_wifi_umac_scan_info *scan_info)
Issue a scan request to the RPU firmware.
This function is used to send a command to: Instruct the RPU firmware to trigger a scan. The scan can be performed in two modes:
Auto Mode (AUTO_SCAN): In this mode, the host does not need to specify any scan specific parameters. The RPU firmware will perform the scan on all the channels permitted by and abiding by the regulations imposed by the WORLD (common denominator of all regulatory domains) regulatory domain. The scan will be performed using the wildcard SSID.
Channel Map Mode (CHANNEL_MAPPING_SCAN): In this mode the host can have fine grained control over the scan specific parameters to be used (for example, Passive/Active scan selection, Number of probe requests per active scan, Channel list to scan, Permanence on each channel, SSIDs to scan etc.). This mode expects the regulatory restrictions to be taken care by the invoker of the API.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which the scan is to be performed.
scan_info – The parameters needed by the RPU for scan operation.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_scan_res_get(void *fmac_dev_ctx, unsigned char if_idx, int scan_type)
Issue a scan results request to the RPU firmware.
This function is used to send a command to:
Instruct the RPU firmware to return the results of a scan.
scan_type defines if the scan is performed for a connection request (SCAN_CONNECT) or to display the scan results to user (SCAN_DISPLAY)
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which the scan results are to be fetched.
scan_type – The scan type (i.e. DISPLAY or CONNECT scan).
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_abort_scan(void *fmac_dev_ctx, unsigned char if_idx)
Issue abort of an ongoing scan to the RPU firmware.
This function is used to send a command to:
Instruct the RPU firmware to abort an ongoing scan request
The
if_idx
provides the interface index on which the ongoing scan is to be aborted
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which the ongoing scan is to be aborted.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_mac_addr(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, unsigned char *addr)
Get unused MAC address from base mac address.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
addr – Memory to copy the mac address to.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
unsigned char nrf_wifi_fmac_vif_idx_get(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
Assign an index for a new VIF.
This function searches for an unused VIF index and returns it.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
- Returns:
Index to be used for the new VIF In case of error MAX_NUM_VIFS will be returned.
-
unsigned char nrf_wifi_fmac_add_vif(void *fmac_dev_ctx, void *os_vif_ctx, struct nrf_wifi_umac_add_vif_info *vif_info)
Add a new virtual interface.
This function is used to send a command to:
Instruct the RPU firmware to add a new interface with parameters specified by
vif_info
.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
os_vif_ctx – Pointer to VIF context that the UMAC IF passes up the stack during invocation of callback functions like rx_frm_callbk_fn() etc.
vif_info – Information regarding the interface to be added.
- Returns:
Index (maintained by the UMAC IF layer) of the VIF that was added. In case of error MAX_NUM_VIFS will be returned.
-
enum nrf_wifi_status nrf_wifi_fmac_del_vif(void *fmac_dev_ctx, unsigned char if_idx)
Deletes a virtual interface.
This function is used to send a command to:
Instruct the RPU firmware to delete an interface which was added using
nrf_wifi_fmac_add_vif
.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface to be deleted.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_chg_vif(void *fmac_dev_ctx, unsigned char if_idx, struct nrf_wifi_umac_chg_vif_attr_info *vif_info)
Change the attributes of an interface.
This function is used to change the attributes of an interface identified with
if_idx
.- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which the functionality is to be bound.
vif_info – Interface specific information which needs to be passed to the RPU firmware.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_chg_vif_state(void *fmac_dev_ctx, unsigned char if_idx, struct nrf_wifi_umac_chg_vif_state_info *vif_info)
Change the state of a virtual interface.
This function is used to send a command to:
Instruct the RPU firmware to change the state of an interface identified by an index
if_idx
and parameters specified byvif_info
.The different states that can be configured are
NRF_WIFI_FMAC_IF_OP_STATE_DOWN
NRF_WIFI_FMAC_IF_OP_STATE_UP
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface whose state needs to be changed.
vif_info – State information to be changed for the interface.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_set_vif_macaddr(void *fmac_dev_ctx, unsigned char if_idx, unsigned char *mac_addr)
Set MAC address on interface.
This function is used to set the MAC address of an interface identified with
if_idx
.- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface whose MAC address is to be changed.
mac_addr – MAC address to set.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_start_xmit(void *fmac_dev_ctx, unsigned char if_idx, void *netbuf)
Transmit a frame to the RPU.
This function takes care of transmitting a frame to the RPU firmware. It does the following:
Queues the frames to a transmit queue.
Based on token availability, sends one or more frames to the RPU using the command for transmission.
The firmware sends an event once the command has been processed to indicate whether the frame(s) have been transmitted/aborted.
The driver can cleanup the frame buffers after receiving this event.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which the frame is to be transmitted.
netbuf – Pointer to the OS specific network buffer.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_suspend(void *fmac_dev_ctx)
Inform the RPU firmware that host is going to suspend state.
This function is used to send a command to:
Inform the RPU firmware that host is going to suspend state.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_resume(void *fmac_dev_ctx)
Notify RPU firmware that host has resumed from a suspended state.
This function is used to send a command to:
Inform the RPU firmware that host has resumed from a suspended state.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_get_tx_power(void *fmac_dev_ctx, unsigned int if_idx)
Get tx power.
This function is used to send a command to:
Get the transmit power on a particular interface given by
if_idx
.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – VIF index.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_get_channel(void *fmac_dev_ctx, unsigned int if_idx)
Get channel definition.
This function is used to send a command to:
Get the channel configured on a particular interface given by /p if_idx.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – VIF index.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_get_station(void *fmac_dev_ctx, unsigned int if_idx, unsigned char *mac)
Get station statistics.
This function is used to send a command to:
Get station statistics using a MAC address.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – VIF index.
mac – MAC address of the station.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_get_interface(void *dev_ctx, unsigned int if_idx)
-
enum nrf_wifi_status nrf_wifi_fmac_set_power_save(void *fmac_dev_ctx, unsigned char if_idx, bool state)
Configure WLAN power management.
This function is used to send a command to:
The RPU firmware to Enable/Disable WLAN Power management.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which power management is to be set.
state – Enable/Disable of WLAN power management.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_set_uapsd_queue(void *fmac_dev_ctx, unsigned char if_idx, unsigned int uapsd_queue)
Configure WLAN U-APSD queue.
This function is used to send a command (NRF_WIFI_UMAC_CMD_CONFIG_UAPSD) to:
The RPU firmware to set a U-APSD queue value.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which power management is to be set.
uapsd_queue – Queue to be set for U-APSD.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_set_power_save_timeout(void *fmac_dev_ctx, unsigned char if_idx, int ps_timeout)
Configure Power save timeout.
This function is used to send a command (NRF_WIFI_UMAC_CMD_SET_POWER_SAVE_TIMEOUT) to:
The RPU firmware to set power save inactivity time.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which power management is to be set.
ps_timeout – Power save inactivity time.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_set_qos_map(void *fmac_dev_ctx, unsigned char if_idx, struct nrf_wifi_umac_qos_map_info *qos_info)
Configure qos_map of for data.
This function is used to send a command to:
The RPU firmware to set QOS map information.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which the qos map be set.
qos_info – qos_map information.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_set_wowlan(void *fmac_dev_ctx, unsigned int var)
Configure WoWLAN.
This function is used to send a command to the RPU firmware to:
Configure wakeup trigger condition in RPU.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
var – Wakeup trigger condition.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_get_wiphy(void *fmac_dev_ctx, unsigned char if_idx)
Get PHY configuration.
This function is used to get PHY configuration from the RPU firmware.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which the CMD needs to be sent.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_register_frame(void *fmac_dev_ctx, unsigned char if_idx, struct nrf_wifi_umac_mgmt_frame_info *frame_info)
Register to get MGMT frames.
Register with the RPU firmware to receive specific MGMT frames from the RPU to the host side.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which the CMD needs to be sent.
frame_info – Information regarding the management frame.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_set_wiphy_params(void *fmac_dev_ctx, unsigned char if_idx, struct nrf_wifi_umac_set_wiphy_info *wiphy_info)
Set wiphy parameters.
This function is used to send a command to the RPU firmware to:
Configure parameters interface specific parameters on an interface identified by
if_idx
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which the CMD needs to be sent.
wiphy_info – wiphy parameters
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_twt_setup(void *fmac_dev_ctx, unsigned char if_idx, struct nrf_wifi_umac_config_twt_info *twt_info)
TWT setup command.
This function is used to send a command to the RPU firmware to:
Configure TWT setup specific parameters.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which the TWT parameters be set.
twt_info – TWT parameters.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_twt_teardown(void *fmac_dev_ctx, unsigned char if_idx, struct nrf_wifi_umac_config_twt_info *twt_info)
TWT teardown command.
This function is used to send a command to the RPU firmware to:
Tear down an existing TWT session.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which the TWT parameters are to be set.
twt_info – TWT parameters.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_get_conn_info(void *fmac_dev_ctx, unsigned char if_idx)
Get connection info from RPU.
This function is used to send a command to the RPU firmware to:
Fetch connection information.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
void nrf_wifi_fmac_deinit(struct nrf_wifi_fmac_priv *fpriv)
De-initializes the UMAC IF layer.
This function de-initializes the UMAC IF layer of the RPU WLAN FullMAC driver. It does the following:
De-initializes the HAL layer.
Frees the context for the UMAC IF layer.
- Parameters:
fpriv – Pointer to the context of the UMAC IF layer.
- Returns:
None
-
void nrf_wifi_fmac_dev_rem(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
Removes a RPU instance.
This is a wrapper function which frees the memory for an RPU instance at the UMAC layer.
- Parameters:
fmac_dev_ctx – Pointer to the context of the RPU instance to be removed.
- Returns:
None.
-
enum nrf_wifi_status nrf_wifi_fmac_dev_init(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, unsigned int phy_calib, enum op_band op_band, bool beamforming, struct nrf_wifi_tx_pwr_ctrl_params *tx_pwr_ctrl_params, struct nrf_wifi_tx_pwr_ceil_params *tx_pwr_ceil_params, struct nrf_wifi_board_params *board_params)
Initializes a RPU instance.
This function initializes the firmware of an RPU instance. The following is addressed
BAL layer device initialization
HAL layer device initialization
FW initialization and PHY calibration data is sent to PHY
RX and TX buffers are initialized, tasklets assigned
- Parameters:
fmac_dev_ctx – Pointer to the context of the RPU instance to be removed.
sleep_type – Type of RPU sleep.
phy_calib – PHY calibration flags to be passed to the RPU.
op_band – Operating band of the RPU.
beamforming – Enable/disable Wi-Fi beamforming.
tx_pwr_ctrl_params – TX power control parameters to be passed to the RPU.
tx_pwr_ceil_params – TX power ceil parameters for both frequency bands.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
void nrf_wifi_fmac_dev_deinit(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
De-initializes a RPU instance.
This function de-initializes the firmware of an RPU instance.
RPU UMAC deinitialization command is executed
RX and TX is deallocated for firmware via UMAC command
- Parameters:
fmac_dev_ctx – Pointer to the context of the RPU instance to be removed.
- Returns:
None.
-
enum nrf_wifi_status nrf_wifi_fmac_set_listen_interval(void *fmac_dev_ctx, unsigned char if_idx, unsigned short listen_interval)
Configure WLAN listen interval.
This function is used to send a command to RPU to configure listen interval. Refer section 9.4.1.6 is 802.11-2020 standard for details on listen interval
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which power management is to be set.
listen_interval – listen interval to be configured.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_set_ps_wakeup_mode(void *fmac_dev_ctx, unsigned char if_idx, bool ps_wakeup_mode)
Configure WLAN PS wakeup mode to DTIM interval or listen interval.
This function is used to configure PS wakeup mode, PS wakeup mode can be configured to:
DTIM interval based PS mode
Listen interval based PS mode Default mode is set to DTIM interval based PS mode
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
if_idx – Index of the interface on which power management is to be set.
ps_wakeup_mode – Enable listen interval based ps(default is DTIM based)
- Return values:
NRF_WIFI_STATUS_SUCCESS – On success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_check_mode_validity(unsigned char mode)
Check if a valid mode is being set.
This function checks the mode value attempted to be configured is a valid mode as supported by the driver. If the mode is valid, the mode will be configured to the lower layers, else an error value will be flagged.
- Parameters:
mode – The mode value attempted to be configured.
- Return values:
WIFI_NRF_STATUS_SUCCESS – On success
WIFI_NRF_STATUS_FAIL – On failure
-
struct nrf_wifi_fmac_callbk_fns
- #include <fmac_structs.h>
Callback functions to be invoked by UMAC IF layer when a particular event occurs.
This structure contains function pointers to all the callback functions that the UMAC IF layer needs to invoke for various events.
Public Members
-
void (*rpu_recovery_callbk_fn)(void *os_vif_ctx, void *event_data, unsigned int event_len)
Callback function to be called when RPU recovery is required.
-
void (*scan_start_callbk_fn)(void *os_vif_ctx, struct nrf_wifi_umac_event_trigger_scan *scan_start_event, unsigned int event_len)
Callback function to be called when a scan is started.
-
void (*scan_done_callbk_fn)(void *os_vif_ctx, struct nrf_wifi_umac_event_trigger_scan *scan_done_event, unsigned int event_len)
Callback function to be called when a scan is done.
-
void (*scan_abort_callbk_fn)(void *os_vif_ctx, struct nrf_wifi_umac_event_trigger_scan *scan_done_event, unsigned int event_len)
Callback function to be called when a scan is aborted.
-
void (*scan_res_callbk_fn)(void *os_vif_ctx, struct nrf_wifi_umac_event_new_scan_results *scan_res, unsigned int event_len, bool more_res)
Callback function to be called when a scan result is received.
-
void (*disp_scan_res_callbk_fn)(void *os_vif_ctx, struct nrf_wifi_umac_event_new_scan_display_results *scan_res, unsigned int event_len, bool more_res)
Callback function to be called when a display scan result is received.
-
void (*event_get_reg)(void *if_priv, struct nrf_wifi_reg *get_reg, unsigned int event_len)
Callback function to be called when a get regulatory response is received.
-
void (*rpu_recovery_callbk_fn)(void *os_vif_ctx, void *event_data, unsigned int event_len)
-
struct nrf_wifi_fmac_priv_def
- #include <fmac_structs.h>
Structure to hold context information for the UMAC IF layer.
This structure maintains the context information necessary for the operation of the UMAC IF layer.
Public Members
-
struct nrf_wifi_fmac_callbk_fns callbk_fns
Callback functions to be called on various events.
-
struct nrf_wifi_data_config_params data_config
Data path configuration parameters.
-
struct rx_buf_pool_params rx_buf_pools[MAX_NUM_OF_RX_QUEUES]
RX buffer pool configuration data.
-
unsigned int rx_desc[MAX_NUM_OF_RX_QUEUES]
Starting RX descriptor number for a RX buffer pool.
-
unsigned int num_rx_bufs
Maximum number of host buffers needed for RX frames.
-
struct nrf_wifi_fmac_callbk_fns callbk_fns
-
struct nrf_wifi_fmac_dev_ctx_def
- #include <fmac_structs.h>
Structure to hold per device context information for the UMAC IF layer.
This structure maintains the context information necessary for a single instance of a FullMAC-based RPU.
Public Members
-
struct nrf_wifi_fmac_vif_ctx *vif_ctx[MAX_NUM_VIFS]
Array of pointers to virtual interfaces created on this device.
-
struct rpu_host_stats host_stats
Host statistics.
-
unsigned char num_sta
Number of interfaces in STA mode.
-
unsigned char num_ap
Number of interfaces in AP mode.
-
struct nrf_wifi_fmac_buf_map_info *rx_buf_info
Queue for storing mapping info of RX buffers.
-
struct nrf_wifi_fmac_vif_ctx *vif_ctx[MAX_NUM_VIFS]
-
struct nrf_wifi_fmac_vif_ctx
- #include <fmac_structs.h>
Structure to hold per VIF context information for the UMAC IF layer.
This structure maintains the context information necessary for a single instance of an VIF.
Public Members
-
struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx
Handle to the FMAC IF abstraction layer.
-
void *os_vif_ctx
Handle to the OS abstraction layer.
-
char mac_addr[NRF_WIFI_ETH_ADDR_LEN]
MAC address of the VIF.
-
int groupwise_cipher
Groupwise cipher being used on this VIF.
-
bool ifflags
Interface flags related to this VIF.
-
int if_type
Interface type of this VIF.
-
unsigned char bssid[NRF_WIFI_ETH_ADDR_LEN]
BSSID of the AP to which this VIF is connected (applicable only in STA mode).
-
unsigned char mode
Mode setting for the current VIF
-
struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx
-
struct nrf_wifi_fmac_buf_map_info
- #include <fmac_structs.h>
Structure to hold TX/RX buffer pool configuration data.
-
enum nrf_wifi_fmac_ac
Radio Test mode
The Radio Test mode is used for testing the RF performance of the nRF70 Series device, mainly to characterize the RF.
Note
Documentation for data structure definitions is disabled for this module. It will be enabled in the future.
nrf_wifi/fw_if/umac_if/src/radio_test/fmac_api.c
- group nrf_wifi_api_radio_test
Header containing API declarations for the FMAC IF Layer of the Wi-Fi driver.
Header containing declarations for utility functions for FMAC IF Layer of the Wi-Fi driver.
TODO: This file is not added doxygen to avoid duplicate warnings.
Functions
-
struct nrf_wifi_fmac_priv *nrf_wifi_fmac_init_rt(void)
Initializes the UMAC IF layer.
This function initializes the UMAC IF layer of the RPU WLAN FullMAC driver. It does the following:
Creates and initializes the context for the UMAC IF layer.
Initializes the OS abstraction Layer
Initializes the HAL layer.
Registers the driver to the underlying Operating System.
- Returns:
Pointer to the context of the UMAC IF layer.
-
enum nrf_wifi_status nrf_wifi_fmac_radio_test_init(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, struct rpu_conf_params *params)
Initialize the RPU for radio tests.
This function is used to send a command to:
The RPU firmware to initialize it for radio test mode.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
params – Parameters necessary for the initialization.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On Success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_radio_test_prog_tx(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, struct rpu_conf_params *params)
Start TX tests in radio test mode.
This function is used to send a command to:
The RPU firmware to start the TX tests in radio test mode.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
params – Parameters necessary for the TX tests.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On Success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_radio_test_prog_rx(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, struct rpu_conf_params *params)
Start RX tests in radio test mode.
This function is used to send a command to:
The RPU firmware to start the RX tests in radio test mode.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
params – Parameters necessary for the RX tests.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On Success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_rf_test_rx_cap(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, enum nrf_wifi_rf_test rf_test_type, void *cap_data, unsigned short int num_samples, unsigned char lna_gain, unsigned char bb_gain)
Start RF test capture in radio test mode.
This function is used to send a command to:
The RPU firmware to start the RF test capture in radio test mode.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
rf_test_type – Type of RF test to be performed.
cap_data – Pointer to the memory where the RF test capture is to be stored.
num_samples – Number of RF test samples to capture.
lna_gain – LNA gain value.
bb_gain – Baseband gain value.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On Success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_rf_test_tx_tone(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, unsigned char enable, signed char tone_freq, signed char tx_power)
Start/Stop RF TX tone test in radio test mode.
This function is used to send a command to:
The RPU firmware to start the RF TX tone test in radio test mode.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
enable – Enable/Disable TX tone test.
tone_freq – Desired tone frequency in MHz in steps of 1 MHz from -10 MHz to +10 MHz.
tx_power – Desired TX power in the range -16dBm to +24dBm.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On Success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_rf_test_dpd(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, unsigned char enable)
Start/Stop RF DPD test in radio test mode.
This function is used to send a command to:
The RPU firmware to start the RF DPD test in radio test mode.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
enable – Enable/Disable DPD test.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On Success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_rf_get_temp(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
Get temperature in Fahrenheit using temperature sensor.
This function is used to send a command to:
The RPU firmware to get the current temperature using the radio test mode.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On Success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_rf_get_rf_rssi(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
Get RF RSSI status.
This function is used to send a command to:
The RPU firmware to get RF RSSI status in radio test mode.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On Success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_set_xo_val(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, unsigned char value)
Set XO adjustment value.
This function is used to send a command to:
The RPU firmware to set XO adjustment value in radio test mode.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
value – XO adjustment value.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On Success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
enum nrf_wifi_status nrf_wifi_fmac_rf_test_compute_xo(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
Get XO calibrated value.
This function is used to send a command to:
The RPU firmware wherein the RPU firmware estimates and returns optimal XO value.
- Parameters:
fmac_dev_ctx – Pointer to the UMAC IF context for a RPU WLAN device.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On Success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
void nrf_wifi_fmac_deinit_rt(struct nrf_wifi_fmac_priv *fpriv)
De-initializes the UMAC IF layer.
This function de-initializes the UMAC IF layer of the RPU WLAN FullMAC driver. It does the following:
De-initializes the HAL layer.
Frees the context for the UMAC IF layer.
- Parameters:
fpriv – Pointer to the context of the UMAC IF layer.
- Returns:
None
-
void nrf_wifi_fmac_dev_rem_rt(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
Removes a RPU instance.
This function handles the removal of an RPU instance at the UMAC IF layer.
- Parameters:
fmac_dev_ctx – Pointer to the context of the RPU instance to be removed.
- Returns:
None.
-
enum nrf_wifi_status nrf_wifi_fmac_dev_init_rt(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, unsigned int phy_calib, enum op_band op_band, bool beamforming, struct nrf_wifi_tx_pwr_ctrl_params *tx_pwr_ctrl, struct nrf_wifi_tx_pwr_ceil_params *tx_pwr_ceil_params, struct nrf_wifi_board_params *board_params)
Initializes a RPU instance.
This function initializes the firmware of an RPU instance.
- Parameters:
fmac_dev_ctx – Pointer to the context of the RPU instance to be removed.
sleep_type – Type of RPU sleep.
phy_calib – PHY calibration flags to be passed to the RPU.
op_band – Operating band of the RPU.
beamforming – Enable/disable Wi-Fi beamforming.
tx_pwr_ctrl – TX power control parameters to be passed to the RPU.
- Return values:
NRF_WIFI_STATUS_SUCCESS – On Success
NRF_WIFI_STATUS_FAIL – On failure to execute command
-
void nrf_wifi_fmac_dev_deinit_rt(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
De-initializes a RPU instance.
This function de-initializes the firmware of an RPU instance.
- Parameters:
fmac_dev_ctx – Pointer to the context of the RPU instance to be removed.
- Returns:
None.
-
struct nrf_wifi_fmac_dev_ctx_rt
- #include <fmac_structs.h>
Structure to hold per device context information for the UMAC IF layer.
This structure maintains the context information necessary for a single instance of a FullMAC-based RPU.
Public Members
-
enum nrf_wifi_rf_test rf_test_type
Firmware RF test command type.
-
void *rf_test_cap_data
Firmware RF test capability data.
-
unsigned int rf_test_cap_sz
Firmware RF test capability data size.
-
bool radio_cmd_done
Firmware RF test command is completed.
-
enum nrf_wifi_radio_test_err_status radio_cmd_status
Firmware RF test command status.
-
enum nrf_wifi_rf_test rf_test_type
-
struct nrf_wifi_fmac_priv *nrf_wifi_fmac_init_rt(void)