diff options
Diffstat (limited to 'drivers/net/pcmcia/fmvj18x_cs.c')
-rw-r--r-- | drivers/net/pcmcia/fmvj18x_cs.c | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index 384a736a0d2f..356f50909222 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
@@ -131,10 +131,9 @@ typedef struct local_info_t { | |||
131 | u_short tx_queue_len; | 131 | u_short tx_queue_len; |
132 | cardtype_t cardtype; | 132 | cardtype_t cardtype; |
133 | u_short sent; | 133 | u_short sent; |
134 | u_char mc_filter[8]; | ||
135 | } local_info_t; | 134 | } local_info_t; |
136 | 135 | ||
137 | #define MC_FILTERBREAK 8 | 136 | #define MC_FILTERBREAK 64 |
138 | 137 | ||
139 | /*====================================================================*/ | 138 | /*====================================================================*/ |
140 | /* | 139 | /* |
@@ -1005,15 +1004,8 @@ static void fjn_reset(struct net_device *dev) | |||
1005 | for (i = 0; i < 6; i++) | 1004 | for (i = 0; i < 6; i++) |
1006 | outb(dev->dev_addr[i], ioaddr + NODE_ID + i); | 1005 | outb(dev->dev_addr[i], ioaddr + NODE_ID + i); |
1007 | 1006 | ||
1008 | /* Switch to bank 1 */ | 1007 | /* (re)initialize the multicast table */ |
1009 | if (lp->cardtype == MBH10302) | 1008 | set_rx_mode(dev); |
1010 | outb(BANK_1, ioaddr + CONFIG_1); | ||
1011 | else | ||
1012 | outb(BANK_1U, ioaddr + CONFIG_1); | ||
1013 | |||
1014 | /* set the multicast table to accept none. */ | ||
1015 | for (i = 0; i < 8; i++) | ||
1016 | outb(0x00, ioaddr + MAR_ADR + i); | ||
1017 | 1009 | ||
1018 | /* Switch to bank 2 (runtime mode) */ | 1010 | /* Switch to bank 2 (runtime mode) */ |
1019 | if (lp->cardtype == MBH10302) | 1011 | if (lp->cardtype == MBH10302) |
@@ -1264,11 +1256,11 @@ static struct net_device_stats *fjn_get_stats(struct net_device *dev) | |||
1264 | static void set_rx_mode(struct net_device *dev) | 1256 | static void set_rx_mode(struct net_device *dev) |
1265 | { | 1257 | { |
1266 | kio_addr_t ioaddr = dev->base_addr; | 1258 | kio_addr_t ioaddr = dev->base_addr; |
1267 | struct local_info_t *lp = netdev_priv(dev); | ||
1268 | u_char mc_filter[8]; /* Multicast hash filter */ | 1259 | u_char mc_filter[8]; /* Multicast hash filter */ |
1269 | u_long flags; | 1260 | u_long flags; |
1270 | int i; | 1261 | int i; |
1271 | 1262 | ||
1263 | int saved_bank; | ||
1272 | int saved_config_0 = inb(ioaddr + CONFIG_0); | 1264 | int saved_config_0 = inb(ioaddr + CONFIG_0); |
1273 | 1265 | ||
1274 | local_irq_save(flags); | 1266 | local_irq_save(flags); |
@@ -1306,15 +1298,13 @@ static void set_rx_mode(struct net_device *dev) | |||
1306 | outb(2, ioaddr + RX_MODE); /* Use normal mode. */ | 1298 | outb(2, ioaddr + RX_MODE); /* Use normal mode. */ |
1307 | } | 1299 | } |
1308 | 1300 | ||
1309 | if (memcmp(mc_filter, lp->mc_filter, sizeof(mc_filter))) { | 1301 | /* Switch to bank 1 and set the multicast table. */ |
1310 | int saved_bank = inb(ioaddr + CONFIG_1); | 1302 | saved_bank = inb(ioaddr + CONFIG_1); |
1311 | /* Switch to bank 1 and set the multicast table. */ | 1303 | outb(0xe4, ioaddr + CONFIG_1); |
1312 | outb(0xe4, ioaddr + CONFIG_1); | 1304 | |
1313 | for (i = 0; i < 8; i++) | 1305 | for (i = 0; i < 8; i++) |
1314 | outb(mc_filter[i], ioaddr + MAR_ADR + i); | 1306 | outb(mc_filter[i], ioaddr + MAR_ADR + i); |
1315 | memcpy(lp->mc_filter, mc_filter, sizeof(mc_filter)); | 1307 | outb(saved_bank, ioaddr + CONFIG_1); |
1316 | outb(saved_bank, ioaddr + CONFIG_1); | ||
1317 | } | ||
1318 | 1308 | ||
1319 | outb(saved_config_0, ioaddr + CONFIG_0); | 1309 | outb(saved_config_0, ioaddr + CONFIG_0); |
1320 | 1310 | ||