swconfig: add SWITCH_TYPE_LINK and support sending link info to user space
authorJohn Crispin <john@openwrt.org>
Wed, 23 Dec 2015 19:24:30 +0000 (19:24 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 23 Dec 2015 19:24:30 +0000 (19:24 +0000)
commit67e10d757f88d9f2e0a0be8c96c01d951a2fca6e
treea1ada1770b17ef64fc79fe7034799e594b27c4a7
parentc01ca020ea12190afa644bd80629cc11f380e24e
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
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