90 lines
2.9 KiB
Diff
90 lines
2.9 KiB
Diff
|
From 3b166eeb496e3fad2b778b4d2e0ec39c5668fb56 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
|
||
|
Date: Fri, 19 Feb 2021 12:15:51 +0100
|
||
|
Subject: [PATCH 132/464] 8723cs: Enable WoWLAN
|
||
|
|
||
|
On PinePhone:
|
||
|
|
||
|
iw dev # and write down mac address, eg. 02:ba:7c:9c:cc:78
|
||
|
echo clean > /proc/net/rtl8723cs/wlan0/wow_pattern_info
|
||
|
iw phy0 wowlan enable any
|
||
|
... suspend to ram ...
|
||
|
|
||
|
On other device:
|
||
|
|
||
|
wol -i pinephone_ip_address 02:ba:7c:9c:cc:78
|
||
|
... pinephone wakes up over wifi ... :)
|
||
|
|
||
|
Figured out with help from by #linux-sunxi/Peetz0r.
|
||
|
|
||
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
||
|
---
|
||
|
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 1 +
|
||
|
drivers/staging/rtl8723cs/Makefile | 4 ++--
|
||
|
drivers/staging/rtl8723cs/os_dep/linux/sdio_intf.c | 6 ++----
|
||
|
3 files changed, 5 insertions(+), 6 deletions(-)
|
||
|
|
||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||
|
index 87847116ab6d..565cb1e8d3ee 100644
|
||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||
|
@@ -249,6 +249,7 @@ &mmc1 {
|
||
|
bus-width = <4>;
|
||
|
non-removable;
|
||
|
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..b428d679e83e 100644
|
||
|
--- a/drivers/staging/rtl8723cs/Makefile
|
||
|
+++ b/drivers/staging/rtl8723cs/Makefile
|
||
|
@@ -108,7 +108,7 @@ 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
|
||
|
CONFIG_WOW_LPS_MODE = default
|
||
|
@@ -127,7 +127,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..d6494bad9591 100644
|
||
|
--- a/drivers/staging/rtl8723cs/os_dep/linux/sdio_intf.c
|
||
|
+++ b/drivers/staging/rtl8723cs/os_dep/linux/sdio_intf.c
|
||
|
@@ -269,9 +269,8 @@ 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 +281,8 @@ 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.34.1
|
||
|
|