git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drivers/net/mlx4: Adjust constant
[safe/jmp/linux-2.6]
/
drivers
/
net
/
mv643xx_eth.c
diff --git
a/drivers/net/mv643xx_eth.c
b/drivers/net/mv643xx_eth.c
index
1361ddc
..
0f32db3
100644
(file)
--- a/
drivers/net/mv643xx_eth.c
+++ b/
drivers/net/mv643xx_eth.c
@@
-55,6
+55,7
@@
#include <linux/types.h>
#include <linux/inet_lro.h>
#include <asm/system.h>
#include <linux/types.h>
#include <linux/inet_lro.h>
#include <asm/system.h>
+#include <linux/list.h>
static char mv643xx_eth_driver_name[] = "mv643xx_eth";
static char mv643xx_eth_driver_version[] = "1.4";
static char mv643xx_eth_driver_name[] = "mv643xx_eth";
static char mv643xx_eth_driver_version[] = "1.4";
@@
-1721,20
+1722,20
@@
static void uc_addr_set(struct mv643xx_eth_private *mp, unsigned char *addr)
static u32 uc_addr_filter_mask(struct net_device *dev)
{
static u32 uc_addr_filter_mask(struct net_device *dev)
{
- struct
dev_addr_list *uc_ptr
;
+ struct
netdev_hw_addr *ha
;
u32 nibbles;
if (dev->flags & IFF_PROMISC)
return 0;
nibbles = 1 << (dev->dev_addr[5] & 0x0f);
u32 nibbles;
if (dev->flags & IFF_PROMISC)
return 0;
nibbles = 1 << (dev->dev_addr[5] & 0x0f);
-
for (uc_ptr = dev->uc_list; uc_ptr != NULL; uc_ptr = uc_ptr->nex
t) {
- if (memcmp(dev->dev_addr,
uc_ptr->da_
addr, 5))
+
list_for_each_entry(ha, &dev->uc.list, lis
t) {
+ if (memcmp(dev->dev_addr,
ha->
addr, 5))
return 0;
return 0;
- if ((dev->dev_addr[5] ^
uc_ptr->da_
addr[5]) & 0xf0)
+ if ((dev->dev_addr[5] ^
ha->
addr[5]) & 0xf0)
return 0;
return 0;
- nibbles |= 1 << (
uc_ptr->da_
addr[5] & 0x0f);
+ nibbles |= 1 << (
ha->
addr[5] & 0x0f);
}
return nibbles;
}
return nibbles;
@@
-1749,12
+1750,12
@@
static void mv643xx_eth_program_unicast_filter(struct net_device *dev)
uc_addr_set(mp, dev->dev_addr);
uc_addr_set(mp, dev->dev_addr);
- port_config = rdlp(mp, PORT_CONFIG);
+ port_config = rdlp(mp, PORT_CONFIG) & ~UNICAST_PROMISCUOUS_MODE;
+
nibbles = uc_addr_filter_mask(dev);
if (!nibbles) {
port_config |= UNICAST_PROMISCUOUS_MODE;
nibbles = uc_addr_filter_mask(dev);
if (!nibbles) {
port_config |= UNICAST_PROMISCUOUS_MODE;
- wrlp(mp, PORT_CONFIG, port_config);
- return;
+ nibbles = 0xffff;
}
for (i = 0; i < 16; i += 4) {
}
for (i = 0; i < 16; i += 4) {
@@
-1775,7
+1776,6
@@
static void mv643xx_eth_program_unicast_filter(struct net_device *dev)
wrl(mp, off, v);
}
wrl(mp, off, v);
}
- port_config &= ~UNICAST_PROMISCUOUS_MODE;
wrlp(mp, PORT_CONFIG, port_config);
}
wrlp(mp, PORT_CONFIG, port_config);
}