.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
---|
1 | 2 | /****************************************************************************** |
---|
2 | 3 | * |
---|
3 | 4 | * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. |
---|
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 | | - * You should have received a copy of the GNU General Public License along with |
---|
15 | | - * this program; if not, write to the Free Software Foundation, Inc., |
---|
16 | | - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA |
---|
17 | 5 | * |
---|
18 | 6 | * Modifications for inclusion into the Linux staging tree are |
---|
19 | 7 | * Copyright(c) 2010 Larry Finger. All rights reserved. |
---|
.. | .. |
---|
290 | 278 | |
---|
291 | 279 | #define GetAddr4Ptr(pbuf) ((unsigned char *)((addr_t)(pbuf) + 24)) |
---|
292 | 280 | |
---|
293 | | - |
---|
294 | | - |
---|
295 | | -static inline int IS_MCAST(unsigned char *da) |
---|
296 | | -{ |
---|
297 | | - if ((*da) & 0x01) |
---|
298 | | - return true; |
---|
299 | | - else |
---|
300 | | - return false; |
---|
301 | | -} |
---|
302 | | - |
---|
303 | | - |
---|
304 | 281 | static inline unsigned char *get_da(unsigned char *pframe) |
---|
305 | 282 | { |
---|
306 | 283 | unsigned char *da; |
---|
.. | .. |
---|
322 | 299 | } |
---|
323 | 300 | return da; |
---|
324 | 301 | } |
---|
325 | | - |
---|
326 | 302 | |
---|
327 | 303 | static inline unsigned char *get_sa(unsigned char *pframe) |
---|
328 | 304 | { |
---|
.. | .. |
---|
369 | 345 | return sa; |
---|
370 | 346 | } |
---|
371 | 347 | |
---|
372 | | - |
---|
373 | | - |
---|
374 | 348 | /*----------------------------------------------------------------------------- |
---|
375 | 349 | * Below is for the security related definition |
---|
376 | 350 | *----------------------------------------------------------------------------- |
---|
.. | .. |
---|
415 | 389 | |
---|
416 | 390 | #define _RESERVED47_ 47 |
---|
417 | 391 | |
---|
418 | | - |
---|
419 | 392 | /* --------------------------------------------------------------------------- |
---|
420 | 393 | * Below is the fixed elements... |
---|
421 | 394 | * --------------------------------------------------------------------------- |
---|
.. | .. |
---|
459 | 432 | #define _WMM_IE_Length_ 7 /* for WMM STA */ |
---|
460 | 433 | #define _WMM_Para_Element_Length_ 24 |
---|
461 | 434 | |
---|
462 | | - |
---|
463 | 435 | /*----------------------------------------------------------------------------- |
---|
464 | 436 | * Below is the definition for 802.11n |
---|
465 | 437 | *------------------------------------------------------------------------------ |
---|
466 | 438 | */ |
---|
467 | | - |
---|
468 | | -/* block-ack parameters */ |
---|
469 | | -#define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002 |
---|
470 | | -#define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C |
---|
471 | | -#define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFC0 |
---|
472 | | -#define IEEE80211_DELBA_PARAM_TID_MASK 0xF000 |
---|
473 | | -#define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800 |
---|
474 | 439 | |
---|
475 | 440 | #define SetOrderBit(pbuf) ({ \ |
---|
476 | 441 | *(__le16 *)(pbuf) |= cpu_to_le16(_ORDER_); \ |
---|
.. | .. |
---|
479 | 444 | #define GetOrderBit(pbuf) (((*(__le16 *)(pbuf)) & \ |
---|
480 | 445 | le16_to_cpu(_ORDER_)) != 0) |
---|
481 | 446 | |
---|
482 | | - |
---|
483 | | -/** |
---|
484 | | - * struct ieee80211_bar - HT Block Ack Request |
---|
485 | | - * |
---|
486 | | - * This structure refers to "HT BlockAckReq" as |
---|
487 | | - * described in 802.11n draft section 7.2.1.7.1 |
---|
488 | | - */ |
---|
489 | | -struct ieee80211_bar { |
---|
490 | | - __le16 frame_control; |
---|
491 | | - __le16 duration; |
---|
492 | | - unsigned char ra[6]; |
---|
493 | | - unsigned char ta[6]; |
---|
494 | | - __le16 control; |
---|
495 | | - __le16 start_seq_num; |
---|
496 | | -} __packed; |
---|
497 | | - |
---|
498 | | -/* 802.11 BAR control masks */ |
---|
499 | | -#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000 |
---|
500 | | -#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004 |
---|
501 | | - |
---|
502 | | - |
---|
503 | 447 | /* |
---|
504 | | - * struct ieee80211_ht_cap - HT capabilities |
---|
| 448 | + * struct rtl_ieee80211_ht_cap - HT capabilities |
---|
505 | 449 | * |
---|
506 | 450 | * This structure refers to "HT capabilities element" as |
---|
507 | 451 | * described in 802.11n draft section 7.3.2.52 |
---|
508 | 452 | */ |
---|
509 | 453 | |
---|
510 | | -struct ieee80211_ht_cap { |
---|
| 454 | +struct rtl_ieee80211_ht_cap { |
---|
511 | 455 | __le16 cap_info; |
---|
512 | 456 | unsigned char ampdu_params_info; |
---|
513 | 457 | unsigned char supp_mcs_set[16]; |
---|
.. | .. |
---|
517 | 461 | } __packed; |
---|
518 | 462 | |
---|
519 | 463 | /** |
---|
520 | | - * struct ieee80211_ht_cap - HT additional information |
---|
| 464 | + * struct ieee80211_ht_addt_info - HT additional information |
---|
521 | 465 | * |
---|
522 | 466 | * This structure refers to "HT information element" as |
---|
523 | 467 | * described in 802.11n draft section 7.3.2.53 |
---|
.. | .. |
---|
529 | 473 | __le16 stbc_param; |
---|
530 | 474 | unsigned char basic_set[16]; |
---|
531 | 475 | } __packed; |
---|
532 | | - |
---|
533 | | -/* 802.11n HT capabilities masks */ |
---|
534 | | -#define IEEE80211_HT_CAP_SUP_WIDTH 0x0002 |
---|
535 | | -#define IEEE80211_HT_CAP_SM_PS 0x000C |
---|
536 | | -#define IEEE80211_HT_CAP_GRN_FLD 0x0010 |
---|
537 | | -#define IEEE80211_HT_CAP_SGI_20 0x0020 |
---|
538 | | -#define IEEE80211_HT_CAP_SGI_40 0x0040 |
---|
539 | | -#define IEEE80211_HT_CAP_TX_STBC 0x0080 |
---|
540 | | -#define IEEE80211_HT_CAP_DELAY_BA 0x0400 |
---|
541 | | -#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 |
---|
542 | | -#define IEEE80211_HT_CAP_DSSSCCK40 0x1000 |
---|
543 | | -/* 802.11n HT capability AMPDU settings */ |
---|
544 | | -#define IEEE80211_HT_CAP_AMPDU_FACTOR 0x03 |
---|
545 | | -#define IEEE80211_HT_CAP_AMPDU_DENSITY 0x1C |
---|
546 | | -/* 802.11n HT capability MSC set */ |
---|
547 | | -#define IEEE80211_SUPP_MCS_SET_UEQM 4 |
---|
548 | | -#define IEEE80211_HT_CAP_MAX_STREAMS 4 |
---|
549 | | -#define IEEE80211_SUPP_MCS_SET_LEN 10 |
---|
550 | | -/* maximum streams the spec allows */ |
---|
551 | | -#define IEEE80211_HT_CAP_MCS_TX_DEFINED 0x01 |
---|
552 | | -#define IEEE80211_HT_CAP_MCS_TX_RX_DIFF 0x02 |
---|
553 | | -#define IEEE80211_HT_CAP_MCS_TX_STREAMS 0x0C |
---|
554 | | -#define IEEE80211_HT_CAP_MCS_TX_UEQM 0x10 |
---|
555 | | -/* 802.11n HT IE masks */ |
---|
556 | | -#define IEEE80211_HT_IE_CHA_SEC_OFFSET 0x03 |
---|
557 | | -#define IEEE80211_HT_IE_CHA_SEC_NONE 0x00 |
---|
558 | | -#define IEEE80211_HT_IE_CHA_SEC_ABOVE 0x01 |
---|
559 | | -#define IEEE80211_HT_IE_CHA_SEC_BELOW 0x03 |
---|
560 | | -#define IEEE80211_HT_IE_CHA_WIDTH 0x04 |
---|
561 | | -#define IEEE80211_HT_IE_HT_PROTECTION 0x0003 |
---|
562 | | -#define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004 |
---|
563 | | -#define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010 |
---|
564 | | - |
---|
565 | | -/* |
---|
566 | | - * A-PMDU buffer sizes |
---|
567 | | - * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2) |
---|
568 | | - */ |
---|
569 | | -#define IEEE80211_MIN_AMPDU_BUF 0x8 |
---|
570 | | - |
---|
571 | | - |
---|
572 | | -/* Spatial Multiplexing Power Save Modes */ |
---|
573 | | -#define WLAN_HT_CAP_SM_PS_STATIC 0 |
---|
574 | | -#define WLAN_HT_CAP_SM_PS_DYNAMIC 1 |
---|
575 | | -#define WLAN_HT_CAP_SM_PS_INVALID 2 |
---|
576 | | -#define WLAN_HT_CAP_SM_PS_DISABLED 3 |
---|
577 | 476 | |
---|
578 | 477 | #endif /* _WIFI_H_ */ |
---|
579 | 478 | |
---|