Hi Inaky,
Attached is a patch, for your review, to resolve an endian issue in
op-rfkill.c. On a big-endian machine the following is emitted by the driver:
i2400m_usb 2-1.3.1:1.0: HW BUG? Unknown RF SW state 0x2000000
i2400m_usb 2-1.3.1:1.0: HW BUG? Unknown RF HW state 0x2000000
sw_rf_switch/hw_rf_switch (struct i2400m_tlv_rf_switches_status) are define as
__u8 so the le32_to_cpu() call isn't needed. The patch works correctly on a
big-endian machine. I didn't test it on a little-endian machine 8(
Regards,
...doug
diff -uraN linux-2.6.36.orig/drivers/net/wimax/i2400m//op-rfkill.c linux-2.6.36/drivers/net/wimax/i2400m//op-rfkill.c
--- linux-2.6.36.orig/drivers/net/wimax/i2400m//op-rfkill.c 2010-10-20 15:30:22.000000000 -0500
+++ linux-2.6.36/drivers/net/wimax/i2400m//op-rfkill.c 2010-12-07 16:01:33.000000000 -0600
@@ -170,8 +170,8 @@
enum i2400m_rf_switch_status hw, sw;
enum wimax_st wimax_state;
- sw = le32_to_cpu(rfss->sw_rf_switch);
- hw = le32_to_cpu(rfss->hw_rf_switch);
+ sw = (enum i2400m_rf_switch_status)rfss->sw_rf_switch;
+ hw = (enum i2400m_rf_switch_status)rfss->hw_rf_switch;
d_fnstart(3, dev, "(i2400m %p rfss %p [hw %u sw %u])\n",
i2400m, rfss, hw, sw);
_______________________________________________
wimax mailing list
[email protected]
http://lists.linuxwimax.org/listinfo/wimax