summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/sierra_net.c
diff options
context:
space:
mode:
authorLennart Sorensen <lsorense@csclub.uwaterloo.ca>2012-09-07 14:14:02 +0200
committerDavid S. Miller <davem@davemloft.net>2012-09-10 21:05:42 +0200
commit2120c52da6fe741454a60644018ad2a6abd957ac (patch)
treeae4f3b8efc72c176e597b5d1cf4a09869e90cf7e /drivers/net/usb/sierra_net.c
parentnet: small bug on rxhash calculation (diff)
downloadlinux-2120c52da6fe741454a60644018ad2a6abd957ac.tar.xz
linux-2120c52da6fe741454a60644018ad2a6abd957ac.zip
sierra_net: Endianess bug fix.
I discovered I couldn't get sierra_net to work on a powerpc. Turns out the firmware attribute check assumes the system is little endian and hence fails because the attributes is a 16 bit value. Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/sierra_net.c')
-rw-r--r--drivers/net/usb/sierra_net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c
index 7be49ea60b6d..8e22417fa6c1 100644
--- a/drivers/net/usb/sierra_net.c
+++ b/drivers/net/usb/sierra_net.c
@@ -656,7 +656,7 @@ static int sierra_net_get_fw_attr(struct usbnet *dev, u16 *datap)
return -EIO;
}
- *datap = *attrdata;
+ *datap = le16_to_cpu(*attrdata);
kfree(attrdata);
return result;