From: Chin-Yen Lee Date: Fri, 15 May 2026 01:44:28 +0000 (+0800) Subject: wifi: rtw89: wow: send ARP reply packets instead of Null packets to keep alive X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=dcf5c7262bffa2cbafc6523be63c287d15d8ae22;p=thirdparty%2Fkernel%2Flinux.git wifi: rtw89: wow: send ARP reply packets instead of Null packets to keep alive In WoWLAN mode, the firmware periodically sends Null packets to the AP to keep the connection alive and prevent the AP from disconnecting the client due to inactivity. However, it was observed that certain APs, such as TP-Link Archer BE800, do not recognize Null packets as valid activity and still drop the connection. Replacing Null packets with ARP reply packets effectively resolves this compatibility issue and maintains the connection. Specifically, while the firmware typically handles standard ARP offloads by dynamically modifying target IP/MAC fields, these keep-alive ARP reply packets are pre-filled by the driver with the DUT's own MAC and IP addresses for both sender and target fields. In this case, the firmware transmits the packets as-is without further modification. This approach ensures compatibility with APs that require valid Layer 3 traffic for activity monitoring while simplifying the firmware's processing logic during WoWLAN mode. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20260515014433.16168-9-pkshih@realtek.com --- diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c index 29d8d13d11fe..eb5683d64461 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.c +++ b/drivers/net/wireless/realtek/rtw89/fw.c @@ -2958,6 +2958,8 @@ static struct sk_buff *rtw89_arp_response_get(struct rtw89_dev *rtwdev, ether_addr_copy(arp_skb->sender_hw, rtwvif_link->mac_addr); arp_skb->sender_ip = rtwvif->ip_addr; + ether_addr_copy(arp_skb->target_hw, rtwvif_link->mac_addr); + arp_skb->target_ip = rtwvif->ip_addr; return skb; } @@ -9617,7 +9619,7 @@ int rtw89_fw_h2c_keep_alive(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtw if (enable) { ret = rtw89_fw_h2c_add_general_pkt(rtwdev, rtwvif_link, - RTW89_PKT_OFLD_TYPE_NULL_DATA, + RTW89_PKT_OFLD_TYPE_ARP_RSP, &pkt_id); if (ret) return -EPERM;