mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

The VLAN hash filters of ENETC v1 and v4 are basically the same, the only difference is that the offset of the VLAN hash filter registers has been changed in ENETC v4. So some functions like enetc_vlan_rx_add_vid() and enetc_vlan_rx_del_vid() only need to be slightly modified to be reused by ENETC v4. Currently, we just move these functions from enetc_pf.c to enetc_pf_common.c. Appropriate modifications will be made for ENETC4 in a subsequent patch. Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20250506080735.3444381-13-wei.fang@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
22 lines
999 B
C
22 lines
999 B
C
/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
|
|
/* Copyright 2024 NXP */
|
|
|
|
#include "enetc_pf.h"
|
|
|
|
int enetc_pf_set_mac_addr(struct net_device *ndev, void *addr);
|
|
int enetc_setup_mac_addresses(struct device_node *np, struct enetc_pf *pf);
|
|
void enetc_pf_netdev_setup(struct enetc_si *si, struct net_device *ndev,
|
|
const struct net_device_ops *ndev_ops);
|
|
int enetc_mdiobus_create(struct enetc_pf *pf, struct device_node *node);
|
|
void enetc_mdiobus_destroy(struct enetc_pf *pf);
|
|
int enetc_phylink_create(struct enetc_ndev_priv *priv, struct device_node *node,
|
|
const struct phylink_mac_ops *ops);
|
|
void enetc_phylink_destroy(struct enetc_ndev_priv *priv);
|
|
void enetc_set_default_rss_key(struct enetc_pf *pf);
|
|
int enetc_vlan_rx_add_vid(struct net_device *ndev, __be16 prot, u16 vid);
|
|
int enetc_vlan_rx_del_vid(struct net_device *ndev, __be16 prot, u16 vid);
|
|
|
|
static inline u16 enetc_get_ip_revision(struct enetc_hw *hw)
|
|
{
|
|
return enetc_global_rd(hw, ENETC_G_EIPBRR0) & EIPBRR0_REVISION;
|
|
}
|