rt2x00: Fix efuse EEPROM reading on PPC32.
PATCH 1/1 rt2x00: Fix efuse EEPROM reading on PPC32.
Fix __le32 to __le16 conversion of the first word of an 8-word block of EEPROM read via the efuse method.
Reported-and-tested-by Ingvar Hagelund <[email protected]>
Signed-off-by Gertjan van Wingerde <[email protected]>
CC <[email protected]>
--- drivers/net/wireless/rt2x00/rt2800lib.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/rt2x00/rt2800lib.c +1 -1
@@ -3771,7 +3771,7 @@ static void rt2800_efuse_read(struct rt2x00_dev *rt2x00dev, unsigned int i)/* Apparently the data is read from end to start */ rt2800_register_read_lock (rt2x00dev,EFUSE_DATA3 , ®);/* The returned value is in CPU order, but eeprom is le */ - rt2x00dev->eeprom[i] =cpu_to_le32 (reg); + *(u32 *)&rt2x00dev->eeprom[i] =cpu_to_le32 (reg);rt2800_register_read_lock (rt2x00dev,EFUSE_DATA2 , ®); *(u32 *)&rt2x00dev->eeprom[i +2 ] =cpu_to_le32 (reg);rt2800_register_read_lock (rt2x00dev,EFUSE_DATA1 , ®);
Signature · 1 line
1.7.7
Quoted 6 lines · Gertjan van Wingerde
Fix
__le32to__le16conversion of the first word of an 8-word block of EEPROM read via the efuse method.Reported-and-tested-by Ingvar Hagelund <[email protected]>Signed-off-by Gertjan van Wingerde <[email protected]>CC <[email protected]>
Nice catch!
Acked-by Helmut Schaa <[email protected]>
Quoted 6 lines · Gertjan van Wingerde
Fix
__le32to__le16conversion of the first word of an 8-word block of EEPROM read via the efuse method.Reported-and-tested-by Ingvar Hagelund <[email protected]>Signed-off-by Gertjan van Wingerde <[email protected]>CC <[email protected]>
Acked-by Ivo van Doorn <[email protected]>
Quoted 25 lines
---
drivers/net/wireless/rt2x00/rt2800lib.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/wireless/rt2x00/rt2800lib.c +1
-2@@ -3771,7 +3771,7 @@ static void rt2800_efuse_read(struct rt2x00_dev *rt2x00dev, unsigned int i) /* Apparently the data is read from end to start */ rt2800_register_read_lock(rt2x00dev, EFUSE_DATA3, ®); /* The returned value is in CPU order, but eeprom is le */ - rt2x00dev->eeprom[i] = cpu_to_le32(reg); + *(u32 *)&rt2x00dev->eeprom[i] = cpu_to_le32(reg); rt2800_register_read_lock(rt2x00dev, EFUSE_DATA2, ®); *(u32 *)&rt2x00dev->eeprom[i + 2] = cpu_to_le32(reg); rt2800_register_read_lock(rt2x00dev, EFUSE_DATA1, ®); --1.7.7
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html