1#include "wifi_hal.h"
2
3#ifndef __WIFI_HAL_CONFIG_H
4#define __WIFI_HAL_CONFIG_H
5
6#ifdef __cplusplus
7extern "C"
8{
9#endif /* __cplusplus */
10
11#define CONFIG_MAJOR_VERSION      1
12#define CONFIG_MINOR_VERSION      0
13#define CONFIG_MICRO_VERSION      0
14
15typedef int wifi_radio;
16
17// whether the wifi chipset wakes at every dtim beacon or a multiple of the dtim period
18// if extended_dtim is set to 3, the STA shall wake up every 3 DTIM beacons
19wifi_error wifi_extended_dtim_config_set(wifi_request_id id,
20        wifi_interface_handle iface, int extended_dtim);
21
22//set the country code to driver
23wifi_error wifi_set_country_code(wifi_interface_handle iface, const char* country_code);
24
25//set the wifi_iface stats averaging factor used to calculate
26// statistics like average the TSF offset or average number of frame leaked
27// For instance, upon beacon reception:
28//    current_avg = ((beacon_TSF - TBTT) * factor + previous_avg * (0x10000 - factor) ) / 0x10000
29// For instance, when evaluating leaky APs:
30//    current_avg = ((num frame received within guard time) * factor + previous_avg * (0x10000 - factor)) / 0x10000
31
32wifi_error wifi_set_beacon_wifi_iface_stats_averaging_factor(wifi_request_id id, wifi_interface_handle iface,
33        u16 factor);
34
35// configure guard time, i.e. when implementing IEEE power management based on
36// frame control PM bit, how long driver waits before shutting down the radio and
37// after receiving an ACK for a data frame with PM bit set
38wifi_error wifi_set_guard_time(wifi_request_id id, wifi_interface_handle iface,
39        u32 guard_time);
40
41#ifdef __cplusplus
42}
43
44#endif /* __cplusplus */
45
46#endif /*__WIFI_HAL_STATS_ */
47
48