diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-05-25 23:38:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-06-11 14:28:45 -0400 |
commit | bb793e2bfc25b8891b84b8fe3cb4b77cd4619814 (patch) | |
tree | 87b0ebe1ed342a7ad4646d57010b2434c8f00f49 /drivers/net/wireless | |
parent | 981f187b7c4b237011d4175cae0120d5d203c0fd (diff) |
[PATCH] libertas: More endianness fixes.
Now it at least manages to load the firmware.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index b544fcdcd0e7..998317571ec2 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -313,7 +313,7 @@ static int if_prog_firmware(wlan_private * priv) | |||
313 | 313 | ||
314 | /* | 314 | /* |
315 | lbs_deb_usbd(&cardp->udev->dev, | 315 | lbs_deb_usbd(&cardp->udev->dev, |
316 | "Data length = %d\n", fwdata->fwheader.datalength); | 316 | "Data length = %d\n", le32_to_cpu(fwdata->fwheader.datalength)); |
317 | */ | 317 | */ |
318 | 318 | ||
319 | cardp->fwseqnum = cardp->fwseqnum + 1; | 319 | cardp->fwseqnum = cardp->fwseqnum + 1; |
@@ -332,7 +332,7 @@ static int if_prog_firmware(wlan_private * priv) | |||
332 | memcpy(cardp->bulk_out_buffer, fwheader, FW_DATA_XMIT_SIZE); | 332 | memcpy(cardp->bulk_out_buffer, fwheader, FW_DATA_XMIT_SIZE); |
333 | usb_tx_block(priv, cardp->bulk_out_buffer, FW_DATA_XMIT_SIZE); | 333 | usb_tx_block(priv, cardp->bulk_out_buffer, FW_DATA_XMIT_SIZE); |
334 | 334 | ||
335 | } else if (fwdata->fwheader.dnldcmd == FW_HAS_LAST_BLOCK) { | 335 | } else if (fwdata->fwheader.dnldcmd == cpu_to_le32(FW_HAS_LAST_BLOCK)) { |
336 | /* | 336 | /* |
337 | lbs_deb_usbd(&cardp->udev->dev, | 337 | lbs_deb_usbd(&cardp->udev->dev, |
338 | "Host has finished FW downloading\n"); | 338 | "Host has finished FW downloading\n"); |
diff --git a/drivers/net/wireless/libertas/if_usb.h b/drivers/net/wireless/libertas/if_usb.h index 3ed46a33fd21..156bb485e1a6 100644 --- a/drivers/net/wireless/libertas/if_usb.h +++ b/drivers/net/wireless/libertas/if_usb.h | |||
@@ -100,7 +100,7 @@ struct fwsyncheader { | |||
100 | #define FW_HAS_LAST_BLOCK 0x00000004 | 100 | #define FW_HAS_LAST_BLOCK 0x00000004 |
101 | 101 | ||
102 | #define FW_DATA_XMIT_SIZE \ | 102 | #define FW_DATA_XMIT_SIZE \ |
103 | sizeof(struct fwheader) + fwdata->fwheader.datalength + sizeof(u32) | 103 | sizeof(struct fwheader) + le32_to_cpu(fwdata->fwheader.datalength) + sizeof(u32) |
104 | 104 | ||
105 | int usb_tx_block(wlan_private *priv, u8 *payload, u16 nb); | 105 | int usb_tx_block(wlan_private *priv, u8 *payload, u16 nb); |
106 | void if_usb_free(struct usb_card_rec *cardp); | 106 | void if_usb_free(struct usb_card_rec *cardp); |