.. | .. |
---|
1 | | -/****************************************************************************** |
---|
2 | | - * |
---|
3 | | - * Copyright(c) 2009-2013 Realtek Corporation. |
---|
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 | | - * The full GNU General Public License is included in this distribution in the |
---|
15 | | - * file called LICENSE. |
---|
16 | | - * |
---|
17 | | - * Contact Information: |
---|
18 | | - * wlanfae <wlanfae@realtek.com> |
---|
19 | | - * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, |
---|
20 | | - * Hsinchu 300, Taiwan. |
---|
21 | | - * |
---|
22 | | - * Larry Finger <Larry.Finger@lwfinger.net> |
---|
23 | | - * |
---|
24 | | - *****************************************************************************/ |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
---|
| 2 | +/* Copyright(c) 2009-2013 Realtek Corporation.*/ |
---|
25 | 3 | |
---|
26 | 4 | #ifndef __RTL92C_DEF_H__ |
---|
27 | 5 | #define __RTL92C_DEF_H__ |
---|
.. | .. |
---|
34 | 12 | #define RX_CMD_QUEUE 1 |
---|
35 | 13 | |
---|
36 | 14 | #define C2H_RX_CMD_HDR_LEN 8 |
---|
37 | | -#define GET_C2H_CMD_CMD_LEN(__prxhdr) \ |
---|
38 | | - LE_BITS_TO_4BYTE((__prxhdr), 0, 16) |
---|
39 | | -#define GET_C2H_CMD_ELEMENT_ID(__prxhdr) \ |
---|
40 | | - LE_BITS_TO_4BYTE((__prxhdr), 16, 8) |
---|
41 | | -#define GET_C2H_CMD_CMD_SEQ(__prxhdr) \ |
---|
42 | | - LE_BITS_TO_4BYTE((__prxhdr), 24, 7) |
---|
43 | | -#define GET_C2H_CMD_CONTINUE(__prxhdr) \ |
---|
44 | | - LE_BITS_TO_4BYTE((__prxhdr), 31, 1) |
---|
45 | | -#define GET_C2H_CMD_CONTENT(__prxhdr) \ |
---|
46 | | - ((u8 *)(__prxhdr) + C2H_RX_CMD_HDR_LEN) |
---|
47 | | - |
---|
48 | | -#define GET_C2H_CMD_FEEDBACK_ELEMENT_ID(__pcmdfbhdr) \ |
---|
49 | | - LE_BITS_TO_4BYTE((__pcmdfbhdr), 0, 8) |
---|
50 | | -#define GET_C2H_CMD_FEEDBACK_CCX_LEN(__pcmdfbhdr) \ |
---|
51 | | - LE_BITS_TO_4BYTE((__pcmdfbhdr), 8, 8) |
---|
52 | | -#define GET_C2H_CMD_FEEDBACK_CCX_CMD_CNT(__pcmdfbhdr) \ |
---|
53 | | - LE_BITS_TO_4BYTE((__pcmdfbhdr), 16, 16) |
---|
54 | | -#define GET_C2H_CMD_FEEDBACK_CCX_MAC_ID(__pcmdfbhdr) \ |
---|
55 | | - LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 0, 5) |
---|
56 | | -#define GET_C2H_CMD_FEEDBACK_CCX_VALID(__pcmdfbhdr) \ |
---|
57 | | - LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 7, 1) |
---|
58 | | -#define GET_C2H_CMD_FEEDBACK_CCX_RETRY_CNT(__pcmdfbhdr) \ |
---|
59 | | - LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 8, 5) |
---|
60 | | -#define GET_C2H_CMD_FEEDBACK_CCX_TOK(__pcmdfbhdr) \ |
---|
61 | | - LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 15, 1) |
---|
62 | | -#define GET_C2H_CMD_FEEDBACK_CCX_QSEL(__pcmdfbhdr) \ |
---|
63 | | - LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 16, 4) |
---|
64 | | -#define GET_C2H_CMD_FEEDBACK_CCX_SEQ(__pcmdfbhdr) \ |
---|
65 | | - LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 20, 12) |
---|
66 | 15 | |
---|
67 | 16 | #define CHIP_BONDING_IDENTIFIER(_value) (((_value)>>22)&0x3) |
---|
68 | 17 | |
---|
.. | .. |
---|
123 | 72 | |
---|
124 | 73 | #define IS_92C_SERIAL(version) \ |
---|
125 | 74 | ((IS_81XXC(version) && IS_2T2R(version)) ? true : false) |
---|
126 | | -#define IS_81xxC_VENDOR_UMC_A_CUT(version) \ |
---|
127 | | - (IS_81XXC(version) ? ((IS_CHIP_VENDOR_UMC(version)) ? \ |
---|
128 | | - ((GET_CVID_CUT_VERSION(version)) ? false : true) : false) : false) |
---|
129 | 75 | #define IS_81XXC_VENDOR_UMC_B_CUT(version) \ |
---|
130 | 76 | (IS_81XXC(version) ? (IS_CHIP_VENDOR_UMC(version) ? \ |
---|
131 | 77 | ((GET_CVID_CUT_VERSION(version) == B_CUT_VERSION) ? true \ |
---|