Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtw88: pci: check if queue mapping exceeds size of ac_to_hwq

Dump warning messages when we get a q_mapping larger than the AC
numbers. And pick BE queue as default.

Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

Yan-Hsuan Chuang and committed by
Kalle Valo
0d788295 82dea406

+2
+2
drivers/net/wireless/realtek/rtw88/pci.c
··· 504 504 queue = RTW_TX_QUEUE_BCN; 505 505 else if (unlikely(ieee80211_is_mgmt(fc) || ieee80211_is_ctl(fc))) 506 506 queue = RTW_TX_QUEUE_MGMT; 507 + else if (WARN_ON_ONCE(q_mapping >= ARRAY_SIZE(ac_to_hwq))) 508 + queue = ac_to_hwq[IEEE80211_AC_BE]; 507 509 else 508 510 queue = ac_to_hwq[q_mapping]; 509 511