mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
net: enetc: use enetc_set_si_hw_addr() for setting MAC address
Replace enetc_pf_set_primary_mac_addr() with the generic enetc_set_si_hw_addr() function. This prepares for moving enetc_msg_pf_set_vf_primary_mac_addr() to the enetc-pf-common driver, where it can be shared between ENETC v1 and v4 PF drivers. Signed-off-by: Wei Fang <wei.fang@nxp.com> Link: https://patch.msgid.link/20260522092438.1264020-2-wei.fang@nxp.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
e4d050026f
commit
443a573e79
|
|
@ -509,7 +509,7 @@ static u16 enetc_msg_pf_set_vf_primary_mac_addr(struct enetc_pf *pf,
|
|||
return ENETC_MSG_CMD_STATUS_FAIL;
|
||||
}
|
||||
|
||||
enetc_pf_set_primary_mac_addr(&pf->si->hw, vf_id + 1, addr);
|
||||
enetc_set_si_hw_addr(pf, vf_id + 1, addr);
|
||||
mutex_unlock(&vf_state->lock);
|
||||
|
||||
return ENETC_MSG_CMD_STATUS_OK;
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
#include "enetc_pf_common.h"
|
||||
|
||||
static void enetc_set_si_hw_addr(struct enetc_pf *pf, int si,
|
||||
const u8 *mac_addr)
|
||||
void enetc_set_si_hw_addr(struct enetc_pf *pf, int si, const u8 *mac_addr)
|
||||
{
|
||||
struct enetc_hw *hw = &pf->si->hw;
|
||||
|
||||
pf->ops->set_si_primary_mac(hw, si, mac_addr);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(enetc_set_si_hw_addr);
|
||||
|
||||
static void enetc_get_si_hw_addr(struct enetc_pf *pf, int si, u8 *mac_addr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "enetc_pf.h"
|
||||
|
||||
void enetc_set_si_hw_addr(struct enetc_pf *pf, int si, const u8 *mac_addr);
|
||||
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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user