aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-11-16 04:38:06 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-16 20:23:18 -0500
commitb721e25383c394f24fa19a66517c5efca382c2e5 (patch)
tree94ebcb73f595292fae47736dfdcfa2caf8ac1bf9
parentc857ff6ecef1c7a1eb10c97c72d7230683392e9c (diff)
ucc_geth: Convert ENET_NUM_OCTETS_PER_ADDRESS uses to ETH_ALEN
Reduce the number of #defines, use the normal #define from if_ether.h Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/freescale/ucc_geth.c2
-rw-r--r--drivers/net/ethernet/freescale/ucc_geth.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index b5dc0273a1d1..ba2dc083bfc0 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -443,7 +443,7 @@ static void hw_add_addr_in_hash(struct ucc_geth_private *ugeth,
443 443
444static inline int compare_addr(u8 **addr1, u8 **addr2) 444static inline int compare_addr(u8 **addr1, u8 **addr2)
445{ 445{
446 return memcmp(addr1, addr2, ENET_NUM_OCTETS_PER_ADDRESS); 446 return memcmp(addr1, addr2, ETH_ALEN);
447} 447}
448 448
449#ifdef DEBUG 449#ifdef DEBUG
diff --git a/drivers/net/ethernet/freescale/ucc_geth.h b/drivers/net/ethernet/freescale/ucc_geth.h
index d12fcad145e9..2e395a2566b8 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.h
+++ b/drivers/net/ethernet/freescale/ucc_geth.h
@@ -20,6 +20,7 @@
20 20
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/list.h> 22#include <linux/list.h>
23#include <linux/if_ether.h>
23 24
24#include <asm/immap_qe.h> 25#include <asm/immap_qe.h>
25#include <asm/qe.h> 26#include <asm/qe.h>
@@ -881,7 +882,6 @@ struct ucc_geth_hardware_statistics {
881#define TX_RING_MOD_MASK(size) (size-1) 882#define TX_RING_MOD_MASK(size) (size-1)
882#define RX_RING_MOD_MASK(size) (size-1) 883#define RX_RING_MOD_MASK(size) (size-1)
883 884
884#define ENET_NUM_OCTETS_PER_ADDRESS 6
885#define ENET_GROUP_ADDR 0x01 /* Group address mask 885#define ENET_GROUP_ADDR 0x01 /* Group address mask
886 for ethernet 886 for ethernet
887 addresses */ 887 addresses */
@@ -1051,7 +1051,7 @@ enum ucc_geth_num_of_station_addresses {
1051 1051
1052/* UCC GETH 82xx Ethernet Address Container */ 1052/* UCC GETH 82xx Ethernet Address Container */
1053struct enet_addr_container { 1053struct enet_addr_container {
1054 u8 address[ENET_NUM_OCTETS_PER_ADDRESS]; /* ethernet address */ 1054 u8 address[ETH_ALEN]; /* ethernet address */
1055 enum ucc_geth_enet_address_recognition_location location; /* location in 1055 enum ucc_geth_enet_address_recognition_location location; /* location in
1056 82xx address 1056 82xx address
1057 recognition 1057 recognition
@@ -1194,7 +1194,7 @@ struct ucc_geth_private {
1194 u16 cpucount[NUM_TX_QUEUES]; 1194 u16 cpucount[NUM_TX_QUEUES];
1195 u16 __iomem *p_cpucount[NUM_TX_QUEUES]; 1195 u16 __iomem *p_cpucount[NUM_TX_QUEUES];
1196 int indAddrRegUsed[NUM_OF_PADDRS]; 1196 int indAddrRegUsed[NUM_OF_PADDRS];
1197 u8 paddr[NUM_OF_PADDRS][ENET_NUM_OCTETS_PER_ADDRESS]; /* ethernet address */ 1197 u8 paddr[NUM_OF_PADDRS][ETH_ALEN]; /* ethernet address */
1198 u8 numGroupAddrInHash; 1198 u8 numGroupAddrInHash;
1199 u8 numIndAddrInHash; 1199 u8 numIndAddrInHash;
1200 u8 numIndAddrInReg; 1200 u8 numIndAddrInReg;