| .. | .. |
|---|
| 1 | | -/* SPDX-License-Identifier: GPL-2.0 */ |
|---|
| 2 | 1 | /* |
|---|
| 3 | 2 | * CDC network driver ioctl/indication encoding |
|---|
| 4 | 3 | * Broadcom 802.11abg Networking Device Driver |
|---|
| 5 | 4 | * |
|---|
| 6 | 5 | * Definitions subject to change without notice. |
|---|
| 7 | 6 | * |
|---|
| 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 | + * |
|---|
| 10 | 11 | * Unless you and Broadcom execute a separate written software license |
|---|
| 11 | 12 | * agreement governing use of this software, this software is licensed to you |
|---|
| 12 | 13 | * under the terms of the GNU General Public License version 2 (the "GPL"), |
|---|
| 13 | 14 | * available at http://www.broadcom.com/licenses/GPLv2.php, with the |
|---|
| 14 | 15 | * following added to such license: |
|---|
| 15 | | - * |
|---|
| 16 | + * |
|---|
| 16 | 17 | * As a special exception, the copyright holders of this software give you |
|---|
| 17 | 18 | * permission to link this software with independent modules, and to copy and |
|---|
| 18 | 19 | * distribute the resulting executable under terms of your choice, provided that |
|---|
| .. | .. |
|---|
| 20 | 21 | * the license of that module. An independent module is a module which is not |
|---|
| 21 | 22 | * derived from this software. The special exception does not apply to any |
|---|
| 22 | 23 | * modifications of the software. |
|---|
| 23 | | - * |
|---|
| 24 | + * |
|---|
| 24 | 25 | * Notwithstanding the above, under no circumstances may you combine this |
|---|
| 25 | 26 | * software in any way with any other Broadcom software provided under a license |
|---|
| 26 | 27 | * other than the GPL, without Broadcom's express prior written consent. |
|---|
| .. | .. |
|---|
| 28 | 29 | * |
|---|
| 29 | 30 | * <<Broadcom-WL-IPTag/Open:>> |
|---|
| 30 | 31 | * |
|---|
| 31 | | - * $Id: bcmcdc.h 514727 2014-11-12 03:02:48Z $ |
|---|
| 32 | + * $Id$ |
|---|
| 32 | 33 | */ |
|---|
| 33 | 34 | #ifndef _bcmcdc_h_ |
|---|
| 34 | 35 | #define _bcmcdc_h_ |
|---|
| 35 | | -#include <proto/ethernet.h> |
|---|
| 36 | +#include <ethernet.h> |
|---|
| 36 | 37 | |
|---|
| 37 | 38 | typedef struct cdc_ioctl { |
|---|
| 38 | 39 | uint32 cmd; /* ioctl command value */ |
|---|
| .. | .. |
|---|
| 90 | 91 | #define BDC_HEADER_LEN 4 |
|---|
| 91 | 92 | |
|---|
| 92 | 93 | /* flags field bitmap */ |
|---|
| 94 | +#define BDC_FLAG_EXEMPT 0x03 /* EXT_STA: encryption exemption (host -> dongle?) */ |
|---|
| 93 | 95 | #define BDC_FLAG_80211_PKT 0x01 /* Packet is in 802.11 format (dongle -> host) */ |
|---|
| 94 | 96 | #define BDC_FLAG_SUM_GOOD 0x04 /* Dongle has verified good RX checksums */ |
|---|
| 95 | 97 | #define BDC_FLAG_SUM_NEEDED 0x08 /* Dongle needs to do TX checksums: host->device */ |
|---|
| .. | .. |
|---|
| 117 | 119 | ((int)((((hdr)->flags2) & BDC_FLAG2_IF_MASK) >> BDC_FLAG2_IF_SHIFT)) |
|---|
| 118 | 120 | #define BDC_SET_IF_IDX(hdr, idx) \ |
|---|
| 119 | 121 | ((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))) |
|---|
| 135 | 122 | |
|---|
| 136 | 123 | #endif /* _bcmcdc_h_ */ |
|---|