1 /* SPDX-License-Identifier: GPL-2.0 */
3 * This header file contains definition for global types
8 #include <linux/if_ether.h>
9 #include <linux/ieee80211.h>
10 #include <asm/byteorder.h>
12 struct ieee_ie_header {
17 struct ieee_ie_cf_param_set {
18 struct ieee_ie_header header;
22 __le16 cfpmaxduration;
23 __le16 cfpdurationremaining;
27 struct ieee_ie_ibss_param_set {
28 struct ieee_ie_header header;
33 union ieee_ss_param_set {
34 struct ieee_ie_cf_param_set cf;
35 struct ieee_ie_ibss_param_set ibss;
38 struct ieee_ie_fh_param_set {
39 struct ieee_ie_header header;
47 struct ieee_ie_ds_param_set {
48 struct ieee_ie_header header;
53 union ieee_phy_param_set {
54 struct ieee_ie_fh_param_set fh;
55 struct ieee_ie_ds_param_set ds;
58 /* TLV type ID definition */
59 #define PROPRIETARY_TLV_BASE_ID 0x0100
61 /* Terminating TLV type */
62 #define MRVL_TERMINATE_TLV_ID 0xffff
64 #define TLV_TYPE_SSID 0x0000
65 #define TLV_TYPE_RATES 0x0001
66 #define TLV_TYPE_PHY_FH 0x0002
67 #define TLV_TYPE_PHY_DS 0x0003
68 #define TLV_TYPE_CF 0x0004
69 #define TLV_TYPE_IBSS 0x0006
71 #define TLV_TYPE_DOMAIN 0x0007
73 #define TLV_TYPE_POWER_CAPABILITY 0x0021
75 #define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0)
76 #define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1)
77 #define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2)
78 #define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4)
79 #define TLV_TYPE_SNR_LOW (PROPRIETARY_TLV_BASE_ID + 5)
80 #define TLV_TYPE_FAILCOUNT (PROPRIETARY_TLV_BASE_ID + 6)
81 #define TLV_TYPE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 7)
82 #define TLV_TYPE_LED_GPIO (PROPRIETARY_TLV_BASE_ID + 8)
83 #define TLV_TYPE_LEDBEHAVIOR (PROPRIETARY_TLV_BASE_ID + 9)
84 #define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10)
85 #define TLV_TYPE_REASSOCAP (PROPRIETARY_TLV_BASE_ID + 11)
86 #define TLV_TYPE_POWER_TBL_2_4GHZ (PROPRIETARY_TLV_BASE_ID + 12)
87 #define TLV_TYPE_POWER_TBL_5GHZ (PROPRIETARY_TLV_BASE_ID + 13)
88 #define TLV_TYPE_BCASTPROBE (PROPRIETARY_TLV_BASE_ID + 14)
89 #define TLV_TYPE_NUMSSID_PROBE (PROPRIETARY_TLV_BASE_ID + 15)
90 #define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16)
91 #define TLV_TYPE_CRYPTO_DATA (PROPRIETARY_TLV_BASE_ID + 17)
92 #define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18)
93 #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19)
94 #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22)
95 #define TLV_TYPE_SNR_HIGH (PROPRIETARY_TLV_BASE_ID + 23)
96 #define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31)
97 #define TLV_TYPE_MESH_ID (PROPRIETARY_TLV_BASE_ID + 37)
98 #define TLV_TYPE_OLD_MESH_ID (PROPRIETARY_TLV_BASE_ID + 291)
100 /* TLV related data structures */
101 struct mrvl_ie_header {
106 struct mrvl_ie_data {
107 struct mrvl_ie_header header;
111 struct mrvl_ie_rates_param_set {
112 struct mrvl_ie_header header;
116 struct mrvl_ie_ssid_param_set {
117 struct mrvl_ie_header header;
121 struct mrvl_ie_wildcard_ssid_param_set {
122 struct mrvl_ie_header header;
127 struct chanscanmode {
128 #ifdef __BIG_ENDIAN_BITFIELD
130 u8 disablechanfilt:1;
134 u8 disablechanfilt:1;
139 struct chanscanparamset {
142 struct chanscanmode chanscanmode;
147 struct mrvl_ie_chanlist_param_set {
148 struct mrvl_ie_header header;
149 struct chanscanparamset chanscanparam[1];
152 struct mrvl_ie_cf_param_set {
153 struct mrvl_ie_header header;
156 __le16 cfpmaxduration;
157 __le16 cfpdurationremaining;
160 struct mrvl_ie_ds_param_set {
161 struct mrvl_ie_header header;
165 struct mrvl_ie_rsn_param_set {
166 struct mrvl_ie_header header;
170 struct mrvl_ie_tsf_timestamp {
171 struct mrvl_ie_header header;
175 /* v9 and later firmware only */
176 struct mrvl_ie_auth_type {
177 struct mrvl_ie_header header;
181 /* Local Power capability */
182 struct mrvl_ie_power_capability {
183 struct mrvl_ie_header header;
188 /* used in CMD_802_11_SUBSCRIBE_EVENT for SNR, RSSI and Failure */
189 struct mrvl_ie_thresholds {
190 struct mrvl_ie_header header;
195 struct mrvl_ie_beacons_missed {
196 struct mrvl_ie_header header;
201 struct mrvl_ie_num_probes {
202 struct mrvl_ie_header header;
206 struct mrvl_ie_bcast_probe {
207 struct mrvl_ie_header header;
211 struct mrvl_ie_num_ssid_probe {
212 struct mrvl_ie_header header;
221 struct mrvl_ie_ledgpio {
222 struct mrvl_ie_header header;
223 struct led_pin ledpin[1];
227 uint8_t firmwarestate;
234 struct mrvl_ie_ledbhv {
235 struct mrvl_ie_header header;
236 struct led_bhv ledbhv[1];
240 * Meant to be packed as the value member of a struct ieee80211_info_element.
241 * Note that the len member of the ieee80211_info_element varies depending on
244 struct mrvl_meshie_val {
249 uint8_t active_protocol_id;
250 uint8_t active_metric_id;
251 uint8_t mesh_capability;
253 uint8_t mesh_id[IEEE80211_MAX_SSID_LEN];
258 struct mrvl_meshie_val val;
261 struct mrvl_mesh_defaults {
266 struct mrvl_meshie meshie;