Lines Matching refs:slave
19 ssize_t (*show)(struct slave *, char *);
31 static ssize_t state_show(struct slave *slave, char *buf) in state_show() argument
33 switch (bond_slave_state(slave)) { in state_show()
44 static ssize_t mii_status_show(struct slave *slave, char *buf) in mii_status_show() argument
46 return sprintf(buf, "%s\n", bond_slave_link_status(slave->link)); in mii_status_show()
50 static ssize_t link_failure_count_show(struct slave *slave, char *buf) in link_failure_count_show() argument
52 return sprintf(buf, "%d\n", slave->link_failure_count); in link_failure_count_show()
56 static ssize_t perm_hwaddr_show(struct slave *slave, char *buf) in perm_hwaddr_show() argument
58 return sprintf(buf, "%pM\n", slave->perm_hwaddr); in perm_hwaddr_show()
62 static ssize_t queue_id_show(struct slave *slave, char *buf) in queue_id_show() argument
64 return sprintf(buf, "%d\n", slave->queue_id); in queue_id_show()
68 static ssize_t ad_aggregator_id_show(struct slave *slave, char *buf) in ad_aggregator_id_show() argument
72 if (BOND_MODE(slave->bond) == BOND_MODE_8023AD) { in ad_aggregator_id_show()
73 agg = SLAVE_AD_INFO(slave)->port.aggregator; in ad_aggregator_id_show()
94 #define to_slave(obj) container_of(obj, struct slave, kobj)
100 struct slave *slave = to_slave(kobj); in slave_show() local
102 return slave_attr->show(slave, buf); in slave_show()
115 int bond_sysfs_slave_add(struct slave *slave) in bond_sysfs_slave_add() argument
120 err = kobject_init_and_add(&slave->kobj, &slave_ktype, in bond_sysfs_slave_add()
121 &(slave->dev->dev.kobj), "bonding_slave"); in bond_sysfs_slave_add()
126 err = sysfs_create_file(&slave->kobj, &((*a)->attr)); in bond_sysfs_slave_add()
128 kobject_put(&slave->kobj); in bond_sysfs_slave_add()
136 void bond_sysfs_slave_del(struct slave *slave) in bond_sysfs_slave_del() argument
141 sysfs_remove_file(&slave->kobj, &((*a)->attr)); in bond_sysfs_slave_del()
143 kobject_put(&slave->kobj); in bond_sysfs_slave_del()