mbox series

[v2,0/7] wifi: ath12k: add support for WoW

Message ID 20240523033143.21677-1-quic_bqiang@quicinc.com (mailing list archive)
Headers show
Series wifi: ath12k: add support for WoW | expand

Message

Baochen Qiang May 23, 2024, 3:31 a.m. UTC
Add support for WoW (Wakeup on Wireless) funtionalities, this including
magic-pattern, net-detect, disconnect and patterns, HW data filter, ARP
and NS offload, GTK rekey offload.

Also enable keepalive before suspend to avoid unexpected kick out by AP.

v2:
 - [2/7] wifi: ath12k: add basic WoW functionalities
	1. In ath12k_wow_convert_8023_to_80211(), change to use 'size_t'
	   instead of 'int' to make GCC happy
 - [5/7] wifi: ath12k: support ARP and NS offload
	1. In ath12k_mac_arvif_get_arp_ns_offload(), change to use
	   GFP_ATOMIC to fix kernel crash due to sleep in invalid context
 - rebased on ToT
	
Baochen Qiang (7):
  wifi: ath12k: implement WoW enable and wakeup commands
  wifi: ath12k: add basic WoW functionalities
  wifi: ath12k: add WoW net-detect functionality
  wifi: ath12k: implement hardware data filter
  wifi: ath12k: support ARP and NS offload
  wifi: ath12k: support GTK rekey offload
  wifi: ath12k: handle keepalive during WoWLAN suspend and resume

 drivers/net/wireless/ath/ath12k/Makefile |   1 +
 drivers/net/wireless/ath/ath12k/core.c   |  48 +-
 drivers/net/wireless/ath/ath12k/core.h   |  37 +
 drivers/net/wireless/ath/ath12k/htc.c    |   6 +
 drivers/net/wireless/ath/ath12k/mac.c    | 252 ++++++-
 drivers/net/wireless/ath/ath12k/mac.h    |   4 +
 drivers/net/wireless/ath/ath12k/wmi.c    | 719 +++++++++++++++++++
 drivers/net/wireless/ath/ath12k/wmi.h    | 559 +++++++++++++++
 drivers/net/wireless/ath/ath12k/wow.c    | 878 +++++++++++++++++++++++
 drivers/net/wireless/ath/ath12k/wow.h    |  62 ++
 10 files changed, 2557 insertions(+), 9 deletions(-)
 create mode 100644 drivers/net/wireless/ath/ath12k/wow.c
 create mode 100644 drivers/net/wireless/ath/ath12k/wow.h


base-commit: 429eeef2ed089af1b3aa1983ec00a7591166be27

Comments

Kalle Valo May 23, 2024, 4:48 p.m. UTC | #1
Baochen Qiang <quic_bqiang@quicinc.com> writes:

> Add support for WoW (Wakeup on Wireless) funtionalities, this including
> magic-pattern, net-detect, disconnect and patterns, HW data filter, ARP
> and NS offload, GTK rekey offload.
>
> Also enable keepalive before suspend to avoid unexpected kick out by AP.
>
> v2:
>  - [2/7] wifi: ath12k: add basic WoW functionalities
> 	1. In ath12k_wow_convert_8023_to_80211(), change to use 'size_t'
> 	   instead of 'int' to make GCC happy
>  - [5/7] wifi: ath12k: support ARP and NS offload
> 	1. In ath12k_mac_arvif_get_arp_ns_offload(), change to use
> 	   GFP_ATOMIC to fix kernel crash due to sleep in invalid context
>  - rebased on ToT
> 	
> Baochen Qiang (7):
>   wifi: ath12k: implement WoW enable and wakeup commands
>   wifi: ath12k: add basic WoW functionalities
>   wifi: ath12k: add WoW net-detect functionality
>   wifi: ath12k: implement hardware data filter
>   wifi: ath12k: support ARP and NS offload
>   wifi: ath12k: support GTK rekey offload
>   wifi: ath12k: handle keepalive during WoWLAN suspend and resume

I see new kmemleak warnings with ath-pending-202405231313, I'm assuming
it's from this patchset but didn't check. I see a lot of warnings like
below but I can provide more information tomorrow if needed.

unreferenced object 0xffff88814fa4d800 (size 1024):
  comm "wpa_supplicant", pid 11989, jiffies 4296591308
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00  ................
    fe 80 00 00 00 00 00 00 02 03 7f ff fe 37 16 02  .............7..
  backtrace (crc 3f321b49):
    [<ffffffff8dbdd8d5>] kmemleak_alloc+0x45/0x80
    [<ffffffff8b573984>] kmalloc_trace+0x284/0x2d0
    [<ffffffffc0e634e2>] ath12k_mac_arvif_get_arp_ns_offload+0x72/0xd0 [ath12k]
    [<ffffffffc0e6b437>] ath12k_mac_op_ipv6_changed+0xc7/0x1470 [ath12k]
    [<ffffffffc077e797>] ieee80211_ifa6_changed+0x1c7/0x3a0 [mac80211]
    [<ffffffff8afeb177>] notifier_call_chain+0x97/0x310
    [<ffffffff8afeb72d>] atomic_notifier_call_chain+0x5d/0x140
    [<ffffffff8d918796>] inet6addr_notifier_call_chain+0x16/0x20
    [<ffffffff8d7f193a>] addrconf_ifdown.isra.0+0xa8a/0x1700
    [<ffffffff8d800895>] addrconf_notify+0x105/0xdd0
    [<ffffffff8afeb177>] notifier_call_chain+0x97/0x310
    [<ffffffff8afeb571>] raw_notifier_call_chain+0x11/0x20
    [<ffffffff8d277e1b>] call_netdevice_notifiers_info+0x8b/0xf0
    [<ffffffff8d28ec33>] __dev_notify_flags+0x163/0x240
    [<ffffffff8d290771>] dev_change_flags+0xf1/0x150
    [<ffffffff8d647406>] devinet_ioctl+0x1116/0x19b0