hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * RTL8XXXU mac80211 USB driver - 8192e specific subdriver
34 *
....@@ -10,15 +11,6 @@
1011 * rtl8723au driver. As the Realtek 8xxx chips are very similar in
1112 * their programming interface, I have started adding support for
1213 * 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.
2214 */
2315
2416 #include <linux/init.h>
....@@ -1066,7 +1058,7 @@
10661058 u32 i, val32;
10671059 int path_a_ok, path_b_ok;
10681060 int retry = 2;
1069
- const u32 adda_regs[RTL8XXXU_ADDA_REGS] = {
1061
+ static const u32 adda_regs[RTL8XXXU_ADDA_REGS] = {
10701062 REG_FPGA0_XCD_SWITCH_CTRL, REG_BLUETOOTH,
10711063 REG_RX_WAIT_CCA, REG_TX_CCK_RFON,
10721064 REG_TX_CCK_BBON, REG_TX_OFDM_RFON,
....@@ -1076,11 +1068,11 @@
10761068 REG_RX_TO_RX, REG_STANDBY,
10771069 REG_SLEEP, REG_PMPD_ANAEN
10781070 };
1079
- const u32 iqk_mac_regs[RTL8XXXU_MAC_REGS] = {
1071
+ static const u32 iqk_mac_regs[RTL8XXXU_MAC_REGS] = {
10801072 REG_TXPAUSE, REG_BEACON_CTRL,
10811073 REG_BEACON_CTRL_1, REG_GPIO_MUXCFG
10821074 };
1083
- const u32 iqk_bb_regs[RTL8XXXU_BB_REGS] = {
1075
+ static const u32 iqk_bb_regs[RTL8XXXU_BB_REGS] = {
10841076 REG_OFDM0_TRX_PATH_ENABLE, REG_OFDM0_TR_MUX_PAR,
10851077 REG_FPGA0_XCD_RF_SW_CTRL, REG_CONFIG_ANT_A, REG_CONFIG_ANT_B,
10861078 REG_FPGA0_XAB_RF_SW_CTRL, REG_FPGA0_XA_RF_INT_OE,
....@@ -1679,6 +1671,11 @@
16791671 val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1);
16801672 val8 &= ~BIT(0);
16811673 rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8);
1674
+
1675
+ /*
1676
+ * Fix transmission failure of rtl8192e.
1677
+ */
1678
+ rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
16821679 }
16831680
16841681 struct rtl8xxxu_fileops rtl8192eu_fops = {
....@@ -1705,6 +1702,7 @@
17051702 .rx_desc_size = sizeof(struct rtl8xxxu_rxdesc24),
17061703 .has_s0s1 = 0,
17071704 .gen2_thermal_meter = 1,
1705
+ .needs_full_init = 1,
17081706 .adda_1t_init = 0x0fc01616,
17091707 .adda_1t_path_on = 0x0fc01616,
17101708 .adda_2t_path_on_a = 0x0fc01616,