Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4298501rdb; Thu, 28 Dec 2023 18:01:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFq13wM6s3vkdJUlJNHyuFihQSBeU+W7ZAwKXBABV9OYyzpYNH6KuydCYssjKR6ucB/YVP1 X-Received: by 2002:a17:90a:c295:b0:28b:ecd8:ee2 with SMTP id f21-20020a17090ac29500b0028becd80ee2mr3968909pjt.13.1703815287834; Thu, 28 Dec 2023 18:01:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703815287; cv=none; d=google.com; s=arc-20160816; b=Ia8caSI/3UNVk0sIwQOz27tQYObxBE/jlyXfDJGOyWMXouYvTjjpl71Vfq7nI9yEUQ +zfowr3hg7/GGpr1fbkIgw1vhHJ+wbtvERq/dBsslXLrPJmppMycu5zIG/5YrAB6QWYz kZQxjWQo9d2oOAvtgERqWfApj6UzHaos4Zt+SdeTb7BZH4b1iiYPy5/obGj//awv+cer 0/P0WaFJ1VJ5UigTD3Rxn+CfqFxZ3Ri1/G5ydjznZc832G5ytOp1LPUADp0VQvTqfXw7 Qju2AIAhh2ecw7SJI+hMb+U0Y18lSCRIogKNFlNFYNJapGYifSEBXIiGWyUD5ObhvIyR xNkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=S9gdR+a5LdIUu8TmfSBK1x9oXDqMPX0qjRHU75+Bsew=; fh=LxT6+fTk9ci2AQ96V3BA2YXm8qcJKzzxP2CE7XRKGxs=; b=GcHj/lFaxd4szD7h29ACbuSCtX6/KXnJdyA8zp7sO5ow7Z0oWa2zLZKQfgQqH/CTyv NqlTkIkkCRHlQIdXzb4CR9aE1aSHaS2R5nL82golDX4OfQMQ+ylEOWFSgMT7KQYSYogW zobjLoFwNL/bs7RT1vzwfFe8hXXm/kCfforuH1dY+dV2k6dg9Fq+Y8i6Wdo3jyP932I1 ldqKq34KIGUkG9VMeqY+ODLA8uUZbH3uj2p0JsMKagm0HUOabEmLuhqVrtDi3eJHSXjt QNk6Fk+TwSI0HYcLnU9l0dUzQRaQhFe/KjQnH/+juFPxbj/ZNKLLINBdyY/njzD1i2nS MUQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=FDRNn50v; spf=pass (google.com: domain of linux-wireless+bounces-1316-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1316-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e9-20020a17090a728900b0028ba38abf07si13652233pjg.63.2023.12.28.18.01.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 18:01:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1316-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=FDRNn50v; spf=pass (google.com: domain of linux-wireless+bounces-1316-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1316-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7EE95B23F6C for ; Fri, 29 Dec 2023 02:01:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9668846AE; Fri, 29 Dec 2023 02:00:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="FDRNn50v" X-Original-To: linux-wireless@vger.kernel.org Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2E371C2B for ; Fri, 29 Dec 2023 02:00:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: 0327a15aa5ee11eea2298b7352fd921d-20231229 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=S9gdR+a5LdIUu8TmfSBK1x9oXDqMPX0qjRHU75+Bsew=; b=FDRNn50vMwjCwtaIFFMSLmzluyjRCaFEOlDLCe7LHBdDHWlQGUXibyTS/KkF62Tybfum8Tql4V7PwKkoZG1nopQc7E6RxKwbOSBo7cV40Y46WH/KjGDJ15V67drcrXx7479kxxX97fUnUG/4nRUibzJG07Vb4wTki8GOSJnz/gg=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:c1b75a2b-d8e9-4567-9114-b8fa80e2e6d6,IP:0,U RL:-32768,TC:0,Content:-32768,EDM:-32768,RT:0,SF:-32768,FILE:0,BULK:-32768 ,RULE:Release_Ham,ACTION:release,TS:0 X-CID-META: VersionHash:5d391d7,CLOUDID:ea1eaf8d-e2c0-40b0-a8fe-7c7e47299109,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:nil,TC:nil,Content:nil,EDM:nil,IP:ni l,URL:nil,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SP R:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 0327a15aa5ee11eea2298b7352fd921d-20231229 Received: from mtkmbs14n1.mediatek.inc [(172.21.101.75)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1668284294; Fri, 29 Dec 2023 10:00:16 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 29 Dec 2023 10:00:15 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 29 Dec 2023 10:00:15 +0800 From: Mingyen Hsieh To: , CC: , , , , , , , , , , , , , , Hao Zhang , Ming Yen Hsieh Subject: [PATCH v1 03/10] wifi: mt76: mt7925: fix mcu query command fail Date: Fri, 29 Dec 2023 10:00:02 +0800 Message-ID: <20231229020009.12385-4-mingyen.hsieh@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20231229020009.12385-1-mingyen.hsieh@mediatek.com> References: <20231229020009.12385-1-mingyen.hsieh@mediatek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain From: Hao Zhang Apply query command type properly to make the chip send the response back. Otherwise, we may see the command timeout in driver side. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Hao Zhang Signed-off-by: Ming Yen Hsieh --- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index 9a8db9b1a4f2..4811fccbe30e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -2850,12 +2850,16 @@ int mt7925_mcu_fill_message(struct mt76_dev *mdev, struct sk_buff *skb, if (cmd & __MCU_CMD_FIELD_UNI) { uni_txd = (struct mt76_connac2_mcu_uni_txd *)txd; uni_txd->len = cpu_to_le16(skb->len - sizeof(uni_txd->txd)); - uni_txd->option = MCU_CMD_UNI_EXT_ACK; uni_txd->cid = cpu_to_le16(mcu_cmd); uni_txd->s2d_index = MCU_S2D_H2N; uni_txd->pkt_type = MCU_PKT_ID; uni_txd->seq = seq; + if (cmd & __MCU_CMD_FIELD_QUERY) + uni_txd->option = MCU_CMD_UNI_QUERY_ACK; + else + uni_txd->option = MCU_CMD_UNI_EXT_ACK; + goto exit; } -- 2.18.0