]> git.ipfire.org Git - thirdparty/linux.git/commit
net: airoha: Fix off-by-one in airoha_tc_remove_htb_queue()
authorLorenzo Bianconi <lorenzo@kernel.org>
Fri, 19 Jun 2026 11:37:13 +0000 (13:37 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 25 Jun 2026 00:44:42 +0000 (17:44 -0700)
commitbfcce49c4aaab9339ef7b9a7fa4d8ac5a19cc820
tree4c80e746879e8d640d77471387515cdcb227cea9
parentd87363b0edfc7504ff2b144fe4cdd8154f90f42e
net: airoha: Fix off-by-one in airoha_tc_remove_htb_queue()

airoha_tc_htb_alloc_leaf_queue() computes the HTB QoS channel index
as opt->classid % AIROHA_NUM_QOS_CHANNELS and stores it in qos_sq_bmap.
However, airoha_tc_remove_htb_queue() clears the HTB configuration
using queue + 1 as the channel index, causing an off-by-one error.
Use queue directly as the QoS channel index to match the allocation
logic.

Fixes: ef1ca9271313b ("net: airoha: Add sched HTB offload support")
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20260619-airoha-qos-fixes-v2-1-5c43485038f9@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/airoha/airoha_eth.c