wifi: rtw88: Move enum rtw_tx_queue_type mapping code to tx.{c,h}
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sat, 4 Feb 2023 23:30:00 +0000 (00:30 +0100)
committerKalle Valo <kvalo@kernel.org>
Mon, 13 Feb 2023 15:15:46 +0000 (17:15 +0200)
commit7b6e9df91133e13ce7d980fcdb55cc7f26099106
tree69958b2722e8cb41f715aeef312168363f04c75d
parentc90897960c19f5bad59fcd391901ac1b7787c50b
wifi: rtw88: Move enum rtw_tx_queue_type mapping code to tx.{c,h}

This code is not specific to the PCIe bus type but can be re-used by USB
and SDIO bus types. Move it to tx.{c,h} to avoid code-duplication in the
future. While here, add checking of the ac argument in
rtw_tx_ac_to_hwq() so we're not accessing entries beyond the end of the
array.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230204233001.1511643-4-martin.blumenstingl@googlemail.com
drivers/net/wireless/realtek/rtw88/pci.c
drivers/net/wireless/realtek/rtw88/tx.c
drivers/net/wireless/realtek/rtw88/tx.h