};
struct switch_dev {
+ struct device_node *of_node;
const struct switch_dev_ops *ops;
/* will be automatically filled */
char devname[IFNAMSIZ];
const char *alias;
struct net_device *netdev;
- int ports;
- int vlans;
- int cpu_port;
+ unsigned int ports;
+ unsigned int vlans;
+ unsigned int cpu_port;
/* the following fields are internal for swconfig */
- int id;
+ unsigned int id;
struct list_head dev_list;
unsigned long def_global, def_port, def_vlan;
struct mutex sw_mutex;
struct switch_port *portbuf;
+ struct switch_portmap *portmap;
struct switch_port_link linkbuf;
char buf[128];
u32 flags;
};
+struct switch_portmap {
+ u32 virt;
+ const char *s;
+};
+
struct switch_val {
const struct switch_attr *attr;
- int port_vlan;
- int len;
+ unsigned int port_vlan;
+ unsigned int len;
union {
const char *s;
u32 i;