lkml.org 
[lkml]   [2023]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2 8/9] microchip: lan865x: add driver support for Microchip's LAN865X MACPHY
> Ah ok, then it is supposed to be like below, isn't it?
>
> static int lan865x_set_mac_address(struct net_device *netdev, void *addr)
> {
> struct sockaddr *address = addr;
> int ret;
>
> if (netif_running(netdev))
> return -EBUSY;
>
> ret = lan865x_set_hw_macaddr(netdev);
> if (ret)
> return ret;
>
> eth_hw_addr_set(netdev, address->sa_data);
>
> return 0;
> }

Yes, that is better. In practice, its probably not an issue, setting
the MAC address will never fail, but it is good to get right, just in
case.

Andrew

\
 
 \ /
  Last update: 2023-10-31 13:54    [W:0.147 / U:2.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site