mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02: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: 0a17329ae9 ("mt76: mt7915: add debugfs knob for RF registers read/write")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
cffd934115
commit
f572dc969a
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user