net: dsa: felix: convert TAS link speed based on phylink speed
authorXiaoliang Yang <xiaoliang.yang_1@nxp.com>
Thu, 24 Sep 2020 01:57:46 +0000 (09:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Sep 2020 03:00:40 +0000 (20:00 -0700)
commitdba1e4660a87927bdc03c23e36fd2c81a16a7ab1
tree030378c845d0ffe34607b8bb66d290c2c64c1af8
parentf68910a8056f9451ee9fe7e1b962f7d90d326ad3
net: dsa: felix: convert TAS link speed based on phylink speed

state->speed holds a value of 10, 100, 1000 or 2500, but
QSYS_TAG_CONFIG_LINK_SPEED expects a value of 0, 1, 2, 3. So convert the
speed to a proper value.

Fixes: de143c0e274b ("net: dsa: felix: Configure Time-Aware Scheduler via taprio offload")
Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix_vsc9959.c