swconfig: add API for setting port link speed
[openwrt/svn-archive/archive.git] / target / linux / generic / files / include / linux / switch.h
index 42913645629a401724f2cba511b5e31f7185d714..4ada0e5d33a0f4ecd524aa4000c75148b40871bc 100644 (file)
@@ -95,6 +95,8 @@ struct switch_dev_ops {
 
        int (*get_port_link)(struct switch_dev *dev, int port,
                             struct switch_port_link *link);
+       int (*set_port_link)(struct switch_dev *dev, int port,
+                            struct switch_port_link *link);
        int (*get_port_stats)(struct switch_dev *dev, int port,
                              struct switch_port_stats *stats);
 };
@@ -122,6 +124,7 @@ struct switch_dev {
        struct mutex sw_mutex;
        struct switch_port *portbuf;
        struct switch_portmap *portmap;
+       struct switch_port_link linkbuf;
 
        char buf[128];
 
@@ -148,6 +151,7 @@ struct switch_val {
                const char *s;
                u32 i;
                struct switch_port *ports;
+               struct switch_port_link *link;
        } value;
 };