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