diff options
Diffstat (limited to 'drivers/net/ethernet/freescale/gianfar.c')
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index 83199fd0d62b..8e21ceb3b7da 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c | |||
@@ -734,7 +734,7 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev) | |||
734 | 734 | ||
735 | mac_addr = of_get_mac_address(np); | 735 | mac_addr = of_get_mac_address(np); |
736 | if (mac_addr) | 736 | if (mac_addr) |
737 | memcpy(dev->dev_addr, mac_addr, MAC_ADDR_LEN); | 737 | memcpy(dev->dev_addr, mac_addr, ETH_ALEN); |
738 | 738 | ||
739 | if (model && !strcasecmp(model, "TSEC")) | 739 | if (model && !strcasecmp(model, "TSEC")) |
740 | priv->device_flags = | 740 | priv->device_flags = |
@@ -2306,7 +2306,7 @@ void gfar_check_rx_parser_mode(struct gfar_private *priv) | |||
2306 | } | 2306 | } |
2307 | 2307 | ||
2308 | /* Enables and disables VLAN insertion/extraction */ | 2308 | /* Enables and disables VLAN insertion/extraction */ |
2309 | void gfar_vlan_mode(struct net_device *dev, u32 features) | 2309 | void gfar_vlan_mode(struct net_device *dev, netdev_features_t features) |
2310 | { | 2310 | { |
2311 | struct gfar_private *priv = netdev_priv(dev); | 2311 | struct gfar_private *priv = netdev_priv(dev); |
2312 | struct gfar __iomem *regs = NULL; | 2312 | struct gfar __iomem *regs = NULL; |
@@ -3114,7 +3114,7 @@ static void gfar_set_multi(struct net_device *dev) | |||
3114 | static void gfar_clear_exact_match(struct net_device *dev) | 3114 | static void gfar_clear_exact_match(struct net_device *dev) |
3115 | { | 3115 | { |
3116 | int idx; | 3116 | int idx; |
3117 | static const u8 zero_arr[MAC_ADDR_LEN] = {0, 0, 0, 0, 0, 0}; | 3117 | static const u8 zero_arr[ETH_ALEN] = {0, 0, 0, 0, 0, 0}; |
3118 | 3118 | ||
3119 | for(idx = 1;idx < GFAR_EM_NUM + 1;idx++) | 3119 | for(idx = 1;idx < GFAR_EM_NUM + 1;idx++) |
3120 | gfar_set_mac_for_addr(dev, idx, zero_arr); | 3120 | gfar_set_mac_for_addr(dev, idx, zero_arr); |
@@ -3137,7 +3137,7 @@ static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr) | |||
3137 | { | 3137 | { |
3138 | u32 tempval; | 3138 | u32 tempval; |
3139 | struct gfar_private *priv = netdev_priv(dev); | 3139 | struct gfar_private *priv = netdev_priv(dev); |
3140 | u32 result = ether_crc(MAC_ADDR_LEN, addr); | 3140 | u32 result = ether_crc(ETH_ALEN, addr); |
3141 | int width = priv->hash_width; | 3141 | int width = priv->hash_width; |
3142 | u8 whichbit = (result >> (32 - width)) & 0x1f; | 3142 | u8 whichbit = (result >> (32 - width)) & 0x1f; |
3143 | u8 whichreg = result >> (32 - width + 5); | 3143 | u8 whichreg = result >> (32 - width + 5); |
@@ -3158,7 +3158,7 @@ static void gfar_set_mac_for_addr(struct net_device *dev, int num, | |||
3158 | struct gfar_private *priv = netdev_priv(dev); | 3158 | struct gfar_private *priv = netdev_priv(dev); |
3159 | struct gfar __iomem *regs = priv->gfargrp[0].regs; | 3159 | struct gfar __iomem *regs = priv->gfargrp[0].regs; |
3160 | int idx; | 3160 | int idx; |
3161 | char tmpbuf[MAC_ADDR_LEN]; | 3161 | char tmpbuf[ETH_ALEN]; |
3162 | u32 tempval; | 3162 | u32 tempval; |
3163 | u32 __iomem *macptr = ®s->macstnaddr1; | 3163 | u32 __iomem *macptr = ®s->macstnaddr1; |
3164 | 3164 | ||
@@ -3166,8 +3166,8 @@ static void gfar_set_mac_for_addr(struct net_device *dev, int num, | |||
3166 | 3166 | ||
3167 | /* Now copy it into the mac registers backwards, cuz */ | 3167 | /* Now copy it into the mac registers backwards, cuz */ |
3168 | /* little endian is silly */ | 3168 | /* little endian is silly */ |
3169 | for (idx = 0; idx < MAC_ADDR_LEN; idx++) | 3169 | for (idx = 0; idx < ETH_ALEN; idx++) |
3170 | tmpbuf[MAC_ADDR_LEN - 1 - idx] = addr[idx]; | 3170 | tmpbuf[ETH_ALEN - 1 - idx] = addr[idx]; |
3171 | 3171 | ||
3172 | gfar_write(macptr, *((u32 *) (tmpbuf))); | 3172 | gfar_write(macptr, *((u32 *) (tmpbuf))); |
3173 | 3173 | ||