wifi: rtw89: add getting function of DMA channel v1

The coming RTL8922DE uses new mapping of DMA channel. Add it accordingly.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250826085424.28713-1-pkshih@realtek.com
This commit is contained in:
Ping-Ke Shih 2025-08-26 16:54:24 +08:00
parent 571ce803c2
commit e83a2a996b
2 changed files with 23 additions and 0 deletions

View File

@ -737,6 +737,28 @@ u8 rtw89_core_get_ch_dma(struct rtw89_dev *rtwdev, u8 qsel)
}
EXPORT_SYMBOL(rtw89_core_get_ch_dma);
u8 rtw89_core_get_ch_dma_v1(struct rtw89_dev *rtwdev, u8 qsel)
{
switch (qsel) {
default:
rtw89_warn(rtwdev, "Cannot map qsel to dma v1: %d\n", qsel);
fallthrough;
case RTW89_TX_QSEL_BE_0:
case RTW89_TX_QSEL_BK_0:
return RTW89_TXCH_ACH0;
case RTW89_TX_QSEL_VI_0:
case RTW89_TX_QSEL_VO_0:
return RTW89_TXCH_ACH2;
case RTW89_TX_QSEL_B0_MGMT:
case RTW89_TX_QSEL_B0_HI:
return RTW89_TXCH_CH8;
case RTW89_TX_QSEL_B1_MGMT:
case RTW89_TX_QSEL_B1_HI:
return RTW89_TXCH_CH10;
}
}
EXPORT_SYMBOL(rtw89_core_get_ch_dma_v1);
static void
rtw89_core_tx_update_mgmt_info(struct rtw89_dev *rtwdev,
struct rtw89_core_tx_request *tx_req)

View File

@ -7451,6 +7451,7 @@ void rtw89_core_fill_txdesc_fwcmd_v2(struct rtw89_dev *rtwdev,
struct rtw89_tx_desc_info *desc_info,
void *txdesc);
u8 rtw89_core_get_ch_dma(struct rtw89_dev *rtwdev, u8 qsel);
u8 rtw89_core_get_ch_dma_v1(struct rtw89_dev *rtwdev, u8 qsel);
void rtw89_core_rx(struct rtw89_dev *rtwdev,
struct rtw89_rx_desc_info *desc_info,
struct sk_buff *skb);