summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/sdio_txrx.c
diff options
context:
space:
mode:
authorRyder Lee <ryder.lee@mediatek.com>2022-03-09 07:29:24 +0100
committerFelix Fietkau <nbd@nbd.name>2022-03-16 17:40:22 +0100
commitf1fe8eefd2dd383beaf1748d8246a421c43865c5 (patch)
tree4f49392d8f1df8179356d5dcc193020b45fc14e5 /drivers/net/wireless/mediatek/mt76/sdio_txrx.c
parentmt76: connac: make read-only array ba_range static const (diff)
downloadlinux-f1fe8eefd2dd383beaf1748d8246a421c43865c5.tar.xz
linux-f1fe8eefd2dd383beaf1748d8246a421c43865c5.zip
mt76: use le32/16_get_bits() whenever possible
Switch to use le32/16_get_bits() to simplfy codes and specify the size explicitly to avoid potential issues. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/sdio_txrx.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/sdio_txrx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/sdio_txrx.c b/drivers/net/wireless/mediatek/mt76/sdio_txrx.c
index 9fcf507e09bd..a2601aa9e7b1 100644
--- a/drivers/net/wireless/mediatek/mt76/sdio_txrx.c
+++ b/drivers/net/wireless/mediatek/mt76/sdio_txrx.c
@@ -118,7 +118,7 @@ mt76s_rx_run_queue(struct mt76_dev *dev, enum mt76_rxq_id qid,
__le32 *rxd = (__le32 *)buf;
/* parse rxd to get the actual packet length */
- len = FIELD_GET(GENMASK(15, 0), le32_to_cpu(rxd[0]));
+ len = le32_get_bits(rxd[0], GENMASK(15, 0));
e->skb = mt76s_build_rx_skb(buf, len, round_up(len + 4, 4));
if (!e->skb)
break;