diff options
Diffstat (limited to 'drivers/net/smc911x.c')
-rw-r--r-- | drivers/net/smc911x.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 9871a2b61f86..6278734c735f 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -383,7 +383,7 @@ static inline void smc911x_rcv(struct net_device *dev) | |||
383 | DBG(SMC_DEBUG_FUNC | SMC_DEBUG_RX, "%s: --> %s\n", | 383 | DBG(SMC_DEBUG_FUNC | SMC_DEBUG_RX, "%s: --> %s\n", |
384 | dev->name, __func__); | 384 | dev->name, __func__); |
385 | status = SMC_GET_RX_STS_FIFO(lp); | 385 | status = SMC_GET_RX_STS_FIFO(lp); |
386 | DBG(SMC_DEBUG_RX, "%s: Rx pkt len %d status 0x%08x \n", | 386 | DBG(SMC_DEBUG_RX, "%s: Rx pkt len %d status 0x%08x\n", |
387 | dev->name, (status & 0x3fff0000) >> 16, status & 0xc000ffff); | 387 | dev->name, (status & 0x3fff0000) >> 16, status & 0xc000ffff); |
388 | pkt_len = (status & RX_STS_PKT_LEN_) >> 16; | 388 | pkt_len = (status & RX_STS_PKT_LEN_) >> 16; |
389 | if (status & RX_STS_ES_) { | 389 | if (status & RX_STS_ES_) { |
@@ -1136,7 +1136,7 @@ static irqreturn_t smc911x_interrupt(int irq, void *dev_id) | |||
1136 | } | 1136 | } |
1137 | #else | 1137 | #else |
1138 | if (status & INT_STS_TSFL_) { | 1138 | if (status & INT_STS_TSFL_) { |
1139 | DBG(SMC_DEBUG_TX, "%s: TX status FIFO limit (%d) irq \n", dev->name, ); | 1139 | DBG(SMC_DEBUG_TX, "%s: TX status FIFO limit (%d) irq\n", dev->name, ); |
1140 | smc911x_tx(dev); | 1140 | smc911x_tx(dev); |
1141 | SMC_ACK_INT(lp, INT_STS_TSFL_); | 1141 | SMC_ACK_INT(lp, INT_STS_TSFL_); |
1142 | } | 1142 | } |
@@ -1275,7 +1275,7 @@ static void smc911x_timeout(struct net_device *dev) | |||
1275 | status = SMC_GET_INT(lp); | 1275 | status = SMC_GET_INT(lp); |
1276 | mask = SMC_GET_INT_EN(lp); | 1276 | mask = SMC_GET_INT_EN(lp); |
1277 | spin_unlock_irqrestore(&lp->lock, flags); | 1277 | spin_unlock_irqrestore(&lp->lock, flags); |
1278 | DBG(SMC_DEBUG_MISC, "%s: INT 0x%02x MASK 0x%02x \n", | 1278 | DBG(SMC_DEBUG_MISC, "%s: INT 0x%02x MASK 0x%02x\n", |
1279 | dev->name, status, mask); | 1279 | dev->name, status, mask); |
1280 | 1280 | ||
1281 | /* Dump the current TX FIFO contents and restart */ | 1281 | /* Dump the current TX FIFO contents and restart */ |
@@ -1341,7 +1341,7 @@ static void smc911x_set_multicast_list(struct net_device *dev) | |||
1341 | * within that register. | 1341 | * within that register. |
1342 | */ | 1342 | */ |
1343 | else if (!netdev_mc_empty(dev)) { | 1343 | else if (!netdev_mc_empty(dev)) { |
1344 | struct dev_mc_list *cur_addr; | 1344 | struct netdev_hw_addr *ha; |
1345 | 1345 | ||
1346 | /* Set the Hash perfec mode */ | 1346 | /* Set the Hash perfec mode */ |
1347 | mcr |= MAC_CR_HPFILT_; | 1347 | mcr |= MAC_CR_HPFILT_; |
@@ -1349,19 +1349,16 @@ static void smc911x_set_multicast_list(struct net_device *dev) | |||
1349 | /* start with a table of all zeros: reject all */ | 1349 | /* start with a table of all zeros: reject all */ |
1350 | memset(multicast_table, 0, sizeof(multicast_table)); | 1350 | memset(multicast_table, 0, sizeof(multicast_table)); |
1351 | 1351 | ||
1352 | netdev_for_each_mc_addr(cur_addr, dev) { | 1352 | netdev_for_each_mc_addr(ha, dev) { |
1353 | u32 position; | 1353 | u32 position; |
1354 | 1354 | ||
1355 | /* do we have a pointer here? */ | ||
1356 | if (!cur_addr) | ||
1357 | break; | ||
1358 | /* make sure this is a multicast address - | 1355 | /* make sure this is a multicast address - |
1359 | shouldn't this be a given if we have it here ? */ | 1356 | shouldn't this be a given if we have it here ? */ |
1360 | if (!(*cur_addr->dmi_addr & 1)) | 1357 | if (!(*ha->addr & 1)) |
1361 | continue; | 1358 | continue; |
1362 | 1359 | ||
1363 | /* upper 6 bits are used as hash index */ | 1360 | /* upper 6 bits are used as hash index */ |
1364 | position = ether_crc(ETH_ALEN, cur_addr->dmi_addr)>>26; | 1361 | position = ether_crc(ETH_ALEN, ha->addr)>>26; |
1365 | 1362 | ||
1366 | multicast_table[position>>5] |= 1 << (position&0x1f); | 1363 | multicast_table[position>>5] |= 1 << (position&0x1f); |
1367 | } | 1364 | } |