[PATCH] i2400m: Endian Fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Doug Kehn <rdkehn at yahoo.com>
---
 drivers/net/wimax/i2400m/op-rfkill.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wimax/i2400m/op-rfkill.c b/drivers/net/wimax/i2400m/op-rfkill.c
index 9e02b90..232bd42 100644
--- a/drivers/net/wimax/i2400m/op-rfkill.c
+++ b/drivers/net/wimax/i2400m/op-rfkill.c
@@ -170,8 +170,8 @@ void i2400m_report_tlv_rf_switches_status(
 	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 = rfss->sw_rf_switch;
+	hw = rfss->hw_rf_switch;
 
 	d_fnstart(3, dev, "(i2400m %p rfss %p [hw %u sw %u])\n",
 		  i2400m, rfss, hw, sw);
-- 
1.7.1



      


[Index of Archives]     [Linux Kernel]     [Linux Wireless]     [Linux Bluetooth]     [Linux Netdev]     [Linux Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux