nrfxlib API 0.1.0
Loading...
Searching...
No Matches
fmac_api.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
16#ifndef __FMAC_API_H__
17#define __FMAC_API_H__
18
19#include "osal_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#include "fmac_api_common.h"
30
31
32
53 struct rx_buf_pool_params *rx_buf_pools,
54 struct nrf_wifi_fmac_callbk_fns *callbk_fns);
55
84enum nrf_wifi_status nrf_wifi_fmac_scan(void *fmac_dev_ctx,
85 unsigned char if_idx,
86 struct nrf_wifi_umac_scan_info *scan_info);
87
88
105 unsigned char if_idx,
106 int scan_type);
107
122 unsigned char if_idx);
123
124#if defined(CONFIG_NRF700X_STA_MODE) || defined(__DOXYGEN__)
140enum nrf_wifi_status nrf_wifi_fmac_auth(void *fmac_dev_ctx,
141 unsigned char if_idx,
142 struct nrf_wifi_umac_auth_info *auth_info);
143
144
159enum nrf_wifi_status nrf_wifi_fmac_deauth(void *fmac_dev_ctx,
160 unsigned char if_idx,
161 struct nrf_wifi_umac_disconn_info *deauth_info);
162
163
179enum nrf_wifi_status nrf_wifi_fmac_assoc(void *fmac_dev_ctx,
180 unsigned char if_idx,
181 struct nrf_wifi_umac_assoc_info *assoc_info);
182
183
198enum nrf_wifi_status nrf_wifi_fmac_disassoc(void *fmac_dev_ctx,
199 unsigned char if_idx,
200 struct nrf_wifi_umac_disconn_info *disassoc_info);
201
202
218enum nrf_wifi_status nrf_wifi_fmac_add_key(void *fmac_dev_ctx,
219 unsigned char if_idx,
220 struct nrf_wifi_umac_key_info *key_info,
221 const char *mac_addr);
222
223
239enum nrf_wifi_status nrf_wifi_fmac_del_key(void *fmac_dev_ctx,
240 unsigned char if_idx,
241 struct nrf_wifi_umac_key_info *key_info,
242 const char *mac_addr);
243
244
260enum nrf_wifi_status nrf_wifi_fmac_set_key(void *fmac_dev_ctx,
261 unsigned char if_idx,
262 struct nrf_wifi_umac_key_info *key_info);
263
264
277enum nrf_wifi_status nrf_wifi_fmac_set_bss(void *fmac_dev_ctx,
278 unsigned char if_idx,
279 struct nrf_wifi_umac_bss_info *bss_info);
280
281
294enum nrf_wifi_status nrf_wifi_fmac_chg_bcn(void *fmac_dev_ctx,
295 unsigned char if_idx,
296 struct nrf_wifi_umac_set_beacon_info *data);
297
311enum nrf_wifi_status nrf_wifi_fmac_start_ap(void *fmac_dev_ctx,
312 unsigned char if_idx,
313 struct nrf_wifi_umac_start_ap_info *ap_info);
314
315
328enum nrf_wifi_status nrf_wifi_fmac_stop_ap(void *fmac_dev_ctx,
329 unsigned char if_idx);
330
331
344enum nrf_wifi_status nrf_wifi_fmac_p2p_dev_start(void *fmac_dev_ctx,
345 unsigned char if_idx);
346
347
360enum nrf_wifi_status nrf_wifi_fmac_p2p_dev_stop(void *fmac_dev_ctx,
361 unsigned char if_idx);
362
376enum nrf_wifi_status nrf_wifi_fmac_p2p_roc_start(void *fmac_dev_ctx,
377 unsigned char if_idx,
378 struct remain_on_channel_info *roc_info);
379
393enum nrf_wifi_status nrf_wifi_fmac_p2p_roc_stop(void *fmac_dev_ctx,
394 unsigned char if_idx,
395 unsigned long long cookie);
396
411enum nrf_wifi_status nrf_wifi_fmac_mgmt_tx(void *fmac_dev_ctx,
412 unsigned char if_idx,
413 struct nrf_wifi_umac_mgmt_tx_info *mgmt_tx_info);
414
415
429enum nrf_wifi_status nrf_wifi_fmac_del_sta(void *fmac_dev_ctx,
430 unsigned char if_idx,
431 struct nrf_wifi_umac_del_sta_info *del_sta_info);
432
433
446enum nrf_wifi_status nrf_wifi_fmac_add_sta(void *fmac_dev_ctx,
447 unsigned char if_idx,
448 struct nrf_wifi_umac_add_sta_info *add_sta_info);
449
462enum nrf_wifi_status nrf_wifi_fmac_chg_sta(void *fmac_dev_ctx,
463 unsigned char if_idx,
464 struct nrf_wifi_umac_chg_sta_info *chg_sta_info);
465
466
467
483enum nrf_wifi_status nrf_wifi_fmac_mgmt_frame_reg(void *fmac_dev_ctx,
484 unsigned char if_idx,
485 struct nrf_wifi_umac_mgmt_frame_info *frame_info);
486
487#endif /* CONFIG_NRF700X_STA_MODE */
497 unsigned char *addr);
498
508unsigned char nrf_wifi_fmac_vif_idx_get(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx);
509
525unsigned char nrf_wifi_fmac_add_vif(void *fmac_dev_ctx,
526 void *os_vif_ctx,
527 struct nrf_wifi_umac_add_vif_info *vif_info);
528
529
543 unsigned char if_idx);
544
560 unsigned char if_idx,
561 struct nrf_wifi_umac_chg_vif_attr_info *vif_info);
562
563
581 unsigned char if_idx,
582 struct nrf_wifi_umac_chg_vif_state_info *vif_info);
583
584
598 unsigned char if_idx,
599 unsigned char *mac_addr);
600
623 unsigned char if_idx,
624 void *netbuf);
625
636enum nrf_wifi_status nrf_wifi_fmac_suspend(void *fmac_dev_ctx);
637
638
649enum nrf_wifi_status nrf_wifi_fmac_resume(void *fmac_dev_ctx);
650
651
666 unsigned int if_idx);
667
681 unsigned int if_idx);
682
697 unsigned int if_idx,
698 unsigned char *mac);
699
700
701/* @brief Get interface statistics
702 *
703 * @param dev_ctx Pointer to the UMAC IF context for a RPU WLAN device.
704 * @param if_idx VIF index.
705 *
706 * This function is used to send a command to:
707 * - Get interface statistics using interface index \p if_idx.
708 *
709 *@retval NRF_WIFI_STATUS_SUCCESS On success
710 *@retval NRF_WIFI_STATUS_FAIL On failure to execute command
711 */
713 unsigned int if_idx);
714
715
729 unsigned char if_idx,
730 bool state);
731
745 unsigned char if_idx,
746 unsigned int uapsd_queue);
747
761 unsigned char if_idx,
762 int ps_timeout);
763
777 unsigned char if_idx,
778 struct nrf_wifi_umac_qos_map_info *qos_info);
779
792 unsigned int var);
793
804enum nrf_wifi_status nrf_wifi_fmac_get_wiphy(void *fmac_dev_ctx, unsigned char if_idx);
805
817enum nrf_wifi_status nrf_wifi_fmac_register_frame(void *fmac_dev_ctx, unsigned char if_idx,
818 struct nrf_wifi_umac_mgmt_frame_info *frame_info);
819
835 unsigned char if_idx,
836 struct nrf_wifi_umac_set_wiphy_info *wiphy_info);
837
851 unsigned char if_idx,
852 struct nrf_wifi_umac_config_twt_info *twt_info);
853
867 unsigned char if_idx,
868 struct nrf_wifi_umac_config_twt_info *twt_info);
869
882 unsigned char if_idx);
883
896
907
908
930#if defined(CONFIG_NRF_WIFI_LOW_POWER) || defined(__DOXYGEN__)
931 int sleep_type,
932#endif /* CONFIG_NRF_WIFI_LOW_POWER */
933 unsigned int phy_calib,
934 enum op_band op_band,
935 bool beamforming,
936 struct nrf_wifi_tx_pwr_ctrl_params *tx_pwr_ctrl_params,
937 struct nrf_wifi_tx_pwr_ceil_params *tx_pwr_ceil_params,
938 struct nrf_wifi_board_params *board_params);
939
940
952
966 unsigned char if_idx,
967 unsigned short listen_interval);
968
985 unsigned char if_idx,
986 bool ps_wakeup_mode);
987
988#ifdef CONFIG_NRF700X_RAW_DATA_TX
1010enum nrf_wifi_status nrf_wifi_fmac_start_rawpkt_xmit(void *dev_ctx,
1011 unsigned char if_idx,
1012 void *net_packet);
1013
1025bool nrf_wifi_util_is_rawpktmode_enabled(struct nrf_wifi_fmac_vif_ctx *vif);
1026#endif /* CONFIG_NRF700X_RAW_DATA_TX */
1027
1041
1042#if defined(CONFIG_NRF_WIFI_RPU_RECOVERY) || defined(__DOXYGEN__)
1044enum nrf_wifi_status nrf_wifi_fmac_rpu_recovery_callback(void *mac_dev_ctx,
1045 void *event_data,
1046 unsigned int len);
1048#endif /* CONFIG_NRF_RPU_RECOVERY */
1052#endif /* __FMAC_API_H__ */
Header containing event specific declarations for the FMAC IF Layer of the Wi-Fi driver.
enum nrf_wifi_status nrf_wifi_fmac_get_wiphy(void *fmac_dev_ctx, unsigned char if_idx)
Get PHY configuration.
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)
Initialize an RPU instance.
enum nrf_wifi_status nrf_wifi_fmac_get_interface(void *dev_ctx, unsigned int if_idx)
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.
unsigned char nrf_wifi_fmac_vif_idx_get(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
Assign an index for a new VIF.
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.
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.
enum nrf_wifi_status nrf_wifi_fmac_resume(void *fmac_dev_ctx)
Notify RPU firmware that host has resumed from a suspended state.
void nrf_wifi_fmac_deinit(struct nrf_wifi_fmac_priv *fpriv)
De-initialize the UMAC IF layer.
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.
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.
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.
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.
void nrf_wifi_fmac_dev_rem(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
Removes a RPU instance.
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.
enum nrf_wifi_status nrf_wifi_fmac_suspend(void *fmac_dev_ctx)
Inform the RPU firmware that host is going to suspend state.
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.
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.
enum nrf_wifi_status nrf_wifi_fmac_get_channel(void *fmac_dev_ctx, unsigned int if_idx)
Get channel definition.
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.
enum nrf_wifi_status nrf_wifi_fmac_del_vif(void *fmac_dev_ctx, unsigned char if_idx)
Deletes a virtual interface.
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.
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)
Initialize the UMAC IF layer.
void nrf_wifi_fmac_dev_deinit(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx)
De-initialize a RPU instance.
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.
enum nrf_wifi_status nrf_wifi_fmac_set_power_save(void *fmac_dev_ctx, unsigned char if_idx, bool state)
Configure WLAN power management.
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.
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.
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.
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.
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.
enum nrf_wifi_status nrf_wifi_fmac_get_conn_info(void *fmac_dev_ctx, unsigned char if_idx)
Get connection info from RPU.
enum nrf_wifi_status nrf_wifi_fmac_set_wowlan(void *fmac_dev_ctx, unsigned int var)
Configure WoWLAN.
enum nrf_wifi_status nrf_wifi_fmac_get_station(void *fmac_dev_ctx, unsigned int if_idx, unsigned char *mac)
Get station statistics.
enum nrf_wifi_status nrf_wifi_fmac_get_tx_power(void *fmac_dev_ctx, unsigned int if_idx)
Get tx power.
enum nrf_wifi_status nrf_wifi_check_mode_validity(unsigned char mode)
Check if a valid mode is being set.
op_band
This enum defines different types of operating bands.
Definition: host_rpu_sys_if.h:843
nrf_wifi_status
The status of an operation performed by the RPU driver.
Definition: osal_structs.h:29
This structure defines board dependent parameters like PCB loss.
Definition: host_rpu_sys_if.h:828
This structure specifies the configuration parameters used for configuring data-related settings.
Definition: host_rpu_sys_if.h:702
Callback functions to be invoked by UMAC IF layer when a particular event occurs.
Definition: fmac_structs.h:101
Structure to hold common fmac dev context parameter data.
Definition: fmac_structs_common.h:146
Structure to hold common fmac priv parameter data.
Definition: fmac_structs_common.h:135
Structure to hold per VIF context information for the UMAC IF layer.
Definition: fmac_structs.h:497
This structure defines the parameters used to control the max transmit (TX) power in both frequency b...
Definition: phy_rf_params.h:546
This structure defines the parameters used to control the transmit (TX) power.
Definition: host_rpu_sys_if.h:761
This structure describes the parameters for adding a new station entry to the RPU.
Definition: host_rpu_umac_if.h:1930
This structure contains the information to be passed to the RPU to create a new virtual interface usi...
Definition: host_rpu_umac_if.h:1403
This structure specifies the parameters to be used when sending an association request.
Definition: host_rpu_umac_if.h:1314
This structure specifies the parameters to be used when sending an authentication request.
Definition: host_rpu_umac_if.h:1251
This structure contains parameters that describe the BSS (Basic Service Set) information.
Definition: host_rpu_umac_if.h:1532
This structure represents the information needed to update a station entry in the RPU.
Definition: host_rpu_umac_if.h:1854
This structure contains the information that needs to be provided to the RPU when modifying the attri...
Definition: host_rpu_umac_if.h:2094
This structure contains the information that needs to be passed to the RPU when changing the interfac...
Definition: host_rpu_umac_if.h:2123
This structure describes the TWT information.
Definition: host_rpu_umac_if.h:2355
This structure contains the parameters to delete a station.
Definition: host_rpu_umac_if.h:1732
This structure specifies the parameters to be passed while sending a deauthentication request (NRF_WI...
Definition: host_rpu_umac_if.h:1368
This structure contains information about a security key.
Definition: host_rpu_umac_if.h:1095
This structure contains information about the type of management frame that should be passed to the d...
Definition: host_rpu_umac_if.h:1463
This structure describes the parameters required to transmit a management frame from the host.
Definition: host_rpu_umac_if.h:2186
This structure represents the information of qos_map.
Definition: host_rpu_umac_if.h:2263
This structure contains details about scan request information.
Definition: host_rpu_umac_if.h:1131
This structure represents the parameters that must be passed to the RPU when configuring Beacon and P...
Definition: host_rpu_umac_if.h:2067
This structure contains information about the configuration parameters needed to set up and configure...
Definition: host_rpu_umac_if.h:1668
This structure describes the parameters required to be passed to the RPU when initiating a SoftAP (So...
Definition: host_rpu_umac_if.h:2003
This structure contains information relevant to the "Remain on Channel" operation....
Definition: host_rpu_umac_if.h:2946
Definition: lmac_if_common.h:202