Commit 84d26fda authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Kalle Valo

rtlwifi: Update 8821ae new phy parameters and its parser.

There are new PHY table values for the RTL8821AE. The changes require
new parsing code.
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 5caa7f38
......@@ -449,6 +449,9 @@ u32 RTL8821AE_PHY_REG_ARRAY[] = {
0xCB8, 0x00508240,
};
u32 RTL8821AE_PHY_REG_1TARRAYLEN =
sizeof(RTL8821AE_PHY_REG_ARRAY) / sizeof(u32);
u32 RTL8812AE_PHY_REG_ARRAY_PG[] = {
0, 0, 0, 0x00000c20, 0xffffffff, 0x34363840,
0, 0, 0, 0x00000c24, 0xffffffff, 0x42424444,
......@@ -516,6 +519,9 @@ u32 RTL8821AE_PHY_REG_ARRAY_PG[] = {
1, 0, 0, 0x00000c44, 0x0000ffff, 0x00002022
};
u32 RTL8821AE_PHY_REG_ARRAY_PGLEN =
sizeof(RTL8821AE_PHY_REG_ARRAY_PG) / sizeof(u32);
u32 RTL8812AE_RADIOA_ARRAY[] = {
0x000, 0x00010000,
0x018, 0x0001712A,
......@@ -2285,16 +2291,16 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
0x0EF, 0x00000000,
0x0EF, 0x00000100,
0x034, 0x0000ADF3,
0x034, 0x00009DEF,
0x034, 0x00008DEC,
0x034, 0x00007DE9,
0x034, 0x00006CED,
0x034, 0x00005CE9,
0x034, 0x000044E9,
0x034, 0x000034E6,
0x034, 0x0000246A,
0x034, 0x00001467,
0x034, 0x00000068,
0x034, 0x00009DF0,
0x034, 0x00008D70,
0x034, 0x00007D6D,
0x034, 0x00006CEE,
0x034, 0x00005CCC,
0x034, 0x000044EC,
0x034, 0x000034AC,
0x034, 0x0000246D,
0x034, 0x0000106F,
0x034, 0x0000006C,
0x0EF, 0x00000000,
0x0ED, 0x00000010,
0x044, 0x0000ADF2,
......@@ -2365,8 +2371,11 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
0x0FE, 0x00000000,
0x0FE, 0x00000000,
0x018, 0x0001712A,
};
u32 RTL8821AE_RADIOA_1TARRAYLEN = sizeof(RTL8821AE_RADIOA_ARRAY) / sizeof(u32);
u32 RTL8812AE_MAC_REG_ARRAY[] = {
0x010, 0x0000000C,
0xFF0F0180, 0xABCD,
......@@ -2578,6 +2587,8 @@ u32 RTL8821AE_MAC_REG_ARRAY[] = {
0x718, 0x00000040,
};
u32 RTL8821AE_MAC_1T_ARRAYLEN = sizeof(RTL8821AE_MAC_REG_ARRAY) / sizeof(u32);
u32 RTL8812AE_AGC_TAB_ARRAY[] = {
0xFF0F07D8, 0xABCD,
0x81C, 0xFC000001,
......@@ -3430,9 +3441,11 @@ u32 RTL8821AE_AGC_TAB_ARRAY[] = {
0x81C, 0x017E0101,
0xC50, 0x00000022,
0xC50, 0x00000020,
};
u32 RTL8821AE_AGC_TAB_1TARRAYLEN =
sizeof(RTL8821AE_AGC_TAB_ARRAY) / sizeof(u32);
/******************************************************************************
* TXPWR_LMT.TXT
******************************************************************************/
......@@ -4284,9 +4297,9 @@ u8 *RTL8821AE_TXPWR_LMT[] = {
"FCC", "5G", "20M", "OFDM", "1T", "100", "32",
"ETSI", "5G", "20M", "OFDM", "1T", "100", "30",
"MKK", "5G", "20M", "OFDM", "1T", "100", "30",
"FCC", "5G", "20M", "OFDM", "1T", "114", "32",
"ETSI", "5G", "20M", "OFDM", "1T", "114", "30",
"MKK", "5G", "20M", "OFDM", "1T", "114", "30",
"FCC", "5G", "20M", "OFDM", "1T", "104", "32",
"ETSI", "5G", "20M", "OFDM", "1T", "104", "30",
"MKK", "5G", "20M", "OFDM", "1T", "104", "30",
"FCC", "5G", "20M", "OFDM", "1T", "108", "32",
"ETSI", "5G", "20M", "OFDM", "1T", "108", "30",
"MKK", "5G", "20M", "OFDM", "1T", "108", "30",
......@@ -4356,9 +4369,9 @@ u8 *RTL8821AE_TXPWR_LMT[] = {
"FCC", "5G", "20M", "HT", "1T", "100", "32",
"ETSI", "5G", "20M", "HT", "1T", "100", "30",
"MKK", "5G", "20M", "HT", "1T", "100", "30",
"FCC", "5G", "20M", "HT", "1T", "114", "32",
"ETSI", "5G", "20M", "HT", "1T", "114", "30",
"MKK", "5G", "20M", "HT", "1T", "114", "30",
"FCC", "5G", "20M", "HT", "1T", "104", "32",
"ETSI", "5G", "20M", "HT", "1T", "104", "30",
"MKK", "5G", "20M", "HT", "1T", "104", "30",
"FCC", "5G", "20M", "HT", "1T", "108", "32",
"ETSI", "5G", "20M", "HT", "1T", "108", "30",
"MKK", "5G", "20M", "HT", "1T", "108", "30",
......@@ -4428,9 +4441,9 @@ u8 *RTL8821AE_TXPWR_LMT[] = {
"FCC", "5G", "20M", "HT", "2T", "100", "28",
"ETSI", "5G", "20M", "HT", "2T", "100", "30",
"MKK", "5G", "20M", "HT", "2T", "100", "30",
"FCC", "5G", "20M", "HT", "2T", "114", "28",
"ETSI", "5G", "20M", "HT", "2T", "114", "30",
"MKK", "5G", "20M", "HT", "2T", "114", "30",
"FCC", "5G", "20M", "HT", "2T", "104", "28",
"ETSI", "5G", "20M", "HT", "2T", "104", "30",
"MKK", "5G", "20M", "HT", "2T", "104", "30",
"FCC", "5G", "20M", "HT", "2T", "108", "30",
"ETSI", "5G", "20M", "HT", "2T", "108", "30",
"MKK", "5G", "20M", "HT", "2T", "108", "30",
......@@ -4570,3 +4583,5 @@ u8 *RTL8821AE_TXPWR_LMT[] = {
"ETSI", "5G", "80M", "VHT", "2T", "155", "30",
"MKK", "5G", "80M", "VHT", "2T", "155", "63"
};
u32 RTL8821AE_TXPWR_LMT_ARRAY_LEN = sizeof(RTL8821AE_TXPWR_LMT) / sizeof(u8 *);
......@@ -29,32 +29,31 @@
#define __RTL8821AE_TABLE__H_
#include <linux/types.h>
#define RTL8821AEPHY_REG_1TARRAYLEN 344
extern u32 RTL8821AE_PHY_REG_1TARRAYLEN;
extern u32 RTL8821AE_PHY_REG_ARRAY[];
#define RTL8812AEPHY_REG_1TARRAYLEN 490
extern u32 RTL8812AE_PHY_REG_ARRAY[];
#define RTL8821AEPHY_REG_ARRAY_PGLEN 90
extern u32 RTL8821AE_PHY_REG_ARRAY_PGLEN;
extern u32 RTL8821AE_PHY_REG_ARRAY_PG[];
#define RTL8812AEPHY_REG_ARRAY_PGLEN 276
extern u32 RTL8812AE_PHY_REG_ARRAY_PG[];
/* #define RTL8723BE_RADIOA_1TARRAYLEN 206 */
/* extern u8 *RTL8821AE_TXPWR_LMT_ARRAY[]; */
#define RTL8812AE_RADIOA_1TARRAYLEN 1264
extern u32 RTL8812AE_RADIOA_ARRAY[];
#define RTL8812AE_RADIOB_1TARRAYLEN 1240
extern u32 RTL8812AE_RADIOB_ARRAY[];
#define RTL8821AE_RADIOA_1TARRAYLEN 1176
extern u32 RTL8821AE_RADIOA_1TARRAYLEN;
extern u32 RTL8821AE_RADIOA_ARRAY[];
#define RTL8821AEMAC_1T_ARRAYLEN 194
extern u32 RTL8821AE_MAC_1T_ARRAYLEN;
extern u32 RTL8821AE_MAC_REG_ARRAY[];
#define RTL8812AEMAC_1T_ARRAYLEN 214
extern u32 RTL8812AE_MAC_REG_ARRAY[];
#define RTL8821AEAGCTAB_1TARRAYLEN 382
extern u32 RTL8821AE_AGC_TAB_1TARRAYLEN;
extern u32 RTL8821AE_AGC_TAB_ARRAY[];
#define RTL8812AEAGCTAB_1TARRAYLEN 1312
extern u32 RTL8812AE_AGC_TAB_ARRAY[];
#define RTL8812AE_TXPWR_LMT_ARRAY_LEN 3948
extern u8 *RTL8812AE_TXPWR_LMT[];
#define RTL8821AE_TXPWR_LMT_ARRAY_LEN 3948
extern u32 RTL8821AE_TXPWR_LMT_ARRAY_LEN;
extern u8 *RTL8821AE_TXPWR_LMT[];
#endif
......@@ -1529,6 +1529,10 @@ struct rtl_hal {
u8 external_lna_2g;
u8 external_pa_5g;
u8 external_lna_5g;
u8 type_glna;
u8 type_gpa;
u8 type_alna;
u8 type_apa;
u8 rfe_type;
/*firmware */
......@@ -2933,6 +2937,14 @@ static inline void rtl_write_byte(struct rtl_priv *rtlpriv, u32 addr, u8 val8)
rtlpriv->io.read8_sync(rtlpriv, addr);
}
static inline void rtl_write_byte_with_val32(struct ieee80211_hw *hw,
u32 addr, u32 val8)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
rtl_write_byte(rtlpriv, addr, (u8)val8);
}
static inline void rtl_write_word(struct rtl_priv *rtlpriv, u32 addr, u16 val16)
{
rtlpriv->io.write16_async(rtlpriv, addr, val16);
......@@ -2966,6 +2978,12 @@ static inline void rtl_set_bbreg(struct ieee80211_hw *hw, u32 regaddr,
rtlpriv->cfg->ops->set_bbreg(hw, regaddr, bitmask, data);
}
static inline void rtl_set_bbreg_with_dwmask(struct ieee80211_hw *hw,
u32 regaddr, u32 data)
{
rtl_set_bbreg(hw, regaddr, 0xffffffff, data);
}
static inline u32 rtl_get_rfreg(struct ieee80211_hw *hw,
enum radio_path rfpath, u32 regaddr,
u32 bitmask)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment