Message ID | 20221107185452.90711-7-nbd@nbd.name (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [01/14] net: ethernet: mtk_eth_soc: account for vlan in rx header length | expand |
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h index 8123a646ba0a..e09b2483c70c 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h @@ -905,7 +905,13 @@ enum mkt_eth_capabilities { #define MTK_MUX_GMAC12_TO_GEPHY_SGMII \ (MTK_ETH_MUX_GMAC12_TO_GEPHY_SGMII | MTK_MUX) -#define MTK_HAS_CAPS(caps, _x) (((caps) & (_x)) == (_x)) +#ifdef CONFIG_SOC_MT7621 +#define MTK_CAP_MASK MTK_NETSYS_V2 +#else +#define MTK_CAP_MASK 0 +#endif + +#define MTK_HAS_CAPS(caps, _x) (((caps) & (_x) & ~(MTK_CAP_MASK)) == (_x)) #define MT7621_CAPS (MTK_GMAC1_RGMII | MTK_GMAC1_TRGMII | \ MTK_GMAC2_RGMII | MTK_SHARED_INT | \
Avoid some branches in the hot path on low-end devices with limited CPU power, and reduce code size Signed-off-by: Felix Fietkau <nbd@nbd.name> --- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)