]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: tag_{e}dsa.c: Remove dependency on platform data
authorAndrew Lunn <andrew@lunn.ch>
Sat, 4 Jun 2016 19:16:56 +0000 (21:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 Jun 2016 21:29:53 +0000 (14:29 -0700)
commit931436b4e8f7914bd336fdf9158ef85336c36bca
treea7242119cc023908a8544027942a0cbfbe502dbc
parentd25b19c94938ff8bc1ca285ba31c9799121362d1
net: dsa: tag_{e}dsa.c: Remove dependency on platform data

The platform data nr_chips is used when validating a received packet,
to ensure it comes from a know switch chip. The number of possible
switches is limited to DSA_MAX_SWITCHES, so use this as the first
validation step. The new binding allows holes in the dst->ds[] array,
so also ensure ensure there is a valid dsa_switch for this packet.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/tag_dsa.c
net/dsa/tag_edsa.c