Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196894
b: refs/heads/master
c: d24e449
h: refs/heads/master
v: v3
  • Loading branch information
Andrea Gelmini authored and Greg Kroah-Hartman committed May 11, 2010
1 parent 174db05 commit 6f96a8d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 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: 2c300f2a65a113440f9fbd0bce7e8d446615fb03
refs/heads/master: d24e449762facabfb00e4095247f4f027a73caf3
27 changes: 12 additions & 15 deletions trunk/drivers/staging/rt2870/common/rtusb_bulk.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ void RTUSBInitRxDesc(struct rt_rtmp_adapter *pAd, struct rt_rx_context *pRxConte
*/

#define BULK_OUT_LOCK(pLock, IrqFlags) \
if(1 /*!(in_interrupt() & 0xffff0000)*/) \
if (1 /*!(in_interrupt() & 0xffff0000)*/) \
RTMP_IRQ_LOCK((pLock), IrqFlags);

#define BULK_OUT_UNLOCK(pLock, IrqFlags) \
if(1 /*!(in_interrupt() & 0xffff0000)*/) \
if (1 /*!(in_interrupt() & 0xffff0000)*/) \
RTMP_IRQ_UNLOCK((pLock), IrqFlags);

void RTUSBBulkOutDataPacket(struct rt_rtmp_adapter *pAd,
Expand All @@ -187,7 +187,7 @@ void RTUSBBulkOutDataPacket(struct rt_rtmp_adapter *pAd,
PURB pUrb;
int ret = 0;
struct rt_txinfo *pTxInfo, *pLastTxInfo = NULL;
struct rt_txwi * pTxWI;
struct rt_txwi *pTxWI;
unsigned long TmpBulkEndPos, ThisBulkSize;
unsigned long IrqFlags = 0, IrqFlags2 = 0;
u8 *pWirelessPkt, *pAppendant;
Expand Down Expand Up @@ -273,9 +273,9 @@ void RTUSBBulkOutDataPacket(struct rt_rtmp_adapter *pAd,
}

do {
pTxInfo = (struct rt_txinfo *)& pWirelessPkt[TmpBulkEndPos];
pTxInfo = (struct rt_txinfo *)&pWirelessPkt[TmpBulkEndPos];
pTxWI =
(struct rt_txwi *) & pWirelessPkt[TmpBulkEndPos + TXINFO_SIZE];
(struct rt_txwi *)&pWirelessPkt[TmpBulkEndPos + TXINFO_SIZE];

if (pAd->bForcePrintTX == TRUE)
DBGPRINT(RT_DEBUG_TRACE,
Expand Down Expand Up @@ -310,7 +310,7 @@ void RTUSBBulkOutDataPacket(struct rt_rtmp_adapter *pAd,
pHTTXContext->ENextBulkOutPosition =
TmpBulkEndPos;
break;
} else if (((pAd->BulkOutMaxPacketSize < 512) && ((ThisBulkSize & 0xfffff800) != 0)) /*|| ( (ThisBulkSize != 0) && (pTxWI->AMPDU == 0)) */ ) { /* For USB 1.1 or peer which didn't support AMPDU, limit the BulkOut size. */
} else if (((pAd->BulkOutMaxPacketSize < 512) && ((ThisBulkSize & 0xfffff800) != 0)) /*|| ( (ThisBulkSize != 0) && (pTxWI->AMPDU == 0)) */) { /* For USB 1.1 or peer which didn't support AMPDU, limit the BulkOut size. */
/* For performence in b/g mode, now just check for USB 1.1 and didn't care about the APMDU or not! 2008/06/04. */
pHTTXContext->ENextBulkOutPosition =
TmpBulkEndPos;
Expand All @@ -326,15 +326,15 @@ void RTUSBBulkOutDataPacket(struct rt_rtmp_adapter *pAd,
if (pTxInfo->QSEL != FIFO_EDCA) {
DBGPRINT(RT_DEBUG_ERROR,
("%s(): ====> pTxInfo->QueueSel(%d)!= FIFO_EDCA!!!!\n",
__FUNCTION__, pTxInfo->QSEL));
__func__, pTxInfo->QSEL));
DBGPRINT(RT_DEBUG_ERROR,
("\tCWPos=%ld, NBPos=%ld, ENBPos=%ld, bCopy=%d!\n",
pHTTXContext->CurWritePosition,
pHTTXContext->NextBulkOutPosition,
pHTTXContext->ENextBulkOutPosition,
pHTTXContext->bCopySavePad));
hex_dump("Wrong QSel Pkt:",
(u8 *)& pWirelessPkt[TmpBulkEndPos],
(u8 *)&pWirelessPkt[TmpBulkEndPos],
(pHTTXContext->CurWritePosition -
pHTTXContext->NextBulkOutPosition));
}
Expand Down Expand Up @@ -401,9 +401,8 @@ void RTUSBBulkOutDataPacket(struct rt_rtmp_adapter *pAd,
} while (TRUE);

/* adjust the pTxInfo->USBDMANextVLD value of last pTxInfo. */
if (pLastTxInfo) {
if (pLastTxInfo)
pLastTxInfo->USBDMANextVLD = 0;
}

/*
We need to copy SavedPad when following condition matched!
Expand Down Expand Up @@ -949,9 +948,8 @@ void RTUSBKickBulkOut(struct rt_rtmp_adapter *pAd)
if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NEED_STOP_TX)
) {
/* 2. PS-Poll frame is next */
if (RTUSB_TEST_BULK_FLAG(pAd, fRTUSB_BULK_OUT_PSPOLL)) {
if (RTUSB_TEST_BULK_FLAG(pAd, fRTUSB_BULK_OUT_PSPOLL))
RTUSBBulkOutPsPoll(pAd);
}
/* 5. Mlme frame is next */
else if ((RTUSB_TEST_BULK_FLAG(pAd, fRTUSB_BULK_OUT_MLME)) ||
(pAd->MgmtRing.TxSwFreeIdx < MGMT_RING_SIZE)) {
Expand Down Expand Up @@ -1014,9 +1012,8 @@ void RTUSBKickBulkOut(struct rt_rtmp_adapter *pAd)
}
}
/* 8. No data avaliable */
else {

}
else
;
}
}

Expand Down

0 comments on commit 6f96a8d

Please sign in to comment.