]> err.no Git - linux-2.6/blobdiff - net/bridge/br_sysfs_if.c
Pull mem-attribute into release branch
[linux-2.6] / net / bridge / br_sysfs_if.c
index c51c9e42aeb3d0b6709edf35841699770725c5d5..2da22927d8dd158ea341fe53d896dc1f53ea52b6 100644 (file)
@@ -137,6 +137,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 +159,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
 };
 
@@ -211,7 +219,7 @@ int br_sysfs_addif(struct net_bridge_port *p)
        struct brport_attribute **a;
        int err;
 
-       err = sysfs_create_link(&p->kobj, &br->dev->class_dev.kobj, 
+       err = sysfs_create_link(&p->kobj, &br->dev->dev.kobj,
                                SYSFS_BRIDGE_PORT_LINK);
        if (err)
                goto out2;