forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/bcmcdc.h
....@@ -1,18 +1,19 @@
1
-/* SPDX-License-Identifier: GPL-2.0 */
21 /*
32 * CDC network driver ioctl/indication encoding
43 * Broadcom 802.11abg Networking Device Driver
54 *
65 * Definitions subject to change without notice.
76 *
8
- * Copyright (C) 1999-2019, Broadcom Corporation
9
- *
7
+ * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation
8
+ *
9
+ * Copyright (C) 1999-2017, Broadcom Corporation
10
+ *
1011 * Unless you and Broadcom execute a separate written software license
1112 * agreement governing use of this software, this software is licensed to you
1213 * under the terms of the GNU General Public License version 2 (the "GPL"),
1314 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
1415 * following added to such license:
15
- *
16
+ *
1617 * As a special exception, the copyright holders of this software give you
1718 * permission to link this software with independent modules, and to copy and
1819 * distribute the resulting executable under terms of your choice, provided that
....@@ -20,7 +21,7 @@
2021 * the license of that module. An independent module is a module which is not
2122 * derived from this software. The special exception does not apply to any
2223 * modifications of the software.
23
- *
24
+ *
2425 * Notwithstanding the above, under no circumstances may you combine this
2526 * software in any way with any other Broadcom software provided under a license
2627 * other than the GPL, without Broadcom's express prior written consent.
....@@ -28,11 +29,11 @@
2829 *
2930 * <<Broadcom-WL-IPTag/Open:>>
3031 *
31
- * $Id: bcmcdc.h 514727 2014-11-12 03:02:48Z $
32
+ * $Id$
3233 */
3334 #ifndef _bcmcdc_h_
3435 #define _bcmcdc_h_
35
-#include <proto/ethernet.h>
36
+#include <ethernet.h>
3637
3738 typedef struct cdc_ioctl {
3839 uint32 cmd; /* ioctl command value */
....@@ -90,6 +91,7 @@
9091 #define BDC_HEADER_LEN 4
9192
9293 /* flags field bitmap */
94
+#define BDC_FLAG_EXEMPT 0x03 /* EXT_STA: encryption exemption (host -> dongle?) */
9395 #define BDC_FLAG_80211_PKT 0x01 /* Packet is in 802.11 format (dongle -> host) */
9496 #define BDC_FLAG_SUM_GOOD 0x04 /* Dongle has verified good RX checksums */
9597 #define BDC_FLAG_SUM_NEEDED 0x08 /* Dongle needs to do TX checksums: host->device */
....@@ -117,20 +119,5 @@
117119 ((int)((((hdr)->flags2) & BDC_FLAG2_IF_MASK) >> BDC_FLAG2_IF_SHIFT))
118120 #define BDC_SET_IF_IDX(hdr, idx) \
119121 ((hdr)->flags2 = (((hdr)->flags2 & ~BDC_FLAG2_IF_MASK) | ((idx) << BDC_FLAG2_IF_SHIFT)))
120
-
121
-#define BDC_FLAG2_PAD_MASK 0xf0
122
-#define BDC_FLAG_PAD_MASK 0x03
123
-#define BDC_FLAG2_PAD_SHIFT 2
124
-#define BDC_FLAG_PAD_SHIFT 0
125
-#define BDC_FLAG2_PAD_IDX 0x3c
126
-#define BDC_FLAG_PAD_IDX 0x03
127
-#define BDC_GET_PAD_LEN(hdr) \
128
- ((int)(((((hdr)->flags2) & BDC_FLAG2_PAD_MASK) >> BDC_FLAG2_PAD_SHIFT) | \
129
- ((((hdr)->flags) & BDC_FLAG_PAD_MASK) >> BDC_FLAG_PAD_SHIFT)))
130
-#define BDC_SET_PAD_LEN(hdr, idx) \
131
- ((hdr)->flags2 = (((hdr)->flags2 & ~BDC_FLAG2_PAD_MASK) | \
132
- (((idx) & BDC_FLAG2_PAD_IDX) << BDC_FLAG2_PAD_SHIFT))); \
133
- ((hdr)->flags = (((hdr)->flags & ~BDC_FLAG_PAD_MASK) | \
134
- (((idx) & BDC_FLAG_PAD_IDX) << BDC_FLAG_PAD_SHIFT)))
135122
136123 #endif /* _bcmcdc_h_ */