diff options
author | Andrea Gelmini <andrea.gelmini@gelma.net> | 2010-02-27 11:43:22 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 14:35:29 -0400 |
commit | 0b25a610c1f4e1f9632421e10a0f4c6497ea7deb (patch) | |
tree | 53d1398105252f0c2832d15b92760dba797f0492 /drivers/staging/vt6655/80211hdr.h | |
parent | 66f41d4c5c8a5deed66fdcc84509376c9a0bf9d8 (diff) |
Staging: vt6655: 80211hdr.h: Checkpatch cleanup
ERROR: do not use C99 // comments
+// bit type
ERROR: do not use C99 // comments
+// 802.11 frame related, defined as 802.11 spec
ERROR: do not use C99 // comments
+//#define WLAN_RATES_MAXLEN 255
ERROR: do not use C99 // comments
+//#define WLAN_WEPMAX_KEYLEN 29
ERROR: do not use C99 // comments
+// Frame Type
ERROR: do not use C99 // comments
+// Frame Subtypes
ERROR: do not use C99 // comments
+// Control
ERROR: do not use C99 // comments
+// Data
ERROR: do not use C99 // comments
+// GET & SET Frame Control bit
ERROR: do not use C99 // comments
+// Sequence Field bit
ERROR: do not use C99 // comments
+// Capability Field bit
ERROR: do not use C99 // comments
+// GET & SET Frame Control bit
ERROR: do not use C99 // comments
+// Sequence Field bit
ERROR: do not use C99 // comments
+// Capability Field bit
ERROR: do not use C99 // comments
+#endif //#ifdef __BIG_ENDIAN
ERROR: do not use C99 // comments
+// ERP Field bit
ERROR: do not use C99 // comments
+// Support & Basic Rates field
ERROR: do not use C99 // comments
+// TIM field
ERROR: do not use C99 // comments
+// 3-Addr & 4-Addr
ERROR: do not use C99 // comments
+// IEEE ADDR
ERROR: do not use C99 // comments
+// 802.11 Header Format
ERROR: space required after that close brace '}'
+}__attribute__ ((__packed__))
ERROR: space required after that close brace '}'
+}__attribute__ ((__packed__))
ERROR: space required after that close brace '}'
+}__attribute__ ((__packed__))
ERROR: do not use C99 // comments
+#endif // __80211HDR_H__
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6655/80211hdr.h')
-rw-r--r-- | drivers/staging/vt6655/80211hdr.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/staging/vt6655/80211hdr.h b/drivers/staging/vt6655/80211hdr.h index e5cee6fd053..b7b170e19aa 100644 --- a/drivers/staging/vt6655/80211hdr.h +++ b/drivers/staging/vt6655/80211hdr.h | |||
@@ -34,7 +34,7 @@ | |||
34 | #include "ttype.h" | 34 | #include "ttype.h" |
35 | 35 | ||
36 | /*--------------------- Export Definitions -------------------------*/ | 36 | /*--------------------- Export Definitions -------------------------*/ |
37 | // bit type | 37 | /* bit type */ |
38 | #define BIT0 0x00000001 | 38 | #define BIT0 0x00000001 |
39 | #define BIT1 0x00000002 | 39 | #define BIT1 0x00000002 |
40 | #define BIT2 0x00000004 | 40 | #define BIT2 0x00000004 |
@@ -80,7 +80,7 @@ | |||
80 | #define WLAN_HDR_ADDR4_LEN 30 | 80 | #define WLAN_HDR_ADDR4_LEN 30 |
81 | #define WLAN_IEHDR_LEN 2 | 81 | #define WLAN_IEHDR_LEN 2 |
82 | #define WLAN_SSID_MAXLEN 32 | 82 | #define WLAN_SSID_MAXLEN 32 |
83 | //#define WLAN_RATES_MAXLEN 255 | 83 | /*#define WLAN_RATES_MAXLEN 255*/ |
84 | #define WLAN_RATES_MAXLEN 16 | 84 | #define WLAN_RATES_MAXLEN 16 |
85 | #define WLAN_RATES_MAXLEN_11B 4 | 85 | #define WLAN_RATES_MAXLEN_11B 4 |
86 | #define WLAN_RSN_MAXLEN 32 | 86 | #define WLAN_RSN_MAXLEN 32 |
@@ -106,7 +106,7 @@ | |||
106 | #define WLAN_WEP40_KEYLEN 5 | 106 | #define WLAN_WEP40_KEYLEN 5 |
107 | #define WLAN_WEP104_KEYLEN 13 | 107 | #define WLAN_WEP104_KEYLEN 13 |
108 | #define WLAN_WEP232_KEYLEN 29 | 108 | #define WLAN_WEP232_KEYLEN 29 |
109 | //#define WLAN_WEPMAX_KEYLEN 29 | 109 | /*#define WLAN_WEPMAX_KEYLEN 29*/ |
110 | #define WLAN_WEPMAX_KEYLEN 32 | 110 | #define WLAN_WEPMAX_KEYLEN 32 |
111 | #define WLAN_CHALLENGE_IE_MAXLEN 255 | 111 | #define WLAN_CHALLENGE_IE_MAXLEN 255 |
112 | #define WLAN_CHALLENGE_IE_LEN 130 | 112 | #define WLAN_CHALLENGE_IE_LEN 130 |
@@ -115,7 +115,7 @@ | |||
115 | #define WLAN_WEP_ICV_LEN 4 | 115 | #define WLAN_WEP_ICV_LEN 4 |
116 | #define WLAN_FRAGS_MAX 16 | 116 | #define WLAN_FRAGS_MAX 16 |
117 | 117 | ||
118 | // Frame Type | 118 | /* Frame Type */ |
119 | #define WLAN_TYPE_MGR 0x00 | 119 | #define WLAN_TYPE_MGR 0x00 |
120 | #define WLAN_TYPE_CTL 0x01 | 120 | #define WLAN_TYPE_CTL 0x01 |
121 | #define WLAN_TYPE_DATA 0x02 | 121 | #define WLAN_TYPE_DATA 0x02 |
@@ -125,7 +125,7 @@ | |||
125 | #define WLAN_FTYPE_DATA 0x02 | 125 | #define WLAN_FTYPE_DATA 0x02 |
126 | 126 | ||
127 | 127 | ||
128 | // Frame Subtypes | 128 | /* Frame Subtypes */ |
129 | #define WLAN_FSTYPE_ASSOCREQ 0x00 | 129 | #define WLAN_FSTYPE_ASSOCREQ 0x00 |
130 | #define WLAN_FSTYPE_ASSOCRESP 0x01 | 130 | #define WLAN_FSTYPE_ASSOCRESP 0x01 |
131 | #define WLAN_FSTYPE_REASSOCREQ 0x02 | 131 | #define WLAN_FSTYPE_REASSOCREQ 0x02 |
@@ -139,7 +139,7 @@ | |||
139 | #define WLAN_FSTYPE_DEAUTHEN 0x0c | 139 | #define WLAN_FSTYPE_DEAUTHEN 0x0c |
140 | #define WLAN_FSTYPE_ACTION 0x0d | 140 | #define WLAN_FSTYPE_ACTION 0x0d |
141 | 141 | ||
142 | // Control | 142 | /* Control */ |
143 | #define WLAN_FSTYPE_PSPOLL 0x0a | 143 | #define WLAN_FSTYPE_PSPOLL 0x0a |
144 | #define WLAN_FSTYPE_RTS 0x0b | 144 | #define WLAN_FSTYPE_RTS 0x0b |
145 | #define WLAN_FSTYPE_CTS 0x0c | 145 | #define WLAN_FSTYPE_CTS 0x0c |
@@ -147,7 +147,7 @@ | |||
147 | #define WLAN_FSTYPE_CFEND 0x0e | 147 | #define WLAN_FSTYPE_CFEND 0x0e |
148 | #define WLAN_FSTYPE_CFENDCFACK 0x0f | 148 | #define WLAN_FSTYPE_CFENDCFACK 0x0f |
149 | 149 | ||
150 | // Data | 150 | /* Data */ |
151 | #define WLAN_FSTYPE_DATAONLY 0x00 | 151 | #define WLAN_FSTYPE_DATAONLY 0x00 |
152 | #define WLAN_FSTYPE_DATA_CFACK 0x01 | 152 | #define WLAN_FSTYPE_DATA_CFACK 0x01 |
153 | #define WLAN_FSTYPE_DATA_CFPOLL 0x02 | 153 | #define WLAN_FSTYPE_DATA_CFPOLL 0x02 |
@@ -160,7 +160,7 @@ | |||
160 | 160 | ||
161 | #ifdef __BIG_ENDIAN | 161 | #ifdef __BIG_ENDIAN |
162 | 162 | ||
163 | // GET & SET Frame Control bit | 163 | /* GET & SET Frame Control bit */ |
164 | #define WLAN_GET_FC_PRVER(n) ((((WORD)(n) >> 8) & (BIT0 | BIT1)) | 164 | #define WLAN_GET_FC_PRVER(n) ((((WORD)(n) >> 8) & (BIT0 | BIT1)) |
165 | #define WLAN_GET_FC_FTYPE(n) ((((WORD)(n) >> 8) & (BIT2 | BIT3)) >> 2) | 165 | #define WLAN_GET_FC_FTYPE(n) ((((WORD)(n) >> 8) & (BIT2 | BIT3)) >> 2) |
166 | #define WLAN_GET_FC_FSTYPE(n) ((((WORD)(n) >> 8) & (BIT4|BIT5|BIT6|BIT7)) >> 4) | 166 | #define WLAN_GET_FC_FSTYPE(n) ((((WORD)(n) >> 8) & (BIT4|BIT5|BIT6|BIT7)) >> 4) |
@@ -173,12 +173,12 @@ | |||
173 | #define WLAN_GET_FC_ISWEP(n) ((((WORD)(n) << 8) & (BIT14)) >> 14) | 173 | #define WLAN_GET_FC_ISWEP(n) ((((WORD)(n) << 8) & (BIT14)) >> 14) |
174 | #define WLAN_GET_FC_ORDER(n) ((((WORD)(n) << 8) & (BIT15)) >> 15) | 174 | #define WLAN_GET_FC_ORDER(n) ((((WORD)(n) << 8) & (BIT15)) >> 15) |
175 | 175 | ||
176 | // Sequence Field bit | 176 | /* Sequence Field bit */ |
177 | #define WLAN_GET_SEQ_FRGNUM(n) (((WORD)(n) >> 8) & (BIT0|BIT1|BIT2|BIT3)) | 177 | #define WLAN_GET_SEQ_FRGNUM(n) (((WORD)(n) >> 8) & (BIT0|BIT1|BIT2|BIT3)) |
178 | #define WLAN_GET_SEQ_SEQNUM(n) ((((WORD)(n) >> 8) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) | 178 | #define WLAN_GET_SEQ_SEQNUM(n) ((((WORD)(n) >> 8) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) |
179 | 179 | ||
180 | 180 | ||
181 | // Capability Field bit | 181 | /* Capability Field bit */ |
182 | #define WLAN_GET_CAP_INFO_ESS(n) (((n) >> 8) & BIT0) | 182 | #define WLAN_GET_CAP_INFO_ESS(n) (((n) >> 8) & BIT0) |
183 | #define WLAN_GET_CAP_INFO_IBSS(n) ((((n) >> 8) & BIT1) >> 1) | 183 | #define WLAN_GET_CAP_INFO_IBSS(n) ((((n) >> 8) & BIT1) >> 1) |
184 | #define WLAN_GET_CAP_INFO_CFPOLLABLE(n) ((((n) >> 8) & BIT2) >> 2) | 184 | #define WLAN_GET_CAP_INFO_CFPOLLABLE(n) ((((n) >> 8) & BIT2) >> 2) |
@@ -195,7 +195,7 @@ | |||
195 | 195 | ||
196 | #else | 196 | #else |
197 | 197 | ||
198 | // GET & SET Frame Control bit | 198 | /* GET & SET Frame Control bit */ |
199 | #define WLAN_GET_FC_PRVER(n) (((WORD)(n)) & (BIT0 | BIT1)) | 199 | #define WLAN_GET_FC_PRVER(n) (((WORD)(n)) & (BIT0 | BIT1)) |
200 | #define WLAN_GET_FC_FTYPE(n) ((((WORD)(n)) & (BIT2 | BIT3)) >> 2) | 200 | #define WLAN_GET_FC_FTYPE(n) ((((WORD)(n)) & (BIT2 | BIT3)) >> 2) |
201 | #define WLAN_GET_FC_FSTYPE(n) ((((WORD)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4) | 201 | #define WLAN_GET_FC_FSTYPE(n) ((((WORD)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4) |
@@ -209,12 +209,12 @@ | |||
209 | #define WLAN_GET_FC_ORDER(n) ((((WORD)(n)) & (BIT15)) >> 15) | 209 | #define WLAN_GET_FC_ORDER(n) ((((WORD)(n)) & (BIT15)) >> 15) |
210 | 210 | ||
211 | 211 | ||
212 | // Sequence Field bit | 212 | /* Sequence Field bit */ |
213 | #define WLAN_GET_SEQ_FRGNUM(n) (((WORD)(n)) & (BIT0|BIT1|BIT2|BIT3)) | 213 | #define WLAN_GET_SEQ_FRGNUM(n) (((WORD)(n)) & (BIT0|BIT1|BIT2|BIT3)) |
214 | #define WLAN_GET_SEQ_SEQNUM(n) ((((WORD)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) | 214 | #define WLAN_GET_SEQ_SEQNUM(n) ((((WORD)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) |
215 | 215 | ||
216 | 216 | ||
217 | // Capability Field bit | 217 | /* Capability Field bit */ |
218 | #define WLAN_GET_CAP_INFO_ESS(n) ((n) & BIT0) | 218 | #define WLAN_GET_CAP_INFO_ESS(n) ((n) & BIT0) |
219 | #define WLAN_GET_CAP_INFO_IBSS(n) (((n) & BIT1) >> 1) | 219 | #define WLAN_GET_CAP_INFO_IBSS(n) (((n) & BIT1) >> 1) |
220 | #define WLAN_GET_CAP_INFO_CFPOLLABLE(n) (((n) & BIT2) >> 2) | 220 | #define WLAN_GET_CAP_INFO_CFPOLLABLE(n) (((n) & BIT2) >> 2) |
@@ -229,7 +229,7 @@ | |||
229 | #define WLAN_GET_CAP_INFO_GRPACK(n) (((n) & BIT14) >> 14) | 229 | #define WLAN_GET_CAP_INFO_GRPACK(n) (((n) & BIT14) >> 14) |
230 | 230 | ||
231 | 231 | ||
232 | #endif //#ifdef __BIG_ENDIAN | 232 | #endif /*#ifdef __BIG_ENDIAN */ |
233 | 233 | ||
234 | 234 | ||
235 | #define WLAN_SET_CAP_INFO_ESS(n) (n) | 235 | #define WLAN_SET_CAP_INFO_ESS(n) (n) |
@@ -261,7 +261,7 @@ | |||
261 | #define WLAN_SET_SEQ_FRGNUM(n) ((WORD)(n)) | 261 | #define WLAN_SET_SEQ_FRGNUM(n) ((WORD)(n)) |
262 | #define WLAN_SET_SEQ_SEQNUM(n) (((WORD)(n)) << 4) | 262 | #define WLAN_SET_SEQ_SEQNUM(n) (((WORD)(n)) << 4) |
263 | 263 | ||
264 | // ERP Field bit | 264 | /* ERP Field bit */ |
265 | 265 | ||
266 | #define WLAN_GET_ERP_NONERP_PRESENT(n) ((n) & BIT0) | 266 | #define WLAN_GET_ERP_NONERP_PRESENT(n) ((n) & BIT0) |
267 | #define WLAN_GET_ERP_USE_PROTECTION(n) (((n) & BIT1) >> 1) | 267 | #define WLAN_GET_ERP_USE_PROTECTION(n) (((n) & BIT1) >> 1) |
@@ -273,19 +273,19 @@ | |||
273 | 273 | ||
274 | 274 | ||
275 | 275 | ||
276 | // Support & Basic Rates field | 276 | /* Support & Basic Rates field */ |
277 | #define WLAN_MGMT_IS_BASICRATE(b) ((b) & BIT7) | 277 | #define WLAN_MGMT_IS_BASICRATE(b) ((b) & BIT7) |
278 | #define WLAN_MGMT_GET_RATE(b) ((b) & ~BIT7) | 278 | #define WLAN_MGMT_GET_RATE(b) ((b) & ~BIT7) |
279 | 279 | ||
280 | // TIM field | 280 | /* TIM field */ |
281 | #define WLAN_MGMT_IS_MULTICAST_TIM(b) ((b) & BIT0) | 281 | #define WLAN_MGMT_IS_MULTICAST_TIM(b) ((b) & BIT0) |
282 | #define WLAN_MGMT_GET_TIM_OFFSET(b) (((b) & ~BIT0) >> 1) | 282 | #define WLAN_MGMT_GET_TIM_OFFSET(b) (((b) & ~BIT0) >> 1) |
283 | 283 | ||
284 | // 3-Addr & 4-Addr | 284 | /* 3-Addr & 4-Addr */ |
285 | #define WLAN_HDR_A3_DATA_PTR(p) (((PBYTE)(p)) + WLAN_HDR_ADDR3_LEN) | 285 | #define WLAN_HDR_A3_DATA_PTR(p) (((PBYTE)(p)) + WLAN_HDR_ADDR3_LEN) |
286 | #define WLAN_HDR_A4_DATA_PTR(p) (((PBYTE)(p)) + WLAN_HDR_ADDR4_LEN) | 286 | #define WLAN_HDR_A4_DATA_PTR(p) (((PBYTE)(p)) + WLAN_HDR_ADDR4_LEN) |
287 | 287 | ||
288 | // IEEE ADDR | 288 | /* IEEE ADDR */ |
289 | #define IEEE_ADDR_UNIVERSAL 0x02 | 289 | #define IEEE_ADDR_UNIVERSAL 0x02 |
290 | #define IEEE_ADDR_GROUP 0x01 | 290 | #define IEEE_ADDR_GROUP 0x01 |
291 | 291 | ||
@@ -293,7 +293,7 @@ typedef struct { | |||
293 | BYTE abyAddr[6]; | 293 | BYTE abyAddr[6]; |
294 | } IEEE_ADDR, *PIEEE_ADDR; | 294 | } IEEE_ADDR, *PIEEE_ADDR; |
295 | 295 | ||
296 | // 802.11 Header Format | 296 | /* 802.11 Header Format */ |
297 | 297 | ||
298 | typedef struct tagWLAN_80211HDR_A2 { | 298 | typedef struct tagWLAN_80211HDR_A2 { |
299 | 299 | ||
@@ -302,7 +302,7 @@ typedef struct tagWLAN_80211HDR_A2 { | |||
302 | BYTE abyAddr1[WLAN_ADDR_LEN]; | 302 | BYTE abyAddr1[WLAN_ADDR_LEN]; |
303 | BYTE abyAddr2[WLAN_ADDR_LEN]; | 303 | BYTE abyAddr2[WLAN_ADDR_LEN]; |
304 | 304 | ||
305 | }__attribute__ ((__packed__)) | 305 | } __attribute__ ((__packed__)) |
306 | WLAN_80211HDR_A2, *PWLAN_80211HDR_A2; | 306 | WLAN_80211HDR_A2, *PWLAN_80211HDR_A2; |
307 | 307 | ||
308 | typedef struct tagWLAN_80211HDR_A3 { | 308 | typedef struct tagWLAN_80211HDR_A3 { |
@@ -327,7 +327,7 @@ typedef struct tagWLAN_80211HDR_A4 { | |||
327 | WORD wSeqCtl; | 327 | WORD wSeqCtl; |
328 | BYTE abyAddr4[WLAN_ADDR_LEN]; | 328 | BYTE abyAddr4[WLAN_ADDR_LEN]; |
329 | 329 | ||
330 | }__attribute__ ((__packed__)) | 330 | } __attribute__ ((__packed__)) |
331 | WLAN_80211HDR_A4, *PWLAN_80211HDR_A4; | 331 | WLAN_80211HDR_A4, *PWLAN_80211HDR_A4; |
332 | 332 | ||
333 | 333 | ||
@@ -348,6 +348,6 @@ typedef union tagUWLAN_80211HDR { | |||
348 | 348 | ||
349 | 349 | ||
350 | 350 | ||
351 | #endif // __80211HDR_H__ | 351 | #endif /* __80211HDR_H__ */ |
352 | 352 | ||
353 | 353 | ||