.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * RTL8XXXU mac80211 USB driver - 8192e specific subdriver |
---|
3 | 4 | * |
---|
.. | .. |
---|
10 | 11 | * rtl8723au driver. As the Realtek 8xxx chips are very similar in |
---|
11 | 12 | * their programming interface, I have started adding support for |
---|
12 | 13 | * additional 8xxx chips like the 8192cu, 8188cus, etc. |
---|
13 | | - * |
---|
14 | | - * This program is free software; you can redistribute it and/or modify it |
---|
15 | | - * under the terms of version 2 of the GNU General Public License as |
---|
16 | | - * published by the Free Software Foundation. |
---|
17 | | - * |
---|
18 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
---|
19 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
20 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
21 | | - * more details. |
---|
22 | 14 | */ |
---|
23 | 15 | |
---|
24 | 16 | #include <linux/init.h> |
---|
.. | .. |
---|
1066 | 1058 | u32 i, val32; |
---|
1067 | 1059 | int path_a_ok, path_b_ok; |
---|
1068 | 1060 | int retry = 2; |
---|
1069 | | - const u32 adda_regs[RTL8XXXU_ADDA_REGS] = { |
---|
| 1061 | + static const u32 adda_regs[RTL8XXXU_ADDA_REGS] = { |
---|
1070 | 1062 | REG_FPGA0_XCD_SWITCH_CTRL, REG_BLUETOOTH, |
---|
1071 | 1063 | REG_RX_WAIT_CCA, REG_TX_CCK_RFON, |
---|
1072 | 1064 | REG_TX_CCK_BBON, REG_TX_OFDM_RFON, |
---|
.. | .. |
---|
1076 | 1068 | REG_RX_TO_RX, REG_STANDBY, |
---|
1077 | 1069 | REG_SLEEP, REG_PMPD_ANAEN |
---|
1078 | 1070 | }; |
---|
1079 | | - const u32 iqk_mac_regs[RTL8XXXU_MAC_REGS] = { |
---|
| 1071 | + static const u32 iqk_mac_regs[RTL8XXXU_MAC_REGS] = { |
---|
1080 | 1072 | REG_TXPAUSE, REG_BEACON_CTRL, |
---|
1081 | 1073 | REG_BEACON_CTRL_1, REG_GPIO_MUXCFG |
---|
1082 | 1074 | }; |
---|
1083 | | - const u32 iqk_bb_regs[RTL8XXXU_BB_REGS] = { |
---|
| 1075 | + static const u32 iqk_bb_regs[RTL8XXXU_BB_REGS] = { |
---|
1084 | 1076 | REG_OFDM0_TRX_PATH_ENABLE, REG_OFDM0_TR_MUX_PAR, |
---|
1085 | 1077 | REG_FPGA0_XCD_RF_SW_CTRL, REG_CONFIG_ANT_A, REG_CONFIG_ANT_B, |
---|
1086 | 1078 | REG_FPGA0_XAB_RF_SW_CTRL, REG_FPGA0_XA_RF_INT_OE, |
---|
.. | .. |
---|
1679 | 1671 | val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1); |
---|
1680 | 1672 | val8 &= ~BIT(0); |
---|
1681 | 1673 | rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8); |
---|
| 1674 | + |
---|
| 1675 | + /* |
---|
| 1676 | + * Fix transmission failure of rtl8192e. |
---|
| 1677 | + */ |
---|
| 1678 | + rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00); |
---|
1682 | 1679 | } |
---|
1683 | 1680 | |
---|
1684 | 1681 | struct rtl8xxxu_fileops rtl8192eu_fops = { |
---|
.. | .. |
---|
1705 | 1702 | .rx_desc_size = sizeof(struct rtl8xxxu_rxdesc24), |
---|
1706 | 1703 | .has_s0s1 = 0, |
---|
1707 | 1704 | .gen2_thermal_meter = 1, |
---|
| 1705 | + .needs_full_init = 1, |
---|
1708 | 1706 | .adda_1t_init = 0x0fc01616, |
---|
1709 | 1707 | .adda_1t_path_on = 0x0fc01616, |
---|
1710 | 1708 | .adda_2t_path_on_a = 0x0fc01616, |
---|