diff options
author | Jonathan McDowell <noodles@earth.li> | 2020-08-01 18:05:54 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-03 15:45:39 -0700 |
commit | e9d204fde5fd7d8ca1d6490d1b5c3d8d963bcd1a (patch) | |
tree | 6bb6bbd78e2e7d32562adb38ba1aecf3f117334f /drivers/net/dsa/qca8k.h | |
parent | ac6d1835ca964b053f051ecedd44ecb3de0f1b33 (diff) |
net: dsa: qca8k: Add define for port VID
Rather than using a magic value of 1 when configuring the port VIDs add
a QCA8K_PORT_VID_DEF define and use that instead. Also fix up the
bitmask in the process; the top 4 bits are reserved so this wasn't a
problem, but only masking 12 bits is the correct approach.
Signed-off-by: Jonathan McDowell <noodles@earth.li>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/qca8k.h')
-rw-r--r-- | drivers/net/dsa/qca8k.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h index 31439396401c..92216a52daa5 100644 --- a/drivers/net/dsa/qca8k.h +++ b/drivers/net/dsa/qca8k.h @@ -22,6 +22,8 @@ #define QCA8K_CPU_PORT 0 +#define QCA8K_PORT_VID_DEF 1 + /* Global control registers */ #define QCA8K_REG_MASK_CTRL 0x000 #define QCA8K_MASK_CTRL_ID_M 0xff |