staging: fsl-dpaa2/ethsw: Fix tag control information value overwrite
authorRazvan Stefanescu <razvan.stefanescu@nxp.com>
Wed, 28 Mar 2018 10:50:20 +0000 (05:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 08:49:14 +0000 (10:49 +0200)
commit593c9c7c90c9a8298ab09053f1598b1b1211e8e5
tree7db97946199dbeb1fe5e8a476ec540a9772ba93a
parent1494cb32bc736989d968e8622a2a54674bbff863
staging: fsl-dpaa2/ethsw: Fix tag control information value overwrite

The tag control information (TCI) part of the VLAN header contains several
fields, including PCP (priority code point) and PVID (port VLAN id).

Current implementation uses function ethsw_port_set_tci() to set the PVID
value and mistakenly overwrites the rest of the TCI fields with 0,
including PCP which by default has a value of 7.

Fix this by adding support to retrieve TCI set in hardware. Read existing
value and only updated the PVID fields, leaving others unchanged.

Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h
drivers/staging/fsl-dpaa2/ethsw/dpsw.c
drivers/staging/fsl-dpaa2/ethsw/dpsw.h
drivers/staging/fsl-dpaa2/ethsw/ethsw.c