diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2016-06-29 17:04:05 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2016-09-15 20:23:46 +0200 |
commit | 092e77d94847c7d8530e160106442d97404c4513 (patch) | |
tree | a2e9d3d03eb58e274bad95620c68c677f7fa57fc /package/kernel/mac80211/patches/652-0061-rtl8xxxu-Correct-power-down-sequence-for-8188eu.patch | |
parent | c1678f1fa0bfa3c53c706fad0897f9a0aec8dab2 (diff) | |
download | upstream-092e77d94847c7d8530e160106442d97404c4513.tar.gz upstream-092e77d94847c7d8530e160106442d97404c4513.tar.bz2 upstream-092e77d94847c7d8530e160106442d97404c4513.zip |
rtl8xxxu: add support for rtl8188eu
Patches by Jes Sorensen:
https://git.kernel.org/cgit/linux/kernel/git/jes/linux.git/
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'package/kernel/mac80211/patches/652-0061-rtl8xxxu-Correct-power-down-sequence-for-8188eu.patch')
-rw-r--r-- | package/kernel/mac80211/patches/652-0061-rtl8xxxu-Correct-power-down-sequence-for-8188eu.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/652-0061-rtl8xxxu-Correct-power-down-sequence-for-8188eu.patch b/package/kernel/mac80211/patches/652-0061-rtl8xxxu-Correct-power-down-sequence-for-8188eu.patch new file mode 100644 index 0000000000..cf8c170db8 --- /dev/null +++ b/package/kernel/mac80211/patches/652-0061-rtl8xxxu-Correct-power-down-sequence-for-8188eu.patch @@ -0,0 +1,65 @@ +From 503e2c16e21b49e912bcbe6af5cda34b65e30502 Mon Sep 17 00:00:00 2001 +From: Jes Sorensen <Jes.Sorensen@redhat.com> +Date: Tue, 30 Aug 2016 17:23:35 -0400 +Subject: [PATCH] rtl8xxxu: Correct power down sequence for 8188eu + +This matches the vendor driver more correctly + +Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> +--- + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c | 26 ++++++++++++++++------ + 1 file changed, 19 insertions(+), 7 deletions(-) + +--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c ++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c +@@ -1083,7 +1083,8 @@ static void rtl8188e_disabled_to_emu(str + u16 val16; + + val16 = rtl8xxxu_read16(priv, REG_APS_FSMCO); +- val16 &= ~(APS_FSMCO_PFM_WOWL | APS_FSMCO_ENABLE_POWERDOWN); ++ val16 &= ~(APS_FSMCO_PFM_WOWL | APS_FSMCO_ENABLE_POWERDOWN | ++ APS_FSMCO_HW_POWERDOWN); + rtl8xxxu_write16(priv, REG_APS_FSMCO, val16); + } + +@@ -1196,15 +1197,26 @@ static int rtl8188eu_emu_to_disabled(str + { + u8 val8; + +- /* 0x04[12:11] = 01 enable WL suspend */ +- val8 = rtl8xxxu_read8(priv, REG_APS_FSMCO + 2); +- val8 &= ~BIT(0); +- rtl8xxxu_write8(priv, REG_APS_FSMCO + 2, val8); ++ val8 = rtl8xxxu_read8(priv, REG_AFE_XTAL_CTRL + 2); ++ val8 |= BIT(7); ++ rtl8xxxu_write8(priv, REG_AFE_XTAL_CTRL + 2, val8); + + val8 = rtl8xxxu_read8(priv, REG_APS_FSMCO + 1); +- val8 |= BIT(7); ++ val8 &= ~(BIT(3) | BIT(4)); ++ val8 |= BIT(3); + rtl8xxxu_write8(priv, REG_APS_FSMCO + 1, val8); + ++ rtl8xxxu_write8(priv, REG_APS_FSMCO + 3, 0x00); ++ ++ val8 = rtl8xxxu_read8(priv, REG_GPIO_MUXCFG + 1); ++ val8 &= ~BIT(4); ++ rtl8xxxu_write8(priv, REG_GPIO_MUXCFG + 1, val8); ++ ++ /* Set USB suspend enable local register 0xfe10[4]=1 */ ++ val8 = rtl8xxxu_read8(priv, 0xfe10); ++ val8 |= BIT(4); ++ rtl8xxxu_write8(priv, 0xfe10, val8); ++ + return 0; + } + +@@ -1339,7 +1351,7 @@ void rtl8188eu_power_off(struct rtl8xxxu + rtl8xxxu_write8(priv, REG_GPIO_PIN_CTRL + 2, 0xff); + + val8 = rtl8xxxu_read8(priv, REG_GPIO_IO_SEL); +- rtl8xxxu_write8(priv, REG_GPIO_IO_SEL + 1, val8 << 4); ++ rtl8xxxu_write8(priv, REG_GPIO_IO_SEL, val8 << 4); + val8 = rtl8xxxu_read8(priv, REG_GPIO_IO_SEL + 1); + rtl8xxxu_write8(priv, REG_GPIO_IO_SEL + 1, val8 | 0x0f); + |