X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=net%2Fbridge%2Fbr_sysfs_if.c;h=02b2d50cce4da640f4b62a6652253d217e890af2;hb=c62a11fd9555007b1caab83b5bcbb443a43e32bb;hp=0bc2aef8f9f3aa95332f12829ba8962bec29923e;hpb=920841d8d1d61bc12b43f95a579a5374f6d98f81;p=linux-2.6-omap-h63xx.git diff --git a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c index 0bc2aef8f9f..02b2d50cce4 100644 --- a/net/bridge/br_sysfs_if.c +++ b/net/bridge/br_sysfs_if.c @@ -29,8 +29,7 @@ struct brport_attribute { #define BRPORT_ATTR(_name,_mode,_show,_store) \ struct brport_attribute brport_attr_##_name = { \ .attr = {.name = __stringify(_name), \ - .mode = _mode, \ - .owner = THIS_MODULE, }, \ + .mode = _mode }, \ .show = _show, \ .store = _store, \ }; @@ -137,6 +136,13 @@ static ssize_t show_hold_timer(struct net_bridge_port *p, } static BRPORT_ATTR(hold_timer, S_IRUGO, show_hold_timer, NULL); +static ssize_t store_flush(struct net_bridge_port *p, unsigned long v) +{ + br_fdb_delete_by_port(p->br, p, 0); // Don't delete local entry + return 0; +} +static BRPORT_ATTR(flush, S_IWUSR, NULL, store_flush); + static struct brport_attribute *brport_attrs[] = { &brport_attr_path_cost, &brport_attr_priority, @@ -152,6 +158,7 @@ static struct brport_attribute *brport_attrs[] = { &brport_attr_message_age_timer, &brport_attr_forward_delay_timer, &brport_attr_hold_timer, + &brport_attr_flush, NULL }; @@ -222,7 +229,7 @@ int br_sysfs_addif(struct net_bridge_port *p) goto out2; } - err= sysfs_create_link(&br->ifobj, &p->kobj, p->dev->name); + err = sysfs_create_link(br->ifobj, &p->kobj, p->dev->name); out2: return err; }