diff --git a/modules/wowlan.nix b/modules/wowlan.nix index df56a693..b2da6e0b 100644 --- a/modules/wowlan.nix +++ b/modules/wowlan.nix @@ -1,6 +1,9 @@ # wake on wireless LAN # developed for the PinePhone (rtl8723cs), but may work on other systems. # key info was found from this chat between Peetz0r and megi: +# additionally in the Realtek "Quick Guide For Wake on WLAN": +# megi's devlog which enabled WOWLAN: +# driver lives in Megi's kernel tree, at drivers/staging/rtl8723cs/Makefile # # wowlan configuration can be inspected with: # - `iw phy0 wowlan` @@ -15,7 +18,15 @@ # - can take 15s or more from when the packet is broadcast to when an application services it. # - WiFi doesn't respond to arp queries, so the sender might not actually know how to route # the packet to WiFi device at all. -# run `arp -s ` on the sender to hardcode an arp association. +# - run `arp -s ` on the sender to hardcode an arp association. +# - driver Makefile mentions ARP support though: +# - #bit3: ARP enable, bit2: deauth, bit1: unicast, bit0: magic pkt. +# - CONFIG_WAKEUP_TYPE = 0xf +# - CONFIG_IP_R_MONITOR = n #arp VOQ and high rate +# - #bit0: disBBRF off, #bit1: Wireless remote controller (WRC) +# - CONFIG_SUSPEND_TYPE = 0 (i think this is correct) +# - CONFIG_LPS_MODE = 1 (setting to 0 would disable LPS) +# - maybe ARP gets disabled as part of the power saving features (iw phy ... power-save; CONFIG_POWER_SAVING=y)? # - packet matching happens below the OS, so it's not generic over virtual network devices like tunnels. # Wake On Lan with a VPN effectively requires that you wake on *every* packet routed via that VPN # since the meaning within any packet isn't obvious to the chipset. @@ -36,6 +47,11 @@ # - WiFi chip *should* have a way to wake on connection state change, i just need to enable it? # - `iw phy phy0 wowlan enable disconnect` => Invalid argument (-22) # - `iw phy0 wowlan enable net-detect ...` (from man example) => Operation not supported (-95) +# - Realtek Quick Start guide claims "CONFIG_WAKEUP_TYPE = 0x7" enables deauth wake up (bit 2), unicast wake up (bit 1), magic packet (bit 0) +# - driver Makefile: +# - #bit0: ROAM_ON_EXPIRED, #bit1: ROAM_ON_RESUME, #bit2: ROAM_ACTIVE +# - CONFIG_ROAMING_FLAG = 0x3 + { config, lib, pkgs, ... }: let