summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7996
diff options
context:
space:
mode:
authorRyder Lee <ryder.lee@mediatek.com>2022-12-03 11:22:25 +0800
committerFelix Fietkau <nbd@nbd.name>2022-12-09 16:45:38 +0100
commitaab169ad3a7aa8678aed90d7fdbc243e3d4b32a6 (patch)
treefc4601f59f432b5ab0aaef8b7214121e0d9848b7 /drivers/net/wireless/mediatek/mt76/mt7996
parentf37c6e5c75029443bc72c45acf92b2f2de2945be (diff)
downloadlinux-stable-aab169ad3a7aa8678aed90d7fdbc243e3d4b32a6.tar.gz
linux-stable-aab169ad3a7aa8678aed90d7fdbc243e3d4b32a6.tar.bz2
linux-stable-aab169ad3a7aa8678aed90d7fdbc243e3d4b32a6.zip
wifi: mt76: mt7996: fix integer handling issue of mt7996_rf_regval_set()
This code is supposed to set a u32 value, but casting will not work on big endian systems. Reported-by: coverity-bot <keescook+coverity-bot@chromium.org> Addresses-Coverity-ID: 1527816 ("Integer handling issues") Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") 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/mt7996')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
index 2e4a8909b9e8..99b23aef53a5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
@@ -653,8 +653,9 @@ static int
mt7996_rf_regval_set(void *data, u64 val)
{
struct mt7996_dev *dev = data;
+ u32 val32 = val;
- return mt7996_mcu_rf_regval(dev, dev->mt76.debugfs_reg, (u32 *)&val, true);
+ return mt7996_mcu_rf_regval(dev, dev->mt76.debugfs_reg, &val32, true);
}
DEFINE_DEBUGFS_ATTRIBUTE(fops_rf_regval, mt7996_rf_regval_get,