ipq40xx: net/ipqess: fix outbound port tag computation
authorMatthias Schiffer <mschiffer@universe-factory.net>
Wed, 19 Jun 2024 23:05:51 +0000 (01:05 +0200)
committerRobert Marko <robimarko@gmail.com>
Thu, 20 Jun 2024 08:52:26 +0000 (10:52 +0200)
commit0b6b54eca939a2cb757f854594863548fb93f21f
treef43e46354555bffba9c659dba90a561bcda98efd
parentb004feaafbb9fef8964ccaacfd6cd17f2c6e330a
ipq40xx: net/ipqess: fix outbound port tag computation

Since the introduction of out-of-band tagging, writing the outbound tag
had been completely broken: First, in place of a port mask containing
the port number, just the port number itself was set in the register
value. Just after that, the full port mask 0x3e (all 5 external ports)
was set unconditionally.

This remained unnoticed because the switch would then use the FDB to
decide where to send unicast packets; broadcast and multicast packets
were however sent to every port.

Fix the port tag computation and only use the full port mask as a
fallback for non-DSA mode, as it was done in the older driver patches
used on Linux 5.15.

Fixes: cd9c7211241e ("ipq40xx: 6.1: use latest DSA and ethernet patches")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/ipq40xx/patches-6.6/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch
target/linux/ipq40xx/patches-6.6/704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch