Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5267751rwd; Mon, 5 Jun 2023 00:35:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5a+O22wH3UFHDWzYneA5ywxCV2zLFrZ7A0dv6LrNVtONNx8HdnHuh5gu+ggYM/VNzuTxJq X-Received: by 2002:a17:902:f7cc:b0:1af:beae:c0b with SMTP id h12-20020a170902f7cc00b001afbeae0c0bmr5794476plw.22.1685950542739; Mon, 05 Jun 2023 00:35:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685950542; cv=none; d=google.com; s=arc-20160816; b=O5wlcS2rj8wETBx65EhEW6hr68kfqoKAOM1DFF8KFQubfSUoB4/LSmsCKhdy+ZREOy t1yWiFIi/zOLJT/JAtq1e3VyXBQehRLwlhEoKAR0jmsnxFHHTctwwprqx7EqL+fR4gfU xBlU5IFLlq9fjPqM56EVKGGSrjE7b70N8LazslDcZwWENkjXj0iWEJZIq1KHzNL2Rv4u 0pHQ+VL47454B5AdBtYJk3a2lonakZz4cgaGyeVmPa6QCHe9xpVkzLlsgZXhHkTRzoG8 ffprr8Fyx3rDpwucApeBsEk77RKt310d9KHN7voXE41hzwil4gSDDPzvpB97NhiRSPJZ pe6g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=DAgRq2EXmiJlw5QVvMbHQppFdqv5pzza5dzmoTwBNQ8=; b=ZtuJY2BNBPv7pTet3NA0jYwqF+xXrM7cc5XtmI2ZvX/pFZgWvkZGtzcY400/fp0WHz tMNrlS21ceDlx188nBjxB81RFA/WUd9r+1eYOXWYFL7rb+V+9OcM9UffmdER5rhQ58wh GVh8avVX5sgkE71Q7LZmId8c9DMFYv8hSZT4yOASD3HidfVGJ246GeyW+qoIJX7kwlhF WsDHZ6Ci3rt75/qQr7MwgYFLfaiFAWptngSf0EXvAeS/EQnJ1e5DJUii7VDTxCM2EYCG HWHY/Byq/q78zeCTbMExSfE3e68jYdHmi3nWmBkcDFUUZlrVF/THH0RnmwVGSDMFPmW4 6/tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="GOPR4d+/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l19-20020a170902f69300b001afdfd0b36dsi5212056plg.359.2023.06.05.00.35.31; Mon, 05 Jun 2023 00:35:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@gmail.com header.s=20221208 header.b="GOPR4d+/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229869AbjFEHeo (ORCPT + 63 others); Mon, 5 Jun 2023 03:34:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229729AbjFEHen (ORCPT ); Mon, 5 Jun 2023 03:34:43 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4CF983; Mon, 5 Jun 2023 00:34:41 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f620583bc2so1628929e87.1; Mon, 05 Jun 2023 00:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685950480; x=1688542480; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DAgRq2EXmiJlw5QVvMbHQppFdqv5pzza5dzmoTwBNQ8=; b=GOPR4d+/UEzaru7bfg0RdVmwWCfzmOk0IQA91sr3KwRMPXT30HCwHUn05o8osUkDpD MsA7L94HI7gZfq3ALkgV3RippOJKS26pkN/bdoRJPCCwr7GkxE4BELQdzz+/jiFCzj47 LutkrzD710untVOO5vy2jWpN3/4HCZv99+yPalk8MvgtcRMziJfLxNsR4GIugdW83XaK u8oLh5kpyiDr1n44SQIuGNyMUQvqnSeddlU6ij+6RtpodwOZ7ENHZiUkGCL7qydhznuI 6RNnLnHKr8Qzd4ibaeAcm/tw0ObHcTOAA7muPFpKY/VxTLR7Y6kU0cV6lDEK+5JOB94w vMGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685950480; x=1688542480; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DAgRq2EXmiJlw5QVvMbHQppFdqv5pzza5dzmoTwBNQ8=; b=k0lRy8pwJNHGZ1uB79EjaMci6ErxKFg+Rv+epu00WLPDMLcaaztyD1AzRCZLXSZy0K jsfUC25onuWcnClnZB4WeJ6Q1zX7a4NItR1bRn+Hyjs8DFi9jjETGugNQO/u6IUu7x4H 9FBkX8HyyiuzOJ3z7nZd13Mdi1fttNc0LNcLs23iECBBEmqxsTUAQwq9o0rJN+YSLOfn dpG0BuxjIRykslmaV0CXcaxo9nnxG5g+crXuizPzyBzBJrVzbxMUHOyilgEn96wk/nLv NXLKhrzdWMSbuqpVz/PrAusLhN3BsRD34OgD/KJ+AVuVD2Y7BIJsNj/AvvYEZd+GZlyD N3sg== X-Gm-Message-State: AC+VfDyfILKOPeiVemfAXGBCDpDmRJe/W9fak6T5ascArkT11sDoK/2x QYU+8fZ8BkaxNYjSSfR+EwOQnIGlQjIn0A== X-Received: by 2002:ac2:4281:0:b0:4f1:3d6c:d89b with SMTP id m1-20020ac24281000000b004f13d6cd89bmr4850910lfh.42.1685950479796; Mon, 05 Jun 2023 00:34:39 -0700 (PDT) Received: from home.paul.comp (paulfertser.info. [2001:470:26:54b:226:9eff:fe70:80c2]) by smtp.gmail.com with ESMTPSA id w12-20020ac2598c000000b004f62225ffb6sm564382lfn.105.2023.06.05.00.34.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 00:34:39 -0700 (PDT) Received: from home.paul.comp (home.paul.comp [IPv6:0:0:0:0:0:0:0:1]) by home.paul.comp (8.15.2/8.15.2/Debian-22) with ESMTP id 3557YZcg008744; Mon, 5 Jun 2023 10:34:36 +0300 Received: (from paul@localhost) by home.paul.comp (8.15.2/8.15.2/Submit) id 3557YXaZ008743; Mon, 5 Jun 2023 10:34:33 +0300 From: Paul Fertser To: linux-wireless@vger.kernel.org Cc: Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Paul Fertser , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Rani Hod , stable@vger.kernel.org Subject: [PATCH] mt76: mt7615: do not advertise 5 GHz on first phy of MT7615D (DBDC) Date: Mon, 5 Jun 2023 10:34:07 +0300 Message-Id: <20230605073408.8699-1-fercerpav@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-wireless@vger.kernel.org On DBDC devices the first (internal) phy is only capable of using 2.4 GHz band, and the 5 GHz band is exposed via a separate phy object, so avoid the false advertising. Reported-by: Rani Hod Closes: https://github.com/openwrt/openwrt/pull/12361 Fixes: 7660a1bd0c22 ("mt76: mt7615: register ext_phy if DBDC is detected") Cc: stable@vger.kernel.org Signed-off-by: Paul Fertser --- drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c index 68e88224b8b1..ccedea7e8a50 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c @@ -128,12 +128,12 @@ mt7615_eeprom_parse_hw_band_cap(struct mt7615_dev *dev) case MT_EE_5GHZ: dev->mphy.cap.has_5ghz = true; break; - case MT_EE_2GHZ: - dev->mphy.cap.has_2ghz = true; - break; case MT_EE_DBDC: dev->dbdc_support = true; fallthrough; + case MT_EE_2GHZ: + dev->mphy.cap.has_2ghz = true; + break; default: dev->mphy.cap.has_2ghz = true; dev->mphy.cap.has_5ghz = true; -- 2.34.1