X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fgeneric%2Ffiles%2Finclude%2Flinux%2Fswitch.h;h=f8380b98c56687810816025f63f4e062b69e6f06;hb=5a69f596027ff45d9daf7c6584a8a9d4f7ea0770;hp=a381fd006c4417eab3a86acac5578e220b1fbc20;hpb=675407baa44a8700de20b6b2857009a552a807ba;p=openwrt%2Fstaging%2Fwigyori.git diff --git a/target/linux/generic/files/include/linux/switch.h b/target/linux/generic/files/include/linux/switch.h index a381fd006c..f8380b98c5 100644 --- a/target/linux/generic/files/include/linux/switch.h +++ b/target/linux/generic/files/include/linux/switch.h @@ -105,6 +105,7 @@ struct switch_dev_ops { }; struct switch_dev { + struct device_node *of_node; const struct switch_dev_ops *ops; /* will be automatically filled */ char devname[IFNAMSIZ]; @@ -114,17 +115,18 @@ struct switch_dev { 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]; @@ -139,10 +141,15 @@ struct switch_port { 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;