rtw88: pci: define a mask for TX/RX BD indexes
authorYan-Hsuan Chuang <yhchuang@realtek.com>
Thu, 12 Mar 2020 08:08:51 +0000 (16:08 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 23 Mar 2020 17:29:50 +0000 (19:29 +0200)
commita5697a65ecd109ce7f8e3661b89a5dffae73b512
treeece088a5134528f8065a593830f6645d3f4545a4
parent895c096dab3603aa8cb9423e151874a91f0816bf
rtw88: pci: define a mask for TX/RX BD indexes

Add a macro TRX_BD_IDX_MASK for access the TX/RX BD indexes.

The hardware has only 12 bits for TX/RX BD indexes, we should not
initialize a TX/RX ring or access the TX/RX BD index with a length
that is larger than TRX_BD_IDX_MASK.

Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200312080852.16684-5-yhchuang@realtek.com
drivers/net/wireless/realtek/rtw88/pci.c
drivers/net/wireless/realtek/rtw88/pci.h