linux-postmarketos-allwinner: add patch enabling WoWLAN (MR 1955)

[ci:skip-build] Already built successfully in CI
This commit is contained in:
Clayton Craft 2021-02-22 10:56:07 -08:00
parent a2524184ed
commit 8d05efae6b
No known key found for this signature in database
GPG key ID: 7A3461CA187CEA54
2 changed files with 79 additions and 1 deletions

View file

@ -0,0 +1,76 @@
From d39f92118bdd436aa6cce0c6a45178ba5c7a1bb1 Mon Sep 17 00:00:00 2001
From: Peetz0r <github@haas-en-berg.nl>
Date: Mon, 22 Feb 2021 13:01:09 +0100
Subject: [PATCH] WoWLAN support for the PinePhone
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 1 +
drivers/staging/rtl8723cs/Makefile | 7 ++++---
drivers/staging/rtl8723cs/os_dep/linux/sdio_intf.c | 4 ----
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 7d0dd52e2f9d..834a2d74d376 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -603,6 +603,7 @@ &mmc1 {
non-removable;
post-power-on-delay-ms = <1>; /* wifi power is always on */
status = "okay";
+ keep-power-in-suspend;
rtl8723cs: wifi@1 {
reg = <1>;
diff --git a/drivers/staging/rtl8723cs/Makefile b/drivers/staging/rtl8723cs/Makefile
index 60c1c864db42..0b60caa83e75 100644
--- a/drivers/staging/rtl8723cs/Makefile
+++ b/drivers/staging/rtl8723cs/Makefile
@@ -108,9 +108,10 @@ CONFIG_RTW_LOG_LEVEL = 6
CONFIG_PROC_DEBUG = y
######################## Wake On Lan ##########################
-CONFIG_WOWLAN = n
+CONFIG_WOWLAN = y
#bit3: ARP enable, bit2: deauth, bit1: unicast, bit0: magic pkt.
-CONFIG_WAKEUP_TYPE = 0xf
+#enabling unicast causes unwanted wake-ups all the time, so disable
+CONFIG_WAKEUP_TYPE = 0xd
CONFIG_WOW_LPS_MODE = default
#bit0: disBBRF off, #bit1: Wireless remote controller (WRC)
CONFIG_SUSPEND_TYPE = 0
@@ -127,7 +128,7 @@ CONFIG_PNO_SUPPORT = n
CONFIG_PNO_SET_DEBUG = n
CONFIG_AP_WOWLAN = n
######### Notify SDIO Host Keep Power During Syspend ##########
-CONFIG_RTW_SDIO_PM_KEEP_POWER = n
+CONFIG_RTW_SDIO_PM_KEEP_POWER = y
###################### MP HW TX MODE FOR VHT #######################
CONFIG_MP_VHT_HW_TX_MODE = n
###################### ROAMING #####################################
diff --git a/drivers/staging/rtl8723cs/os_dep/linux/sdio_intf.c b/drivers/staging/rtl8723cs/os_dep/linux/sdio_intf.c
index c20c136d111d..4168e2949748 100644
--- a/drivers/staging/rtl8723cs/os_dep/linux/sdio_intf.c
+++ b/drivers/staging/rtl8723cs/os_dep/linux/sdio_intf.c
@@ -269,9 +269,7 @@ static u8 gpio_hostwakeup_alloc_irq(PADAPTER padapter)
} else
RTW_INFO("allocate gpio irq %d ok\n", oob_irq);
-#ifndef CONFIG_PLATFORM_ARM_SUN8I
enable_irq_wake(oob_irq);
-#endif
return _SUCCESS;
}
@@ -282,9 +280,7 @@ static void gpio_hostwakeup_free_irq(PADAPTER padapter)
if (oob_irq == 0)
return;
-#ifndef CONFIG_PLATFORM_ARM_SUN8I
disable_irq_wake(oob_irq);
-#endif
free_irq(oob_irq, padapter);
}
#endif
--
2.30.1

View file

@ -40,6 +40,7 @@ source="$pkgname-$_tag.tar.gz::https://github.com/megous/linux/archive/$_tag.tar
0010-dts-pinephone-drop-modem-power-node.patch
0011-dts-pinephone-jack-detection.patch
0012-pinephone-fix-pogopin-i2c.patch
0013-WoWLAN-support-for-the-PinePhone.patch
"
subpackages="$pkgname-dev"
builddir="$srcdir/linux-$_tag"
@ -93,4 +94,5 @@ e8eca7814daf76ebe658bdf988a062c4ed433cee5fde522b8d64492267716a5e7ae91b55877253cc
95335f5755f8385c824cc8fb55af8b11ab02196ea6f49a80fe1ed964c0287fd6e41b597d50de615308e2cd53e0b0a471d452ea3ff8503caccfc17561c393c7f2 0009-dts-pinephone-Add-pine64-pinephone-to-compat-list.patch
e9cfb545c216c061da243b0eeb2169ff11e80898270a87f432cec937057d585313109d4ae9487a6641eeb5de1b0be69b7615bfca99fb64ab7227d941e6f129c1 0010-dts-pinephone-drop-modem-power-node.patch
789ae2e405f00e897c357427c587cb7a4a3d3a68b77b9700fb6f6a67d92314fcf75f2ad8b65c0d046215bb7bd5fcf65e4e8e31748170ed595bef1ba3010dd0bf 0011-dts-pinephone-jack-detection.patch
611bab79b36ee3a9ff8504fa5c56964a0ff1bcd65eacc692d8d991a9bc300e2b16c6d69f4bcad3a35315e848653c2969a985446c385081f019d3e4e74521f42c 0012-pinephone-fix-pogopin-i2c.patch"
611bab79b36ee3a9ff8504fa5c56964a0ff1bcd65eacc692d8d991a9bc300e2b16c6d69f4bcad3a35315e848653c2969a985446c385081f019d3e4e74521f42c 0012-pinephone-fix-pogopin-i2c.patch
503e417d8296e1da302a80ef89427074039d4dcb4d95f8d4372a1427994789a82663b0489be7f5df70230d1e2ee6541471361f3c22c1573168eef41daf8a7230 0013-WoWLAN-support-for-the-PinePhone.patch"