On 09/08/2011 12:34 AM, Semigod King wrote:
Greetings,
I would like to report a bug to you. The same problem was reported to
OpenWRT developers. But, they suggest me report it to linux wireless.
I do see a problem. Looking at one piece of your patch, we see
- rt2800_register_read_lock(rt2x00dev, EFUSE_DATA3,
- (u32 *)&rt2x00dev->eeprom[i]);
+ rt2800_register_read_lock(rt2x00dev, EFUSE_DATA3, ®);
+ *(u32 *)&rt2x00dev->eeprom[i] = le32_to_cpu(reg);
The last statement of rt2800_register_read_lock() does an le32_to_cpu()
conversion of the output value (3rd argument), but rt2x00dev->eeprom is le16,
which is why a double conversion le32 => be32 => le32 is needed. Your second
line should be
*(u32 *)&rt2x00dev->eeprom[i] = cpu_to_le32(reg);
That does the same thing, but makes it clearer what is happening.
I am having to rebuild the Ubuntu system on my Mac, which will take a while.
When that is done, I will be able to test.
Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html