net: ethernet: ti: ale: switch to use tables for vlan entry description
authorGrygorii Strashko <grygorii.strashko@ti.com>
Thu, 10 Sep 2020 20:28:06 +0000 (23:28 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Sep 2020 00:34:39 +0000 (17:34 -0700)
commitaa61296c3095bf43baeef6cbd024796164154a69
tree5a93df26ea3ae0718404f0028792765f83908011
parent23015ff1a0f33a296572df0fc23baf97c1f7f86f
net: ethernet: ti: ale: switch to use tables for vlan entry description

The ALE VLAN entries are too much differ between different TI CPSW ALE
versions. So, handling them using flags, defines and get/set functions
became over-complicated.

This patch introduces tables to describe the ALE VLAN entries fields, which
are different between TI CPSW ALE versions, and new get/set access
functions. It also allows to detect incorrect access to not available ALL
entry fields.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw_ale.c
drivers/net/ethernet/ti/cpsw_ale.h