1 /* 2 * Copyright (c) 2024 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * @brief Header containing WiFi management operation implementations 9 * for the Zephyr OS. 10 */ 11 12 #ifndef __ZEPHYR_WIFI_MGMT_H__ 13 #define __ZEPHYR_WIFI_MGMT_H__ 14 #include <math.h> 15 16 #include <zephyr/device.h> 17 #include <zephyr/net/wifi_mgmt.h> 18 19 #include "osal_api.h" 20 21 /** Filter setting defines for sniffer mode. */ 22 #define WIFI_MGMT_DATA_CTRL_FILTER_SETTING 0xE 23 #define WIFI_ALL_FILTER_SETTING 0xF 24 25 struct twt_interval_float { 26 unsigned short mantissa; 27 unsigned char exponent; 28 }; 29 30 int nrf_wifi_set_power_save(const struct device *dev, 31 struct wifi_ps_params *params); 32 33 int nrf_wifi_set_twt(const struct device *dev, 34 struct wifi_twt_params *twt_params); 35 36 void nrf_wifi_event_proc_twt_setup_zep(void *vif_ctx, 37 struct nrf_wifi_umac_cmd_config_twt *twt_setup_info, 38 unsigned int event_len); 39 40 void nrf_wifi_event_proc_twt_teardown_zep(void *vif_ctx, 41 struct nrf_wifi_umac_cmd_teardown_twt *twt_teardown_info, 42 unsigned int event_len); 43 44 void nrf_wifi_event_proc_twt_sleep_zep(void *vif_ctx, 45 struct nrf_wifi_umac_event_twt_sleep *twt_sleep_info, 46 unsigned int event_len); 47 48 int nrf_wifi_twt_teardown_flows(struct nrf_wifi_vif_ctx_zep *vif_ctx_zep, 49 unsigned char start_flow_id, unsigned char end_flow_id); 50 51 int nrf_wifi_get_power_save_config(const struct device *dev, 52 struct wifi_ps_config *ps_config); 53 54 void nrf_wifi_event_proc_get_power_save_info(void *vif_ctx, 55 struct nrf_wifi_umac_event_power_save_info *ps_info, 56 unsigned int event_len); 57 58 #ifdef CONFIG_NRF70_SYSTEM_WITH_RAW_MODES 59 int nrf_wifi_mode(const struct device *dev, 60 struct wifi_mode_info *mode); 61 #endif 62 63 #if defined(CONFIG_NRF70_RAW_DATA_TX) || defined(CONFIG_NRF70_RAW_DATA_RX) 64 int nrf_wifi_channel(const struct device *dev, 65 struct wifi_channel_info *channel); 66 #endif /* CONFIG_NRF70_RAW_DATA_TX || CONFIG_NRF70_RAW_DATA_RX */ 67 68 #if defined(CONFIG_NRF70_RAW_DATA_RX) || defined(CONFIG_NRF70_PROMISC_DATA_RX) 69 int nrf_wifi_filter(const struct device *dev, 70 struct wifi_filter_info *filter); 71 #endif /* CONFIG_NRF70_RAW_DATA_RX || CONFIG_NRF70_PROMISC_DATA_RX */ 72 73 int nrf_wifi_set_rts_threshold(const struct device *dev, 74 unsigned int rts_threshold); 75 76 int nrf_wifi_get_rts_threshold(const struct device *dev, 77 unsigned int *rts_threshold); 78 #endif /* __ZEPHYR_WIFI_MGMT_H__ */ 79