aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sis/sis190.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/sis/sis190.c')
-rw-r--r--drivers/net/ethernet/sis/sis190.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c
index 220e98219a3b..5b118cd5bf94 100644
--- a/drivers/net/ethernet/sis/sis190.c
+++ b/drivers/net/ethernet/sis/sis190.c
@@ -47,8 +47,6 @@
47#define sis190_rx_skb netif_rx 47#define sis190_rx_skb netif_rx
48#define sis190_rx_quota(count, quota) count 48#define sis190_rx_quota(count, quota) count
49 49
50#define MAC_ADDR_LEN 6
51
52#define NUM_TX_DESC 64 /* [8..1024] */ 50#define NUM_TX_DESC 64 /* [8..1024] */
53#define NUM_RX_DESC 64 /* [8..8192] */ 51#define NUM_RX_DESC 64 /* [8..8192] */
54#define TX_RING_BYTES (NUM_TX_DESC * sizeof(struct TxDesc)) 52#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,
1601 } 1599 }
1602 1600
1603 /* Get MAC address from EEPROM */ 1601 /* Get MAC address from EEPROM */
1604 for (i = 0; i < MAC_ADDR_LEN / 2; i++) { 1602 for (i = 0; i < ETH_ALEN / 2; i++) {
1605 u16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i); 1603 u16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i);
1606 1604
1607 ((__le16 *)dev->dev_addr)[i] = cpu_to_le16(w); 1605 ((__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,
1653 udelay(50); 1651 udelay(50);
1654 pci_read_config_byte(isa_bridge, 0x48, &reg); 1652 pci_read_config_byte(isa_bridge, 0x48, &reg);
1655 1653
1656 for (i = 0; i < MAC_ADDR_LEN; i++) { 1654 for (i = 0; i < ETH_ALEN; i++) {
1657 outb(0x9 + i, 0x78); 1655 outb(0x9 + i, 0x78);
1658 dev->dev_addr[i] = inb(0x79); 1656 dev->dev_addr[i] = inb(0x79);
1659 } 1657 }
@@ -1692,7 +1690,7 @@ static inline void sis190_init_rxfilter(struct net_device *dev)
1692 */ 1690 */
1693 SIS_W16(RxMacControl, ctl & ~0x0f00); 1691 SIS_W16(RxMacControl, ctl & ~0x0f00);
1694 1692
1695 for (i = 0; i < MAC_ADDR_LEN; i++) 1693 for (i = 0; i < ETH_ALEN; i++)
1696 SIS_W8(RxMacAddr + i, dev->dev_addr[i]); 1694 SIS_W8(RxMacAddr + i, dev->dev_addr[i]);
1697 1695
1698 SIS_W16(RxMacControl, ctl); 1696 SIS_W16(RxMacControl, ctl);