2016-09-29 07:48:09 +00:00
|
|
|
From c59fee32cbdda0382b6c37429d8bb50bafe9d166 Mon Sep 17 00:00:00 2001
|
2016-06-29 15:04:05 +00:00
|
|
|
From: Jes Sorensen <Jes.Sorensen@redhat.com>
|
|
|
|
Date: Fri, 22 Jul 2016 13:17:36 -0400
|
|
|
|
Subject: [PATCH] rtl8xxxu: Implement rtl8188e_disable_rf()
|
|
|
|
|
|
|
|
This is partly guessware as there is no straight forward disable RF
|
|
|
|
routine in the vendor driver.
|
|
|
|
|
|
|
|
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
|
|
|
|
---
|
|
|
|
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c | 15 +++++++++++++++
|
|
|
|
1 file changed, 15 insertions(+)
|
|
|
|
|
|
|
|
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
|
|
|
|
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
|
2016-09-29 07:48:09 +00:00
|
|
|
@@ -1101,6 +1101,20 @@ static void rtl8188e_enable_rf(struct rt
|
2016-06-29 15:04:05 +00:00
|
|
|
rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
|
|
|
|
}
|
|
|
|
|
|
|
|
+static void rtl8188e_disable_rf(struct rtl8xxxu_priv *priv)
|
|
|
|
+{
|
|
|
|
+ u32 val32;
|
|
|
|
+
|
|
|
|
+ val32 = rtl8xxxu_read32(priv, REG_OFDM0_TRX_PATH_ENABLE);
|
|
|
|
+ val32 &= ~OFDM_RF_PATH_TX_MASK;
|
|
|
|
+ rtl8xxxu_write32(priv, REG_OFDM0_TRX_PATH_ENABLE, val32);
|
|
|
|
+
|
|
|
|
+ /* Power down RF module */
|
|
|
|
+ rtl8xxxu_write_rfreg(priv, RF_A, RF6052_REG_AC, 0);
|
|
|
|
+ if (priv->rf_paths == 2)
|
|
|
|
+ rtl8xxxu_write_rfreg(priv, RF_B, RF6052_REG_AC, 0);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
static void rtl8188e_usb_quirks(struct rtl8xxxu_priv *priv)
|
|
|
|
{
|
|
|
|
u16 val16;
|
2016-09-29 07:48:09 +00:00
|
|
|
@@ -1133,6 +1147,7 @@ struct rtl8xxxu_fileops rtl8188eu_fops =
|
|
|
|
.config_channel = rtl8188eu_config_channel,
|
2016-06-29 15:04:05 +00:00
|
|
|
.parse_rx_desc = rtl8xxxu_parse_rxdesc16,
|
|
|
|
.enable_rf = rtl8188e_enable_rf,
|
|
|
|
+ .disable_rf = rtl8188e_disable_rf,
|
|
|
|
.usb_quirks = rtl8188e_usb_quirks,
|
|
|
|
.update_rate_mask = rtl8xxxu_gen2_update_rate_mask,
|
|
|
|
.report_connect = rtl8xxxu_gen2_report_connect,
|