xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8852be/phl/phl_chnlplan_6g.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2020 Realtek Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  *****************************************************************************/
15 #ifndef _PHL_CHNLPLAN_6GHZ_H_
16 #define _PHL_CHNLPLAN_6GHZ_H_
17 
18 
19 /*
20  * 6 GHz channel group from UNII-5 to UNII-8
21  * channel index diff is 4 : minimum working bandwidth : 20 MHz
22  * => next channel index = current index + 4
23  */
24 
25 struct chdef_6ghz {
26     /* ch_def index */
27     u8 idx;
28 
29     /*
30      * UNII-5 support channel list, ch1 ~ ch93, total : 24
31      * bit0 stands for ch1
32      * bit1 stands for ch5
33      * bit2 stands for ch9
34      * ...
35      * bit23 stands for ch93
36      */
37     u8 support_ch_u5[3];
38     u8 passive_u5[3];
39 
40     /*
41      * UNII-6 support channel list, ch97 ~ ch117, total : 6
42      * bit0 stands for ch97
43      * bit1 stands for ch101
44      * bit2 stands for ch105
45      * bit3 stands for ch109
46      * bit4 stands for ch113
47      * bit5 stands for ch117
48      */
49     u8 support_ch_u6;
50     u8 passive_u6;
51 
52     /*
53      * UNII-7 support channel list, ch121 ~ ch189, total : 18
54      * bit0 stands for ch121
55      * bit1 stands for ch125
56      * bit2 stands for ch129
57      * ...
58      * bit17 stands for ch189
59      */
60     u8 support_ch_u7[3];
61     u8 passive_u7[3];
62 
63     /*
64      * UNII-8 support channel list, ch193 ~ ch237, total : 12
65      * bit0 stands for ch193
66      * bit1 stands for ch197
67      * bit2 stands for ch201
68      * ...
69      * bit10 stands for ch233
70      */
71     u8 support_ch_u8[2];
72     u8 passive_u8[2];
73 };
74 
75 struct regulatory_domain_mapping_6g {
76     u8 domain_code;
77     u8 regulation;
78     u8 ch_idx;
79 };
80 
81 #define MAX_CHDEF_6GHZ 6
82 #define MAX_RD_MAP_NUM_6GHZ 6
83 
84 
85 #endif /* _PHL_CHNLPLAN_6GHZ_H_ */
86