aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ks8851_mll.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ks8851_mll.c')
-rw-r--r--drivers/net/ks8851_mll.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c
index ee3fe30b2ad7..70a3d98f4bd7 100644
--- a/drivers/net/ks8851_mll.c
+++ b/drivers/net/ks8851_mll.c
@@ -362,7 +362,6 @@ static u8 KS_DEFAULT_MAC_ADDRESS[] = { 0x00, 0x10, 0xA1, 0x86, 0x95, 0x11 };
362 362
363#define MAX_MCAST_LST 32 363#define MAX_MCAST_LST 32
364#define HW_MCAST_SIZE 8 364#define HW_MCAST_SIZE 8
365#define MAC_ADDR_LEN 6
366 365
367/** 366/**
368 * union ks_tx_hdr - tx header data 367 * union ks_tx_hdr - tx header data
@@ -450,7 +449,7 @@ struct ks_net {
450 u16 promiscuous; 449 u16 promiscuous;
451 u16 all_mcast; 450 u16 all_mcast;
452 u16 mcast_lst_size; 451 u16 mcast_lst_size;
453 u8 mcast_lst[MAX_MCAST_LST][MAC_ADDR_LEN]; 452 u8 mcast_lst[MAX_MCAST_LST][ETH_ALEN];
454 u8 mcast_bits[HW_MCAST_SIZE]; 453 u8 mcast_bits[HW_MCAST_SIZE];
455 u8 mac_addr[6]; 454 u8 mac_addr[6];
456 u8 fid; 455 u8 fid;
@@ -1170,7 +1169,7 @@ static void ks_set_mcast(struct ks_net *ks, u16 mcast)
1170static void ks_set_rx_mode(struct net_device *netdev) 1169static void ks_set_rx_mode(struct net_device *netdev)
1171{ 1170{
1172 struct ks_net *ks = netdev_priv(netdev); 1171 struct ks_net *ks = netdev_priv(netdev);
1173 struct dev_mc_list *ptr; 1172 struct netdev_hw_addr *ha;
1174 1173
1175 /* Turn on/off promiscuous mode. */ 1174 /* Turn on/off promiscuous mode. */
1176 if ((netdev->flags & IFF_PROMISC) == IFF_PROMISC) 1175 if ((netdev->flags & IFF_PROMISC) == IFF_PROMISC)
@@ -1187,13 +1186,12 @@ static void ks_set_rx_mode(struct net_device *netdev)
1187 if (netdev_mc_count(netdev) <= MAX_MCAST_LST) { 1186 if (netdev_mc_count(netdev) <= MAX_MCAST_LST) {
1188 int i = 0; 1187 int i = 0;
1189 1188
1190 netdev_for_each_mc_addr(ptr, netdev) { 1189 netdev_for_each_mc_addr(ha, netdev) {
1191 if (!(*ptr->dmi_addr & 1)) 1190 if (!(*ha->addr & 1))
1192 continue; 1191 continue;
1193 if (i >= MAX_MCAST_LST) 1192 if (i >= MAX_MCAST_LST)
1194 break; 1193 break;
1195 memcpy(ks->mcast_lst[i++], ptr->dmi_addr, 1194 memcpy(ks->mcast_lst[i++], ha->addr, ETH_ALEN);
1196 MAC_ADDR_LEN);
1197 } 1195 }
1198 ks->mcast_lst_size = (u8)i; 1196 ks->mcast_lst_size = (u8)i;
1199 ks_set_grpaddr(ks); 1197 ks_set_grpaddr(ks);