aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorThomas Klute <thomas2.klute@uni-dortmund.de>2010-07-31 06:01:45 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-16 15:26:37 -0400
commit139455c3912bfed4bd42824d59c82113cc667f91 (patch)
treeeb134bccb1212766077c432358b73dadeac1ff4f /drivers/net/wireless
parent422f8d19d68d0530dfd37be97bac431ca7435e69 (diff)
libertas_tf: if_usb.c: Some more formatting fixes
Split some long lines to make checkpatch.pl happy. ;-) Signed-off-by: Thomas Klute <thomas2.klute@uni-dortmund.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/libertas_tf/if_usb.c49
1 files changed, 31 insertions, 18 deletions
diff --git a/drivers/net/wireless/libertas_tf/if_usb.c b/drivers/net/wireless/libertas_tf/if_usb.c
index f93260b67fcf..1cf01acef5f0 100644
--- a/drivers/net/wireless/libertas_tf/if_usb.c
+++ b/drivers/net/wireless/libertas_tf/if_usb.c
@@ -178,14 +178,17 @@ static int if_usb_probe(struct usb_interface *intf,
178 le16_to_cpu(endpoint->wMaxPacketSize); 178 le16_to_cpu(endpoint->wMaxPacketSize);
179 cardp->ep_in = usb_endpoint_num(endpoint); 179 cardp->ep_in = usb_endpoint_num(endpoint);
180 180
181 lbtf_deb_usbd(&udev->dev, "in_endpoint = %d\n", cardp->ep_in); 181 lbtf_deb_usbd(&udev->dev, "in_endpoint = %d\n",
182 lbtf_deb_usbd(&udev->dev, "Bulk in size is %d\n", cardp->ep_in_size); 182 cardp->ep_in);
183 lbtf_deb_usbd(&udev->dev, "Bulk in size is %d\n",
184 cardp->ep_in_size);
183 } else if (usb_endpoint_is_bulk_out(endpoint)) { 185 } else if (usb_endpoint_is_bulk_out(endpoint)) {
184 cardp->ep_out_size = 186 cardp->ep_out_size =
185 le16_to_cpu(endpoint->wMaxPacketSize); 187 le16_to_cpu(endpoint->wMaxPacketSize);
186 cardp->ep_out = usb_endpoint_num(endpoint); 188 cardp->ep_out = usb_endpoint_num(endpoint);
187 189
188 lbtf_deb_usbd(&udev->dev, "out_endpoint = %d\n", cardp->ep_out); 190 lbtf_deb_usbd(&udev->dev, "out_endpoint = %d\n",
191 cardp->ep_out);
189 lbtf_deb_usbd(&udev->dev, "Bulk out size is %d\n", 192 lbtf_deb_usbd(&udev->dev, "Bulk out size is %d\n",
190 cardp->ep_out_size); 193 cardp->ep_out_size);
191 } 194 }
@@ -318,10 +321,12 @@ static int if_usb_send_fw_pkt(struct if_usb_card *cardp)
318 321
319 if (fwdata->hdr.dnldcmd == cpu_to_le32(FW_HAS_DATA_TO_RECV)) { 322 if (fwdata->hdr.dnldcmd == cpu_to_le32(FW_HAS_DATA_TO_RECV)) {
320 lbtf_deb_usb2(&cardp->udev->dev, "There are data to follow\n"); 323 lbtf_deb_usb2(&cardp->udev->dev, "There are data to follow\n");
321 lbtf_deb_usb2(&cardp->udev->dev, "seqnum = %d totalbytes = %d\n", 324 lbtf_deb_usb2(&cardp->udev->dev,
322 cardp->fwseqnum, cardp->totalbytes); 325 "seqnum = %d totalbytes = %d\n",
326 cardp->fwseqnum, cardp->totalbytes);
323 } else if (fwdata->hdr.dnldcmd == cpu_to_le32(FW_HAS_LAST_BLOCK)) { 327 } else if (fwdata->hdr.dnldcmd == cpu_to_le32(FW_HAS_LAST_BLOCK)) {
324 lbtf_deb_usb2(&cardp->udev->dev, "Host has finished FW downloading\n"); 328 lbtf_deb_usb2(&cardp->udev->dev,
329 "Host has finished FW downloading\n");
325 lbtf_deb_usb2(&cardp->udev->dev, "Donwloading FW JUMP BLOCK\n"); 330 lbtf_deb_usb2(&cardp->udev->dev, "Donwloading FW JUMP BLOCK\n");
326 331
327 /* Host has finished FW downloading 332 /* Host has finished FW downloading
@@ -400,7 +405,8 @@ static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload,
400 urb->transfer_flags |= URB_ZERO_PACKET; 405 urb->transfer_flags |= URB_ZERO_PACKET;
401 406
402 if (usb_submit_urb(urb, GFP_ATOMIC)) { 407 if (usb_submit_urb(urb, GFP_ATOMIC)) {
403 lbtf_deb_usbd(&cardp->udev->dev, "usb_submit_urb failed: %d\n", ret); 408 lbtf_deb_usbd(&cardp->udev->dev,
409 "usb_submit_urb failed: %d\n", ret);
404 goto tx_ret; 410 goto tx_ret;
405 } 411 }
406 412
@@ -438,10 +444,12 @@ static int __if_usb_submit_rx_urb(struct if_usb_card *cardp,
438 444
439 cardp->rx_urb->transfer_flags |= URB_ZERO_PACKET; 445 cardp->rx_urb->transfer_flags |= URB_ZERO_PACKET;
440 446
441 lbtf_deb_usb2(&cardp->udev->dev, "Pointer for rx_urb %p\n", cardp->rx_urb); 447 lbtf_deb_usb2(&cardp->udev->dev, "Pointer for rx_urb %p\n",
448 cardp->rx_urb);
442 ret = usb_submit_urb(cardp->rx_urb, GFP_ATOMIC); 449 ret = usb_submit_urb(cardp->rx_urb, GFP_ATOMIC);
443 if (ret) { 450 if (ret) {
444 lbtf_deb_usbd(&cardp->udev->dev, "Submit Rx URB failed: %d\n", ret); 451 lbtf_deb_usbd(&cardp->udev->dev,
452 "Submit Rx URB failed: %d\n", ret);
445 kfree_skb(skb); 453 kfree_skb(skb);
446 cardp->rx_skb = NULL; 454 cardp->rx_skb = NULL;
447 lbtf_deb_leave(LBTF_DEB_USB); 455 lbtf_deb_leave(LBTF_DEB_USB);
@@ -522,14 +530,14 @@ static void if_usb_receive_fwload(struct urb *urb)
522 } 530 }
523 } else if (bcmdresp.cmd != BOOT_CMD_FW_BY_USB) { 531 } else if (bcmdresp.cmd != BOOT_CMD_FW_BY_USB) {
524 pr_info("boot cmd response cmd_tag error (%d)\n", 532 pr_info("boot cmd response cmd_tag error (%d)\n",
525 bcmdresp.cmd); 533 bcmdresp.cmd);
526 } else if (bcmdresp.result != BOOT_CMD_RESP_OK) { 534 } else if (bcmdresp.result != BOOT_CMD_RESP_OK) {
527 pr_info("boot cmd response result error (%d)\n", 535 pr_info("boot cmd response result error (%d)\n",
528 bcmdresp.result); 536 bcmdresp.result);
529 } else { 537 } else {
530 cardp->bootcmdresp = 1; 538 cardp->bootcmdresp = 1;
531 lbtf_deb_usbd(&cardp->udev->dev, 539 lbtf_deb_usbd(&cardp->udev->dev,
532 "Received valid boot command response\n"); 540 "Received valid boot command response\n");
533 } 541 }
534 542
535 kfree_skb(skb); 543 kfree_skb(skb);
@@ -541,19 +549,23 @@ static void if_usb_receive_fwload(struct urb *urb)
541 syncfwheader = kmemdup(skb->data, sizeof(struct fwsyncheader), 549 syncfwheader = kmemdup(skb->data, sizeof(struct fwsyncheader),
542 GFP_ATOMIC); 550 GFP_ATOMIC);
543 if (!syncfwheader) { 551 if (!syncfwheader) {
544 lbtf_deb_usbd(&cardp->udev->dev, "Failure to allocate syncfwheader\n"); 552 lbtf_deb_usbd(&cardp->udev->dev,
553 "Failure to allocate syncfwheader\n");
545 kfree_skb(skb); 554 kfree_skb(skb);
546 lbtf_deb_leave(LBTF_DEB_USB); 555 lbtf_deb_leave(LBTF_DEB_USB);
547 return; 556 return;
548 } 557 }
549 558
550 if (!syncfwheader->cmd) { 559 if (!syncfwheader->cmd) {
551 lbtf_deb_usb2(&cardp->udev->dev, "FW received Blk with correct CRC\n"); 560 lbtf_deb_usb2(&cardp->udev->dev,
552 lbtf_deb_usb2(&cardp->udev->dev, "FW received Blk seqnum = %d\n", 561 "FW received Blk with correct CRC\n");
553 le32_to_cpu(syncfwheader->seqnum)); 562 lbtf_deb_usb2(&cardp->udev->dev,
563 "FW received Blk seqnum = %d\n",
564 le32_to_cpu(syncfwheader->seqnum));
554 cardp->CRC_OK = 1; 565 cardp->CRC_OK = 1;
555 } else { 566 } else {
556 lbtf_deb_usbd(&cardp->udev->dev, "FW received Blk with CRC error\n"); 567 lbtf_deb_usbd(&cardp->udev->dev,
568 "FW received Blk with CRC error\n");
557 cardp->CRC_OK = 0; 569 cardp->CRC_OK = 0;
558 } 570 }
559 571
@@ -666,7 +678,8 @@ static void if_usb_receive(struct urb *urb)
666 { 678 {
667 /* Event cause handling */ 679 /* Event cause handling */
668 u32 event_cause = le32_to_cpu(pkt[1]); 680 u32 event_cause = le32_to_cpu(pkt[1]);
669 lbtf_deb_usbd(&cardp->udev->dev, "**EVENT** 0x%X\n", event_cause); 681 lbtf_deb_usbd(&cardp->udev->dev, "**EVENT** 0x%X\n",
682 event_cause);
670 683
671 /* Icky undocumented magic special case */ 684 /* Icky undocumented magic special case */
672 if (event_cause & 0xffff0000) { 685 if (event_cause & 0xffff0000) {