Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp263025rdb; Thu, 2 Nov 2023 03:05:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqANXGx63VznUmtQo+AR+F6iJShXSBDNFCi4bIV+A0UCW1/DueJpAoVyTE5vu0EK705WYX X-Received: by 2002:a05:6a20:7a96:b0:15c:b7ba:1671 with SMTP id u22-20020a056a207a9600b0015cb7ba1671mr7921475pzh.2.1698919555709; Thu, 02 Nov 2023 03:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698919555; cv=none; d=google.com; s=arc-20160816; b=1CiIfzSdDtFAVDoyJTZU2ArNVNRnO0o7dpxJykArnFQSVFcfMYoibfXMdz4TV4+Jtz 6DtrUheQtVVzvIaQpVfQT3b8demCZJFkEkK7hg5n11u/gLB1fZna+4m8zRzASgSJpmgn PWqGzoufP9yQmgVImYSf2AL7TE5celz9u/QoAWY4Q6Vr4WV5VnaOlGRilG3YqGobeNw1 aGWGcvKEvVpT2/Ku8RxeDLXZx3uLB0FdMdUEV8IaxPoE3099nxd3MCnZHJX1kAplW/lw 1cGQ/Izo8RYa3fOjH/J8X5yZFQrPZjrWe4gv0hlkn2F7RrG3VWHu7sPKqSnIshEP5FDc MTdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=X5py3cy/xu4oqRWHELduhlbDNGtG9oSPSUrEgSMyuSY=; fh=N3/GfEl39B0oClSTj/X5Gx+caDXJV1m+sZkQOjkJLzQ=; b=KzfdBSn90wZemCR/dhcSy6P1j4qpm6p6Pl+7V/Joanfksaeu83F06ZTq2Gjm3GNLdz vFXD26vUfDOdJDjhXU3YLj8MEXAFFK2ec3TE+WPek8Y2nT22wmjX3skLphjeMYjv6lfI kaqBDxm2zlG3AWyFuAyGcM52CMDI1HVgFYs/B3siZR83T9K9ErU/UxXnmvDL3f9VDo8s DXsrqSxzAifYBN/B/KEZU5Il3nhvgiNPVzElkt/22b7DYAjuSa/dFgjGz3Sn9rw5vPQl XSltM8ZjoDZYjB48P213vsz5bYq3umxjIhfjVtuwgeCDAix30Sy7W28BwLz+2mHt3bXS zGhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=OKzgji8J; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id y12-20020a056a00180c00b006c0fe926fc9si3513758pfa.173.2023.11.02.03.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 03:05:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=OKzgji8J; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id B36918145969; Thu, 2 Nov 2023 03:05:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346230AbjKBKEo (ORCPT + 52 others); Thu, 2 Nov 2023 06:04:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346256AbjKBKEn (ORCPT ); Thu, 2 Nov 2023 06:04:43 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8992F189 for ; Thu, 2 Nov 2023 03:04:21 -0700 (PDT) X-UUID: 2df1d6a2796711eea33bb35ae8d461a2-20231102 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=X5py3cy/xu4oqRWHELduhlbDNGtG9oSPSUrEgSMyuSY=; b=OKzgji8JPctjRJRLQYOzfWrQa6DlkdXWETRT4ZoDZGai1FHvcFzTylXFsqrxFMA6VAj+cxrqi8wIlsoXAFvzMRsf/9JVICOOD41f/YyTsvkljrCO1PY82lFr1PrHEnv2Ip3Mbr1duMaVlhNUojjZL3pXOyyfOtSlKEHq8kn76/Y=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.33,REQID:05c405a8-06fd-4465-bedd-2899ae62c5ab,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:364b77b,CLOUDID:199112fc-4a48-46e2-b946-12f04f20af8c,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: 2df1d6a2796711eea33bb35ae8d461a2-20231102 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 32215017; Thu, 02 Nov 2023 18:04:15 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Thu, 2 Nov 2023 18:04:14 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 2 Nov 2023 18:04:14 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , linux-mediatek , MeiChia Chiu , Shayne Chen Subject: [PATCH 8/8] wifi: mt76: connac: fix EHT phy mode check Date: Thu, 2 Nov 2023 18:03:02 +0800 Message-ID: <20231102100302.22160-8-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20231102100302.22160-1-shayne.chen@mediatek.com> References: <20231102100302.22160-1-shayne.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 02 Nov 2023 03:05:42 -0700 (PDT) From: MeiChia Chiu Add a BSS eht_support check before returning EHT phy mode. Without this patch, there might be an inconsistency where the softmac layer thinks the BSS is in HE mode, while the FW thinks it is in EHT mode. Signed-off-by: MeiChia Chiu Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index ae6bf3c968df..b475555097ff 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -1359,7 +1359,7 @@ u8 mt76_connac_get_phy_mode_ext(struct mt76_phy *phy, struct ieee80211_vif *vif, sband = phy->hw->wiphy->bands[band]; eht_cap = ieee80211_get_eht_iftype_cap(sband, vif->type); - if (!eht_cap || !eht_cap->has_eht) + if (!eht_cap || !eht_cap->has_eht || !vif->bss_conf.eht_support) return mode; switch (band) { -- 2.39.2