1 /******************************************************************************
3 * Copyright(c) 2016 Realtek Corporation.
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.
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
14 * The full GNU General Public License is included in this distribution in the
15 * file called LICENSE.
17 * Contact Information:
18 * wlanfae <wlanfae@realtek.com>
19 * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20 * Hsinchu 300, Taiwan.
22 * Larry Finger <Larry.Finger@lwfinger.net>
24 *****************************************************************************/
26 #ifndef __RTL8822B_DEF_H__
27 #define __RTL8822B_DEF_H__
29 #define RX_DESC_NUM_8822BE 512
31 #define HAL_PRIME_CHNL_OFFSET_DONT_CARE 0
32 #define HAL_PRIME_CHNL_OFFSET_LOWER 1
33 #define HAL_PRIME_CHNL_OFFSET_UPPER 2
35 #define RX_MPDU_QUEUE 0
37 #define IS_HT_RATE(_rate) (_rate >= DESC_RATEMCS0)
38 #define IS_CCK_RATE(_rate) (_rate >= DESC_RATE1M && _rate <= DESC_RATE11M)
39 #define IS_OFDM_RATE(_rate) (_rate >= DESC_RATE6M && _rate <= DESC_RATE54M)
40 #define IS_1T_RATE(_rate) \
41 ((_rate >= DESC_RATE1M && _rate <= DESC_RATEMCS7) || \
42 (_rate >= DESC_RATEVHT1SS_MCS0 && _rate <= DESC_RATEVHT1SS_MCS9))
43 #define IS_2T_RATE(_rate) \
44 ((_rate >= DESC_RATEMCS8 && _rate <= DESC_RATEMCS15) || \
45 (_rate >= DESC_RATEVHT2SS_MCS0 && _rate <= DESC_RATEVHT2SS_MCS9))
47 #define IS_1T_RATESEC(_rs) \
48 ((_rs == CCK) || (_rs == OFDM) || (_rs == HT_MCS0_MCS7) || \
49 (_rs == VHT_1SSMCS0_1SSMCS9))
50 #define IS_2T_RATESEC(_rs) \
51 ((_rs == HT_MCS8_MCS15) || (_rs == VHT_2SSMCS0_2SSMCS9))
70 VHT_DATA_SC_DONOT_CARE = 0,
71 VHT_DATA_SC_20_UPPER_OF_80MHZ = 1,
72 VHT_DATA_SC_20_LOWER_OF_80MHZ = 2,
73 VHT_DATA_SC_20_UPPERST_OF_80MHZ = 3,
74 VHT_DATA_SC_20_LOWEST_OF_80MHZ = 4,
75 VHT_DATA_SC_20_RECV1 = 5,
76 VHT_DATA_SC_20_RECV2 = 6,
77 VHT_DATA_SC_20_RECV3 = 7,
78 VHT_DATA_SC_20_RECV4 = 8,
79 VHT_DATA_SC_40_UPPER_OF_80MHZ = 9,
80 VHT_DATA_SC_40_LOWER_OF_80MHZ = 10,