aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorLennart Sorensen <lsorense@csclub.uwaterloo.ca>2012-09-07 12:14:02 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-13 05:38:42 +0900
commit97d5d3295198279362552d9b810c088d3410da23 (patch)
tree0ec8aa26c632c5136937829cc33d337d418e01de /drivers/net
parent5ee708f19bd6a1da1d7bab5916382bbbfba4edbb (diff)
sierra_net: Endianess bug fix.
[ Upstream commit 2120c52da6fe741454a60644018ad2a6abd957ac ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-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 cc9776c2a39..8789bc58b17 100644
--- a/drivers/net/usb/sierra_net.c
+++ b/drivers/net/usb/sierra_net.c
@@ -678,7 +678,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;