net:drivers/net: Miscellaneous conversions to ETH_ALEN
Convert the memset/memcpy uses of 6 to ETH_ALEN where appropriate. Also convert some struct definitions and u8 array declarations of [6] to ETH_ALEN. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0b3d8e087b
commit
d458cdf712
@@ -309,7 +309,7 @@ static void
|
||||
jme_load_macaddr(struct net_device *netdev)
|
||||
{
|
||||
struct jme_adapter *jme = netdev_priv(netdev);
|
||||
unsigned char macaddr[6];
|
||||
unsigned char macaddr[ETH_ALEN];
|
||||
u32 val;
|
||||
|
||||
spin_lock_bh(&jme->macaddr_lock);
|
||||
@@ -321,7 +321,7 @@ jme_load_macaddr(struct net_device *netdev)
|
||||
val = jread32(jme, JME_RXUMA_HI);
|
||||
macaddr[4] = (val >> 0) & 0xFF;
|
||||
macaddr[5] = (val >> 8) & 0xFF;
|
||||
memcpy(netdev->dev_addr, macaddr, 6);
|
||||
memcpy(netdev->dev_addr, macaddr, ETH_ALEN);
|
||||
spin_unlock_bh(&jme->macaddr_lock);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user