diff options
author | John Crispin <john@openwrt.org> | 2015-12-23 19:24:30 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2015-12-23 19:24:30 +0000 |
commit | 67e10d757f88d9f2e0a0be8c96c01d951a2fca6e (patch) | |
tree | a1ada1770b17ef64fc79fe7034799e594b27c4a7 /target/linux/generic/files/include/linux | |
parent | c01ca020ea12190afa644bd80629cc11f380e24e (diff) | |
download | upstream-67e10d757f88d9f2e0a0be8c96c01d951a2fca6e.tar.gz upstream-67e10d757f88d9f2e0a0be8c96c01d951a2fca6e.tar.bz2 upstream-67e10d757f88d9f2e0a0be8c96c01d951a2fca6e.zip |
swconfig: add SWITCH_TYPE_LINK and support sending link info to user space
So far we were sending link data as a string. It got some drawbacks:
1) Didn't allow writing clean user space apps reading link state. It was
needed to do some screen scraping.
2) Forced whole PORT_LINK communication to be string based. Adding
support for *setting* port link required passing string and parting
it in the kernel space.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 47997
Diffstat (limited to 'target/linux/generic/files/include/linux')
-rw-r--r-- | target/linux/generic/files/include/linux/switch.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/linux/generic/files/include/linux/switch.h b/target/linux/generic/files/include/linux/switch.h index 4291364562..eac35f9135 100644 --- a/target/linux/generic/files/include/linux/switch.h +++ b/target/linux/generic/files/include/linux/switch.h @@ -122,6 +122,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 +149,7 @@ struct switch_val { const char *s; u32 i; struct switch_port *ports; + struct switch_port_link *link; } value; }; |