mirror of
https://github.com/torvalds/linux.git
synced 2025-11-12 06:29:40 +02:00
When using sub-VLANs in the range of 1-7, the resulting value from:
rx_vid = dsa_8021q_rx_vid_subvlan(ds, port, subvlan);
is wrong according to the description from tag_8021q.c:
| 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
+-----------+-----+-----------------+-----------+-----------------------+
| DIR | SVL | SWITCH_ID | SUBVLAN | PORT |
+-----------+-----+-----------------+-----------+-----------------------+
For example, when ds->index == 0, port == 3 and subvlan == 1,
dsa_8021q_rx_vid_subvlan() returns 1027, same as it returns for
subvlan == 0, but it should have returned 1043.
This is because the low portion of the subvlan bits are not masked
properly when writing into the 12-bit VLAN value. They are masked into
bits 4:3, but they should be masked into bits 5:4.
Fixes:
|
||
|---|---|---|
| .. | ||
| dsa.c | ||
| dsa2.c | ||
| dsa_priv.h | ||
| Kconfig | ||
| Makefile | ||
| master.c | ||
| port.c | ||
| slave.c | ||
| switch.c | ||
| tag_8021q.c | ||
| tag_ar9331.c | ||
| tag_brcm.c | ||
| tag_dsa.c | ||
| tag_gswip.c | ||
| tag_hellcreek.c | ||
| tag_ksz.c | ||
| tag_lan9303.c | ||
| tag_mtk.c | ||
| tag_ocelot.c | ||
| tag_ocelot_8021q.c | ||
| tag_qca.c | ||
| tag_rtl4_a.c | ||
| tag_sja1105.c | ||
| tag_trailer.c | ||
| tag_xrs700x.c | ||