xref: /wlan-driver/qcacld-3.0/core/cds/src/cds_ieee80211_common_i.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2013-2017,2019 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef CDS_COMMON__IEEE80211_I_H_
21 #define CDS_COMMON__IEEE80211_I_H_
22 
23 /**
24  * enum ieee80211_phymode - not really a mode; there are really multiple PHY's
25  * @IEEE80211_MODE_AUTO: autoselect
26  * @IEEE80211_MODE_11A: 5GHz, OFDM
27  * @IEEE80211_MODE_11B: 2GHz, CCK
28  * @IEEE80211_MODE_11G: 2GHz, OFDM
29  * @IEEE80211_MODE_FH: 2GHz, GFSK
30  * @IEEE80211_MODE_TURBO_A: 5GHz, OFDM, 2x clock dynamic turbo
31  * @IEEE80211_MODE_TURBO_G: 2GHz, OFDM, 2x clock dynamic turbo
32  * @IEEE80211_MODE_11NA_HT20: 5Ghz, HT20
33  * @IEEE80211_MODE_11NG_HT20: 2Ghz, HT20
34  * @IEEE80211_MODE_11NA_HT40PLUS: 5Ghz, HT40 (ext ch +1)
35  * @IEEE80211_MODE_11NA_HT40MINUS: 5Ghz, HT40 (ext ch -1)
36  * @IEEE80211_MODE_11NG_HT40PLUS: 2Ghz, HT40 (ext ch +1)
37  * @IEEE80211_MODE_11NG_HT40MINUS: 2Ghz, HT40 (ext ch -1)
38  * @IEEE80211_MODE_11NG_HT40: 2Ghz, Auto HT40
39  * @IEEE80211_MODE_11NA_HT40: 2Ghz, Auto HT40
40  * @IEEE80211_MODE_11AC_VHT20: 5Ghz, VHT20
41  * @IEEE80211_MODE_11AC_VHT40PLUS: 5Ghz, VHT40 (Ext ch +1)
42  * @IEEE80211_MODE_11AC_VHT40MINUS: 5Ghz VHT40 (Ext ch -1)
43  * @IEEE80211_MODE_11AC_VHT40: 5Ghz, VHT40
44  * @IEEE80211_MODE_11AC_VHT80: 5Ghz, VHT80
45  * @IEEE80211_MODE_2G_AUTO: 2G 11 b/g/n autoselect
46  * @IEEE80211_MODE_5G_AUTO: 5G 11 a/n/ac autoselect
47  * @IEEE80211_MODE_11AGN: Support 11N in both 2G and 5G
48  * @IEEE80211_MODE_11AX_HE20: HE20
49  * @IEEE80211_MODE_11AX_HE40: HE40
50  * @IEEE80211_MODE_11AX_HE40PLUS: HE40 (ext ch +1)
51  * @IEEE80211_MODE_11AX_HE40MINUS: HE40 (ext ch -1)
52  * @IEEE80211_MODE_11AX_HE80: HE80
53  * @IEEE80211_MODE_11AX_HE80P80: HE 80P80
54  * @IEEE80211_MODE_11AX_HE160: HE160
55  * @IEEE80211_MODE_MAX: Maximum possible value
56  */
57 enum ieee80211_phymode {
58 	IEEE80211_MODE_AUTO = 0,
59 	IEEE80211_MODE_11A = 1,
60 	IEEE80211_MODE_11B = 2,
61 	IEEE80211_MODE_11G = 3,
62 	IEEE80211_MODE_FH = 4,
63 	IEEE80211_MODE_TURBO_A = 5,
64 	IEEE80211_MODE_TURBO_G = 6,
65 	IEEE80211_MODE_11NA_HT20 = 7,
66 	IEEE80211_MODE_11NG_HT20 = 8,
67 	IEEE80211_MODE_11NA_HT40PLUS = 9,
68 	IEEE80211_MODE_11NA_HT40MINUS = 10,
69 	IEEE80211_MODE_11NG_HT40PLUS = 11,
70 	IEEE80211_MODE_11NG_HT40MINUS = 12,
71 	IEEE80211_MODE_11NG_HT40 = 13,
72 	IEEE80211_MODE_11NA_HT40 = 14,
73 	IEEE80211_MODE_11AC_VHT20 = 15,
74 	IEEE80211_MODE_11AC_VHT40PLUS = 16,
75 	IEEE80211_MODE_11AC_VHT40MINUS = 17,
76 	IEEE80211_MODE_11AC_VHT40 = 18,
77 	IEEE80211_MODE_11AC_VHT80 = 19,
78 	IEEE80211_MODE_2G_AUTO = 20,
79 	IEEE80211_MODE_5G_AUTO = 21,
80 	IEEE80211_MODE_11AGN = 22,
81 	IEEE80211_MODE_11AX_HE20 = 23,
82 	IEEE80211_MODE_11AX_HE40 = 24,
83 	IEEE80211_MODE_11AX_HE40PLUS = 25,
84 	IEEE80211_MODE_11AX_HE40MINUS = 26,
85 	IEEE80211_MODE_11AX_HE80 = 27,
86 	IEEE80211_MODE_11AX_HE80P80 = 28,
87 	IEEE80211_MODE_11AX_HE160 = 29,
88 
89 	/* Do not add after this line */
90 	IEEE80211_MODE_MAX = IEEE80211_MODE_11AX_HE160,
91 };
92 
93 /*
94  * 802.11g protection mode.
95  */
96 enum ieee80211_protmode {
97 	IEEE80211_PROT_NONE = 0,        /* no protection */
98 	IEEE80211_PROT_CTSONLY = 1,     /* CTS to self */
99 	IEEE80211_PROT_RTSCTS = 2,      /* RTS-CTS */
100 };
101 
102 /* bits 0-3 are for private use by drivers */
103 /* channel attributes */
104 #define IEEE80211_CHAN_TURBO            0x00000010      /* Turbo channel */
105 #define IEEE80211_CHAN_CCK              0x00000020      /* CCK channel */
106 #define IEEE80211_CHAN_OFDM             0x00000040      /* OFDM channel */
107 #define IEEE80211_CHAN_2GHZ             0x00000080      /* 2 GHz spectrum channel. */
108 #define IEEE80211_CHAN_5GHZ             0x00000100      /* 5 GHz spectrum channel */
109 #define IEEE80211_CHAN_PASSIVE          0x00000200      /* Only passive scan allowed */
110 #define IEEE80211_CHAN_DYN              0x00000400      /* Dynamic CCK-OFDM channel */
111 #define IEEE80211_CHAN_GFSK             0x00000800      /* GFSK channel (FHSS PHY) */
112 #define IEEE80211_CHAN_RADAR_DFS        0x00001000      /* Radar found on channel */
113 #define IEEE80211_CHAN_STURBO           0x00002000      /* 11a static turbo channel only */
114 #define IEEE80211_CHAN_HALF             0x00004000      /* Half rate channel */
115 #define IEEE80211_CHAN_QUARTER          0x00008000      /* Quarter rate channel */
116 #define IEEE80211_CHAN_HT20             0x00010000      /* HT 20 channel */
117 #define IEEE80211_CHAN_HT40PLUS         0x00020000      /* HT 40 with extension channel above */
118 #define IEEE80211_CHAN_HT40MINUS        0x00040000      /* HT 40 with extension channel below */
119 #define IEEE80211_CHAN_HT40INTOL        0x00080000      /* HT 40 Intolerant */
120 #define IEEE80211_CHAN_VHT20            0x00100000      /* VHT 20 channel */
121 #define IEEE80211_CHAN_VHT40PLUS        0x00200000      /* VHT 40 with extension channel above */
122 #define IEEE80211_CHAN_VHT40MINUS       0x00400000      /* VHT 40 with extension channel below */
123 #define IEEE80211_CHAN_VHT80            0x00800000      /* VHT 80 channel */
124 /* channel temporarily blocked due to noise */
125 #define IEEE80211_CHAN_BLOCKED          0x02000000
126 /* VHT 160 channel */
127 #define IEEE80211_CHAN_VHT160           0x04000000
128 /* VHT 80_80 channel */
129 #define IEEE80211_CHAN_VHT80_80         0x08000000
130 
131 /* flagext */
132 #define IEEE80211_CHAN_DFS              0x0002  /* DFS required on channel */
133 /* DFS required on channel for 2nd band of 80+80*/
134 #define IEEE80211_CHAN_DFS_CFREQ2       0x0004
135 
136 #define IEEE80211_SEQ_MASK      0xfff   /* sequence generator mask */
137 #define MIN_SW_SEQ              0x100   /* minimum sequence for SW generate packect */
138 
139 #endif /* CDS_COMMON__IEEE80211_I_H_ */
140