net: phy: add Generic Netlink Ethernet switch configuration API

From: Felix Fietkau <nbd@openwrt.org>

This patch adds an Ethernet Switch generic netlink configuration API
which allows for doing the required configuration of managed Ethernet
switches commonly found in Wireless/Cable/DSL routers in the market.

Since this API is based on the Generic Netlink infrastructure it is very
easy to extend a particular switch driver to support additional features
and to adapt it to specific switches.

So far the API includes support for:

- getting/setting a port VLAN id
- getting/setting VLAN port membership
- getting a port link status
- getting a port statistics counters
- resetting a switch device
- applying a configuration to a switch device

Unlike the Distributed Switch Architecture code, this API is much
smaller and does not interfere with the networking stack packet flow, but
rather focuses on the control path of managed switches.

A concrete example of a switch driver is included in subsequent patches
to illustrate how it can be used as well as the required user-space
controlling tools.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
tools: add Generic Netlink switch configuration tool

Add the user-space configuration tool for the Generic Netlink switch
configuration API. This tool is currently linking with libnl-1.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
net: phy: add Broadcom B53 switch driver

From: Jonas Gorski <jogo@openwrt.org>

This patch add support for the BCM53xx aka RoboSwitch managed Ethernet
switches using the proposed swconfig Generic Netlink API.

This driver supports both SPI and MDIO connected switches and in
particular the following models: BCM5325E, BCM5365, BCM539x,
BCM53115 and BCM53125.

Support for BCM63xx integrated switches as well as BCM53xxx ARM-based
platforms will be submitted as separate driver backends.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
net: phy: add fake switch driver

Add a fake switch driver which can be used to test both the kernel
swconfig API and user-land swconfig tool for regression and features
additions.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>