nrfxlib API 0.1.0
Loading...
Searching...
No Matches
fmac_api_common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
15#ifndef __FMAC_API_COMMON_H__
16#define __FMAC_API_COMMON_H__
17
18#include "osal_api.h"
19#include "hal_api.h"
20#include "host_rpu_umac_if.h"
21#include "host_rpu_data_if.h"
22#include "host_rpu_sys_if.h"
23
24#include "fmac_structs.h"
25#include "fmac_cmd.h"
26#include "fmac_event.h"
27#include "fmac_vif.h"
28#include "fmac_bb.h"
29
30#include <patch_info.h>
31
32#define MIN(a, b) (((a) < (b)) ? (a) : (b))
33
47 void *os_dev_ctx);
48
62 enum rpu_op_mode op_mode,
63 struct rpu_op_stats *stats);
64
65
73 struct nrf70_fw_image_info *info);
74
86 const void *fw_data,
87 unsigned int fw_size,
88 struct nrf_wifi_fmac_fw_info *fw_info);
89
90
102
115
129 enum RPU_PROC_TYPE rpu_proc,
130 struct nrf_wifi_fmac_fw_chunk_info *fw_chunk);
131
144 struct nrf_wifi_fmac_fw_info *fmac_fw);
145
146
157 unsigned int *fw_ver);
158
172 unsigned char he_ltf,
173 unsigned char he_gi,
174 unsigned char enabled);
175
176#if defined(CONFIG_NRF700X_UTIL) || defined(__DOXYGEN__)
177enum nrf_wifi_status nrf_wifi_fmac_set_tx_rate(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx,
178 unsigned char rate_flag,
179 int data_rate);
180#if defined(CONFIG_NRF_WIFI_LOW_POWER) || defined(__DOXYGEN__)
192enum nrf_wifi_status nrf_wifi_fmac_get_host_rpu_ps_ctrl_state(void *fmac_dev_ctx,
193 int *rpu_ps_ctrl_state);
194#endif /* CONFIG_NRF_WIFI_LOW_POWER */
195#endif /* CONFIG_NRF700X_UTIL */
208 void *cmd, unsigned int cmd_len);
209
210
224 unsigned char if_idx,
225 struct nrf_wifi_umac_mcast_cfg *mcast_info);
226
227
239 unsigned char vif_idx,
240 unsigned char *mac_addr);
241
242
255 struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx,
256 struct nrf_wifi_phy_rf_params *rf_params);
267 struct nrf_wifi_fmac_reg_info *reg_info);
268
279 struct nrf_wifi_fmac_reg_info *reg_info);
280
292 unsigned char if_idx);
293
305 unsigned int package_info,
306 unsigned char *str);
307
308#ifdef CONFIG_NRF700X_SYSTEM_WITH_RAW_MODES
321enum nrf_wifi_status nrf_wifi_fmac_set_mode(void *dev_ctx,
322 unsigned char if_idx,
323 unsigned char mode);
324#endif
325
326#if defined(CONFIG_NRF700X_RAW_DATA_TX) || defined(CONFIG_NRF700X_RAW_DATA_RX)
339enum nrf_wifi_status nrf_wifi_fmac_set_channel(void *dev_ctx,
340 unsigned char if_idx,
341 unsigned int channel);
342
343#endif /* CONFIG_NRF700X_RAW_DATA_TX || CONFIG_NRF700X_RAW_DATA_RX */
344
345#if defined(CONFIG_NRF700X_RAW_DATA_RX) || defined(CONFIG_NRF700X_PROMISC_DATA_RX)
358enum nrf_wifi_status nrf_wifi_fmac_set_packet_filter(void *dev_ctx, unsigned char filter,
359 unsigned char if_idx,
360 unsigned short buffer_size);
361#endif /* CONFIG_NRF700X_RAW_DATA_RX || CONFIG_NRF700X_PROMISC_DATA_RX */
362
373
377#endif /* __FMAC_API_COMMON_H__ */
Header containing event specific declarations for the FMAC IF Layer of the Wi-Fi driver.
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.
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.
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.
int nrf_wifi_phy_rf_params_init(struct nrf_wifi_phy_rf_params *prf, unsigned int package_info, unsigned char *str)
Initialize RF parameters.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
enum nrf_wifi_status nrf_wifi_fmac_stats_reset(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
Issue a request to reset stats of the RPU.
rpu_op_mode
This enum provides a list of different operating modes.
Definition: host_rpu_sys_if.h:65
Header containing API declarations for the HAL Layer of the Wi-Fi driver.
RPU_PROC_TYPE
Enumeration of RPU processor types.
Definition: hal_structs.h:32
nrf_wifi_status
The status of an operation performed by the RPU driver.
Definition: osal_structs.h:29
Definition: patch_info.h:49
void * os_dev_ctx
Definition: fmac_structs_common.h:150
struct nrf_wifi_fmac_priv * fpriv
Definition: fmac_structs_common.h:148
Structure to hold common fmac dev context parameter data.
Definition: fmac_structs_common.h:146
Structure to hold FW patch chunk information.
Definition: fmac_structs_common.h:83
Structure to hold FW patch information for LMAC and UMAC.
Definition: fmac_structs_common.h:68
Structure to hold common fmac priv parameter data.
Definition: fmac_structs_common.h:135
Structure to hold Regulatory parameter data.
Definition: fmac_structs_common.h:120
Definition: phy_rf_params.h:299
This structure represents the parameters used to configure the multicast address filter.
Definition: host_rpu_umac_if.h:1195
Structure to hold per device host and firmware statistics.
Definition: fmac_structs_common.h:45