diff options
Diffstat (limited to 'include/linux/ieee80211.h')
-rw-r--r-- | include/linux/ieee80211.h | 85 |
1 files changed, 45 insertions, 40 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index cfa906f28b7a..452c0b0d2f32 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -121,7 +121,7 @@ | |||
121 | #define IEEE80211_MAX_SN IEEE80211_SN_MASK | 121 | #define IEEE80211_MAX_SN IEEE80211_SN_MASK |
122 | #define IEEE80211_SN_MODULO (IEEE80211_MAX_SN + 1) | 122 | #define IEEE80211_SN_MODULO (IEEE80211_MAX_SN + 1) |
123 | 123 | ||
124 | static inline int ieee80211_sn_less(u16 sn1, u16 sn2) | 124 | static inline bool ieee80211_sn_less(u16 sn1, u16 sn2) |
125 | { | 125 | { |
126 | return ((sn1 - sn2) & IEEE80211_SN_MASK) > (IEEE80211_SN_MODULO >> 1); | 126 | return ((sn1 - sn2) & IEEE80211_SN_MASK) > (IEEE80211_SN_MODULO >> 1); |
127 | } | 127 | } |
@@ -250,7 +250,7 @@ struct ieee80211_qos_hdr { | |||
250 | * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set | 250 | * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set |
251 | * @fc: frame control bytes in little-endian byteorder | 251 | * @fc: frame control bytes in little-endian byteorder |
252 | */ | 252 | */ |
253 | static inline int ieee80211_has_tods(__le16 fc) | 253 | static inline bool ieee80211_has_tods(__le16 fc) |
254 | { | 254 | { |
255 | return (fc & cpu_to_le16(IEEE80211_FCTL_TODS)) != 0; | 255 | return (fc & cpu_to_le16(IEEE80211_FCTL_TODS)) != 0; |
256 | } | 256 | } |
@@ -259,7 +259,7 @@ static inline int ieee80211_has_tods(__le16 fc) | |||
259 | * ieee80211_has_fromds - check if IEEE80211_FCTL_FROMDS is set | 259 | * ieee80211_has_fromds - check if IEEE80211_FCTL_FROMDS is set |
260 | * @fc: frame control bytes in little-endian byteorder | 260 | * @fc: frame control bytes in little-endian byteorder |
261 | */ | 261 | */ |
262 | static inline int ieee80211_has_fromds(__le16 fc) | 262 | static inline bool ieee80211_has_fromds(__le16 fc) |
263 | { | 263 | { |
264 | return (fc & cpu_to_le16(IEEE80211_FCTL_FROMDS)) != 0; | 264 | return (fc & cpu_to_le16(IEEE80211_FCTL_FROMDS)) != 0; |
265 | } | 265 | } |
@@ -268,7 +268,7 @@ static inline int ieee80211_has_fromds(__le16 fc) | |||
268 | * ieee80211_has_a4 - check if IEEE80211_FCTL_TODS and IEEE80211_FCTL_FROMDS are set | 268 | * ieee80211_has_a4 - check if IEEE80211_FCTL_TODS and IEEE80211_FCTL_FROMDS are set |
269 | * @fc: frame control bytes in little-endian byteorder | 269 | * @fc: frame control bytes in little-endian byteorder |
270 | */ | 270 | */ |
271 | static inline int ieee80211_has_a4(__le16 fc) | 271 | static inline bool ieee80211_has_a4(__le16 fc) |
272 | { | 272 | { |
273 | __le16 tmp = cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS); | 273 | __le16 tmp = cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS); |
274 | return (fc & tmp) == tmp; | 274 | return (fc & tmp) == tmp; |
@@ -278,7 +278,7 @@ static inline int ieee80211_has_a4(__le16 fc) | |||
278 | * ieee80211_has_morefrags - check if IEEE80211_FCTL_MOREFRAGS is set | 278 | * ieee80211_has_morefrags - check if IEEE80211_FCTL_MOREFRAGS is set |
279 | * @fc: frame control bytes in little-endian byteorder | 279 | * @fc: frame control bytes in little-endian byteorder |
280 | */ | 280 | */ |
281 | static inline int ieee80211_has_morefrags(__le16 fc) | 281 | static inline bool ieee80211_has_morefrags(__le16 fc) |
282 | { | 282 | { |
283 | return (fc & cpu_to_le16(IEEE80211_FCTL_MOREFRAGS)) != 0; | 283 | return (fc & cpu_to_le16(IEEE80211_FCTL_MOREFRAGS)) != 0; |
284 | } | 284 | } |
@@ -287,7 +287,7 @@ static inline int ieee80211_has_morefrags(__le16 fc) | |||
287 | * ieee80211_has_retry - check if IEEE80211_FCTL_RETRY is set | 287 | * ieee80211_has_retry - check if IEEE80211_FCTL_RETRY is set |
288 | * @fc: frame control bytes in little-endian byteorder | 288 | * @fc: frame control bytes in little-endian byteorder |
289 | */ | 289 | */ |
290 | static inline int ieee80211_has_retry(__le16 fc) | 290 | static inline bool ieee80211_has_retry(__le16 fc) |
291 | { | 291 | { |
292 | return (fc & cpu_to_le16(IEEE80211_FCTL_RETRY)) != 0; | 292 | return (fc & cpu_to_le16(IEEE80211_FCTL_RETRY)) != 0; |
293 | } | 293 | } |
@@ -296,7 +296,7 @@ static inline int ieee80211_has_retry(__le16 fc) | |||
296 | * ieee80211_has_pm - check if IEEE80211_FCTL_PM is set | 296 | * ieee80211_has_pm - check if IEEE80211_FCTL_PM is set |
297 | * @fc: frame control bytes in little-endian byteorder | 297 | * @fc: frame control bytes in little-endian byteorder |
298 | */ | 298 | */ |
299 | static inline int ieee80211_has_pm(__le16 fc) | 299 | static inline bool ieee80211_has_pm(__le16 fc) |
300 | { | 300 | { |
301 | return (fc & cpu_to_le16(IEEE80211_FCTL_PM)) != 0; | 301 | return (fc & cpu_to_le16(IEEE80211_FCTL_PM)) != 0; |
302 | } | 302 | } |
@@ -305,7 +305,7 @@ static inline int ieee80211_has_pm(__le16 fc) | |||
305 | * ieee80211_has_moredata - check if IEEE80211_FCTL_MOREDATA is set | 305 | * ieee80211_has_moredata - check if IEEE80211_FCTL_MOREDATA is set |
306 | * @fc: frame control bytes in little-endian byteorder | 306 | * @fc: frame control bytes in little-endian byteorder |
307 | */ | 307 | */ |
308 | static inline int ieee80211_has_moredata(__le16 fc) | 308 | static inline bool ieee80211_has_moredata(__le16 fc) |
309 | { | 309 | { |
310 | return (fc & cpu_to_le16(IEEE80211_FCTL_MOREDATA)) != 0; | 310 | return (fc & cpu_to_le16(IEEE80211_FCTL_MOREDATA)) != 0; |
311 | } | 311 | } |
@@ -314,7 +314,7 @@ static inline int ieee80211_has_moredata(__le16 fc) | |||
314 | * ieee80211_has_protected - check if IEEE80211_FCTL_PROTECTED is set | 314 | * ieee80211_has_protected - check if IEEE80211_FCTL_PROTECTED is set |
315 | * @fc: frame control bytes in little-endian byteorder | 315 | * @fc: frame control bytes in little-endian byteorder |
316 | */ | 316 | */ |
317 | static inline int ieee80211_has_protected(__le16 fc) | 317 | static inline bool ieee80211_has_protected(__le16 fc) |
318 | { | 318 | { |
319 | return (fc & cpu_to_le16(IEEE80211_FCTL_PROTECTED)) != 0; | 319 | return (fc & cpu_to_le16(IEEE80211_FCTL_PROTECTED)) != 0; |
320 | } | 320 | } |
@@ -323,7 +323,7 @@ static inline int ieee80211_has_protected(__le16 fc) | |||
323 | * ieee80211_has_order - check if IEEE80211_FCTL_ORDER is set | 323 | * ieee80211_has_order - check if IEEE80211_FCTL_ORDER is set |
324 | * @fc: frame control bytes in little-endian byteorder | 324 | * @fc: frame control bytes in little-endian byteorder |
325 | */ | 325 | */ |
326 | static inline int ieee80211_has_order(__le16 fc) | 326 | static inline bool ieee80211_has_order(__le16 fc) |
327 | { | 327 | { |
328 | return (fc & cpu_to_le16(IEEE80211_FCTL_ORDER)) != 0; | 328 | return (fc & cpu_to_le16(IEEE80211_FCTL_ORDER)) != 0; |
329 | } | 329 | } |
@@ -332,7 +332,7 @@ static inline int ieee80211_has_order(__le16 fc) | |||
332 | * ieee80211_is_mgmt - check if type is IEEE80211_FTYPE_MGMT | 332 | * ieee80211_is_mgmt - check if type is IEEE80211_FTYPE_MGMT |
333 | * @fc: frame control bytes in little-endian byteorder | 333 | * @fc: frame control bytes in little-endian byteorder |
334 | */ | 334 | */ |
335 | static inline int ieee80211_is_mgmt(__le16 fc) | 335 | static inline bool ieee80211_is_mgmt(__le16 fc) |
336 | { | 336 | { |
337 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == | 337 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == |
338 | cpu_to_le16(IEEE80211_FTYPE_MGMT); | 338 | cpu_to_le16(IEEE80211_FTYPE_MGMT); |
@@ -342,7 +342,7 @@ static inline int ieee80211_is_mgmt(__le16 fc) | |||
342 | * ieee80211_is_ctl - check if type is IEEE80211_FTYPE_CTL | 342 | * ieee80211_is_ctl - check if type is IEEE80211_FTYPE_CTL |
343 | * @fc: frame control bytes in little-endian byteorder | 343 | * @fc: frame control bytes in little-endian byteorder |
344 | */ | 344 | */ |
345 | static inline int ieee80211_is_ctl(__le16 fc) | 345 | static inline bool ieee80211_is_ctl(__le16 fc) |
346 | { | 346 | { |
347 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == | 347 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == |
348 | cpu_to_le16(IEEE80211_FTYPE_CTL); | 348 | cpu_to_le16(IEEE80211_FTYPE_CTL); |
@@ -352,7 +352,7 @@ static inline int ieee80211_is_ctl(__le16 fc) | |||
352 | * ieee80211_is_data - check if type is IEEE80211_FTYPE_DATA | 352 | * ieee80211_is_data - check if type is IEEE80211_FTYPE_DATA |
353 | * @fc: frame control bytes in little-endian byteorder | 353 | * @fc: frame control bytes in little-endian byteorder |
354 | */ | 354 | */ |
355 | static inline int ieee80211_is_data(__le16 fc) | 355 | static inline bool ieee80211_is_data(__le16 fc) |
356 | { | 356 | { |
357 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == | 357 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == |
358 | cpu_to_le16(IEEE80211_FTYPE_DATA); | 358 | cpu_to_le16(IEEE80211_FTYPE_DATA); |
@@ -362,7 +362,7 @@ static inline int ieee80211_is_data(__le16 fc) | |||
362 | * ieee80211_is_data_qos - check if type is IEEE80211_FTYPE_DATA and IEEE80211_STYPE_QOS_DATA is set | 362 | * ieee80211_is_data_qos - check if type is IEEE80211_FTYPE_DATA and IEEE80211_STYPE_QOS_DATA is set |
363 | * @fc: frame control bytes in little-endian byteorder | 363 | * @fc: frame control bytes in little-endian byteorder |
364 | */ | 364 | */ |
365 | static inline int ieee80211_is_data_qos(__le16 fc) | 365 | static inline bool ieee80211_is_data_qos(__le16 fc) |
366 | { | 366 | { |
367 | /* | 367 | /* |
368 | * mask with QOS_DATA rather than IEEE80211_FCTL_STYPE as we just need | 368 | * mask with QOS_DATA rather than IEEE80211_FCTL_STYPE as we just need |
@@ -376,7 +376,7 @@ static inline int ieee80211_is_data_qos(__le16 fc) | |||
376 | * ieee80211_is_data_present - check if type is IEEE80211_FTYPE_DATA and has data | 376 | * ieee80211_is_data_present - check if type is IEEE80211_FTYPE_DATA and has data |
377 | * @fc: frame control bytes in little-endian byteorder | 377 | * @fc: frame control bytes in little-endian byteorder |
378 | */ | 378 | */ |
379 | static inline int ieee80211_is_data_present(__le16 fc) | 379 | static inline bool ieee80211_is_data_present(__le16 fc) |
380 | { | 380 | { |
381 | /* | 381 | /* |
382 | * mask with 0x40 and test that that bit is clear to only return true | 382 | * mask with 0x40 and test that that bit is clear to only return true |
@@ -390,7 +390,7 @@ static inline int ieee80211_is_data_present(__le16 fc) | |||
390 | * ieee80211_is_assoc_req - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_REQ | 390 | * ieee80211_is_assoc_req - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_REQ |
391 | * @fc: frame control bytes in little-endian byteorder | 391 | * @fc: frame control bytes in little-endian byteorder |
392 | */ | 392 | */ |
393 | static inline int ieee80211_is_assoc_req(__le16 fc) | 393 | static inline bool ieee80211_is_assoc_req(__le16 fc) |
394 | { | 394 | { |
395 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 395 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
396 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ASSOC_REQ); | 396 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ASSOC_REQ); |
@@ -400,7 +400,7 @@ static inline int ieee80211_is_assoc_req(__le16 fc) | |||
400 | * ieee80211_is_assoc_resp - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_RESP | 400 | * ieee80211_is_assoc_resp - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_RESP |
401 | * @fc: frame control bytes in little-endian byteorder | 401 | * @fc: frame control bytes in little-endian byteorder |
402 | */ | 402 | */ |
403 | static inline int ieee80211_is_assoc_resp(__le16 fc) | 403 | static inline bool ieee80211_is_assoc_resp(__le16 fc) |
404 | { | 404 | { |
405 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 405 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
406 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ASSOC_RESP); | 406 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ASSOC_RESP); |
@@ -410,7 +410,7 @@ static inline int ieee80211_is_assoc_resp(__le16 fc) | |||
410 | * ieee80211_is_reassoc_req - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_REQ | 410 | * ieee80211_is_reassoc_req - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_REQ |
411 | * @fc: frame control bytes in little-endian byteorder | 411 | * @fc: frame control bytes in little-endian byteorder |
412 | */ | 412 | */ |
413 | static inline int ieee80211_is_reassoc_req(__le16 fc) | 413 | static inline bool ieee80211_is_reassoc_req(__le16 fc) |
414 | { | 414 | { |
415 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 415 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
416 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_REASSOC_REQ); | 416 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_REASSOC_REQ); |
@@ -420,7 +420,7 @@ static inline int ieee80211_is_reassoc_req(__le16 fc) | |||
420 | * ieee80211_is_reassoc_resp - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_RESP | 420 | * ieee80211_is_reassoc_resp - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_RESP |
421 | * @fc: frame control bytes in little-endian byteorder | 421 | * @fc: frame control bytes in little-endian byteorder |
422 | */ | 422 | */ |
423 | static inline int ieee80211_is_reassoc_resp(__le16 fc) | 423 | static inline bool ieee80211_is_reassoc_resp(__le16 fc) |
424 | { | 424 | { |
425 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 425 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
426 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_REASSOC_RESP); | 426 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_REASSOC_RESP); |
@@ -430,7 +430,7 @@ static inline int ieee80211_is_reassoc_resp(__le16 fc) | |||
430 | * ieee80211_is_probe_req - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_REQ | 430 | * ieee80211_is_probe_req - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_REQ |
431 | * @fc: frame control bytes in little-endian byteorder | 431 | * @fc: frame control bytes in little-endian byteorder |
432 | */ | 432 | */ |
433 | static inline int ieee80211_is_probe_req(__le16 fc) | 433 | static inline bool ieee80211_is_probe_req(__le16 fc) |
434 | { | 434 | { |
435 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 435 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
436 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_REQ); | 436 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_REQ); |
@@ -440,7 +440,7 @@ static inline int ieee80211_is_probe_req(__le16 fc) | |||
440 | * ieee80211_is_probe_resp - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_RESP | 440 | * ieee80211_is_probe_resp - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_RESP |
441 | * @fc: frame control bytes in little-endian byteorder | 441 | * @fc: frame control bytes in little-endian byteorder |
442 | */ | 442 | */ |
443 | static inline int ieee80211_is_probe_resp(__le16 fc) | 443 | static inline bool ieee80211_is_probe_resp(__le16 fc) |
444 | { | 444 | { |
445 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 445 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
446 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_RESP); | 446 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_RESP); |
@@ -450,7 +450,7 @@ static inline int ieee80211_is_probe_resp(__le16 fc) | |||
450 | * ieee80211_is_beacon - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_BEACON | 450 | * ieee80211_is_beacon - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_BEACON |
451 | * @fc: frame control bytes in little-endian byteorder | 451 | * @fc: frame control bytes in little-endian byteorder |
452 | */ | 452 | */ |
453 | static inline int ieee80211_is_beacon(__le16 fc) | 453 | static inline bool ieee80211_is_beacon(__le16 fc) |
454 | { | 454 | { |
455 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 455 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
456 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON); | 456 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON); |
@@ -460,7 +460,7 @@ static inline int ieee80211_is_beacon(__le16 fc) | |||
460 | * ieee80211_is_atim - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ATIM | 460 | * ieee80211_is_atim - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ATIM |
461 | * @fc: frame control bytes in little-endian byteorder | 461 | * @fc: frame control bytes in little-endian byteorder |
462 | */ | 462 | */ |
463 | static inline int ieee80211_is_atim(__le16 fc) | 463 | static inline bool ieee80211_is_atim(__le16 fc) |
464 | { | 464 | { |
465 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 465 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
466 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ATIM); | 466 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ATIM); |
@@ -470,7 +470,7 @@ static inline int ieee80211_is_atim(__le16 fc) | |||
470 | * ieee80211_is_disassoc - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DISASSOC | 470 | * ieee80211_is_disassoc - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DISASSOC |
471 | * @fc: frame control bytes in little-endian byteorder | 471 | * @fc: frame control bytes in little-endian byteorder |
472 | */ | 472 | */ |
473 | static inline int ieee80211_is_disassoc(__le16 fc) | 473 | static inline bool ieee80211_is_disassoc(__le16 fc) |
474 | { | 474 | { |
475 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 475 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
476 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DISASSOC); | 476 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DISASSOC); |
@@ -480,7 +480,7 @@ static inline int ieee80211_is_disassoc(__le16 fc) | |||
480 | * ieee80211_is_auth - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_AUTH | 480 | * ieee80211_is_auth - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_AUTH |
481 | * @fc: frame control bytes in little-endian byteorder | 481 | * @fc: frame control bytes in little-endian byteorder |
482 | */ | 482 | */ |
483 | static inline int ieee80211_is_auth(__le16 fc) | 483 | static inline bool ieee80211_is_auth(__le16 fc) |
484 | { | 484 | { |
485 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 485 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
486 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH); | 486 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH); |
@@ -490,7 +490,7 @@ static inline int ieee80211_is_auth(__le16 fc) | |||
490 | * ieee80211_is_deauth - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DEAUTH | 490 | * ieee80211_is_deauth - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DEAUTH |
491 | * @fc: frame control bytes in little-endian byteorder | 491 | * @fc: frame control bytes in little-endian byteorder |
492 | */ | 492 | */ |
493 | static inline int ieee80211_is_deauth(__le16 fc) | 493 | static inline bool ieee80211_is_deauth(__le16 fc) |
494 | { | 494 | { |
495 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 495 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
496 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DEAUTH); | 496 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DEAUTH); |
@@ -500,7 +500,7 @@ static inline int ieee80211_is_deauth(__le16 fc) | |||
500 | * ieee80211_is_action - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ACTION | 500 | * ieee80211_is_action - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ACTION |
501 | * @fc: frame control bytes in little-endian byteorder | 501 | * @fc: frame control bytes in little-endian byteorder |
502 | */ | 502 | */ |
503 | static inline int ieee80211_is_action(__le16 fc) | 503 | static inline bool ieee80211_is_action(__le16 fc) |
504 | { | 504 | { |
505 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 505 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
506 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION); | 506 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION); |
@@ -510,7 +510,7 @@ static inline int ieee80211_is_action(__le16 fc) | |||
510 | * ieee80211_is_back_req - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK_REQ | 510 | * ieee80211_is_back_req - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK_REQ |
511 | * @fc: frame control bytes in little-endian byteorder | 511 | * @fc: frame control bytes in little-endian byteorder |
512 | */ | 512 | */ |
513 | static inline int ieee80211_is_back_req(__le16 fc) | 513 | static inline bool ieee80211_is_back_req(__le16 fc) |
514 | { | 514 | { |
515 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 515 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
516 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_BACK_REQ); | 516 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_BACK_REQ); |
@@ -520,7 +520,7 @@ static inline int ieee80211_is_back_req(__le16 fc) | |||
520 | * ieee80211_is_back - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK | 520 | * ieee80211_is_back - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK |
521 | * @fc: frame control bytes in little-endian byteorder | 521 | * @fc: frame control bytes in little-endian byteorder |
522 | */ | 522 | */ |
523 | static inline int ieee80211_is_back(__le16 fc) | 523 | static inline bool ieee80211_is_back(__le16 fc) |
524 | { | 524 | { |
525 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 525 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
526 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_BACK); | 526 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_BACK); |
@@ -530,7 +530,7 @@ static inline int ieee80211_is_back(__le16 fc) | |||
530 | * ieee80211_is_pspoll - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_PSPOLL | 530 | * ieee80211_is_pspoll - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_PSPOLL |
531 | * @fc: frame control bytes in little-endian byteorder | 531 | * @fc: frame control bytes in little-endian byteorder |
532 | */ | 532 | */ |
533 | static inline int ieee80211_is_pspoll(__le16 fc) | 533 | static inline bool ieee80211_is_pspoll(__le16 fc) |
534 | { | 534 | { |
535 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 535 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
536 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_PSPOLL); | 536 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_PSPOLL); |
@@ -540,7 +540,7 @@ static inline int ieee80211_is_pspoll(__le16 fc) | |||
540 | * ieee80211_is_rts - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_RTS | 540 | * ieee80211_is_rts - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_RTS |
541 | * @fc: frame control bytes in little-endian byteorder | 541 | * @fc: frame control bytes in little-endian byteorder |
542 | */ | 542 | */ |
543 | static inline int ieee80211_is_rts(__le16 fc) | 543 | static inline bool ieee80211_is_rts(__le16 fc) |
544 | { | 544 | { |
545 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 545 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
546 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_RTS); | 546 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_RTS); |
@@ -550,7 +550,7 @@ static inline int ieee80211_is_rts(__le16 fc) | |||
550 | * ieee80211_is_cts - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CTS | 550 | * ieee80211_is_cts - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CTS |
551 | * @fc: frame control bytes in little-endian byteorder | 551 | * @fc: frame control bytes in little-endian byteorder |
552 | */ | 552 | */ |
553 | static inline int ieee80211_is_cts(__le16 fc) | 553 | static inline bool ieee80211_is_cts(__le16 fc) |
554 | { | 554 | { |
555 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 555 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
556 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS); | 556 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS); |
@@ -560,7 +560,7 @@ static inline int ieee80211_is_cts(__le16 fc) | |||
560 | * ieee80211_is_ack - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_ACK | 560 | * ieee80211_is_ack - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_ACK |
561 | * @fc: frame control bytes in little-endian byteorder | 561 | * @fc: frame control bytes in little-endian byteorder |
562 | */ | 562 | */ |
563 | static inline int ieee80211_is_ack(__le16 fc) | 563 | static inline bool ieee80211_is_ack(__le16 fc) |
564 | { | 564 | { |
565 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 565 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
566 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_ACK); | 566 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_ACK); |
@@ -570,7 +570,7 @@ static inline int ieee80211_is_ack(__le16 fc) | |||
570 | * ieee80211_is_cfend - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFEND | 570 | * ieee80211_is_cfend - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFEND |
571 | * @fc: frame control bytes in little-endian byteorder | 571 | * @fc: frame control bytes in little-endian byteorder |
572 | */ | 572 | */ |
573 | static inline int ieee80211_is_cfend(__le16 fc) | 573 | static inline bool ieee80211_is_cfend(__le16 fc) |
574 | { | 574 | { |
575 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 575 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
576 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CFEND); | 576 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CFEND); |
@@ -580,7 +580,7 @@ static inline int ieee80211_is_cfend(__le16 fc) | |||
580 | * ieee80211_is_cfendack - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFENDACK | 580 | * ieee80211_is_cfendack - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFENDACK |
581 | * @fc: frame control bytes in little-endian byteorder | 581 | * @fc: frame control bytes in little-endian byteorder |
582 | */ | 582 | */ |
583 | static inline int ieee80211_is_cfendack(__le16 fc) | 583 | static inline bool ieee80211_is_cfendack(__le16 fc) |
584 | { | 584 | { |
585 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 585 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
586 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CFENDACK); | 586 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CFENDACK); |
@@ -590,7 +590,7 @@ static inline int ieee80211_is_cfendack(__le16 fc) | |||
590 | * ieee80211_is_nullfunc - check if frame is a regular (non-QoS) nullfunc frame | 590 | * ieee80211_is_nullfunc - check if frame is a regular (non-QoS) nullfunc frame |
591 | * @fc: frame control bytes in little-endian byteorder | 591 | * @fc: frame control bytes in little-endian byteorder |
592 | */ | 592 | */ |
593 | static inline int ieee80211_is_nullfunc(__le16 fc) | 593 | static inline bool ieee80211_is_nullfunc(__le16 fc) |
594 | { | 594 | { |
595 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 595 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
596 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC); | 596 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC); |
@@ -600,7 +600,7 @@ static inline int ieee80211_is_nullfunc(__le16 fc) | |||
600 | * ieee80211_is_qos_nullfunc - check if frame is a QoS nullfunc frame | 600 | * ieee80211_is_qos_nullfunc - check if frame is a QoS nullfunc frame |
601 | * @fc: frame control bytes in little-endian byteorder | 601 | * @fc: frame control bytes in little-endian byteorder |
602 | */ | 602 | */ |
603 | static inline int ieee80211_is_qos_nullfunc(__le16 fc) | 603 | static inline bool ieee80211_is_qos_nullfunc(__le16 fc) |
604 | { | 604 | { |
605 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | 605 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
606 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC); | 606 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC); |
@@ -624,7 +624,7 @@ static inline bool ieee80211_is_bufferable_mmpdu(__le16 fc) | |||
624 | * ieee80211_is_first_frag - check if IEEE80211_SCTL_FRAG is not set | 624 | * ieee80211_is_first_frag - check if IEEE80211_SCTL_FRAG is not set |
625 | * @seq_ctrl: frame sequence control bytes in little-endian byteorder | 625 | * @seq_ctrl: frame sequence control bytes in little-endian byteorder |
626 | */ | 626 | */ |
627 | static inline int ieee80211_is_first_frag(__le16 seq_ctrl) | 627 | static inline bool ieee80211_is_first_frag(__le16 seq_ctrl) |
628 | { | 628 | { |
629 | return (seq_ctrl & cpu_to_le16(IEEE80211_SCTL_FRAG)) == 0; | 629 | return (seq_ctrl & cpu_to_le16(IEEE80211_SCTL_FRAG)) == 0; |
630 | } | 630 | } |
@@ -1379,6 +1379,7 @@ struct ieee80211_ht_operation { | |||
1379 | 1379 | ||
1380 | 1380 | ||
1381 | /* block-ack parameters */ | 1381 | /* block-ack parameters */ |
1382 | #define IEEE80211_ADDBA_PARAM_AMSDU_MASK 0x0001 | ||
1382 | #define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002 | 1383 | #define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002 |
1383 | #define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C | 1384 | #define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C |
1384 | #define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFC0 | 1385 | #define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFC0 |
@@ -1745,8 +1746,7 @@ enum ieee80211_eid { | |||
1745 | WLAN_EID_TIM = 5, | 1746 | WLAN_EID_TIM = 5, |
1746 | WLAN_EID_IBSS_PARAMS = 6, | 1747 | WLAN_EID_IBSS_PARAMS = 6, |
1747 | WLAN_EID_COUNTRY = 7, | 1748 | WLAN_EID_COUNTRY = 7, |
1748 | WLAN_EID_HP_PARAMS = 8, | 1749 | /* 8, 9 reserved */ |
1749 | WLAN_EID_HP_TABLE = 9, | ||
1750 | WLAN_EID_REQUEST = 10, | 1750 | WLAN_EID_REQUEST = 10, |
1751 | WLAN_EID_QBSS_LOAD = 11, | 1751 | WLAN_EID_QBSS_LOAD = 11, |
1752 | WLAN_EID_EDCA_PARAM_SET = 12, | 1752 | WLAN_EID_EDCA_PARAM_SET = 12, |
@@ -1932,6 +1932,8 @@ enum ieee80211_category { | |||
1932 | WLAN_CATEGORY_HT = 7, | 1932 | WLAN_CATEGORY_HT = 7, |
1933 | WLAN_CATEGORY_SA_QUERY = 8, | 1933 | WLAN_CATEGORY_SA_QUERY = 8, |
1934 | WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9, | 1934 | WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9, |
1935 | WLAN_CATEGORY_WNM = 10, | ||
1936 | WLAN_CATEGORY_WNM_UNPROTECTED = 11, | ||
1935 | WLAN_CATEGORY_TDLS = 12, | 1937 | WLAN_CATEGORY_TDLS = 12, |
1936 | WLAN_CATEGORY_MESH_ACTION = 13, | 1938 | WLAN_CATEGORY_MESH_ACTION = 13, |
1937 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, | 1939 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, |
@@ -2396,7 +2398,10 @@ static inline bool _ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr) | |||
2396 | category = ((u8 *) hdr) + 24; | 2398 | category = ((u8 *) hdr) + 24; |
2397 | return *category != WLAN_CATEGORY_PUBLIC && | 2399 | return *category != WLAN_CATEGORY_PUBLIC && |
2398 | *category != WLAN_CATEGORY_HT && | 2400 | *category != WLAN_CATEGORY_HT && |
2401 | *category != WLAN_CATEGORY_WNM_UNPROTECTED && | ||
2399 | *category != WLAN_CATEGORY_SELF_PROTECTED && | 2402 | *category != WLAN_CATEGORY_SELF_PROTECTED && |
2403 | *category != WLAN_CATEGORY_UNPROT_DMG && | ||
2404 | *category != WLAN_CATEGORY_VHT && | ||
2400 | *category != WLAN_CATEGORY_VENDOR_SPECIFIC; | 2405 | *category != WLAN_CATEGORY_VENDOR_SPECIFIC; |
2401 | } | 2406 | } |
2402 | 2407 | ||