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
@@ -2676,7 +2676,7 @@ static int emac_init_config(struct emac_instance *dev)
|
||||
np->full_name);
|
||||
return -ENXIO;
|
||||
}
|
||||
memcpy(dev->ndev->dev_addr, p, 6);
|
||||
memcpy(dev->ndev->dev_addr, p, ETH_ALEN);
|
||||
|
||||
/* IAHT and GAHT filter parameterization */
|
||||
if (emac_has_feature(dev, EMAC_FTR_EMAC4SYNC)) {
|
||||
|
@@ -1185,7 +1185,7 @@ static void ibmveth_set_multicast_list(struct net_device *netdev)
|
||||
netdev_for_each_mc_addr(ha, netdev) {
|
||||
/* add the multicast address to the filter table */
|
||||
unsigned long mcast_addr = 0;
|
||||
memcpy(((char *)&mcast_addr)+2, ha->addr, 6);
|
||||
memcpy(((char *)&mcast_addr)+2, ha->addr, ETH_ALEN);
|
||||
lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address,
|
||||
IbmVethMcastAddFilter,
|
||||
mcast_addr);
|
||||
@@ -1370,7 +1370,7 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
|
||||
netif_napi_add(netdev, &adapter->napi, ibmveth_poll, 16);
|
||||
|
||||
adapter->mac_addr = 0;
|
||||
memcpy(&adapter->mac_addr, mac_addr_p, 6);
|
||||
memcpy(&adapter->mac_addr, mac_addr_p, ETH_ALEN);
|
||||
|
||||
netdev->irq = dev->irq;
|
||||
netdev->netdev_ops = &ibmveth_netdev_ops;
|
||||
|
Reference in New Issue
Block a user