git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
net
/
bridge
/
br_if.c
diff --git
a/net/bridge/br_if.c
b/net/bridge/br_if.c
index
f55ef68
..
55bb263
100644
(file)
--- a/
net/bridge/br_if.c
+++ b/
net/bridge/br_if.c
@@
-77,12
+77,16
@@
static int port_cost(struct net_device *dev)
* Called from work queue to allow for calling functions that
* might sleep (such as speed check), and to debounce.
*/
* Called from work queue to allow for calling functions that
* might sleep (such as speed check), and to debounce.
*/
-static void port_carrier_check(
void *arg
)
+static void port_carrier_check(
struct work_struct *work
)
{
{
- struct net_device *dev = arg;
struct net_bridge_port *p;
struct net_bridge_port *p;
+ struct net_device *dev;
struct net_bridge *br;
struct net_bridge *br;
+ dev = container_of(work, struct net_bridge_port,
+ carrier_check.work)->dev;
+ work_release(work);
+
rtnl_lock();
p = dev->br_port;
if (!p)
rtnl_lock();
p = dev->br_port;
if (!p)
@@
-163,7
+167,7
@@
static void del_nbp(struct net_bridge_port *p)
br_stp_disable_port(p);
spin_unlock_bh(&br->lock);
br_stp_disable_port(p);
spin_unlock_bh(&br->lock);
- br_fdb_delete_by_port(br, p);
+ br_fdb_delete_by_port(br, p
, 1
);
list_del_rcu(&p->list);
list_del_rcu(&p->list);
@@
-276,7
+280,7
@@
static struct net_bridge_port *new_nbp(struct net_bridge *br,
p->port_no = index;
br_init_port(p);
p->state = BR_STATE_DISABLED;
p->port_no = index;
br_init_port(p);
p->state = BR_STATE_DISABLED;
- INIT_
WORK(&p->carrier_check, port_carrier_check, dev
);
+ INIT_
DELAYED_WORK_NAR(&p->carrier_check, port_carrier_check
);
br_stp_port_timer_init(p);
kobject_init(&p->kobj);
br_stp_port_timer_init(p);
kobject_init(&p->kobj);
@@
-386,12
+390,17
@@
void br_features_recompute(struct net_bridge *br)
checksum = 0;
if (feature & NETIF_F_GSO)
checksum = 0;
if (feature & NETIF_F_GSO)
- feature |= NETIF_F_
TSO
;
+ feature |= NETIF_F_
GSO_SOFTWARE
;
feature |= NETIF_F_GSO;
features &= feature;
}
feature |= NETIF_F_GSO;
features &= feature;
}
+ if (!(checksum & NETIF_F_ALL_CSUM))
+ features &= ~NETIF_F_SG;
+ if (!(features & NETIF_F_SG))
+ features &= ~NETIF_F_GSO_MASK;
+
br->dev->features = features | checksum | NETIF_F_LLTX |
NETIF_F_GSO_ROBUST;
}
br->dev->features = features | checksum | NETIF_F_LLTX |
NETIF_F_GSO_ROBUST;
}
@@
-443,7
+452,7
@@
int br_add_if(struct net_bridge *br, struct net_device *dev)
return 0;
err2:
return 0;
err2:
- br_fdb_delete_by_port(br, p);
+ br_fdb_delete_by_port(br, p
, 1
);
err1:
kobject_del(&p->kobj);
err0:
err1:
kobject_del(&p->kobj);
err0: