Commit 97e0a509 authored by Kevin McKinney's avatar Kevin McKinney Committed by Greg Kroah-Hartman

Staging: bcm: Properly format braces in Transmit.c

This patch cuddles braces as reported
by checkpatch.pl.
Signed-off-by: default avatarKevin McKinney <klmckinney1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 22976bc3
...@@ -45,14 +45,12 @@ INT SendControlPacket(struct bcm_mini_adapter *Adapter, char *pControlPacket) ...@@ -45,14 +45,12 @@ INT SendControlPacket(struct bcm_mini_adapter *Adapter, char *pControlPacket)
struct bcm_leader *PLeader = (struct bcm_leader *)pControlPacket; struct bcm_leader *PLeader = (struct bcm_leader *)pControlPacket;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Tx"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Tx");
if (!pControlPacket || !Adapter) if (!pControlPacket || !Adapter) {
{
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Got NULL Control Packet or Adapter"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Got NULL Control Packet or Adapter");
return STATUS_FAILURE; return STATUS_FAILURE;
} }
if ((atomic_read(&Adapter->CurrNumFreeTxDesc) < if ((atomic_read(&Adapter->CurrNumFreeTxDesc) <
((PLeader->PLength-1)/MAX_DEVICE_DESC_SIZE)+1)) ((PLeader->PLength-1)/MAX_DEVICE_DESC_SIZE)+1)) {
{
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "NO FREE DESCRIPTORS TO SEND CONTROL PACKET"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "NO FREE DESCRIPTORS TO SEND CONTROL PACKET");
return STATUS_FAILURE; return STATUS_FAILURE;
} }
...@@ -91,8 +89,7 @@ INT SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USH ...@@ -91,8 +89,7 @@ INT SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USH
u16 QueueIndex = skb_get_queue_mapping(Packet); u16 QueueIndex = skb_get_queue_mapping(Packet);
struct bcm_leader Leader = {0}; struct bcm_leader Leader = {0};
if (Packet->len > MAX_DEVICE_DESC_SIZE) if (Packet->len > MAX_DEVICE_DESC_SIZE) {
{
status = STATUS_FAILURE; status = STATUS_FAILURE;
goto errExit; goto errExit;
} }
...@@ -103,8 +100,7 @@ INT SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USH ...@@ -103,8 +100,7 @@ INT SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USH
bHeaderSupressionEnabled = Adapter->PackInfo[QueueIndex].bHeaderSuppressionEnabled bHeaderSupressionEnabled = Adapter->PackInfo[QueueIndex].bHeaderSuppressionEnabled
& Adapter->bPHSEnabled; & Adapter->bPHSEnabled;
if (Adapter->device_removed) if (Adapter->device_removed) {
{
status = STATUS_FAILURE; status = STATUS_FAILURE;
goto errExit; goto errExit;
} }
...@@ -112,8 +108,7 @@ INT SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USH ...@@ -112,8 +108,7 @@ INT SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USH
status = PHSTransmit(Adapter, &Packet, Vcid, uiClassifierRuleID, bHeaderSupressionEnabled, status = PHSTransmit(Adapter, &Packet, Vcid, uiClassifierRuleID, bHeaderSupressionEnabled,
(UINT *)&Packet->len, Adapter->PackInfo[QueueIndex].bEthCSSupport); (UINT *)&Packet->len, Adapter->PackInfo[QueueIndex].bEthCSSupport);
if (status != STATUS_SUCCESS) if (status != STATUS_SUCCESS) {
{
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "PHS Transmit failed..\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "PHS Transmit failed..\n");
goto errExit; goto errExit;
} }
...@@ -125,37 +120,29 @@ INT SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USH ...@@ -125,37 +120,29 @@ INT SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USH
else else
Leader.Status = LEADER_STATUS; Leader.Status = LEADER_STATUS;
if (Adapter->PackInfo[QueueIndex].bEthCSSupport) if (Adapter->PackInfo[QueueIndex].bEthCSSupport) {
{
Leader.PLength = Packet->len; Leader.PLength = Packet->len;
if (skb_headroom(Packet) < LEADER_SIZE) if (skb_headroom(Packet) < LEADER_SIZE) {
{ if ((status = skb_cow(Packet, LEADER_SIZE))) {
if ((status = skb_cow(Packet, LEADER_SIZE)))
{
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "bcm_transmit : Failed To Increase headRoom\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "bcm_transmit : Failed To Increase headRoom\n");
goto errExit; goto errExit;
} }
} }
skb_push(Packet, LEADER_SIZE); skb_push(Packet, LEADER_SIZE);
memcpy(Packet->data, &Leader, LEADER_SIZE); memcpy(Packet->data, &Leader, LEADER_SIZE);
} } else {
else
{
Leader.PLength = Packet->len - ETH_HLEN; Leader.PLength = Packet->len - ETH_HLEN;
memcpy((struct bcm_leader *)skb_pull(Packet, (ETH_HLEN - LEADER_SIZE)), &Leader, LEADER_SIZE); memcpy((struct bcm_leader *)skb_pull(Packet, (ETH_HLEN - LEADER_SIZE)), &Leader, LEADER_SIZE);
} }
status = Adapter->interface_transmit(Adapter->pvInterfaceAdapter, status = Adapter->interface_transmit(Adapter->pvInterfaceAdapter,
Packet->data, (Leader.PLength + LEADER_SIZE)); Packet->data, (Leader.PLength + LEADER_SIZE));
if (status) if (status) {
{
++Adapter->dev->stats.tx_errors; ++Adapter->dev->stats.tx_errors;
if (netif_msg_tx_err(Adapter)) if (netif_msg_tx_err(Adapter))
pr_info(PFX "%s: transmit error %d\n", Adapter->dev->name, pr_info(PFX "%s: transmit error %d\n", Adapter->dev->name,
status); status);
} } else {
else
{
struct net_device_stats *netstats = &Adapter->dev->stats; struct net_device_stats *netstats = &Adapter->dev->stats;
Adapter->PackInfo[QueueIndex].uiTotalTxBytes += Leader.PLength; Adapter->PackInfo[QueueIndex].uiTotalTxBytes += Leader.PLength;
...@@ -205,8 +192,7 @@ int tx_pkt_handler(struct bcm_mini_adapter *Adapter /**< pointer to adapter obje ...@@ -205,8 +192,7 @@ int tx_pkt_handler(struct bcm_mini_adapter *Adapter /**< pointer to adapter obje
if (Adapter->device_removed) if (Adapter->device_removed)
break; break;
if (Adapter->downloadDDR == 1) if (Adapter->downloadDDR == 1) {
{
Adapter->downloadDDR += 1; Adapter->downloadDDR += 1;
status = download_ddr_settings(Adapter); status = download_ddr_settings(Adapter);
if (status) if (status)
...@@ -215,31 +201,26 @@ int tx_pkt_handler(struct bcm_mini_adapter *Adapter /**< pointer to adapter obje ...@@ -215,31 +201,26 @@ int tx_pkt_handler(struct bcm_mini_adapter *Adapter /**< pointer to adapter obje
} }
//Check end point for halt/stall. //Check end point for halt/stall.
if (Adapter->bEndPointHalted == TRUE) if (Adapter->bEndPointHalted == TRUE) {
{
Bcm_clear_halt_of_endpoints(Adapter); Bcm_clear_halt_of_endpoints(Adapter);
Adapter->bEndPointHalted = FALSE; Adapter->bEndPointHalted = FALSE;
StartInterruptUrb((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter)); StartInterruptUrb((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter));
} }
if (Adapter->LinkUpStatus && !Adapter->IdleMode) if (Adapter->LinkUpStatus && !Adapter->IdleMode) {
{
if (atomic_read(&Adapter->TotalPacketCount)) if (atomic_read(&Adapter->TotalPacketCount))
{
update_per_sf_desc_cnts(Adapter); update_per_sf_desc_cnts(Adapter);
} }
}
if (atomic_read(&Adapter->CurrNumFreeTxDesc) && if (atomic_read(&Adapter->CurrNumFreeTxDesc) &&
Adapter->LinkStatus == SYNC_UP_REQUEST && Adapter->LinkStatus == SYNC_UP_REQUEST &&
!Adapter->bSyncUpRequestSent) !Adapter->bSyncUpRequestSent) {
{
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Calling LinkMessage"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Calling LinkMessage");
LinkMessage(Adapter); LinkMessage(Adapter);
} }
if ((Adapter->IdleMode || Adapter->bShutStatus) && atomic_read(&Adapter->TotalPacketCount)) if ((Adapter->IdleMode || Adapter->bShutStatus) && atomic_read(&Adapter->TotalPacketCount)) {
{
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Device in Low Power mode...waking up"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Device in Low Power mode...waking up");
Adapter->usIdleModePattern = ABORT_IDLE_MODE; Adapter->usIdleModePattern = ABORT_IDLE_MODE;
Adapter->bWakeUpDevice = TRUE; Adapter->bWakeUpDevice = TRUE;
......
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