mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7915: fix endian bug in mt7915_rf_regval_set()
This code is supposed to set a u32 value, but casting will not work on
big endian systems.
Fixes: 0a17329ae9c1 ("mt76: mt7915: add debugfs knob for RF registers read/write")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
0742eaeafe
commit
d299ad96d8
+2
-1
@@ -985,8 +985,9 @@ static int
|
||||
mt7915_rf_regval_set(void *data, u64 val)
|
||||
{
|
||||
struct mt7915_dev *dev = data;
|
||||
u32 val32 = val;
|
||||
|
||||
return mt7915_mcu_rf_regval(dev, dev->mt76.debugfs_reg, (u32 *)&val, true);
|
||||
return mt7915_mcu_rf_regval(dev, dev->mt76.debugfs_reg, &val32, true);
|
||||
}
|
||||
|
||||
DEFINE_DEBUGFS_ATTRIBUTE(fops_rf_regval, mt7915_rf_regval_get,
|
||||
|
||||
Reference in New Issue
Block a user