Skip to content

Commit

Permalink
[PATCH] libertas: More endianness fixes.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Woodhouse authored and John W. Linville committed Jun 11, 2007
1 parent 981f187 commit bb793e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/libertas/if_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ static int if_prog_firmware(wlan_private * priv)

/*
lbs_deb_usbd(&cardp->udev->dev,
"Data length = %d\n", fwdata->fwheader.datalength);
"Data length = %d\n", le32_to_cpu(fwdata->fwheader.datalength));
*/

cardp->fwseqnum = cardp->fwseqnum + 1;
Expand All @@ -332,7 +332,7 @@ static int if_prog_firmware(wlan_private * priv)
memcpy(cardp->bulk_out_buffer, fwheader, FW_DATA_XMIT_SIZE);
usb_tx_block(priv, cardp->bulk_out_buffer, FW_DATA_XMIT_SIZE);

} else if (fwdata->fwheader.dnldcmd == FW_HAS_LAST_BLOCK) {
} else if (fwdata->fwheader.dnldcmd == cpu_to_le32(FW_HAS_LAST_BLOCK)) {
/*
lbs_deb_usbd(&cardp->udev->dev,
"Host has finished FW downloading\n");
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/libertas/if_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ struct fwsyncheader {
#define FW_HAS_LAST_BLOCK 0x00000004

#define FW_DATA_XMIT_SIZE \
sizeof(struct fwheader) + fwdata->fwheader.datalength + sizeof(u32)
sizeof(struct fwheader) + le32_to_cpu(fwdata->fwheader.datalength) + sizeof(u32)

int usb_tx_block(wlan_private *priv, u8 *payload, u16 nb);
void if_usb_free(struct usb_card_rec *cardp);
Expand Down

0 comments on commit bb793e2

Please sign in to comment.