smc91c92_cs: define multicast_table as unsigned char

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Tuesday, April 13, 2010 - 12:59 pm

Gitweb:     http://git.kernel.org/linus/a6d37024de02e7cb2b2333e438e71355a9c32a0a
Commit:     a6d37024de02e7cb2b2333e438e71355a9c32a0a
Parent:     4ffa87012efd7b664762b579213d4663560ef4a3
Author:     Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
AuthorDate: Sat Apr 10 12:50:14 2010 +0000
Committer:  David S. Miller <davem@davemloft.net>
CommitDate: Tue Apr 13 03:03:16 2010 -0700

    smc91c92_cs: define multicast_table as unsigned char
    
    smc91c92_cs:
      * define multicast_table as unsigned char
      * remove unnecessary "#ifndef final_version"
    
    Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
    Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/pcmcia/smc91c92_cs.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index ff7eb91..fd9d6e3 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -1608,9 +1608,12 @@ static void set_rx_mode(struct net_device *dev)
 {
     unsigned int ioaddr = dev->base_addr;
     struct smc_private *smc = netdev_priv(dev);
-    u_int multicast_table[ 2 ] = { 0, };
+    unsigned char multicast_table[8];
     unsigned long flags;
     u_short rx_cfg_setting;
+    int i;
+
+    memset(multicast_table, 0, sizeof(multicast_table));
 
     if (dev->flags & IFF_PROMISC) {
 	rx_cfg_setting = RxStripCRC | RxEnable | RxPromisc | RxAllMulti;
@@ -1622,10 +1625,6 @@ static void set_rx_mode(struct net_device *dev)
 
 	    netdev_for_each_mc_addr(mc_addr, dev) {
 		u_int position = ether_crc(6, mc_addr->dmi_addr);
-#ifndef final_version		/* Verify multicast address. */
-		if ((mc_addr->dmi_addr[0] & 1) == 0)
-		    continue;
-#endif
 		multicast_table[position >> 29] |= 1 << ((position >> 26) & 7);
 	    }
 	}
@@ -1635,8 +1634,8 @@ static void set_rx_mode(struct net_device *dev)
     /* Load MC table and Rx setting into the chip without interrupts. */
     spin_lock_irqsave(&smc->lock, flags);
     SMC_SELECT_BANK(3);
-    outl(multicast_table[0], ioaddr + MULTICAST0);
-    outl(multicast_table[1], ioaddr + MULTICAST4);
+    for (i = 0; i < 8; i++)
+	outb(multicast_table[i], ioaddr + MULTICAST0 + i);
     SMC_SELECT_BANK(0);
     outw(rx_cfg_setting, ioaddr + RCR);
     SMC_SELECT_BANK(2);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
smc91c92_cs: define multicast_table as unsigned char, Linux Kernel Mailing ..., (Tue Apr 13, 12:59 pm)