* Distributed under the terms of the GNU GPL version 2.
*
* Significant portions of this file may be copied from parts of the Linux
* Distributed under the terms of the GNU GPL version 2.
*
* Significant portions of this file may be copied from parts of the Linux
#include <linux/if_bridge.h>
#include <linux/rtnetlink.h>
#include <linux/spinlock.h>
#include <linux/if_bridge.h>
#include <linux/rtnetlink.h>
#include <linux/spinlock.h>
- ssize_t (*show)(struct net_bridge_port *, char *);
- ssize_t (*store)(struct net_bridge_port *, unsigned long);
+ ssize_t (*show)(struct dp_port *, char *);
+ ssize_t (*store)(struct dp_port *, unsigned long);
};
#define BRPORT_ATTR(_name,_mode,_show,_store) \
};
#define BRPORT_ATTR(_name,_mode,_show,_store) \
static BRPORT_ATTR(path_cost, S_IRUGO | S_IWUSR,
show_path_cost, store_path_cost);
static BRPORT_ATTR(path_cost, S_IRUGO | S_IWUSR,
show_path_cost, store_path_cost);
static BRPORT_ATTR(priority, S_IRUGO | S_IWUSR,
show_priority, store_priority);
static BRPORT_ATTR(priority, S_IRUGO | S_IWUSR,
show_priority, store_priority);
}
static BRPORT_ATTR(designated_root, S_IRUGO, show_designated_root, NULL);
}
static BRPORT_ATTR(designated_root, S_IRUGO, show_designated_root, NULL);
}
static BRPORT_ATTR(designated_bridge, S_IRUGO, show_designated_bridge, NULL);
}
static BRPORT_ATTR(designated_bridge, S_IRUGO, show_designated_bridge, NULL);
}
static BRPORT_ATTR(designated_port, S_IRUGO, show_designated_port, NULL);
}
static BRPORT_ATTR(designated_port, S_IRUGO, show_designated_port, NULL);
}
static BRPORT_ATTR(designated_cost, S_IRUGO, show_designated_cost, NULL);
}
static BRPORT_ATTR(designated_cost, S_IRUGO, show_designated_cost, NULL);
}
static BRPORT_ATTR(port_id, S_IRUGO, show_port_id, NULL);
}
static BRPORT_ATTR(port_id, S_IRUGO, show_port_id, NULL);
{
return sprintf(buf, "0x%x\n", p->port_no);
}
static BRPORT_ATTR(port_no, S_IRUGO, show_port_no, NULL);
{
return sprintf(buf, "0x%x\n", p->port_no);
}
static BRPORT_ATTR(port_no, S_IRUGO, show_port_no, NULL);
}
static BRPORT_ATTR(change_ack, S_IRUGO, show_change_ack, NULL);
}
static BRPORT_ATTR(change_ack, S_IRUGO, show_change_ack, NULL);
}
static BRPORT_ATTR(config_pending, S_IRUGO, show_config_pending, NULL);
}
static BRPORT_ATTR(config_pending, S_IRUGO, show_config_pending, NULL);
}
static BRPORT_ATTR(state, S_IRUGO, show_port_state, NULL);
}
static BRPORT_ATTR(state, S_IRUGO, show_port_state, NULL);
}
static BRPORT_ATTR(message_age_timer, S_IRUGO, show_message_age_timer, NULL);
}
static BRPORT_ATTR(message_age_timer, S_IRUGO, show_message_age_timer, NULL);
}
static BRPORT_ATTR(forward_delay_timer, S_IRUGO, show_forward_delay_timer, NULL);
}
static BRPORT_ATTR(forward_delay_timer, S_IRUGO, show_forward_delay_timer, NULL);
static ssize_t brport_show(struct kobject * kobj,
struct attribute * attr, char * buf)
{
struct brport_attribute * brport_attr = to_brport_attr(attr);
static ssize_t brport_show(struct kobject * kobj,
struct attribute * attr, char * buf)
{
struct brport_attribute * brport_attr = to_brport_attr(attr);
* Creates a brport subdirectory with bridge attributes.
* Puts symlink in bridge's brport subdirectory
*/
* Creates a brport subdirectory with bridge attributes.
* Puts symlink in bridge's brport subdirectory
*/
struct datapath *dp = p->dp;
struct brport_attribute **a;
int err;
/* Create /sys/class/net/<devname>/brport directory. */
struct datapath *dp = p->dp;
struct brport_attribute **a;
int err;
/* Create /sys/class/net/<devname>/brport directory. */
- err = sysfs_create_link(&p->kobj,
- &dp->ports[ODPP_LOCAL]->dev->NETDEV_DEV_MEMBER.kobj,
+ err = sysfs_create_link(&p->kobj, vport_get_kobj(dp->ports[ODPP_LOCAL]->vport),
/* Create symlink from /sys/class/net/<bridgename>/brif/<devname> to
* /sys/class/net/<devname>/brport. */
/* Create symlink from /sys/class/net/<bridgename>/brif/<devname> to
* /sys/class/net/<devname>/brport. */