Commit 7d774a53 authored by Matthias Oefelein's avatar Matthias Oefelein Committed by Greg Kroah-Hartman

beeceem: Fix whitespace issues at opening parentheses in InterfaceRx.c

Most spaces before opening parentheses (where required) are missing here.
This patch adds spaces at the appropriate spots.
Signed-off-by: default avatarMatthias Oefelein <ma.oefelein@arcor.de>
Signed-off-by: default avatarRalph Mueck <linux-kernel@rmueck.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 26ac5b4d
...@@ -4,8 +4,8 @@ static int SearchVcid(struct bcm_mini_adapter *Adapter, unsigned short usVcid) ...@@ -4,8 +4,8 @@ static int SearchVcid(struct bcm_mini_adapter *Adapter, unsigned short usVcid)
{ {
int iIndex = 0; int iIndex = 0;
for(iIndex = (NO_OF_QUEUES-1); iIndex >= 0; iIndex--) for (iIndex = (NO_OF_QUEUES-1); iIndex >= 0; iIndex--)
if(Adapter->PackInfo[iIndex].usVCID_Value == usVcid) if (Adapter->PackInfo[iIndex].usVCID_Value == usVcid)
return iIndex; return iIndex;
return NO_OF_QUEUES+1; return NO_OF_QUEUES+1;
...@@ -18,7 +18,7 @@ GetBulkInRcb(struct bcm_interface_adapter *psIntfAdapter) ...@@ -18,7 +18,7 @@ GetBulkInRcb(struct bcm_interface_adapter *psIntfAdapter)
struct bcm_usb_rcb *pRcb = NULL; struct bcm_usb_rcb *pRcb = NULL;
UINT index = 0; UINT index = 0;
if((atomic_read(&psIntfAdapter->uNumRcbUsed) < MAXIMUM_USB_RCB) && if ((atomic_read(&psIntfAdapter->uNumRcbUsed) < MAXIMUM_USB_RCB) &&
(psIntfAdapter->psAdapter->StopAllXaction == false)) (psIntfAdapter->psAdapter->StopAllXaction == false))
{ {
index = atomic_read(&psIntfAdapter->uCurrRcb); index = atomic_read(&psIntfAdapter->uCurrRcb);
...@@ -52,7 +52,7 @@ static void read_bulk_callback(struct urb *urb) ...@@ -52,7 +52,7 @@ static void read_bulk_callback(struct urb *urb)
pr_info(PFX "%s: rx urb status %d length %d\n", pr_info(PFX "%s: rx urb status %d length %d\n",
Adapter->dev->name, urb->status, urb->actual_length); Adapter->dev->name, urb->status, urb->actual_length);
if((Adapter->device_removed == TRUE) || if ((Adapter->device_removed == TRUE) ||
(TRUE == Adapter->bEndPointHalted) || (TRUE == Adapter->bEndPointHalted) ||
(0 == urb->actual_length)) (0 == urb->actual_length))
{ {
...@@ -61,9 +61,9 @@ static void read_bulk_callback(struct urb *urb) ...@@ -61,9 +61,9 @@ static void read_bulk_callback(struct urb *urb)
return; return;
} }
if(urb->status != STATUS_SUCCESS) if (urb->status != STATUS_SUCCESS)
{ {
if(urb->status == -EPIPE) if (urb->status == -EPIPE)
{ {
Adapter->bEndPointHalted = TRUE; Adapter->bEndPointHalted = TRUE;
wake_up(&Adapter->tx_packet_wait_queue); wake_up(&Adapter->tx_packet_wait_queue);
...@@ -78,21 +78,21 @@ static void read_bulk_callback(struct urb *urb) ...@@ -78,21 +78,21 @@ static void read_bulk_callback(struct urb *urb)
return; return;
} }
if(Adapter->bDoSuspend && (Adapter->bPreparingForLowPowerMode)) if (Adapter->bDoSuspend && (Adapter->bPreparingForLowPowerMode))
{ {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "device is going in low power mode while PMU option selected..hence rx packet should not be process"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "device is going in low power mode while PMU option selected..hence rx packet should not be process");
return; return;
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "Read back done len %d\n", pLeader->PLength); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "Read back done len %d\n", pLeader->PLength);
if(!pLeader->PLength) if (!pLeader->PLength)
{ {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "Leader Length 0"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "Leader Length 0");
atomic_dec(&psIntfAdapter->uNumRcbUsed); atomic_dec(&psIntfAdapter->uNumRcbUsed);
return; return;
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "Leader Status:0x%hX, Length:0x%hX, VCID:0x%hX", pLeader->Status, pLeader->PLength, pLeader->Vcid); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "Leader Status:0x%hX, Length:0x%hX, VCID:0x%hX", pLeader->Status, pLeader->PLength, pLeader->Vcid);
if(MAX_CNTL_PKT_SIZE < pLeader->PLength) if (MAX_CNTL_PKT_SIZE < pLeader->PLength)
{ {
if (netif_msg_rx_err(Adapter)) if (netif_msg_rx_err(Adapter))
pr_info(PFX "%s: corrupted leader length...%d\n", pr_info(PFX "%s: corrupted leader length...%d\n",
...@@ -102,8 +102,8 @@ static void read_bulk_callback(struct urb *urb) ...@@ -102,8 +102,8 @@ static void read_bulk_callback(struct urb *urb)
return; return;
} }
QueueIndex = SearchVcid( Adapter, pLeader->Vcid); QueueIndex = SearchVcid(Adapter, pLeader->Vcid);
if(QueueIndex < NO_OF_QUEUES) if (QueueIndex < NO_OF_QUEUES)
{ {
bHeaderSupressionEnabled = bHeaderSupressionEnabled =
Adapter->PackInfo[QueueIndex].bHeaderSuppressionEnabled; Adapter->PackInfo[QueueIndex].bHeaderSuppressionEnabled;
...@@ -111,15 +111,15 @@ static void read_bulk_callback(struct urb *urb) ...@@ -111,15 +111,15 @@ static void read_bulk_callback(struct urb *urb)
bHeaderSupressionEnabled & Adapter->bPHSEnabled; bHeaderSupressionEnabled & Adapter->bPHSEnabled;
} }
skb = dev_alloc_skb (pLeader->PLength + SKB_RESERVE_PHS_BYTES + SKB_RESERVE_ETHERNET_HEADER);//2 //2 for allignment skb = dev_alloc_skb(pLeader->PLength + SKB_RESERVE_PHS_BYTES + SKB_RESERVE_ETHERNET_HEADER);//2 //2 for allignment
if(!skb) if (!skb)
{ {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "NO SKBUFF!!! Dropping the Packet"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "NO SKBUFF!!! Dropping the Packet");
atomic_dec(&psIntfAdapter->uNumRcbUsed); atomic_dec(&psIntfAdapter->uNumRcbUsed);
return; return;
} }
/* If it is a control Packet, then call handle_bcm_packet ()*/ /* If it is a control Packet, then call handle_bcm_packet ()*/
if((ntohs(pLeader->Vcid) == VCID_CONTROL_PACKET) || if ((ntohs(pLeader->Vcid) == VCID_CONTROL_PACKET) ||
(!(pLeader->Status >= 0x20 && pLeader->Status <= 0x3F))) (!(pLeader->Status >= 0x20 && pLeader->Status <= 0x3F)))
{ {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_RX, RX_CTRL, DBG_LVL_ALL, "Received control pkt..."); BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_RX, RX_CTRL, DBG_LVL_ALL, "Received control pkt...");
...@@ -147,19 +147,19 @@ static void read_bulk_callback(struct urb *urb) ...@@ -147,19 +147,19 @@ static void read_bulk_callback(struct urb *urb)
skb->dev = Adapter->dev; skb->dev = Adapter->dev;
/* currently skb->len has extra ETH_HLEN bytes in the beginning */ /* currently skb->len has extra ETH_HLEN bytes in the beginning */
skb_put (skb, pLeader->PLength + ETH_HLEN); skb_put(skb, pLeader->PLength + ETH_HLEN);
Adapter->PackInfo[QueueIndex].uiTotalRxBytes += pLeader->PLength; Adapter->PackInfo[QueueIndex].uiTotalRxBytes += pLeader->PLength;
Adapter->PackInfo[QueueIndex].uiThisPeriodRxBytes += pLeader->PLength; Adapter->PackInfo[QueueIndex].uiThisPeriodRxBytes += pLeader->PLength;
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_RX, RX_DATA, DBG_LVL_ALL, "Received Data pkt of len :0x%X", pLeader->PLength); BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_RX, RX_DATA, DBG_LVL_ALL, "Received Data pkt of len :0x%X", pLeader->PLength);
if(netif_running(Adapter->dev)) if (netif_running(Adapter->dev))
{ {
/* Moving ahead by ETH_HLEN to the data ptr as received from FW */ /* Moving ahead by ETH_HLEN to the data ptr as received from FW */
skb_pull(skb, ETH_HLEN); skb_pull(skb, ETH_HLEN);
PHSReceive(Adapter, pLeader->Vcid, skb, &skb->len, PHSReceive(Adapter, pLeader->Vcid, skb, &skb->len,
NULL, bHeaderSupressionEnabled); NULL, bHeaderSupressionEnabled);
if(!Adapter->PackInfo[QueueIndex].bEthCSSupport) if (!Adapter->PackInfo[QueueIndex].bEthCSSupport)
{ {
skb_push(skb, ETH_HLEN); skb_push(skb, ETH_HLEN);
...@@ -183,9 +183,9 @@ static void read_bulk_callback(struct urb *urb) ...@@ -183,9 +183,9 @@ static void read_bulk_callback(struct urb *urb)
++Adapter->dev->stats.rx_packets; ++Adapter->dev->stats.rx_packets;
Adapter->dev->stats.rx_bytes += pLeader->PLength; Adapter->dev->stats.rx_bytes += pLeader->PLength;
for(uiIndex = 0; uiIndex < MIBS_MAX_HIST_ENTRIES; uiIndex++) for (uiIndex = 0; uiIndex < MIBS_MAX_HIST_ENTRIES; uiIndex++)
{ {
if((pLeader->PLength <= MIBS_PKTSIZEHIST_RANGE*(uiIndex+1)) && if ((pLeader->PLength <= MIBS_PKTSIZEHIST_RANGE*(uiIndex+1)) &&
(pLeader->PLength > MIBS_PKTSIZEHIST_RANGE*(uiIndex))) (pLeader->PLength > MIBS_PKTSIZEHIST_RANGE*(uiIndex)))
Adapter->aRxPktSizeHist[uiIndex]++; Adapter->aRxPktSizeHist[uiIndex]++;
} }
...@@ -202,7 +202,7 @@ static int ReceiveRcb(struct bcm_interface_adapter *psIntfAdapter, struct bcm_us ...@@ -202,7 +202,7 @@ static int ReceiveRcb(struct bcm_interface_adapter *psIntfAdapter, struct bcm_us
usb_fill_bulk_urb(urb, psIntfAdapter->udev, usb_rcvbulkpipe(psIntfAdapter->udev, psIntfAdapter->sBulkIn.bulk_in_endpointAddr), usb_fill_bulk_urb(urb, psIntfAdapter->udev, usb_rcvbulkpipe(psIntfAdapter->udev, psIntfAdapter->sBulkIn.bulk_in_endpointAddr),
urb->transfer_buffer, BCM_USB_MAX_READ_LENGTH, read_bulk_callback, pRcb); urb->transfer_buffer, BCM_USB_MAX_READ_LENGTH, read_bulk_callback, pRcb);
if(false == psIntfAdapter->psAdapter->device_removed && if (false == psIntfAdapter->psAdapter->device_removed &&
false == psIntfAdapter->psAdapter->bEndPointHalted && false == psIntfAdapter->psAdapter->bEndPointHalted &&
false == psIntfAdapter->bSuspended && false == psIntfAdapter->bSuspended &&
false == psIntfAdapter->bPreparingForBusSuspend) false == psIntfAdapter->bPreparingForBusSuspend)
...@@ -212,7 +212,7 @@ static int ReceiveRcb(struct bcm_interface_adapter *psIntfAdapter, struct bcm_us ...@@ -212,7 +212,7 @@ static int ReceiveRcb(struct bcm_interface_adapter *psIntfAdapter, struct bcm_us
{ {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "failed submitting read urb, error %d", retval); BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "failed submitting read urb, error %d", retval);
//if this return value is because of pipe halt. need to clear this. //if this return value is because of pipe halt. need to clear this.
if(retval == -EPIPE) if (retval == -EPIPE)
{ {
psIntfAdapter->psAdapter->bEndPointHalted = TRUE; psIntfAdapter->psAdapter->bEndPointHalted = TRUE;
wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue); wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue);
...@@ -237,17 +237,17 @@ Return: TRUE - If Rx was successful. ...@@ -237,17 +237,17 @@ Return: TRUE - If Rx was successful.
Other - If an error occurred. Other - If an error occurred.
*/ */
bool InterfaceRx (struct bcm_interface_adapter *psIntfAdapter) bool InterfaceRx(struct bcm_interface_adapter *psIntfAdapter)
{ {
USHORT RxDescCount = NUM_RX_DESC - atomic_read(&psIntfAdapter->uNumRcbUsed); USHORT RxDescCount = NUM_RX_DESC - atomic_read(&psIntfAdapter->uNumRcbUsed);
struct bcm_usb_rcb *pRcb = NULL; struct bcm_usb_rcb *pRcb = NULL;
// RxDescCount = psIntfAdapter->psAdapter->CurrNumRecvDescs - // RxDescCount = psIntfAdapter->psAdapter->CurrNumRecvDescs -
// psIntfAdapter->psAdapter->PrevNumRecvDescs; // psIntfAdapter->psAdapter->PrevNumRecvDescs;
while(RxDescCount) while (RxDescCount)
{ {
pRcb = GetBulkInRcb(psIntfAdapter); pRcb = GetBulkInRcb(psIntfAdapter);
if(pRcb == NULL) if (pRcb == NULL)
{ {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0, "Unable to get Rcb pointer"); BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0, "Unable to get Rcb pointer");
return false; return false;
......
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