Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4042534rwi; Sat, 22 Oct 2022 04:20:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6K3bY3mUcCNaYZK5zBprC1ch8qoQuEWpBifRlrmUWj712WRz2q1VzycAWW1fIKvcsW8BSs X-Received: by 2002:a17:902:7b91:b0:185:4548:3a96 with SMTP id w17-20020a1709027b9100b0018545483a96mr23830556pll.130.1666437623853; Sat, 22 Oct 2022 04:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666437623; cv=none; d=google.com; s=arc-20160816; b=SrPsRI2aog9gLX3HeunX+eYi0NRBGTMBDVuE164pB5raOesArYzBEM8ssSY+94VmeK p+xQ15g+bzlZJu6FT45+Uqblb0R+xFSbt1yHJ88Mx6pdK9Ne6R8+t5IW5S5SQdD9utBP aRQZGOc7w65eBAejZOsmRSQIJtSrAVv9t9G9ne1eYDUimfcNpx9Ajj4xzTH1Jd3mMY1+ fYV+JPmjokiEwQ5Zmtv5RkBqm97l/CWk8j+us25l3rJflNIBNekW4DZXGBbR7rJKYDQI bZvnbNKGFfbuzhX299GKXPkY+27fQ37a0Z1l0z6k41X+0D6iUYMN3DWB1JAN4TQVo3ou wMuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hcagcCn4MD1kzAhQNzeOIdT0IoPDF4T9ob3acs7B3HA=; b=vpv04shh30R45IYdmWPvDVbePznd1lvILQGizpXZz+ZUO2rtpqLB0Tf9QNuCxu8Nup I88wlv2/lWEXFBHE9vI/seewicpeicmq2C/8AdWVR3o0fhlU/gE4BhnHd0uh7yxsMjHi 5dNrnEcO1XA8K0MhEe4QWtjU4MVIahQIF60TL7Eo9kf8EN4NVtNBc3kosnxwVyqdB+yD K6dLNJHc9shbKOC7ZypMPaVCeExKHWNdZMo4XWHOzCpzm2kJB2x6Q2ztcZJZyILE0hpW nUNqhQtEAqzf2nuzXwwID8xSqyfKiU5xOuZ3D0v8VEr+4Vy9a2OKGPduXo3SdAHGivNv zujg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h7gp7Ncm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t63-20020a638142000000b0041183daa0ffsi265132pgd.761.2022.10.22.04.20.12; Sat, 22 Oct 2022 04:20:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h7gp7Ncm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230115AbiJVK6G (ORCPT + 99 others); Sat, 22 Oct 2022 06:58:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230094AbiJVK5r (ORCPT ); Sat, 22 Oct 2022 06:57:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4659318128; Sat, 22 Oct 2022 03:16:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BA355B82E27; Sat, 22 Oct 2022 07:45:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 308FDC433D6; Sat, 22 Oct 2022 07:45:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424729; bh=mJCJOvl0y7LTRwf4p585S532bpIt8sAVDqmZaOPVe8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h7gp7NcmuDFLG0+FS6e/15VGejReTNFc5klEbiz49of73AEHRt+Lz7TPmuyXMSF7j jL5XPLEppyo5VNu0s0tRyANOqxyY80owZe+niZaFGn32/OlK9KD//9EMTUXjwMlhjj 06R7xBVjSFQkDhDFXOgDSc4u5gs1n7yZ3BQGK4wA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Baochen Qiang , Kalle Valo , Sasha Levin Subject: [PATCH 5.19 254/717] wifi: ath11k: Include STA_KEEPALIVE_ARP_RESPONSE TLV header by default Date: Sat, 22 Oct 2022 09:22:13 +0200 Message-Id: <20221022072459.744282162@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Baochen Qiang [ Upstream commit b7b6f86149a7e06269d61a7a5206360f5b642f80 ] In current code STA_KEEPALIVE_ARP_RESPONSE TLV header is included only when ARP method is used, this causes firmware always to crash when wowlan is enabled because firmware needs it to be present no matter ARP method is used or not. Fix this issue by including STA_KEEPALIVE_ARP_RESPONSE TLV header by default. Also fix below typo: s/WMI_TAG_STA_KEEPALVE_ARP_RESPONSE/WMI_TAG_STA_KEEPALIVE_ARP_RESPONSE/ Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 Fixes: 0f84a156aa3b ("ath11k: Handle keepalive during WoWLAN suspend and resume") Signed-off-by: Baochen Qiang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220913044358.2037-1-quic_bqiang@quicinc.com Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath11k/wmi.c | 9 +++++---- drivers/net/wireless/ath/ath11k/wmi.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index cc84bd53ddae..1c8aa503e614 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -9003,12 +9003,13 @@ int ath11k_wmi_sta_keepalive(struct ath11k *ar, cmd->interval = arg->interval; cmd->method = arg->method; + arp = (struct wmi_sta_keepalive_arp_resp *)(cmd + 1); + arp->tlv_header = FIELD_PREP(WMI_TLV_TAG, + WMI_TAG_STA_KEEPALIVE_ARP_RESPONSE) | + FIELD_PREP(WMI_TLV_LEN, sizeof(*arp) - TLV_HDR_SIZE); + if (arg->method == WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE || arg->method == WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST) { - arp = (struct wmi_sta_keepalive_arp_resp *)(cmd + 1); - arp->tlv_header = FIELD_PREP(WMI_TLV_TAG, - WMI_TAG_STA_KEEPALVE_ARP_RESPONSE) | - FIELD_PREP(WMI_TLV_LEN, sizeof(*arp) - TLV_HDR_SIZE); arp->src_ip4_addr = arg->src_ip4_addr; arp->dest_ip4_addr = arg->dest_ip4_addr; ether_addr_copy(arp->dest_mac_addr.addr, arg->dest_mac_addr); diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h index b1fad4707dc6..ca3b9a384d60 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.h +++ b/drivers/net/wireless/ath/ath11k/wmi.h @@ -1214,7 +1214,7 @@ enum wmi_tlv_tag { WMI_TAG_NS_OFFLOAD_TUPLE, WMI_TAG_FTM_INTG_CMD, WMI_TAG_STA_KEEPALIVE_CMD, - WMI_TAG_STA_KEEPALVE_ARP_RESPONSE, + WMI_TAG_STA_KEEPALIVE_ARP_RESPONSE, WMI_TAG_P2P_SET_VENDOR_IE_DATA_CMD, WMI_TAG_AP_PS_PEER_CMD, WMI_TAG_PEER_RATE_RETRY_SCHED_CMD, -- 2.35.1