summaryrefslogtreecommitdiff
path: root/drivers/staging/fsl-dpaa2/ethsw/dpsw.h
diff options
context:
space:
mode:
authorRazvan Stefanescu <razvan.stefanescu@nxp.com>2018-03-28 05:50:20 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-23 10:49:14 +0200
commit593c9c7c90c9a8298ab09053f1598b1b1211e8e5 (patch)
tree7db97946199dbeb1fe5e8a476ec540a9772ba93a /drivers/staging/fsl-dpaa2/ethsw/dpsw.h
parent1494cb32bc736989d968e8622a2a54674bbff863 (diff)
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>
Diffstat (limited to 'drivers/staging/fsl-dpaa2/ethsw/dpsw.h')
-rw-r--r--drivers/staging/fsl-dpaa2/ethsw/dpsw.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethsw/dpsw.h b/drivers/staging/fsl-dpaa2/ethsw/dpsw.h
index 3335adde0193..82f80c409ec3 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/dpsw.h
+++ b/drivers/staging/fsl-dpaa2/ethsw/dpsw.h
@@ -306,6 +306,12 @@ int dpsw_if_set_tci(struct fsl_mc_io *mc_io,
u16 if_id,
const struct dpsw_tci_cfg *cfg);
+int dpsw_if_get_tci(struct fsl_mc_io *mc_io,
+ u32 cmd_flags,
+ u16 token,
+ u16 if_id,
+ struct dpsw_tci_cfg *cfg);
+
/**
* enum dpsw_stp_state - Spanning Tree Protocol (STP) states
* @DPSW_STP_STATE_BLOCKING: Blocking state