net: dsa: realtek: rtl8365mb: fix trap_door > 7
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Fri, 28 Jan 2022 06:05:09 +0000 (03:05 -0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jan 2022 15:02:50 +0000 (15:02 +0000)
commit078ae1bdd32d4e6d1c6b599f4dc7e5d839084587
tree3f60a1405955fed135e8f973ae89c16bf86ab79f
parent6147631c079f6d8e45feaf6eacd8da728804922e
net: dsa: realtek: rtl8365mb: fix trap_door > 7

Trap door number is a 4-bit number divided in two regions (3 and 1-bit).
Both values were not masked properly. This bug does not affect supported
devices as they use up to port 7 (ext2). It would only be a problem if
the driver becomes compatible with 10-port switches like RTL8370MB and
RTL8310SR.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/realtek/rtl8365mb.c