VSF Documented
vsf_wifi_cfg.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18/*============================ INCLUDES ======================================*/
21
22#ifndef __VSF_WIFI_CFG_H__
23#define __VSF_WIFI_CFG_H__
24
25/*============================ MACROS ========================================*/
26
27#ifndef VSF_USE_WIFI
28# define VSF_USE_WIFI DISABLED
29#endif
30
31#ifndef VSF_WIFI_ASSERT
32# define VSF_WIFI_ASSERT VSF_ASSERT
33#endif
34
35/*
36 * Chip driver enable switches.
37 *
38 * Each chip family has its own ENABLE switch so applications can choose
39 * which chip drivers to compile in. The switches are bus-agnostic; the
40 * same chip driver object can be used by USB / SDIO / SPI shims.
41 *
42 * A bus shim (e.g. vsf_usbh_wifi_rt2x00) MUST require at least one chip driver
43 * to be enabled when the bus class itself is enabled.
44 */
45#ifndef VSF_WIFI_USE_RT28XX
46# define VSF_WIFI_USE_RT28XX ENABLED
47#endif
48
49#ifndef VSF_WIFI_USE_MT76
50# define VSF_WIFI_USE_MT76 ENABLED
51#endif
52
53/*
54 * Per-module log level.
55 *
56 * 0 = silent : no trace output (assertions still fire)
57 * 1 = error : runtime errors only
58 * 2 = info : key life-cycle events (ready, link up/down, scan done,
59 * connect success/fail, DHCP bound)
60 * 3 = verbose : normal runtime logs (TX build, reg script steps,
61 * single URB completion)
62 * 4 = debug : per-frame/beacon/RX delivery counters
63 *
64 * Sub-module macros fall back to VSF_WIFI_CFG_LOG_LEVEL when not defined.
65 */
66#ifndef VSF_WIFI_CFG_LOG_LEVEL
67# define VSF_WIFI_CFG_LOG_LEVEL 2
68#endif
69#ifndef VSF_WIFI_CFG_CHIP_RT28XX_LOG_LEVEL
70# define VSF_WIFI_CFG_CHIP_RT28XX_LOG_LEVEL VSF_WIFI_CFG_LOG_LEVEL
71#endif
72#ifndef VSF_WIFI_CFG_CHIP_MT76_LOG_LEVEL
73# define VSF_WIFI_CFG_CHIP_MT76_LOG_LEVEL VSF_WIFI_CFG_LOG_LEVEL
74#endif
75#ifndef VSF_WIFI_CFG_BUS_RT2X00_LOG_LEVEL
76# define VSF_WIFI_CFG_BUS_RT2X00_LOG_LEVEL VSF_WIFI_CFG_LOG_LEVEL
77#endif
78#ifndef VSF_WIFI_CFG_NETDRV_LOG_LEVEL
79# define VSF_WIFI_CFG_NETDRV_LOG_LEVEL VSF_WIFI_CFG_LOG_LEVEL
80#endif
81
82/*
83 * WPA2-PSK (CCMP) support switch.
84 *
85 * The WPA software stack (PBKDF2 / PRF / EAPOL MIC / AES key-unwrap / CCMP)
86 * is implemented on top of mbedtls, so it can only be enabled when mbedtls is
87 * compiled in. Defaults to follow VSF_USE_MBEDTLS.
88 */
89#ifndef VSF_WIFI_USE_WPA
90# if defined(VSF_USE_MBEDTLS) && (VSF_USE_MBEDTLS == ENABLED)
91# define VSF_WIFI_USE_WPA ENABLED
92# else
93# define VSF_WIFI_USE_WPA DISABLED
94# endif
95#endif
96
97/*
98 * WPA debug logging: PMK / PTK / SNonce / PRF input/output dumps.
99 * These traces are verbose and, when combined with synchronous log flushing,
100 * can delay the M2 response enough to cause 4-way handshake timeouts.
101 * Keep DISABLED for normal operation; enable only when debugging key derivation.
102 */
103#ifndef VSF_WIFI_CFG_WPA_DEBUG_LOG
104# define VSF_WIFI_CFG_WPA_DEBUG_LOG DISABLED
105#endif
106
107/*
108 * RT28xx (RT2870/RT3070/RT3572/RT5370/RT5572) hardware CCMP offloading.
109 * When ENABLED the RT28xx chip driver registers crypto_ops and the wifi layer
110 * skips software CCMP encap/decap. When DISABLED the existing software CCMP
111 * path is used.
112 */
113#ifndef VSF_WIFI_CFG_RT28XX_HW_CRYPTO
114# define VSF_WIFI_CFG_RT28XX_HW_CRYPTO ENABLED
115#endif
116
117/*
118 * 802.11 keepalive: send a null data frame at regular intervals to prevent
119 * the AP from deauthenticating an idle STA. The interval is derived from
120 * the BSS Max Idle Period IE advertised by the AP when available, otherwise
121 * the default below is used. Set to 0 to disable.
122 */
123#ifndef VSF_WIFI_CFG_KEEPALIVE_PERIOD_MS
124# define VSF_WIFI_CFG_KEEPALIVE_PERIOD_MS 10000
125#endif
126
127/* Hard lower bound for the dynamic keepalive period (avoid excessive airtime). */
128#ifndef VSF_WIFI_CFG_KEEPALIVE_MIN_PERIOD_MS
129# define VSF_WIFI_CFG_KEEPALIVE_MIN_PERIOD_MS 2000
130#endif
131
132/*============================ MACROFIED FUNCTIONS ===========================*/
133/*============================ TYPES =========================================*/
134/*============================ GLOBAL VARIABLES ==============================*/
135/*============================ LOCAL VARIABLES ===============================*/
136/*============================ PROTOTYPES ====================================*/
137
138
139#endif
140/* EOF */
Generated from commit: vsfteam/vsf@ceb53fd