From patchwork Wed Oct 19 08:26:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4639 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp212200wrs; Wed, 19 Oct 2022 02:06:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5916VlNB53YriMcLD6aKL8fO5igSxw8z5u5zDXjwHujRJVp4I4lTf1UhQSKUMklT4txIcv X-Received: by 2002:aa7:c144:0:b0:459:f897:793e with SMTP id r4-20020aa7c144000000b00459f897793emr6446025edp.8.1666170417665; Wed, 19 Oct 2022 02:06:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170417; cv=none; d=google.com; s=arc-20160816; b=lPteF8L1pcx/Kk1GhOVURMDan1Ymad5pa+kGio6po+YBstm6zi4Cy0TNJC4YoSTH2q yOBoYwE9ROgKQYDugrKzLnu1gbuFRMw1tOSo+W8aVc/iI3efwvM3zfKIEG8OBZdRPPIh +q/WVo8GIoXIY8b5rdGInPgG4rfy87X44IpIPruN6D7NTw9l6TzhkMVnaRZjz6YG2VUj s8MSjwHvuVqflaWgsMXf176gUJYeQhjfQldnQ6ZBdjSo4gIZvfOuxRnZBNauxXwcp8xT lGn8OMPzb89NEujN+fdHwXWMh0MCs7D4qjP0Z/sgQNmikjyZ5QO/5HxQb7SnF580u2wY LISg== 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=4D79jPn2E8Rb0sRwzdZPMafsndc2hPYlxm9lISzxC+U=; b=A4k3MsOXGvy+chsqH8O+tB/eBvQTXTQd2e36oeC+P2vq88BNNAMlNBxvO8XMWkGxQT YcbG4xVCMuvBAjWTZEsacIcwwk2idIYKaonsxIvh8zK0WfwH7Xxskyr1lElkIQlDT3OF O6gyU4Vn9iNxUg1HWmyc43gjbjDtSZEVYygbNBjHy4VFnwkTCVzH3IA8k8yEo4n0JHaj PcLtZVV/BHMqOZwFNe3IW6oGQKUErvWZmexPmdv1lJU5BaacOvb/0chdeAI2ozeNVOwK 9UCOfjYuBf8oDrHBfMS23Px+D8fx/OnBLjO284QLe2rhDVWJr2G0e6lptiErPmGnJ3lw rzAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uAgRG3N0; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz13-20020a0564021d4d00b00453a0393deasi15621009edb.368.2022.10.19.02.06.23; Wed, 19 Oct 2022 02:06:57 -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=uAgRG3N0; 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 S232037AbiJSI6I (ORCPT + 99 others); Wed, 19 Oct 2022 04:58:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230390AbiJSI5C (ORCPT ); Wed, 19 Oct 2022 04:57:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4321452085; Wed, 19 Oct 2022 01:52:51 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 82E906174E; Wed, 19 Oct 2022 08:51:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9410AC433D7; Wed, 19 Oct 2022 08:51:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169495; bh=mFUfEOAY7UgFEz0zOrho4a8Un5hZ2rqTQSz5pjCrbhc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uAgRG3N0LhpELRlwVxPdsWE9MxHE32t0zQE2/oDmJz82eosuu0wGtaDr5P3xpepSi tI8Pt+li50GV4KJu16pacMJi/ABCcK2VGCR/aFcQq+MNBOR+UT9IcnDsUQWxnbBaXp Zd91yr6lVWWK0LcV36WlZNGeO/oZcGMBKs5TPqj0= 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 6.0 297/862] wifi: ath11k: Include STA_KEEPALIVE_ARP_RESPONSE TLV header by default Date: Wed, 19 Oct 2022 10:26:24 +0200 Message-Id: <20221019083303.127004220@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747106311837988508?= X-GMAIL-MSGID: =?utf-8?q?1747106311837988508?= 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 88ee4f9d19da..b658ea60dcf7 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -8962,12 +8962,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 4da248ffa318..ba5343a3411f 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,