mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 07:04:10 +08:00
net: fjes: constify and use eth_hw_addr_set()
Get it ready for constant netdev->dev_addr. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
2e0566aeb9
commit
ed08890756
@ -137,7 +137,8 @@ static void fjes_hw_free_epbuf(struct epbuf_handler *epbh)
|
|||||||
epbh->ring = NULL;
|
epbh->ring = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void fjes_hw_setup_epbuf(struct epbuf_handler *epbh, u8 *mac_addr, u32 mtu)
|
void fjes_hw_setup_epbuf(struct epbuf_handler *epbh, const u8 *mac_addr,
|
||||||
|
u32 mtu)
|
||||||
{
|
{
|
||||||
union ep_buffer_info *info = epbh->info;
|
union ep_buffer_info *info = epbh->info;
|
||||||
u16 vlan_id[EP_BUFFER_SUPPORT_VLAN_MAX];
|
u16 vlan_id[EP_BUFFER_SUPPORT_VLAN_MAX];
|
||||||
|
@ -330,7 +330,7 @@ int fjes_hw_register_buff_addr(struct fjes_hw *, int,
|
|||||||
int fjes_hw_unregister_buff_addr(struct fjes_hw *, int);
|
int fjes_hw_unregister_buff_addr(struct fjes_hw *, int);
|
||||||
void fjes_hw_init_command_registers(struct fjes_hw *,
|
void fjes_hw_init_command_registers(struct fjes_hw *,
|
||||||
struct fjes_device_command_param *);
|
struct fjes_device_command_param *);
|
||||||
void fjes_hw_setup_epbuf(struct epbuf_handler *, u8 *, u32);
|
void fjes_hw_setup_epbuf(struct epbuf_handler *, const u8 *, u32);
|
||||||
int fjes_hw_raise_interrupt(struct fjes_hw *, int, enum REG_ICTL_MASK);
|
int fjes_hw_raise_interrupt(struct fjes_hw *, int, enum REG_ICTL_MASK);
|
||||||
void fjes_hw_set_irqmask(struct fjes_hw *, enum REG_ICTL_MASK, bool);
|
void fjes_hw_set_irqmask(struct fjes_hw *, enum REG_ICTL_MASK, bool);
|
||||||
u32 fjes_hw_capture_interrupt_status(struct fjes_hw *);
|
u32 fjes_hw_capture_interrupt_status(struct fjes_hw *);
|
||||||
|
@ -1203,6 +1203,7 @@ static int fjes_probe(struct platform_device *plat_dev)
|
|||||||
struct net_device *netdev;
|
struct net_device *netdev;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
struct fjes_hw *hw;
|
struct fjes_hw *hw;
|
||||||
|
u8 addr[ETH_ALEN];
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
@ -1266,12 +1267,13 @@ static int fjes_probe(struct platform_device *plat_dev)
|
|||||||
goto err_free_control_wq;
|
goto err_free_control_wq;
|
||||||
|
|
||||||
/* setup MAC address (02:00:00:00:00:[epid])*/
|
/* setup MAC address (02:00:00:00:00:[epid])*/
|
||||||
netdev->dev_addr[0] = 2;
|
addr[0] = 2;
|
||||||
netdev->dev_addr[1] = 0;
|
addr[1] = 0;
|
||||||
netdev->dev_addr[2] = 0;
|
addr[2] = 0;
|
||||||
netdev->dev_addr[3] = 0;
|
addr[3] = 0;
|
||||||
netdev->dev_addr[4] = 0;
|
addr[4] = 0;
|
||||||
netdev->dev_addr[5] = hw->my_epid; /* EPID */
|
addr[5] = hw->my_epid; /* EPID */
|
||||||
|
eth_hw_addr_set(netdev, addr);
|
||||||
|
|
||||||
err = register_netdev(netdev);
|
err = register_netdev(netdev);
|
||||||
if (err)
|
if (err)
|
||||||
|
Loading…
Reference in New Issue
Block a user