Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3833539rdb; Thu, 28 Dec 2023 01:08:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IG490oTgRBmxp0YCfCD6uV3hm2sw7nvmcJ4oUZl733ya2TRJ3kTsULOhaZMNuQBoEoph1yC X-Received: by 2002:a05:6e02:1d13:b0:35f:ab80:9d9f with SMTP id i19-20020a056e021d1300b0035fab809d9fmr8756112ila.7.1703754483959; Thu, 28 Dec 2023 01:08:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703754483; cv=none; d=google.com; s=arc-20160816; b=QVH1gU+rLovbNt8MWRmRzcbe9dMKC1oTt8Utj0j2C4MI0taMI2gQ/I5Dv/cTBLK70A DiCBZi/PQIJhGeyj7eLZUSuQNFFzo52OsZyZqtZ09Xp6conVM2r1E6IF8toFna84J+5+ 1zNev8eVSzv1GKbneMJyaPckbHCcVT3gZ1JE7qTaQlf4dB1K8Cyo9Pfmr3rPXuO1cPhG RAs4T1l3s/LhtA+WO0PYdzwX53uZEojb8m+KPdXR00ISacIrjaenonIZHu3XNruuC3pa /uxLzs08yUmL5LH6IgLjXrGY6z31vm6BMaGrtgxnS3J1WynXYk1HBFNmeXPbw/mmiS0q y3sQ== 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=uQAmBYZ+Iya09ytihlt0mndcoybBA5b6yMWRSAvbREy1lukD6qjN+Hx6etWnuWaYhO qzXcH6hyxF4LfDeW7ZGrh5mZR9KCoIXOWx6qm1EJUOiyUuZTaAE2OFbiPZl45wfz1TWt j1CJXU0eExVa4RQe+toCBEgjpnwn8APhBilmIzFFngrap2QFDAeKOes1E8EzqMFirD5d l7c5rGz0r3021b95mEy5LbOZ6xBjBeO5PAuUmijfVB8qNvUEzzPkyTpCctUFvyMuxCat 6LDsLcWYdh9ZG1dCtsNvMNSpoMV+f5cEg/DaKe7+RY3E8VbpKDjcnqIitvsBehvO+4IH VYpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=vFVJcrjY; spf=pass (google.com: domain of linux-wireless+bounces-1295-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1295-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d11-20020a656b8b000000b005c6001ec190si13139120pgw.892.2023.12.28.01.08.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 01:08:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1295-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=vFVJcrjY; spf=pass (google.com: domain of linux-wireless+bounces-1295-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1295-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 967B3282D1E for ; Thu, 28 Dec 2023 09:08:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CED096FA7; Thu, 28 Dec 2023 09:08:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="vFVJcrjY" X-Original-To: linux-wireless@vger.kernel.org Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (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 7D57F6AA2 for ; Thu, 28 Dec 2023 09:07:58 +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: 9497a6bea56011ee9e680517dc993faa-20231228 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=vFVJcrjYs/qtlQ0/4T2EhvHkpponseaiE0Sa5UxkNB9HAHXv3NTXNX780+W0TxedrzU+6QcX350/6r0hkIHgYb5djH5+rAECegMu7Y98k0Qx86JifCfUcMNxDn4zrqkd7tHAsh6zj6dPvVRX+Lt8YUfz+hHJ9ol/oBtSAUgznLw=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:15f5ab23-5945-4d24-bdc4-47c4a3328ede,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:5d391d7,CLOUDID:c391c27e-4f93-4875-95e7-8c66ea833d57,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR: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: 9497a6bea56011ee9e680517dc993faa-20231228 Received: from mtkmbs13n1.mediatek.inc [(172.21.101.193)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2123174988; Thu, 28 Dec 2023 17:07:52 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Thu, 28 Dec 2023 17:07:51 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 28 Dec 2023 17:07:51 +0800 From: Mingyen Hsieh To: , CC: , , , , , , , , , , , , , , Hao Zhang , Ming Yen Hsieh Subject: [PATCH 03/10] wifi: mt76: mt7925: fix mcu query command fail Date: Thu, 28 Dec 2023 17:07:42 +0800 Message-ID: <20231228090749.15191-4-mingyen.hsieh@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20231228090749.15191-1-mingyen.hsieh@mediatek.com> References: <20231228090749.15191-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