Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196893
b: refs/heads/master
c: 2c300f2
h: refs/heads/master
i:
  196891: 79b58de
v: v3
  • Loading branch information
Andrea Gelmini authored and Greg Kroah-Hartman committed May 11, 2010
1 parent 5bdbd18 commit 174db05
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f681d552012bc61dedc12aace8126339fcab8d7e
refs/heads/master: 2c300f2a65a113440f9fbd0bce7e8d446615fb03
29 changes: 12 additions & 17 deletions trunk/drivers/staging/rt2870/common/rtusb_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* *
*************************************************************************
Module Name:
Module Name:
rtusb_io.c
Abstract:
Expand Down Expand Up @@ -400,8 +400,7 @@ int RTUSBWriteBBPRegister(struct rt_rtmp_adapter *pAd,
("RTUSBWriteBBPRegister(BBP_CSR_CFG):retry count=%d!\n",
i));
i++;
}
while ((i < RETRY_LIMIT)
} while ((i < RETRY_LIMIT)
&& (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)));

if ((i == RETRY_LIMIT)
Expand Down Expand Up @@ -455,8 +454,7 @@ int RTUSBWriteRFRegister(struct rt_rtmp_adapter *pAd, u32 Value)
("RTUSBWriteRFRegister(RF_CSR_CFG0):retry count=%d!\n",
i));
i++;
}
while ((i < RETRY_LIMIT)
} while ((i < RETRY_LIMIT)
&& (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)));

if ((i == RETRY_LIMIT)
Expand Down Expand Up @@ -652,11 +650,11 @@ int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd,
}
else
#endif
return (NDIS_STATUS_RESOURCES);
return NDIS_STATUS_RESOURCES;

status = os_alloc_mem(pAd, (u8 **) (&cmdqelmt), sizeof(struct rt_cmdqelmt));
if ((status != NDIS_STATUS_SUCCESS) || (cmdqelmt == NULL))
return (NDIS_STATUS_RESOURCES);
return NDIS_STATUS_RESOURCES;

cmdqelmt->buffer = NULL;
if (pInformationBuffer != NULL) {
Expand All @@ -666,7 +664,7 @@ int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd,
if ((status != NDIS_STATUS_SUCCESS)
|| (cmdqelmt->buffer == NULL)) {
kfree(cmdqelmt);
return (NDIS_STATUS_RESOURCES);
return NDIS_STATUS_RESOURCES;
} else {
NdisMoveMemory(cmdqelmt->buffer, pInformationBuffer,
InformationBufferLength);
Expand Down Expand Up @@ -698,7 +696,7 @@ int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd,
} else
RTUSBCMDUp(pAd);

return (NDIS_STATUS_SUCCESS);
return NDIS_STATUS_SUCCESS;
}

/*
Expand Down Expand Up @@ -726,7 +724,7 @@ int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd,

status = os_alloc_mem(pAd, (u8 **) & cmdqelmt, sizeof(struct rt_cmdqelmt));
if ((status != NDIS_STATUS_SUCCESS) || (cmdqelmt == NULL))
return (NDIS_STATUS_RESOURCES);
return NDIS_STATUS_RESOURCES;
NdisZeroMemory(cmdqelmt, sizeof(struct rt_cmdqelmt));

if (InformationBufferLength > 0) {
Expand All @@ -736,7 +734,7 @@ int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd,
if ((status != NDIS_STATUS_SUCCESS)
|| (cmdqelmt->buffer == NULL)) {
os_free_mem(pAd, cmdqelmt);
return (NDIS_STATUS_RESOURCES);
return NDIS_STATUS_RESOURCES;
} else {
NdisMoveMemory(cmdqelmt->buffer, pInformationBuffer,
InformationBufferLength);
Expand Down Expand Up @@ -767,7 +765,7 @@ int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd,
} else
RTUSBCMDUp(pAd);
}
return (NDIS_STATUS_SUCCESS);
return NDIS_STATUS_SUCCESS;
}

/*
Expand Down Expand Up @@ -1071,7 +1069,7 @@ void CMDHandler(struct rt_rtmp_adapter *pAd)
TXRXQ_PCNT,
&MACValue);
if ((MACValue & 0xf00000
/*0x800000 */ ) == 0)
/*0x800000 */) == 0)
break;
Index++;
RTMPusecDelay(10000);
Expand Down Expand Up @@ -1406,15 +1404,13 @@ void CMDHandler(struct rt_rtmp_adapter *pAd)
/* All transfers must be aborted or cancelled before attempting to reset the pipe. */
{
u32 MACValue;

{
/*while ((atomic_read(&pAd->PendingRx) > 0) && (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))) */
if ((pAd->PendingRx > 0)
&&
(!RTMP_TEST_FLAG
(pAd,
fRTMP_ADAPTER_NIC_NOT_EXIST)))
{
fRTMP_ADAPTER_NIC_NOT_EXIST))) {
DBGPRINT_RAW
(RT_DEBUG_ERROR,
("BulkIn IRP Pending!!!\n"));
Expand All @@ -1424,7 +1420,6 @@ void CMDHandler(struct rt_rtmp_adapter *pAd)
pAd->PendingRx = 0;
}
}

/* Wait 10ms before reading register. */
RTMPusecDelay(10000);
ntStatus =
Expand Down

0 comments on commit 174db05

Please sign in to comment.