forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/staging/rtl8712/wifi.h
....@@ -1,19 +1,7 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 /******************************************************************************
23 *
34 * 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
175 *
186 * Modifications for inclusion into the Linux staging tree are
197 * Copyright(c) 2010 Larry Finger. All rights reserved.
....@@ -290,17 +278,6 @@
290278
291279 #define GetAddr4Ptr(pbuf) ((unsigned char *)((addr_t)(pbuf) + 24))
292280
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
-
304281 static inline unsigned char *get_da(unsigned char *pframe)
305282 {
306283 unsigned char *da;
....@@ -322,7 +299,6 @@
322299 }
323300 return da;
324301 }
325
-
326302
327303 static inline unsigned char *get_sa(unsigned char *pframe)
328304 {
....@@ -369,8 +345,6 @@
369345 return sa;
370346 }
371347
372
-
373
-
374348 /*-----------------------------------------------------------------------------
375349 * Below is for the security related definition
376350 *-----------------------------------------------------------------------------
....@@ -415,7 +389,6 @@
415389
416390 #define _RESERVED47_ 47
417391
418
-
419392 /* ---------------------------------------------------------------------------
420393 * Below is the fixed elements...
421394 * ---------------------------------------------------------------------------
....@@ -459,18 +432,10 @@
459432 #define _WMM_IE_Length_ 7 /* for WMM STA */
460433 #define _WMM_Para_Element_Length_ 24
461434
462
-
463435 /*-----------------------------------------------------------------------------
464436 * Below is the definition for 802.11n
465437 *------------------------------------------------------------------------------
466438 */
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
474439
475440 #define SetOrderBit(pbuf) ({ \
476441 *(__le16 *)(pbuf) |= cpu_to_le16(_ORDER_); \
....@@ -479,35 +444,14 @@
479444 #define GetOrderBit(pbuf) (((*(__le16 *)(pbuf)) & \
480445 le16_to_cpu(_ORDER_)) != 0)
481446
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
-
503447 /*
504
- * struct ieee80211_ht_cap - HT capabilities
448
+ * struct rtl_ieee80211_ht_cap - HT capabilities
505449 *
506450 * This structure refers to "HT capabilities element" as
507451 * described in 802.11n draft section 7.3.2.52
508452 */
509453
510
-struct ieee80211_ht_cap {
454
+struct rtl_ieee80211_ht_cap {
511455 __le16 cap_info;
512456 unsigned char ampdu_params_info;
513457 unsigned char supp_mcs_set[16];
....@@ -517,7 +461,7 @@
517461 } __packed;
518462
519463 /**
520
- * struct ieee80211_ht_cap - HT additional information
464
+ * struct ieee80211_ht_addt_info - HT additional information
521465 *
522466 * This structure refers to "HT information element" as
523467 * described in 802.11n draft section 7.3.2.53
....@@ -529,51 +473,6 @@
529473 __le16 stbc_param;
530474 unsigned char basic_set[16];
531475 } __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
577476
578477 #endif /* _WIFI_H_ */
579478