swconfig: add SWITCH_TYPE_LINK and support sending link info to user space
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 23 Dec 2015 19:24:30 +0000 (19:24 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 23 Dec 2015 19:24:30 +0000 (19:24 +0000)
commit7e52f4dfae7a12a18978d82ef7db69bcf3fd500d
treeee24108e1e8e0f29880323fcf501e3678835c87a
parent278f2756b02355ce24441017d11cdb0dbe6445ae
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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47997 3c298f89-4303-0410-b956-a3cf2f4a3e73
target/linux/generic/files/drivers/net/phy/swconfig.c
target/linux/generic/files/include/linux/switch.h
target/linux/generic/files/include/uapi/linux/switch.h