Skip to content

Commit

Permalink
sierra_net: Endianess bug fix.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lennart Sorensen authored and David S. Miller committed Sep 10, 2012
1 parent 6862234 commit 2120c52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/sierra_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2120c52

Please sign in to comment.