Commit 3f2d6564 authored by Sherif Shehab Aldin's avatar Sherif Shehab Aldin Committed by Greg Kroah-Hartman

driver: staging: wlan-ng: Fixed Alignment to match open parenthesis

Fixed Alignment to match open parenthesis in hfa384x_usb.c
Signed-off-by: default avatarSherif Shehab Aldin <shehabaldin.sherif@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 83f91687
...@@ -350,14 +350,14 @@ static int submit_rx_urb(hfa384x_t *hw, gfp_t memflags) ...@@ -350,14 +350,14 @@ static int submit_rx_urb(hfa384x_t *hw, gfp_t memflags)
result = -ENOLINK; result = -ENOLINK;
if (!hw->wlandev->hwremoved && if (!hw->wlandev->hwremoved &&
!test_bit(WORK_RX_HALT, &hw->usb_flags)) { !test_bit(WORK_RX_HALT, &hw->usb_flags)) {
result = SUBMIT_URB(&hw->rx_urb, memflags); result = SUBMIT_URB(&hw->rx_urb, memflags);
/* Check whether we need to reset the RX pipe */ /* Check whether we need to reset the RX pipe */
if (result == -EPIPE) { if (result == -EPIPE) {
netdev_warn(hw->wlandev->netdev, netdev_warn(hw->wlandev->netdev,
"%s rx pipe stalled: requesting reset\n", "%s rx pipe stalled: requesting reset\n",
hw->wlandev->netdev->name); hw->wlandev->netdev->name);
if (!test_and_set_bit(WORK_RX_HALT, &hw->usb_flags)) if (!test_and_set_bit(WORK_RX_HALT, &hw->usb_flags))
schedule_work(&hw->usb_work); schedule_work(&hw->usb_work);
} }
...@@ -406,8 +406,8 @@ static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags) ...@@ -406,8 +406,8 @@ static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags)
/* Test whether we need to reset the TX pipe */ /* Test whether we need to reset the TX pipe */
if (result == -EPIPE) { if (result == -EPIPE) {
netdev_warn(hw->wlandev->netdev, netdev_warn(hw->wlandev->netdev,
"%s tx pipe stalled: requesting reset\n", "%s tx pipe stalled: requesting reset\n",
netdev->name); netdev->name);
set_bit(WORK_TX_HALT, &hw->usb_flags); set_bit(WORK_TX_HALT, &hw->usb_flags);
schedule_work(&hw->usb_work); schedule_work(&hw->usb_work);
} else if (result == 0) { } else if (result == 0) {
...@@ -455,11 +455,11 @@ static void hfa384x_usb_defer(struct work_struct *data) ...@@ -455,11 +455,11 @@ static void hfa384x_usb_defer(struct work_struct *data)
ret = usb_clear_halt(hw->usb, hw->endp_in); ret = usb_clear_halt(hw->usb, hw->endp_in);
if (ret != 0) { if (ret != 0) {
netdev_err(hw->wlandev->netdev, netdev_err(hw->wlandev->netdev,
"Failed to clear rx pipe for %s: err=%d\n", "Failed to clear rx pipe for %s: err=%d\n",
netdev->name, ret); netdev->name, ret);
} else { } else {
netdev_info(hw->wlandev->netdev, "%s rx pipe reset complete.\n", netdev_info(hw->wlandev->netdev, "%s rx pipe reset complete.\n",
netdev->name); netdev->name);
clear_bit(WORK_RX_HALT, &hw->usb_flags); clear_bit(WORK_RX_HALT, &hw->usb_flags);
set_bit(WORK_RX_RESUME, &hw->usb_flags); set_bit(WORK_RX_RESUME, &hw->usb_flags);
} }
...@@ -472,7 +472,8 @@ static void hfa384x_usb_defer(struct work_struct *data) ...@@ -472,7 +472,8 @@ static void hfa384x_usb_defer(struct work_struct *data)
ret = submit_rx_urb(hw, GFP_KERNEL); ret = submit_rx_urb(hw, GFP_KERNEL);
if (ret != 0) { if (ret != 0) {
netdev_err(hw->wlandev->netdev, netdev_err(hw->wlandev->netdev,
"Failed to resume %s rx pipe.\n", netdev->name); "Failed to resume %s rx pipe.\n",
netdev->name);
} else { } else {
clear_bit(WORK_RX_RESUME, &hw->usb_flags); clear_bit(WORK_RX_RESUME, &hw->usb_flags);
} }
...@@ -486,11 +487,11 @@ static void hfa384x_usb_defer(struct work_struct *data) ...@@ -486,11 +487,11 @@ static void hfa384x_usb_defer(struct work_struct *data)
ret = usb_clear_halt(hw->usb, hw->endp_out); ret = usb_clear_halt(hw->usb, hw->endp_out);
if (ret != 0) { if (ret != 0) {
netdev_err(hw->wlandev->netdev, netdev_err(hw->wlandev->netdev,
"Failed to clear tx pipe for %s: err=%d\n", "Failed to clear tx pipe for %s: err=%d\n",
netdev->name, ret); netdev->name, ret);
} else { } else {
netdev_info(hw->wlandev->netdev, "%s tx pipe reset complete.\n", netdev_info(hw->wlandev->netdev, "%s tx pipe reset complete.\n",
netdev->name); netdev->name);
clear_bit(WORK_TX_HALT, &hw->usb_flags); clear_bit(WORK_TX_HALT, &hw->usb_flags);
set_bit(WORK_TX_RESUME, &hw->usb_flags); set_bit(WORK_TX_RESUME, &hw->usb_flags);
...@@ -1206,7 +1207,7 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis) ...@@ -1206,7 +1207,7 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis)
result = usb_reset_device(hw->usb); result = usb_reset_device(hw->usb);
if (result < 0) { if (result < 0) {
netdev_err(hw->wlandev->netdev, "usb_reset_device() failed, result=%d.\n", netdev_err(hw->wlandev->netdev, "usb_reset_device() failed, result=%d.\n",
result); result);
} }
return result; return result;
...@@ -1306,8 +1307,8 @@ static int hfa384x_usbctlx_complete_sync(hfa384x_t *hw, ...@@ -1306,8 +1307,8 @@ static int hfa384x_usbctlx_complete_sync(hfa384x_t *hw,
result = completor->complete(completor); result = completor->complete(completor);
} else { } else {
netdev_warn(hw->wlandev->netdev, "CTLX[%d] error: state(%s)\n", netdev_warn(hw->wlandev->netdev, "CTLX[%d] error: state(%s)\n",
le16_to_cpu(ctlx->outbuf.type), le16_to_cpu(ctlx->outbuf.type),
ctlxstr(ctlx->state)); ctlxstr(ctlx->state));
result = -EIO; result = -EIO;
} }
...@@ -2051,7 +2052,7 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len) ...@@ -2051,7 +2052,7 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len)
burnhi = HFA384x_ADDR_CMD_MKPAGE(burndaddr); burnhi = HFA384x_ADDR_CMD_MKPAGE(burndaddr);
netdev_info(hw->wlandev->netdev, "Writing %d bytes to flash @0x%06x\n", netdev_info(hw->wlandev->netdev, "Writing %d bytes to flash @0x%06x\n",
burnlen, burndaddr); burnlen, burndaddr);
/* Set the download mode */ /* Set the download mode */
result = hfa384x_cmd_download(hw, HFA384x_PROGMODE_NV, result = hfa384x_cmd_download(hw, HFA384x_PROGMODE_NV,
...@@ -2090,8 +2091,8 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len) ...@@ -2090,8 +2091,8 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len)
0, 0, 0); 0, 0, 0);
if (result) { if (result) {
netdev_err(hw->wlandev->netdev, netdev_err(hw->wlandev->netdev,
"download(NVWRITE,lo=%x,hi=%x,len=%x) cmd failed, result=%d. Aborting d/l\n", "download(NVWRITE,lo=%x,hi=%x,len=%x) cmd failed, result=%d. Aborting d/l\n",
burnlo, burnhi, burnlen, result); burnlo, burnhi, burnlen, result);
goto exit_proc; goto exit_proc;
} }
...@@ -2274,7 +2275,7 @@ int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr) ...@@ -2274,7 +2275,7 @@ int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr)
for (i = 0; i < HFA384x_PORTID_MAX; i++) { for (i = 0; i < HFA384x_PORTID_MAX; i++) {
if (hw->port_enabled[i]) { if (hw->port_enabled[i]) {
netdev_err(hw->wlandev->netdev, netdev_err(hw->wlandev->netdev,
"Can't download with a macport enabled.\n"); "Can't download with a macport enabled.\n");
return -EINVAL; return -EINVAL;
} }
} }
...@@ -2445,7 +2446,8 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len) ...@@ -2445,7 +2446,8 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len)
if (result) { if (result) {
netdev_warn(hw->wlandev->netdev, netdev_warn(hw->wlandev->netdev,
"Read from index %zd failed, continuing\n", i); "Read from index %zd failed, continuing\n",
i);
continue; continue;
} }
...@@ -2465,7 +2467,7 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len) ...@@ -2465,7 +2467,7 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len)
/* Test the code */ /* Test the code */
if (!hfa384x_isgood_pdrcode(pdrcode)) { if (!hfa384x_isgood_pdrcode(pdrcode)) {
netdev_err(hw->wlandev->netdev, "pdrcode invalid=%d\n", netdev_err(hw->wlandev->netdev, "pdrcode invalid=%d\n",
pdrcode); pdrcode);
pdaok = 0; pdaok = 0;
break; break;
} }
...@@ -2481,13 +2483,13 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len) ...@@ -2481,13 +2483,13 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len)
} }
if (pdaok) { if (pdaok) {
netdev_info(hw->wlandev->netdev, netdev_info(hw->wlandev->netdev,
"PDA Read from 0x%08x in %s space.\n", "PDA Read from 0x%08x in %s space.\n",
pdaloc[i].cardaddr, pdaloc[i].cardaddr,
pdaloc[i].auxctl == 0 ? "EXTDS" : pdaloc[i].auxctl == 0 ? "EXTDS" :
pdaloc[i].auxctl == 1 ? "NV" : pdaloc[i].auxctl == 1 ? "NV" :
pdaloc[i].auxctl == 2 ? "PHY" : pdaloc[i].auxctl == 2 ? "PHY" :
pdaloc[i].auxctl == 3 ? "ICSRAM" : pdaloc[i].auxctl == 3 ? "ICSRAM" :
"<bogus auxctl>"); "<bogus auxctl>");
break; break;
} }
} }
...@@ -2582,7 +2584,8 @@ int hfa384x_drvr_start(hfa384x_t *hw) ...@@ -2582,7 +2584,8 @@ int hfa384x_drvr_start(hfa384x_t *hw)
result = submit_rx_urb(hw, GFP_KERNEL); result = submit_rx_urb(hw, GFP_KERNEL);
if (result != 0) { if (result != 0) {
netdev_err(hw->wlandev->netdev, netdev_err(hw->wlandev->netdev,
"Fatal, failed to submit RX URB, result=%d\n", result); "Fatal, failed to submit RX URB, result=%d\n",
result);
goto done; goto done;
} }
...@@ -2602,8 +2605,8 @@ int hfa384x_drvr_start(hfa384x_t *hw) ...@@ -2602,8 +2605,8 @@ int hfa384x_drvr_start(hfa384x_t *hw)
if (result1 != 0) { if (result1 != 0) {
if (result2 != 0) { if (result2 != 0) {
netdev_err(hw->wlandev->netdev, netdev_err(hw->wlandev->netdev,
"cmd_initialize() failed on two attempts, results %d and %d\n", "cmd_initialize() failed on two attempts, results %d and %d\n",
result1, result2); result1, result2);
usb_kill_urb(&hw->rx_urb); usb_kill_urb(&hw->rx_urb);
goto done; goto done;
} else { } else {
...@@ -2613,9 +2616,9 @@ int hfa384x_drvr_start(hfa384x_t *hw) ...@@ -2613,9 +2616,9 @@ int hfa384x_drvr_start(hfa384x_t *hw)
} }
} else if (result2 != 0) { } else if (result2 != 0) {
netdev_warn(hw->wlandev->netdev, "First cmd_initialize() succeeded, but second attempt failed (result=%d)\n", netdev_warn(hw->wlandev->netdev, "First cmd_initialize() succeeded, but second attempt failed (result=%d)\n",
result2); result2);
netdev_warn(hw->wlandev->netdev, netdev_warn(hw->wlandev->netdev,
"Most likely the card will be functional\n"); "Most likely the card will be functional\n");
goto done; goto done;
} }
...@@ -3007,7 +3010,8 @@ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) ...@@ -3007,7 +3010,8 @@ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx)
default: default:
netdev_err(hw->wlandev->netdev, "CTLX[%d] not in a terminating state(%s)\n", netdev_err(hw->wlandev->netdev, "CTLX[%d] not in a terminating state(%s)\n",
le16_to_cpu(ctlx->outbuf.type), ctlxstr(ctlx->state)); le16_to_cpu(ctlx->outbuf.type),
ctlxstr(ctlx->state));
break; break;
} /* switch */ } /* switch */
} }
...@@ -3089,8 +3093,8 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw) ...@@ -3089,8 +3093,8 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw)
* and schedule a reset ... * and schedule a reset ...
*/ */
netdev_warn(hw->wlandev->netdev, netdev_warn(hw->wlandev->netdev,
"%s tx pipe stalled: requesting reset\n", "%s tx pipe stalled: requesting reset\n",
hw->wlandev->netdev->name); hw->wlandev->netdev->name);
list_move(&head->list, &hw->ctlxq.pending); list_move(&head->list, &hw->ctlxq.pending);
set_bit(WORK_TX_HALT, &hw->usb_flags); set_bit(WORK_TX_HALT, &hw->usb_flags);
schedule_work(&hw->usb_work); schedule_work(&hw->usb_work);
...@@ -3099,12 +3103,12 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw) ...@@ -3099,12 +3103,12 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw)
if (result == -ESHUTDOWN) { if (result == -ESHUTDOWN) {
netdev_warn(hw->wlandev->netdev, "%s urb shutdown!\n", netdev_warn(hw->wlandev->netdev, "%s urb shutdown!\n",
hw->wlandev->netdev->name); hw->wlandev->netdev->name);
break; break;
} }
netdev_err(hw->wlandev->netdev, "Failed to submit CTLX[%d]: error=%d\n", netdev_err(hw->wlandev->netdev, "Failed to submit CTLX[%d]: error=%d\n",
le16_to_cpu(head->outbuf.type), result); le16_to_cpu(head->outbuf.type), result);
unlocked_usbctlx_complete(hw, head); unlocked_usbctlx_complete(hw, head);
} /* while */ } /* while */
...@@ -3171,7 +3175,7 @@ static void hfa384x_usbin_callback(struct urb *urb) ...@@ -3171,7 +3175,7 @@ static void hfa384x_usbin_callback(struct urb *urb)
case -EPIPE: case -EPIPE:
netdev_warn(hw->wlandev->netdev, "%s rx pipe stalled: requesting reset\n", netdev_warn(hw->wlandev->netdev, "%s rx pipe stalled: requesting reset\n",
wlandev->netdev->name); wlandev->netdev->name);
if (!test_and_set_bit(WORK_RX_HALT, &hw->usb_flags)) if (!test_and_set_bit(WORK_RX_HALT, &hw->usb_flags))
schedule_work(&hw->usb_work); schedule_work(&hw->usb_work);
++(wlandev->linux_stats.rx_errors); ++(wlandev->linux_stats.rx_errors);
...@@ -3222,8 +3226,8 @@ static void hfa384x_usbin_callback(struct urb *urb) ...@@ -3222,8 +3226,8 @@ static void hfa384x_usbin_callback(struct urb *urb)
if (result != 0) { if (result != 0) {
netdev_err(hw->wlandev->netdev, netdev_err(hw->wlandev->netdev,
"Fatal, failed to resubmit rx_urb. error=%d\n", "Fatal, failed to resubmit rx_urb. error=%d\n",
result); result);
} }
} }
...@@ -3358,9 +3362,9 @@ static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin, ...@@ -3358,9 +3362,9 @@ static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin,
*/ */
if (ctlx->outbuf.type != intype) { if (ctlx->outbuf.type != intype) {
netdev_warn(hw->wlandev->netdev, netdev_warn(hw->wlandev->netdev,
"Expected IN[%d], received IN[%d] - ignored.\n", "Expected IN[%d], received IN[%d] - ignored.\n",
le16_to_cpu(ctlx->outbuf.type), le16_to_cpu(ctlx->outbuf.type),
le16_to_cpu(intype)); le16_to_cpu(intype));
goto unlock; goto unlock;
} }
...@@ -3394,9 +3398,9 @@ static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin, ...@@ -3394,9 +3398,9 @@ static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin,
* Throw this CTLX away ... * Throw this CTLX away ...
*/ */
netdev_err(hw->wlandev->netdev, netdev_err(hw->wlandev->netdev,
"Matched IN URB, CTLX[%d] in invalid state(%s). Discarded.\n", "Matched IN URB, CTLX[%d] in invalid state(%s). Discarded.\n",
le16_to_cpu(ctlx->outbuf.type), le16_to_cpu(ctlx->outbuf.type),
ctlxstr(ctlx->state)); ctlxstr(ctlx->state));
if (unlocked_usbctlx_cancel_async(hw, ctlx) == 0) if (unlocked_usbctlx_cancel_async(hw, ctlx) == 0)
run_queue = 1; run_queue = 1;
break; break;
...@@ -3531,7 +3535,8 @@ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb) ...@@ -3531,7 +3535,8 @@ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb)
default: default:
netdev_warn(hw->wlandev->netdev, "Received frame on unsupported port=%d\n", netdev_warn(hw->wlandev->netdev, "Received frame on unsupported port=%d\n",
HFA384x_RXSTATUS_MACPORT_GET(usbin->rxfrm.desc.status)); HFA384x_RXSTATUS_MACPORT_GET(
usbin->rxfrm.desc.status));
goto done; goto done;
break; break;
} }
...@@ -3593,8 +3598,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev, ...@@ -3593,8 +3598,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev,
skb = dev_alloc_skb(skblen); skb = dev_alloc_skb(skblen);
if (skb == NULL) { if (skb == NULL) {
netdev_err(hw->wlandev->netdev, netdev_err(hw->wlandev->netdev,
"alloc_skb failed trying to allocate %d bytes\n", "alloc_skb failed trying to allocate %d bytes\n",
skblen); skblen);
return; return;
} }
...@@ -3711,8 +3716,8 @@ static void hfa384x_usbout_callback(struct urb *urb) ...@@ -3711,8 +3716,8 @@ static void hfa384x_usbout_callback(struct urb *urb)
{ {
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
netdev_warn(hw->wlandev->netdev, netdev_warn(hw->wlandev->netdev,
"%s tx pipe stalled: requesting reset\n", "%s tx pipe stalled: requesting reset\n",
wlandev->netdev->name); wlandev->netdev->name);
if (!test_and_set_bit if (!test_and_set_bit
(WORK_TX_HALT, &hw->usb_flags)) (WORK_TX_HALT, &hw->usb_flags))
schedule_work(&hw->usb_work); schedule_work(&hw->usb_work);
...@@ -3744,7 +3749,7 @@ static void hfa384x_usbout_callback(struct urb *urb) ...@@ -3744,7 +3749,7 @@ static void hfa384x_usbout_callback(struct urb *urb)
default: default:
netdev_info(wlandev->netdev, "unknown urb->status=%d\n", netdev_info(wlandev->netdev, "unknown urb->status=%d\n",
urb->status); urb->status);
++(wlandev->linux_stats.tx_errors); ++(wlandev->linux_stats.tx_errors);
break; break;
} /* switch */ } /* switch */
...@@ -3838,9 +3843,9 @@ static void hfa384x_ctlxout_callback(struct urb *urb) ...@@ -3838,9 +3843,9 @@ static void hfa384x_ctlxout_callback(struct urb *urb)
default: default:
/* This is NOT a valid CTLX "success" state! */ /* This is NOT a valid CTLX "success" state! */
netdev_err(hw->wlandev->netdev, netdev_err(hw->wlandev->netdev,
"Illegal CTLX[%d] success state(%s, %d) in OUT URB\n", "Illegal CTLX[%d] success state(%s, %d) in OUT URB\n",
le16_to_cpu(ctlx->outbuf.type), le16_to_cpu(ctlx->outbuf.type),
ctlxstr(ctlx->state), urb->status); ctlxstr(ctlx->state), urb->status);
break; break;
} /* switch */ } /* switch */
} else { } else {
...@@ -3848,8 +3853,8 @@ static void hfa384x_ctlxout_callback(struct urb *urb) ...@@ -3848,8 +3853,8 @@ static void hfa384x_ctlxout_callback(struct urb *urb)
if ((urb->status == -EPIPE) && if ((urb->status == -EPIPE) &&
!test_and_set_bit(WORK_TX_HALT, &hw->usb_flags)) { !test_and_set_bit(WORK_TX_HALT, &hw->usb_flags)) {
netdev_warn(hw->wlandev->netdev, netdev_warn(hw->wlandev->netdev,
"%s tx pipe stalled: requesting reset\n", "%s tx pipe stalled: requesting reset\n",
hw->wlandev->netdev->name); hw->wlandev->netdev->name);
schedule_work(&hw->usb_work); schedule_work(&hw->usb_work);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment