1 /*  Copyright 2008-2024 NXP
2  *
3  *  SPDX-License-Identifier: BSD-3-Clause
4  *
5  */
6 
7 /*! \file wlan_tests.h
8  *  \brief WLAN Connection Manager Tests
9  */
10 
11 #ifndef __WLAN_TESTS_H__
12 #define __WLAN_TESTS_H__
13 
14 #if CONFIG_11AX
15 /* index enum of cfgs */
16 enum
17 {
18     TEST_WLAN_11AX_CFG,
19 #if CONFIG_11AX_TWT
20     TEST_WLAN_BCAST_TWT,
21     TEST_WLAN_TWT_SETUP,
22     TEST_WLAN_TWT_TEARDOWN,
23 #endif /* CONFIG_11AX_TWT */
24 };
25 
26 /*
27  *  Structs for mutiple config data in freeRTOS, split cfg to various param modules.
28  *  Modify cfg data by param index
29  *  test_cfg_param_t param module of cfg
30  *  test_cfg_table_t cfg table for all the param modules of a cfg
31  */
32 typedef struct
33 {
34     /* name of param */
35     const char *name;
36     /* offset in cfg data */
37     int offset;
38     int len;
39     const char *notes;
40 } test_cfg_param_t;
41 
42 typedef struct
43 {
44     /* name of cfg */
45     const char *name;
46     /* point of stored data for sending cmd, stored in Little-Endian */
47     uint8_t *data;
48     /* len of data */
49     int len;
50     /* point of list for all the params */
51     const test_cfg_param_t *param_list;
52     /* total number of params */
53     int param_num;
54 } test_cfg_table_t;
55 
56 /*
57  *  Cfg table process
58  *  syntax: "wlan-11axcfg <option> <arguments>"
59  *  demo: "wlan-11axcfg dump" dump data
60  *        "wlan-11axcfg help" dump data and notes
61  *        "wlan-11axcfg set 1 ff 01" set param[1] in cfg param list to 0xff 0x01 (511 in uint16_t)
62  *        "wlan-11axcfg done" send corresponding cmd to wifi driver
63  */
64 void test_wlan_cfg_process(uint32_t index, int argc, char **argv);
65 #endif /* CONFIG_11AX */
66 /** Print the TX PWR Limit table received from Wi-Fi firmware
67  *
68  * \param[in] txpwrlimit A \ref wlan_txpwrlimit_t struct holding the
69  * 		the TX PWR Limit table received from Wi-Fi firmware.
70  *
71  */
72 void print_txpwrlimit(wlan_txpwrlimit_t *txpwrlimit);
73 #endif /* WLAN_TESTS_H */
74