forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
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 *-----------------------------------------------------------------------------
....@@ -399,22 +373,6 @@
399373 #define _BEACON_IE_OFFSET_ 12
400374
401375 #define _FIXED_IE_LENGTH_ _BEACON_IE_OFFSET_
402
-
403
-#define _SSID_IE_ 0
404
-#define _SUPPORTEDRATES_IE_ 1
405
-#define _DSSET_IE_ 3
406
-#define _IBSS_PARA_IE_ 6
407
-#define _ERPINFO_IE_ 42
408
-#define _EXT_SUPPORTEDRATES_IE_ 50
409
-
410
-#define _HT_CAPABILITY_IE_ 45
411
-#define _HT_EXTRA_INFO_IE_ 61
412
-#define _HT_ADD_INFO_IE_ 61 /* _HT_EXTRA_INFO_IE_ */
413
-
414
-#define _VENDOR_SPECIFIC_IE_ 221
415
-
416
-#define _RESERVED47_ 47
417
-
418376
419377 /* ---------------------------------------------------------------------------
420378 * Below is the fixed elements...
....@@ -459,18 +417,10 @@
459417 #define _WMM_IE_Length_ 7 /* for WMM STA */
460418 #define _WMM_Para_Element_Length_ 24
461419
462
-
463420 /*-----------------------------------------------------------------------------
464421 * Below is the definition for 802.11n
465422 *------------------------------------------------------------------------------
466423 */
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
474424
475425 #define SetOrderBit(pbuf) ({ \
476426 *(__le16 *)(pbuf) |= cpu_to_le16(_ORDER_); \
....@@ -479,35 +429,14 @@
479429 #define GetOrderBit(pbuf) (((*(__le16 *)(pbuf)) & \
480430 le16_to_cpu(_ORDER_)) != 0)
481431
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
-
503432 /*
504
- * struct ieee80211_ht_cap - HT capabilities
433
+ * struct rtl_ieee80211_ht_cap - HT capabilities
505434 *
506435 * This structure refers to "HT capabilities element" as
507436 * described in 802.11n draft section 7.3.2.52
508437 */
509438
510
-struct ieee80211_ht_cap {
439
+struct rtl_ieee80211_ht_cap {
511440 __le16 cap_info;
512441 unsigned char ampdu_params_info;
513442 unsigned char supp_mcs_set[16];
....@@ -517,7 +446,7 @@
517446 } __packed;
518447
519448 /**
520
- * struct ieee80211_ht_cap - HT additional information
449
+ * struct ieee80211_ht_addt_info - HT additional information
521450 *
522451 * This structure refers to "HT information element" as
523452 * described in 802.11n draft section 7.3.2.53
....@@ -529,51 +458,6 @@
529458 __le16 stbc_param;
530459 unsigned char basic_set[16];
531460 } __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
577461
578462 #endif /* _WIFI_H_ */
579463