]> git.karo-electronics.de Git - linux-beck.git/commitdiff
libertas: Fix endianness in boot2_version handling.
authorDavid Woodhouse <dwmw2@infradead.org>
Fri, 7 Dec 2007 12:56:45 +0000 (12:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:06:10 +0000 (15:06 -0800)
We read it from the card. We byte-swap it. We write it back to the card.
D'oh.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/if_usb.c

index 4d89fd0f53ea0e13b065b46d2de8c9e5ff37c86f..d5fc7d7ed53714186a1b79ea9f7eeabafb55b206 100644 (file)
@@ -227,7 +227,7 @@ static int if_usb_probe(struct usb_interface *intf,
        priv->hw_host_to_card = if_usb_host_to_card;
        priv->hw_get_int_status = if_usb_get_int_status;
        priv->hw_read_event_cause = if_usb_read_event_cause;
-       priv->boot2_version = udev->descriptor.bcdDevice;
+       priv->boot2_version = le16_to_cpu(udev->descriptor.bcdDevice);
 
        /* Delay 200 ms to waiting for the FW ready */
        if_usb_submit_rx_urb(cardp);