ethernet: Convert MAC_ADDR_LEN 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>
This commit is contained in:

committed by
David S. Miller

parent
28011cf19b
commit
6a3c910ca0
@@ -47,8 +47,6 @@
|
||||
#define sis190_rx_skb netif_rx
|
||||
#define sis190_rx_quota(count, quota) count
|
||||
|
||||
#define MAC_ADDR_LEN 6
|
||||
|
||||
#define NUM_TX_DESC 64 /* [8..1024] */
|
||||
#define NUM_RX_DESC 64 /* [8..8192] */
|
||||
#define TX_RING_BYTES (NUM_TX_DESC * sizeof(struct TxDesc))
|
||||
@@ -1601,7 +1599,7 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
|
||||
}
|
||||
|
||||
/* Get MAC address from EEPROM */
|
||||
for (i = 0; i < MAC_ADDR_LEN / 2; i++) {
|
||||
for (i = 0; i < ETH_ALEN / 2; i++) {
|
||||
u16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i);
|
||||
|
||||
((__le16 *)dev->dev_addr)[i] = cpu_to_le16(w);
|
||||
@@ -1653,7 +1651,7 @@ static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
|
||||
udelay(50);
|
||||
pci_read_config_byte(isa_bridge, 0x48, ®);
|
||||
|
||||
for (i = 0; i < MAC_ADDR_LEN; i++) {
|
||||
for (i = 0; i < ETH_ALEN; i++) {
|
||||
outb(0x9 + i, 0x78);
|
||||
dev->dev_addr[i] = inb(0x79);
|
||||
}
|
||||
@@ -1692,7 +1690,7 @@ static inline void sis190_init_rxfilter(struct net_device *dev)
|
||||
*/
|
||||
SIS_W16(RxMacControl, ctl & ~0x0f00);
|
||||
|
||||
for (i = 0; i < MAC_ADDR_LEN; i++)
|
||||
for (i = 0; i < ETH_ALEN; i++)
|
||||
SIS_W8(RxMacAddr + i, dev->dev_addr[i]);
|
||||
|
||||
SIS_W16(RxMacControl, ctl);
|
||||
|
Reference in New Issue
Block a user