Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
staging: r8822be: Add the driver code
The RTL8822BE, an 802.11ac wireless network card, is now appearing in new computers. Its driver is being placed in staging to reduce the time that users of this new card will have access to in-kernel drivers. This commit adds the code for the new r8822be driver. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Yan-Hsuan Chuang <yhchuang@realtek.com> Cc: Birming Chiu <birming@realtek.com> Cc: Shaofu <shaofu@realtek.com> Cc: Steven Ting <steventing@realtek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Loading branch information
Showing
14 changed files
with
9,647 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/****************************************************************************** | ||
* | ||
* Copyright(c) 2016 Realtek Corporation. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of version 2 of the GNU General Public License as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* The full GNU General Public License is included in this distribution in the | ||
* file called LICENSE. | ||
* | ||
* Contact Information: | ||
* wlanfae <wlanfae@realtek.com> | ||
* Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, | ||
* Hsinchu 300, Taiwan. | ||
* | ||
* Larry Finger <Larry.Finger@lwfinger.net> | ||
* | ||
*****************************************************************************/ | ||
|
||
#ifndef __RTL8822B_DEF_H__ | ||
#define __RTL8822B_DEF_H__ | ||
|
||
#define RX_DESC_NUM_8822BE 512 | ||
|
||
#define HAL_PRIME_CHNL_OFFSET_DONT_CARE 0 | ||
#define HAL_PRIME_CHNL_OFFSET_LOWER 1 | ||
#define HAL_PRIME_CHNL_OFFSET_UPPER 2 | ||
|
||
#define RX_MPDU_QUEUE 0 | ||
|
||
#define IS_HT_RATE(_rate) (_rate >= DESC_RATEMCS0) | ||
#define IS_CCK_RATE(_rate) (_rate >= DESC_RATE1M && _rate <= DESC_RATE11M) | ||
#define IS_OFDM_RATE(_rate) (_rate >= DESC_RATE6M && _rate <= DESC_RATE54M) | ||
#define IS_1T_RATE(_rate) \ | ||
((_rate >= DESC_RATE1M && _rate <= DESC_RATEMCS7) || \ | ||
(_rate >= DESC_RATEVHT1SS_MCS0 && _rate <= DESC_RATEVHT1SS_MCS9)) | ||
#define IS_2T_RATE(_rate) \ | ||
((_rate >= DESC_RATEMCS8 && _rate <= DESC_RATEMCS15) || \ | ||
(_rate >= DESC_RATEVHT2SS_MCS0 && _rate <= DESC_RATEVHT2SS_MCS9)) | ||
|
||
#define IS_1T_RATESEC(_rs) \ | ||
((_rs == CCK) || (_rs == OFDM) || (_rs == HT_MCS0_MCS7) || \ | ||
(_rs == VHT_1SSMCS0_1SSMCS9)) | ||
#define IS_2T_RATESEC(_rs) \ | ||
((_rs == HT_MCS8_MCS15) || (_rs == VHT_2SSMCS0_2SSMCS9)) | ||
|
||
enum rx_packet_type { | ||
NORMAL_RX, | ||
C2H_PACKET, | ||
}; | ||
|
||
enum rtl_desc_qsel { | ||
QSLT_BK = 0x2, | ||
QSLT_BE = 0x0, | ||
QSLT_VI = 0x5, | ||
QSLT_VO = 0x7, | ||
QSLT_BEACON = 0x10, | ||
QSLT_HIGH = 0x11, | ||
QSLT_MGNT = 0x12, | ||
QSLT_CMD = 0x13, | ||
}; | ||
|
||
enum vht_data_sc { | ||
VHT_DATA_SC_DONOT_CARE = 0, | ||
VHT_DATA_SC_20_UPPER_OF_80MHZ = 1, | ||
VHT_DATA_SC_20_LOWER_OF_80MHZ = 2, | ||
VHT_DATA_SC_20_UPPERST_OF_80MHZ = 3, | ||
VHT_DATA_SC_20_LOWEST_OF_80MHZ = 4, | ||
VHT_DATA_SC_20_RECV1 = 5, | ||
VHT_DATA_SC_20_RECV2 = 6, | ||
VHT_DATA_SC_20_RECV3 = 7, | ||
VHT_DATA_SC_20_RECV4 = 8, | ||
VHT_DATA_SC_40_UPPER_OF_80MHZ = 9, | ||
VHT_DATA_SC_40_LOWER_OF_80MHZ = 10, | ||
}; | ||
#endif |
Oops, something went wrong.