diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2008-07-22 01:13:12 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-08-07 02:23:19 -0400 |
commit | c16d118537cadb21d186e35aebad90a13cd78846 (patch) | |
tree | 8fc1ab697f2476ecd2b39522efcf6234be3dc5c0 /drivers/net/wireless | |
parent | fe414248551e2880fe8913577699003ff145ab9d (diff) |
[netdrvr] Drivers should not set IFF_* flag themselves
Some hardware set promisc when they are requested to set IFF_ALLMULTI flag.
It's ok, but if drivers set IFF_PROMISC flag when they set promisc,
it will broken upper layer handle for promisc and allmulti.
In addition, drivers can use their own hardware programming to make it.
So do not allow drivers to set IFF_* flags.
This is a general driver fix, so I didn't split it to pieces and send
to specific driver maintainers.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/orinoco.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/wavelan.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/wavelan_cs.c | 6 |
3 files changed, 0 insertions, 16 deletions
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index b047306bf386..1ebcafe7ca5f 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -1998,13 +1998,6 @@ __orinoco_set_multicast_list(struct net_device *dev) | |||
1998 | else | 1998 | else |
1999 | priv->mc_count = mc_count; | 1999 | priv->mc_count = mc_count; |
2000 | } | 2000 | } |
2001 | |||
2002 | /* Since we can set the promiscuous flag when it wasn't asked | ||
2003 | for, make sure the net_device knows about it. */ | ||
2004 | if (priv->promiscuous) | ||
2005 | dev->flags |= IFF_PROMISC; | ||
2006 | else | ||
2007 | dev->flags &= ~IFF_PROMISC; | ||
2008 | } | 2001 | } |
2009 | 2002 | ||
2010 | /* This must be called from user context, without locks held - use | 2003 | /* This must be called from user context, without locks held - use |
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c index 49ae97003952..136220b5ca81 100644 --- a/drivers/net/wireless/wavelan.c +++ b/drivers/net/wireless/wavelan.c | |||
@@ -1409,9 +1409,6 @@ static void wavelan_set_multicast_list(struct net_device * dev) | |||
1409 | lp->mc_count = 0; | 1409 | lp->mc_count = 0; |
1410 | 1410 | ||
1411 | wv_82586_reconfig(dev); | 1411 | wv_82586_reconfig(dev); |
1412 | |||
1413 | /* Tell the kernel that we are doing a really bad job. */ | ||
1414 | dev->flags |= IFF_PROMISC; | ||
1415 | } | 1412 | } |
1416 | } else | 1413 | } else |
1417 | /* Are there multicast addresses to send? */ | 1414 | /* Are there multicast addresses to send? */ |
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c index b584c0ecc62d..00a3559e5aa4 100644 --- a/drivers/net/wireless/wavelan_cs.c +++ b/drivers/net/wireless/wavelan_cs.c | |||
@@ -1412,9 +1412,6 @@ wavelan_set_multicast_list(struct net_device * dev) | |||
1412 | lp->mc_count = 0; | 1412 | lp->mc_count = 0; |
1413 | 1413 | ||
1414 | wv_82593_reconfig(dev); | 1414 | wv_82593_reconfig(dev); |
1415 | |||
1416 | /* Tell the kernel that we are doing a really bad job... */ | ||
1417 | dev->flags |= IFF_PROMISC; | ||
1418 | } | 1415 | } |
1419 | } | 1416 | } |
1420 | else | 1417 | else |
@@ -1433,9 +1430,6 @@ wavelan_set_multicast_list(struct net_device * dev) | |||
1433 | lp->mc_count = 0; | 1430 | lp->mc_count = 0; |
1434 | 1431 | ||
1435 | wv_82593_reconfig(dev); | 1432 | wv_82593_reconfig(dev); |
1436 | |||
1437 | /* Tell the kernel that we are doing a really bad job... */ | ||
1438 | dev->flags |= IFF_ALLMULTI; | ||
1439 | } | 1433 | } |
1440 | } | 1434 | } |
1441 | else | 1435 | else |