diff options
author | Yan-Hsuan Chuang <yhchuang@realtek.com> | 2020-03-12 16:08:51 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-03-23 19:29:50 +0200 |
commit | a5697a65ecd109ce7f8e3661b89a5dffae73b512 (patch) | |
tree | ece088a5134528f8065a593830f6645d3f4545a4 /drivers/net/wireless/realtek/rtw88/pci.h | |
parent | 895c096dab3603aa8cb9423e151874a91f0816bf (diff) |
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
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/pci.h')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/pci.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/pci.h b/drivers/net/wireless/realtek/rtw88/pci.h index b60a359febe6..67b5e2fe2b62 100644 --- a/drivers/net/wireless/realtek/rtw88/pci.h +++ b/drivers/net/wireless/realtek/rtw88/pci.h @@ -52,6 +52,8 @@ #define RTK_PCI_TXBD_DESA_HI0Q 0x340 #define RTK_PCI_RXBD_DESA_MPDUQ 0x338 +#define TRX_BD_IDX_MASK GENMASK(11, 0) + /* BCNQ is specialized for rsvd page, does not need to specify a number */ #define RTK_PCI_TXBD_NUM_H2CQ 0x1328 #define RTK_PCI_TXBD_NUM_MGMTQ 0x380 |