openwrt/target/linux/realtek
Sander Vanheule f8a44c22d4 realtek: correct egress frame priority assignment
Priority values passed to the egress (TX) frame header initialiser are
invalid when smaller than 0, and should not be assigned to the frame.
Queue assignment is then left to the switch core logic.

Current code for RTL83xx forces the passed priority value to be
positive, by always masking it to the lower bits, resulting in the
priority always being set and enabled. RTL93xx code doesn't even check
the value and unconditionally assigns the (32 bit) value to the (5 bit)
QID field without masking.

Fix priority assignment by only setting the AS_QID/AS_PRI flag when a
valid value is passed, and properly mask the value to not overflow the
QID/PRI field.

For RTL839x, also assign the priority to the right part of the frame
header. Counting from the leftmost bit, AS_PRI and PRI are in bits 36
and 37-39. The means they should be assigned to the third 16 bit value,
containing bits 32-47.

Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 0b35a08a05)
2022-07-21 20:59:51 +02:00
..
base-files realtek: add ZyXEL GS1900-24HP v1 support 2022-04-19 21:45:46 +02:00
dts-5.10 realtek: rename u-boot-env2 to board-name 2022-07-08 22:09:52 -03:00
files/firmware/rtl838x_phy
files-5.10 realtek: correct egress frame priority assignment 2022-07-21 20:59:51 +02:00
image realtek: build sane factory images for DGS-1210 models 2022-07-08 22:10:16 -03:00
patches-5.10 kernel: Refresh patches for all targets 2022-07-03 18:54:04 +02:00
profiles target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
rtl838x generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
rtl839x generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
rtl930x generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
rtl931x generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
Makefile realtek: Fix tc default package 2022-03-29 14:28:21 +02:00