aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-11-16 04:38:02 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-16 20:23:17 -0500
commit6a3c910ca04ecd69b16dae47b26097a92c533828 (patch)
tree27d9f1c13c039f67e58120ea12cf65b89a531ee0 /drivers/net
parent28011cf19b75df9d3f35489a7599a97ec0b3f1a0 (diff)
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/freescale/gianfar.c12
-rw-r--r--drivers/net/ethernet/freescale/gianfar.h3
-rw-r--r--drivers/net/ethernet/micrel/ksz884x.c59
-rw-r--r--drivers/net/ethernet/realtek/r8169.c5
-rw-r--r--drivers/net/ethernet/sis/sis190.c8
5 files changed, 38 insertions, 49 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index ff3e8b0f0da3..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 =
@@ -3114,7 +3114,7 @@ static void gfar_set_multi(struct net_device *dev)
3114static void gfar_clear_exact_match(struct net_device *dev) 3114static 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 = &regs->macstnaddr1; 3163 u32 __iomem *macptr = &regs->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
diff --git a/drivers/net/ethernet/freescale/gianfar.h b/drivers/net/ethernet/freescale/gianfar.h
index cda6cb2eb1d2..fe7ac3a83194 100644
--- a/drivers/net/ethernet/freescale/gianfar.h
+++ b/drivers/net/ethernet/freescale/gianfar.h
@@ -74,9 +74,6 @@ struct ethtool_rx_list {
74 * will be the next highest multiple of 512 bytes. */ 74 * will be the next highest multiple of 512 bytes. */
75#define INCREMENTAL_BUFFER_SIZE 512 75#define INCREMENTAL_BUFFER_SIZE 512
76 76
77
78#define MAC_ADDR_LEN 6
79
80#define PHY_INIT_TIMEOUT 100000 77#define PHY_INIT_TIMEOUT 100000
81#define GFAR_PHY_CHANGE_TIME 2 78#define GFAR_PHY_CHANGE_TIME 2
82 79
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index 8d846bd09711..7abd510fe01f 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -743,8 +743,7 @@
743/* Change default LED mode. */ 743/* Change default LED mode. */
744#define SET_DEFAULT_LED LED_SPEED_DUPLEX_ACT 744#define SET_DEFAULT_LED LED_SPEED_DUPLEX_ACT
745 745
746#define MAC_ADDR_LEN 6 746#define MAC_ADDR_ORDER(i) (ETH_ALEN - 1 - (i))
747#define MAC_ADDR_ORDER(i) (MAC_ADDR_LEN - 1 - (i))
748 747
749#define MAX_ETHERNET_BODY_SIZE 1500 748#define MAX_ETHERNET_BODY_SIZE 1500
750#define ETHERNET_HEADER_SIZE 14 749#define ETHERNET_HEADER_SIZE 14
@@ -1043,7 +1042,7 @@ enum {
1043 * @valid: Valid setting indicating the entry is being used. 1042 * @valid: Valid setting indicating the entry is being used.
1044 */ 1043 */
1045struct ksz_mac_table { 1044struct ksz_mac_table {
1046 u8 mac_addr[MAC_ADDR_LEN]; 1045 u8 mac_addr[ETH_ALEN];
1047 u16 vid; 1046 u16 vid;
1048 u8 fid; 1047 u8 fid;
1049 u8 ports; 1048 u8 ports;
@@ -1187,8 +1186,8 @@ struct ksz_switch {
1187 u8 diffserv[DIFFSERV_ENTRIES]; 1186 u8 diffserv[DIFFSERV_ENTRIES];
1188 u8 p_802_1p[PRIO_802_1P_ENTRIES]; 1187 u8 p_802_1p[PRIO_802_1P_ENTRIES];
1189 1188
1190 u8 br_addr[MAC_ADDR_LEN]; 1189 u8 br_addr[ETH_ALEN];
1191 u8 other_addr[MAC_ADDR_LEN]; 1190 u8 other_addr[ETH_ALEN];
1192 1191
1193 u8 broad_per; 1192 u8 broad_per;
1194 u8 member; 1193 u8 member;
@@ -1292,14 +1291,14 @@ struct ksz_hw {
1292 int tx_int_mask; 1291 int tx_int_mask;
1293 int tx_size; 1292 int tx_size;
1294 1293
1295 u8 perm_addr[MAC_ADDR_LEN]; 1294 u8 perm_addr[ETH_ALEN];
1296 u8 override_addr[MAC_ADDR_LEN]; 1295 u8 override_addr[ETH_ALEN];
1297 u8 address[ADDITIONAL_ENTRIES][MAC_ADDR_LEN]; 1296 u8 address[ADDITIONAL_ENTRIES][ETH_ALEN];
1298 u8 addr_list_size; 1297 u8 addr_list_size;
1299 u8 mac_override; 1298 u8 mac_override;
1300 u8 promiscuous; 1299 u8 promiscuous;
1301 u8 all_multi; 1300 u8 all_multi;
1302 u8 multi_list[MAX_MULTICAST_LIST][MAC_ADDR_LEN]; 1301 u8 multi_list[MAX_MULTICAST_LIST][ETH_ALEN];
1303 u8 multi_bits[HW_MULTICAST_SIZE]; 1302 u8 multi_bits[HW_MULTICAST_SIZE];
1304 u8 multi_list_size; 1303 u8 multi_list_size;
1305 1304
@@ -3654,7 +3653,7 @@ static void hw_add_wol_bcast(struct ksz_hw *hw)
3654 static const u8 mask[] = { 0x3F }; 3653 static const u8 mask[] = { 0x3F };
3655 static const u8 pattern[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; 3654 static const u8 pattern[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
3656 3655
3657 hw_set_wol_frame(hw, 2, 1, mask, MAC_ADDR_LEN, pattern); 3656 hw_set_wol_frame(hw, 2, 1, mask, ETH_ALEN, pattern);
3658} 3657}
3659 3658
3660/** 3659/**
@@ -3689,7 +3688,7 @@ static void hw_add_wol_ucast(struct ksz_hw *hw)
3689{ 3688{
3690 static const u8 mask[] = { 0x3F }; 3689 static const u8 mask[] = { 0x3F };
3691 3690
3692 hw_set_wol_frame(hw, 0, 1, mask, MAC_ADDR_LEN, hw->override_addr); 3691 hw_set_wol_frame(hw, 0, 1, mask, ETH_ALEN, hw->override_addr);
3693} 3692}
3694 3693
3695/** 3694/**
@@ -4055,7 +4054,7 @@ static void hw_set_addr(struct ksz_hw *hw)
4055{ 4054{
4056 int i; 4055 int i;
4057 4056
4058 for (i = 0; i < MAC_ADDR_LEN; i++) 4057 for (i = 0; i < ETH_ALEN; i++)
4059 writeb(hw->override_addr[MAC_ADDR_ORDER(i)], 4058 writeb(hw->override_addr[MAC_ADDR_ORDER(i)],
4060 hw->io + KS884X_ADDR_0_OFFSET + i); 4059 hw->io + KS884X_ADDR_0_OFFSET + i);
4061 4060
@@ -4072,17 +4071,16 @@ static void hw_read_addr(struct ksz_hw *hw)
4072{ 4071{
4073 int i; 4072 int i;
4074 4073
4075 for (i = 0; i < MAC_ADDR_LEN; i++) 4074 for (i = 0; i < ETH_ALEN; i++)
4076 hw->perm_addr[MAC_ADDR_ORDER(i)] = readb(hw->io + 4075 hw->perm_addr[MAC_ADDR_ORDER(i)] = readb(hw->io +
4077 KS884X_ADDR_0_OFFSET + i); 4076 KS884X_ADDR_0_OFFSET + i);
4078 4077
4079 if (!hw->mac_override) { 4078 if (!hw->mac_override) {
4080 memcpy(hw->override_addr, hw->perm_addr, MAC_ADDR_LEN); 4079 memcpy(hw->override_addr, hw->perm_addr, ETH_ALEN);
4081 if (empty_addr(hw->override_addr)) { 4080 if (empty_addr(hw->override_addr)) {
4082 memcpy(hw->perm_addr, DEFAULT_MAC_ADDRESS, 4081 memcpy(hw->perm_addr, DEFAULT_MAC_ADDRESS, ETH_ALEN);
4083 MAC_ADDR_LEN);
4084 memcpy(hw->override_addr, DEFAULT_MAC_ADDRESS, 4082 memcpy(hw->override_addr, DEFAULT_MAC_ADDRESS,
4085 MAC_ADDR_LEN); 4083 ETH_ALEN);
4086 hw->override_addr[5] += hw->id; 4084 hw->override_addr[5] += hw->id;
4087 hw_set_addr(hw); 4085 hw_set_addr(hw);
4088 } 4086 }
@@ -4130,16 +4128,16 @@ static int hw_add_addr(struct ksz_hw *hw, u8 *mac_addr)
4130 int i; 4128 int i;
4131 int j = ADDITIONAL_ENTRIES; 4129 int j = ADDITIONAL_ENTRIES;
4132 4130
4133 if (!memcmp(hw->override_addr, mac_addr, MAC_ADDR_LEN)) 4131 if (!memcmp(hw->override_addr, mac_addr, ETH_ALEN))
4134 return 0; 4132 return 0;
4135 for (i = 0; i < hw->addr_list_size; i++) { 4133 for (i = 0; i < hw->addr_list_size; i++) {
4136 if (!memcmp(hw->address[i], mac_addr, MAC_ADDR_LEN)) 4134 if (!memcmp(hw->address[i], mac_addr, ETH_ALEN))
4137 return 0; 4135 return 0;
4138 if (ADDITIONAL_ENTRIES == j && empty_addr(hw->address[i])) 4136 if (ADDITIONAL_ENTRIES == j && empty_addr(hw->address[i]))
4139 j = i; 4137 j = i;
4140 } 4138 }
4141 if (j < ADDITIONAL_ENTRIES) { 4139 if (j < ADDITIONAL_ENTRIES) {
4142 memcpy(hw->address[j], mac_addr, MAC_ADDR_LEN); 4140 memcpy(hw->address[j], mac_addr, ETH_ALEN);
4143 hw_ena_add_addr(hw, j, hw->address[j]); 4141 hw_ena_add_addr(hw, j, hw->address[j]);
4144 return 0; 4142 return 0;
4145 } 4143 }
@@ -4151,8 +4149,8 @@ static int hw_del_addr(struct ksz_hw *hw, u8 *mac_addr)
4151 int i; 4149 int i;
4152 4150
4153 for (i = 0; i < hw->addr_list_size; i++) { 4151 for (i = 0; i < hw->addr_list_size; i++) {
4154 if (!memcmp(hw->address[i], mac_addr, MAC_ADDR_LEN)) { 4152 if (!memcmp(hw->address[i], mac_addr, ETH_ALEN)) {
4155 memset(hw->address[i], 0, MAC_ADDR_LEN); 4153 memset(hw->address[i], 0, ETH_ALEN);
4156 writel(0, hw->io + ADD_ADDR_INCR * i + 4154 writel(0, hw->io + ADD_ADDR_INCR * i +
4157 KS_ADD_ADDR_0_HI); 4155 KS_ADD_ADDR_0_HI);
4158 return 0; 4156 return 0;
@@ -5676,7 +5674,7 @@ static int netdev_set_mac_address(struct net_device *dev, void *addr)
5676 hw_del_addr(hw, dev->dev_addr); 5674 hw_del_addr(hw, dev->dev_addr);
5677 else { 5675 else {
5678 hw->mac_override = 1; 5676 hw->mac_override = 1;
5679 memcpy(hw->override_addr, mac->sa_data, MAC_ADDR_LEN); 5677 memcpy(hw->override_addr, mac->sa_data, ETH_ALEN);
5680 } 5678 }
5681 5679
5682 memcpy(dev->dev_addr, mac->sa_data, MAX_ADDR_LEN); 5680 memcpy(dev->dev_addr, mac->sa_data, MAX_ADDR_LEN);
@@ -5786,7 +5784,7 @@ static void netdev_set_rx_mode(struct net_device *dev)
5786 netdev_for_each_mc_addr(ha, dev) { 5784 netdev_for_each_mc_addr(ha, dev) {
5787 if (i >= MAX_MULTICAST_LIST) 5785 if (i >= MAX_MULTICAST_LIST)
5788 break; 5786 break;
5789 memcpy(hw->multi_list[i++], ha->addr, MAC_ADDR_LEN); 5787 memcpy(hw->multi_list[i++], ha->addr, ETH_ALEN);
5790 } 5788 }
5791 hw->multi_list_size = (u8) i; 5789 hw->multi_list_size = (u8) i;
5792 hw_set_grp_addr(hw); 5790 hw_set_grp_addr(hw);
@@ -6862,7 +6860,7 @@ static void get_mac_addr(struct dev_info *hw_priv, u8 *macaddr, int port)
6862 int num; 6860 int num;
6863 6861
6864 i = j = num = got_num = 0; 6862 i = j = num = got_num = 0;
6865 while (j < MAC_ADDR_LEN) { 6863 while (j < ETH_ALEN) {
6866 if (macaddr[i]) { 6864 if (macaddr[i]) {
6867 int digit; 6865 int digit;
6868 6866
@@ -6893,7 +6891,7 @@ static void get_mac_addr(struct dev_info *hw_priv, u8 *macaddr, int port)
6893 } 6891 }
6894 i++; 6892 i++;
6895 } 6893 }
6896 if (MAC_ADDR_LEN == j) { 6894 if (ETH_ALEN == j) {
6897 if (MAIN_PORT == port) 6895 if (MAIN_PORT == port)
6898 hw_priv->hw.mac_override = 1; 6896 hw_priv->hw.mac_override = 1;
6899 } 6897 }
@@ -7060,7 +7058,7 @@ static int __devinit pcidev_init(struct pci_dev *pdev,
7060 7058
7061 /* Multiple device interfaces mode requires a second MAC address. */ 7059 /* Multiple device interfaces mode requires a second MAC address. */
7062 if (hw->dev_count > 1) { 7060 if (hw->dev_count > 1) {
7063 memcpy(sw->other_addr, hw->override_addr, MAC_ADDR_LEN); 7061 memcpy(sw->other_addr, hw->override_addr, ETH_ALEN);
7064 read_other_addr(hw); 7062 read_other_addr(hw);
7065 if (mac1addr[0] != ':') 7063 if (mac1addr[0] != ':')
7066 get_mac_addr(hw_priv, mac1addr, OTHER_PORT); 7064 get_mac_addr(hw_priv, mac1addr, OTHER_PORT);
@@ -7110,12 +7108,11 @@ static int __devinit pcidev_init(struct pci_dev *pdev,
7110 dev->irq = pdev->irq; 7108 dev->irq = pdev->irq;
7111 if (MAIN_PORT == i) 7109 if (MAIN_PORT == i)
7112 memcpy(dev->dev_addr, hw_priv->hw.override_addr, 7110 memcpy(dev->dev_addr, hw_priv->hw.override_addr,
7113 MAC_ADDR_LEN); 7111 ETH_ALEN);
7114 else { 7112 else {
7115 memcpy(dev->dev_addr, sw->other_addr, 7113 memcpy(dev->dev_addr, sw->other_addr, ETH_ALEN);
7116 MAC_ADDR_LEN);
7117 if (!memcmp(sw->other_addr, hw->override_addr, 7114 if (!memcmp(sw->other_addr, hw->override_addr,
7118 MAC_ADDR_LEN)) 7115 ETH_ALEN))
7119 dev->dev_addr[5] += port->first_port; 7116 dev->dev_addr[5] += port->first_port;
7120 } 7117 }
7121 7118
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 2dfb0c0ea01b..f7bc310f5185 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -69,9 +69,6 @@
69 The RTL chips use a 64 element hash table based on the Ethernet CRC. */ 69 The RTL chips use a 64 element hash table based on the Ethernet CRC. */
70static const int multicast_filter_limit = 32; 70static const int multicast_filter_limit = 32;
71 71
72/* MAC address length */
73#define MAC_ADDR_LEN 6
74
75#define MAX_READ_REQUEST_SHIFT 12 72#define MAX_READ_REQUEST_SHIFT 12
76#define TX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */ 73#define TX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
77#define SafeMtu 0x1c20 /* ... actually life sucks beyond ~7k */ 74#define SafeMtu 0x1c20 /* ... actually life sucks beyond ~7k */
@@ -4101,7 +4098,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
4101 spin_lock_init(&tp->lock); 4098 spin_lock_init(&tp->lock);
4102 4099
4103 /* Get MAC address */ 4100 /* Get MAC address */
4104 for (i = 0; i < MAC_ADDR_LEN; i++) 4101 for (i = 0; i < ETH_ALEN; i++)
4105 dev->dev_addr[i] = RTL_R8(MAC0 + i); 4102 dev->dev_addr[i] = RTL_R8(MAC0 + i);
4106 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 4103 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
4107 4104
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);