]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability
authorBo-Cun Chen <bc-bocun.chen@mediatek.com>
Tue, 13 May 2025 04:27:30 +0000 (05:27 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 15 May 2025 02:28:21 +0000 (19:28 -0700)
Since MTK_ESW_BIT is a bit number rather than a bitmap, it causes
MTK_HAS_CAPS to produce incorrect results. This leads to the ETH
driver not declaring MAC capabilities correctly for the MT7988 ESW.

Fixes: 445eb6448ed3 ("net: ethernet: mtk_eth_soc: add basic support for MT7988 SoC")
Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/b8b37f409d1280fad9c4d32521e6207f63cd3213.1747110258.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c

index 22a532695fb0ddf7bc793392854f3c98ec12299a..6c92072b4c2808336e9887b335522b1764f6d168 100644 (file)
@@ -4748,7 +4748,7 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
        }
 
        if (mtk_is_netsys_v3_or_greater(mac->hw) &&
-           MTK_HAS_CAPS(mac->hw->soc->caps, MTK_ESW_BIT) &&
+           MTK_HAS_CAPS(mac->hw->soc->caps, MTK_ESW) &&
            id == MTK_GMAC1_ID) {
                mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE |
                                                       MAC_SYM_PAUSE |