bonding: Allow userspace to set actors' macaddr in an AD-system.
[deliverable/linux.git] / drivers / net / bonding / bond_sysfs.c
index 4a7626611ca64b1b023c6253912b29c9a281ee77..09fefa50d0557f2c51cd66a2bfc015417bfb61d8 100644 (file)
@@ -706,6 +706,21 @@ static ssize_t bonding_show_ad_actor_sys_prio(struct device *d,
 static DEVICE_ATTR(ad_actor_sys_prio, S_IRUGO | S_IWUSR,
                   bonding_show_ad_actor_sys_prio, bonding_sysfs_store_option);
 
+static ssize_t bonding_show_ad_actor_system(struct device *d,
+                                           struct device_attribute *attr,
+                                           char *buf)
+{
+       struct bonding *bond = to_bond(d);
+
+       if (BOND_MODE(bond) == BOND_MODE_8023AD)
+               return sprintf(buf, "%pM\n", bond->params.ad_actor_system);
+
+       return 0;
+}
+
+static DEVICE_ATTR(ad_actor_system, S_IRUGO | S_IWUSR,
+                  bonding_show_ad_actor_system, bonding_sysfs_store_option);
+
 static struct attribute *per_bond_attrs[] = {
        &dev_attr_slaves.attr,
        &dev_attr_mode.attr,
@@ -740,6 +755,7 @@ static struct attribute *per_bond_attrs[] = {
        &dev_attr_packets_per_slave.attr,
        &dev_attr_tlb_dynamic_lb.attr,
        &dev_attr_ad_actor_sys_prio.attr,
+       &dev_attr_ad_actor_system.attr,
        NULL,
 };
 
This page took 0.025897 seconds and 5 git commands to generate.