summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtw88/rtw8723d.c
diff options
context:
space:
mode:
authorPo-Hao Huang <phhuang@realtek.com>2023-06-16 20:55:35 +0800
committerKalle Valo <kvalo@kernel.org>2023-06-21 12:41:44 +0300
commit88b9d8e6cf9cf89be50ca2ee6cb9b3180b432172 (patch)
treef9e90de6b884f060502369dc198d60e66734b689 /drivers/net/wireless/realtek/rtw88/rtw8723d.c
parent67d7f24b194e6e8e82540aa4fe97580f6cfa0902 (diff)
wifi: rtw88: use struct instead of macros to set TX desc
Remove macros that set TX descriptors. Use struct and le32_encode_bits() with mask definitions. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230616125540.36877-2-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/rtw8723d.c')
-rw-r--r--drivers/net/wireless/realtek/rtw88/rtw8723d.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723d.c b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
index cadf66f4e854..c575476a0020 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
@@ -1970,15 +1970,17 @@ static void rtw8723d_fill_txdesc_checksum(struct rtw_dev *rtwdev,
size_t words = 32 / 2; /* calculate the first 32 bytes (16 words) */
__le16 chksum = 0;
__le16 *data = (__le16 *)(txdesc);
+ struct rtw_tx_desc *tx_desc = (struct rtw_tx_desc *)txdesc;
- SET_TX_DESC_TXDESC_CHECKSUM(txdesc, 0x0000);
+ le32p_replace_bits(&tx_desc->w7, 0, RTW_TX_DESC_W7_TXDESC_CHECKSUM);
while (words--)
chksum ^= *data++;
chksum = ~chksum;
- SET_TX_DESC_TXDESC_CHECKSUM(txdesc, __le16_to_cpu(chksum));
+ le32p_replace_bits(&tx_desc->w7, __le16_to_cpu(chksum),
+ RTW_TX_DESC_W7_TXDESC_CHECKSUM);
}
static struct rtw_chip_ops rtw8723d_ops = {