aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-18 05:39:39 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-18 05:39:39 -0400
commit49997d75152b3d23c53b0fa730599f2f74c92c65 (patch)
tree46e93126170d02cfec9505172e545732c1b69656 /drivers/net/wireless/libertas
parenta0c80b80e0fb48129e4e9d6a9ede914f9ff1850d (diff)
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: Documentation/powerpc/booting-without-of.txt drivers/atm/Makefile drivers/net/fs_enet/fs_enet-main.c drivers/pci/pci-acpi.c net/8021q/vlan.c net/iucv/iucv.c
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r--drivers/net/wireless/libertas/if_cs.c2
-rw-r--r--drivers/net/wireless/libertas/if_sdio.c24
-rw-r--r--drivers/net/wireless/libertas/if_usb.c4
3 files changed, 12 insertions, 18 deletions
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index cc70d53fadd3..04d7a251e3f0 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -122,7 +122,7 @@ static inline void if_cs_write16(struct if_cs_card *card, uint reg, u16 val)
122static inline void if_cs_write16_rep( 122static inline void if_cs_write16_rep(
123 struct if_cs_card *card, 123 struct if_cs_card *card,
124 uint reg, 124 uint reg,
125 void *buf, 125 const void *buf,
126 unsigned long count) 126 unsigned long count)
127{ 127{
128 if (debug_output) 128 if (debug_output)
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index 51f664bbee9d..b54e2ea8346b 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/drivers/net/wireless/libertas/if_sdio.c 2 * linux/drivers/net/wireless/libertas/if_sdio.c
3 * 3 *
4 * Copyright 2007 Pierre Ossman 4 * Copyright 2007-2008 Pierre Ossman
5 * 5 *
6 * Inspired by if_cs.c, Copyright 2007 Holger Schurig 6 * Inspired by if_cs.c, Copyright 2007 Holger Schurig
7 * 7 *
@@ -266,13 +266,10 @@ static int if_sdio_card_to_host(struct if_sdio_card *card)
266 266
267 /* 267 /*
268 * The transfer must be in one transaction or the firmware 268 * The transfer must be in one transaction or the firmware
269 * goes suicidal. 269 * goes suicidal. There's no way to guarantee that for all
270 * controllers, but we can at least try.
270 */ 271 */
271 chunk = size; 272 chunk = sdio_align_size(card->func, size);
272 if ((chunk > card->func->cur_blksize) || (chunk > 512)) {
273 chunk = (chunk + card->func->cur_blksize - 1) /
274 card->func->cur_blksize * card->func->cur_blksize;
275 }
276 273
277 ret = sdio_readsb(card->func, card->buffer, card->ioport, chunk); 274 ret = sdio_readsb(card->func, card->buffer, card->ioport, chunk);
278 if (ret) 275 if (ret)
@@ -392,7 +389,7 @@ static int if_sdio_prog_helper(struct if_sdio_card *card)
392 unsigned long timeout; 389 unsigned long timeout;
393 u8 *chunk_buffer; 390 u8 *chunk_buffer;
394 u32 chunk_size; 391 u32 chunk_size;
395 u8 *firmware; 392 const u8 *firmware;
396 size_t size; 393 size_t size;
397 394
398 lbs_deb_enter(LBS_DEB_SDIO); 395 lbs_deb_enter(LBS_DEB_SDIO);
@@ -508,7 +505,7 @@ static int if_sdio_prog_real(struct if_sdio_card *card)
508 unsigned long timeout; 505 unsigned long timeout;
509 u8 *chunk_buffer; 506 u8 *chunk_buffer;
510 u32 chunk_size; 507 u32 chunk_size;
511 u8 *firmware; 508 const u8 *firmware;
512 size_t size, req_size; 509 size_t size, req_size;
513 510
514 lbs_deb_enter(LBS_DEB_SDIO); 511 lbs_deb_enter(LBS_DEB_SDIO);
@@ -696,13 +693,10 @@ static int if_sdio_host_to_card(struct lbs_private *priv,
696 693
697 /* 694 /*
698 * The transfer must be in one transaction or the firmware 695 * The transfer must be in one transaction or the firmware
699 * goes suicidal. 696 * goes suicidal. There's no way to guarantee that for all
697 * controllers, but we can at least try.
700 */ 698 */
701 size = nb + 4; 699 size = sdio_align_size(card->func, nb + 4);
702 if ((size > card->func->cur_blksize) || (size > 512)) {
703 size = (size + card->func->cur_blksize - 1) /
704 card->func->cur_blksize * card->func->cur_blksize;
705 }
706 700
707 packet = kzalloc(sizeof(struct if_sdio_packet) + size, 701 packet = kzalloc(sizeof(struct if_sdio_packet) + size,
708 GFP_ATOMIC); 702 GFP_ATOMIC);
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index a8b4abce5bfa..632c291404ab 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -310,7 +310,7 @@ static void if_usb_disconnect(struct usb_interface *intf)
310static int if_usb_send_fw_pkt(struct if_usb_card *cardp) 310static int if_usb_send_fw_pkt(struct if_usb_card *cardp)
311{ 311{
312 struct fwdata *fwdata = cardp->ep_out_buf; 312 struct fwdata *fwdata = cardp->ep_out_buf;
313 uint8_t *firmware = cardp->fw->data; 313 const uint8_t *firmware = cardp->fw->data;
314 314
315 /* If we got a CRC failure on the last block, back 315 /* If we got a CRC failure on the last block, back
316 up and retry it */ 316 up and retry it */
@@ -768,7 +768,7 @@ static int if_usb_issue_boot_command(struct if_usb_card *cardp, int ivalue)
768 * len image length 768 * len image length
769 * @return 0 or -1 769 * @return 0 or -1
770 */ 770 */
771static int check_fwfile_format(uint8_t *data, uint32_t totlen) 771static int check_fwfile_format(const uint8_t *data, uint32_t totlen)
772{ 772{
773 uint32_t bincmd, exit; 773 uint32_t bincmd, exit;
774 uint32_t blksize, offset, len; 774 uint32_t blksize, offset, len;