summaryrefslogtreecommitdiff
path: root/package/kernel/mac80211/patches/653-0056-rtl8xxxu-Make-sure-to-enable-OFDM-paths-for-8188eu-i.patch
blob: b5c98ddbdef03a4bf2bf3fbf0d89ac663e519821 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From ba518f046cc1ce63b6984948b19b4d3903c5c30b Mon Sep 17 00:00:00 2001
From: Jes Sorensen <Jes.Sorensen@redhat.com>
Date: Mon, 3 Oct 2016 11:46:37 -0400
Subject: [PATCH] rtl8xxxu: Make sure to enable OFDM paths for 8188eu in
 rtl8188e_enable_rf()

Failure to re-enable OFDM paths results in the dongle only receiving
CCK packets which isn't overly exciting.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
@@ -1353,8 +1353,22 @@ void rtl8188eu_power_off(struct rtl8xxxu
 
 static void rtl8188e_enable_rf(struct rtl8xxxu_priv *priv)
 {
+	u32 val32;
+
 	rtl8xxxu_write8(priv, REG_RF_CTRL, RF_ENABLE | RF_RSTB | RF_SDMRSTB);
 
+	val32 = rtl8xxxu_read32(priv, REG_OFDM0_TRX_PATH_ENABLE);
+	val32 &= ~(OFDM_RF_PATH_RX_MASK | OFDM_RF_PATH_TX_MASK);
+	if (priv->rx_paths == 2)
+		val32 |= OFDM_RF_PATH_RX_A | OFDM_RF_PATH_RX_B;
+	else
+		val32 |= OFDM_RF_PATH_RX_A;
+	if (priv->tx_paths == 2)
+		val32 |= OFDM_RF_PATH_TX_A | OFDM_RF_PATH_TX_B;
+	else
+		val32 |= OFDM_RF_PATH_TX_A;
+	rtl8xxxu_write32(priv, REG_OFDM0_TRX_PATH_ENABLE, val32);
+
 	rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
 }