summaryrefslogtreecommitdiff
path: root/drivers/staging/rt2870
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-12-11 12:23:14 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 12:23:14 -0800
commit9f548a2a3dd8feca99f7301df474f983c1e815f3 (patch)
treef68bb3c31c7767463a567ee7eb9c56bd015437cb /drivers/staging/rt2870
parent52b81c89e564cdde8f2b4ccd0e314f04f8f23ab9 (diff)
Staging: rt28x0: fix comments in *.c files
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt2870')
-rw-r--r--drivers/staging/rt2870/common/rtusb_bulk.c170
-rw-r--r--drivers/staging/rt2870/common/rtusb_data.c10
-rw-r--r--drivers/staging/rt2870/common/rtusb_io.c162
3 files changed, 171 insertions, 171 deletions
diff --git a/drivers/staging/rt2870/common/rtusb_bulk.c b/drivers/staging/rt2870/common/rtusb_bulk.c
index 269dedc7c066..a45f64810dce 100644
--- a/drivers/staging/rt2870/common/rtusb_bulk.c
+++ b/drivers/staging/rt2870/common/rtusb_bulk.c
@@ -40,11 +40,11 @@
#ifdef RTMP_MAC_USB
#include "../rt_config.h"
-// Match total 6 bulkout endpoint to corresponding queue.
+/* Match total 6 bulkout endpoint to corresponding queue. */
UCHAR EpToQueue[6] =
{ FIFO_EDCA, FIFO_EDCA, FIFO_EDCA, FIFO_EDCA, FIFO_EDCA, FIFO_MGMT };
-//static BOOLEAN SingleBulkOut = FALSE;
+/*static BOOLEAN SingleBulkOut = FALSE; */
void RTUSB_FILL_BULK_URB(struct urb *pUrb,
struct usb_device *pUsb_Dev,
@@ -69,7 +69,7 @@ VOID RTUSBInitTxDesc(IN PRTMP_ADAPTER pAd,
pUrb = pTxContext->pUrb;
ASSERT(pUrb);
- // Store BulkOut PipeId
+ /* Store BulkOut PipeId */
pTxContext->BulkOutPipeId = BulkOutPipeId;
if (pTxContext->bAggregatible) {
@@ -79,7 +79,7 @@ VOID RTUSBInitTxDesc(IN PRTMP_ADAPTER pAd,
(PUCHAR) pTxContext->TransferBuffer->field.WirelessPacket;
}
- //Initialize a tx bulk urb
+ /*Initialize a tx bulk urb */
RTUSB_FILL_BULK_URB(pUrb,
pObj->pUsb_Dev,
usb_sndbulkpipe(pObj->pUsb_Dev,
@@ -108,14 +108,14 @@ VOID RTUSBInitHTTxDesc(IN PRTMP_ADAPTER pAd,
pUrb = pTxContext->pUrb;
ASSERT(pUrb);
- // Store BulkOut PipeId
+ /* Store BulkOut PipeId */
pTxContext->BulkOutPipeId = BulkOutPipeId;
pSrc =
&pTxContext->TransferBuffer->field.WirelessPacket[pTxContext->
NextBulkOutPosition];
- //Initialize a tx bulk urb
+ /*Initialize a tx bulk urb */
RTUSB_FILL_BULK_URB(pUrb,
pObj->pUsb_Dev,
usb_sndbulkpipe(pObj->pUsb_Dev,
@@ -142,7 +142,7 @@ VOID RTUSBInitRxDesc(IN PRTMP_ADAPTER pAd, IN PRX_CONTEXT pRxContext)
else
RX_bulk_size = MAX_RXBULK_SIZE;
- //Initialize a rx bulk urb
+ /*Initialize a rx bulk urb */
RTUSB_FILL_BULK_URB(pUrb,
pObj->pUsb_Dev,
usb_rcvbulkpipe(pObj->pUsb_Dev, pAd->BulkInEpAddr),
@@ -223,7 +223,7 @@ VOID RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd,
BULK_OUT_LOCK(&pAd->BulkOutLock[BulkOutPipeId], IrqFlags);
pAd->BulkOutPending[BulkOutPipeId] = FALSE;
- // Clear Data flag
+ /* Clear Data flag */
RTUSB_CLEAR_BULK_FLAG(pAd,
(fRTUSB_BULK_OUT_DATA_FRAG <<
BulkOutPipeId));
@@ -234,15 +234,15 @@ VOID RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd,
BULK_OUT_UNLOCK(&pAd->BulkOutLock[BulkOutPipeId], IrqFlags);
return;
}
- // Clear Data flag
+ /* Clear Data flag */
RTUSB_CLEAR_BULK_FLAG(pAd,
(fRTUSB_BULK_OUT_DATA_FRAG << BulkOutPipeId));
RTUSB_CLEAR_BULK_FLAG(pAd,
(fRTUSB_BULK_OUT_DATA_NORMAL << BulkOutPipeId));
- //DBGPRINT(RT_DEBUG_TRACE,("BulkOut-B:I=0x%lx, CWPos=%ld, CWRPos=%ld, NBPos=%ld, ENBPos=%ld, bCopy=%d!\n", in_interrupt(),
- // pHTTXContext->CurWritePosition, pHTTXContext->CurWriteRealPos, pHTTXContext->NextBulkOutPosition,
- // pHTTXContext->ENextBulkOutPosition, pHTTXContext->bCopySavePad));
+ /*DBGPRINT(RT_DEBUG_TRACE,("BulkOut-B:I=0x%lx, CWPos=%ld, CWRPos=%ld, NBPos=%ld, ENBPos=%ld, bCopy=%d!\n", in_interrupt(), */
+ /* pHTTXContext->CurWritePosition, pHTTXContext->CurWriteRealPos, pHTTXContext->NextBulkOutPosition, */
+ /* pHTTXContext->ENextBulkOutPosition, pHTTXContext->bCopySavePad)); */
pHTTXContext->NextBulkOutPosition = pHTTXContext->ENextBulkOutPosition;
ThisBulkSize = 0;
TmpBulkEndPos = pHTTXContext->NextBulkOutPosition;
@@ -282,12 +282,12 @@ VOID RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd,
("RTUSBBulkOutDataPacket AMPDU = %d.\n",
pTxWI->AMPDU));
- // add by Iverson, limit BulkOut size to 4k to pass WMM b mode 2T1R test items
- //if ((ThisBulkSize != 0) && (pTxWI->AMPDU == 0))
+ /* add by Iverson, limit BulkOut size to 4k to pass WMM b mode 2T1R test items */
+ /*if ((ThisBulkSize != 0) && (pTxWI->AMPDU == 0)) */
if ((ThisBulkSize != 0) && (pTxWI->PHYMODE == MODE_CCK)) {
if (((ThisBulkSize & 0xffff8000) != 0)
|| ((ThisBulkSize & 0x1000) == 0x1000)) {
- // Limit BulkOut size to about 4k bytes.
+ /* Limit BulkOut size to about 4k bytes. */
pHTTXContext->ENextBulkOutPosition =
TmpBulkEndPos;
break;
@@ -297,21 +297,21 @@ VOID RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd,
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.
+ /* 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;
break;
}
}
- // end Iverson
+ /* end Iverson */
else {
- if (((ThisBulkSize & 0xffff8000) != 0) || ((ThisBulkSize & 0x6000) == 0x6000)) { // Limit BulkOut size to about 24k bytes.
+ if (((ThisBulkSize & 0xffff8000) != 0) || ((ThisBulkSize & 0x6000) == 0x6000)) { /* Limit BulkOut size to about 24k bytes. */
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.
- // 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.
+ } 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;
break;
@@ -368,10 +368,10 @@ VOID RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd,
pAd->BulkOutPending[BulkOutPipeId] = FALSE;
BULK_OUT_UNLOCK(&pAd->BulkOutLock[BulkOutPipeId],
IrqFlags);
- //DBGPRINT(RT_DEBUG_LOUD,("Out:pTxInfo->USBDMATxPktLen=%d!\n", pTxInfo->USBDMATxPktLen));
+ /*DBGPRINT(RT_DEBUG_LOUD,("Out:pTxInfo->USBDMATxPktLen=%d!\n", pTxInfo->USBDMATxPktLen)); */
return;
}
- // Increase Total transmit byte counter
+ /* Increase Total transmit byte counter */
pAd->RalinkCounters.OneSecTransmittedByteCount +=
pTxWI->MPDUtotalByteCount;
pAd->RalinkCounters.TransmittedByteCount +=
@@ -379,7 +379,7 @@ VOID RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd,
pLastTxInfo = pTxInfo;
- // Make sure we use EDCA QUEUE.
+ /* Make sure we use EDCA QUEUE. */
pTxInfo->QSEL = FIFO_EDCA;
ThisBulkSize += (pTxInfo->USBDMATxPktLen + 4);
TmpBulkEndPos += (pTxInfo->USBDMATxPktLen + 4);
@@ -400,7 +400,7 @@ VOID RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd,
} while (TRUE);
- // adjust the pTxInfo->USBDMANextVLD value of last pTxInfo.
+ /* adjust the pTxInfo->USBDMANextVLD value of last pTxInfo. */
if (pLastTxInfo) {
pLastTxInfo->USBDMANextVLD = 0;
}
@@ -446,7 +446,7 @@ VOID RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd,
pBuf[0], pBuf[1], pBuf[2], pBuf[3],
pBuf[4], pBuf[5], pBuf[6], pBuf[7]));
}
- //DBGPRINT(RT_DEBUG_LOUD,("ENPos==CWPos=%ld, CWRPos=%ld, bCSPad=%d!\n", pHTTXContext->CurWritePosition, pHTTXContext->CurWriteRealPos, pHTTXContext->bCopySavePad));
+ /*DBGPRINT(RT_DEBUG_LOUD,("ENPos==CWPos=%ld, CWRPos=%ld, bCSPad=%d!\n", pHTTXContext->CurWritePosition, pHTTXContext->CurWriteRealPos, pHTTXContext->bCopySavePad)); */
}
if (pAd->bForcePrintTX == TRUE)
@@ -456,9 +456,9 @@ VOID RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd,
pHTTXContext->NextBulkOutPosition,
pHTTXContext->ENextBulkOutPosition,
pHTTXContext->bCopySavePad));
- //DBGPRINT(RT_DEBUG_LOUD,("BulkOut-A:Size=%ld, CWPos=%ld, CWRPos=%ld, NBPos=%ld, ENBPos=%ld, bCopy=%d, bLRound=%d!\n", ThisBulkSize, pHTTXContext->CurWritePosition, pHTTXContext->CurWriteRealPos, pHTTXContext->NextBulkOutPosition, pHTTXContext->ENextBulkOutPosition, pHTTXContext->bCopySavePad, bTxQLastRound));
+ /*DBGPRINT(RT_DEBUG_LOUD,("BulkOut-A:Size=%ld, CWPos=%ld, CWRPos=%ld, NBPos=%ld, ENBPos=%ld, bCopy=%d, bLRound=%d!\n", ThisBulkSize, pHTTXContext->CurWritePosition, pHTTXContext->CurWriteRealPos, pHTTXContext->NextBulkOutPosition, pHTTXContext->ENextBulkOutPosition, pHTTXContext->bCopySavePad, bTxQLastRound)); */
- // USB DMA engine requires to pad extra 4 bytes. This pad doesn't count into real bulkoutsize.
+ /* USB DMA engine requires to pad extra 4 bytes. This pad doesn't count into real bulkoutsize. */
pAppendant = &pWirelessPkt[TmpBulkEndPos];
NdisZeroMemory(pAppendant, 8);
ThisBulkSize += 4;
@@ -470,7 +470,7 @@ VOID RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd,
pAd->watchDogTxPendingCnt[BulkOutPipeId] = 1;
BULK_OUT_UNLOCK(&pAd->TxContextQueueLock[BulkOutPipeId], IrqFlags2);
- // Init Tx context descriptor
+ /* Init Tx context descriptor */
RTUSBInitHTTxDesc(pAd, pHTTXContext, BulkOutPipeId, ThisBulkSize,
(usb_complete_t) RTUSBBulkOutDataPacketComplete);
@@ -506,7 +506,7 @@ VOID RTUSBBulkOutDataPacketComplete(purbb_t pUrb, struct pt_regs * pt_regs)
pAd = pHTTXContext->pAd;
pObj = (POS_COOKIE) pAd->OS_Cookie;
- // Store BulkOut PipeId
+ /* Store BulkOut PipeId */
BulkOutPipeId = pHTTXContext->BulkOutPipeId;
pAd->BulkOutDataOneSecCount++;
@@ -562,13 +562,13 @@ VOID RTUSBBulkOutNullFrame(IN PRTMP_ADAPTER pAd)
pNullContext->IRPPending = TRUE;
RTMP_IRQ_UNLOCK(&pAd->BulkOutLock[0], IrqFlags);
- // Increase Total transmit byte counter
+ /* Increase Total transmit byte counter */
pAd->RalinkCounters.TransmittedByteCount += pNullContext->BulkOutSize;
- // Clear Null frame bulk flag
+ /* Clear Null frame bulk flag */
RTUSB_CLEAR_BULK_FLAG(pAd, fRTUSB_BULK_OUT_DATA_NULL);
- // Init Tx context descriptor
+ /* Init Tx context descriptor */
RTUSBInitTxDesc(pAd, pNullContext, 0,
(usb_complete_t) RTUSBBulkOutNullFrameComplete);
@@ -588,7 +588,7 @@ VOID RTUSBBulkOutNullFrame(IN PRTMP_ADAPTER pAd)
}
-// NULL frame use BulkOutPipeId = 0
+/* NULL frame use BulkOutPipeId = 0 */
VOID RTUSBBulkOutNullFrameComplete(purbb_t pUrb, struct pt_regs * pt_regs)
{
PRTMP_ADAPTER pAd;
@@ -633,7 +633,7 @@ VOID RTUSBBulkOutMLMEPacket(IN PRTMP_ADAPTER pAd, IN UCHAR Index)
(pMLMEContext->InUse == FALSE) ||
(pMLMEContext->bWaitingBulkOut == FALSE)) {
- // Clear MLME bulk flag
+ /* Clear MLME bulk flag */
RTUSB_CLEAR_BULK_FLAG(pAd, fRTUSB_BULK_OUT_MLME);
return;
@@ -652,17 +652,17 @@ VOID RTUSBBulkOutMLMEPacket(IN PRTMP_ADAPTER pAd, IN UCHAR Index)
pMLMEContext->bWaitingBulkOut = FALSE;
RTMP_IRQ_UNLOCK(&pAd->BulkOutLock[MGMTPIPEIDX], IrqFlags);
- // Increase Total transmit byte counter
+ /* Increase Total transmit byte counter */
pAd->RalinkCounters.TransmittedByteCount += pMLMEContext->BulkOutSize;
- // Clear MLME bulk flag
+ /* Clear MLME bulk flag */
RTUSB_CLEAR_BULK_FLAG(pAd, fRTUSB_BULK_OUT_MLME);
- // Init Tx context descriptor
+ /* Init Tx context descriptor */
RTUSBInitTxDesc(pAd, pMLMEContext, MGMTPIPEIDX,
(usb_complete_t) RTUSBBulkOutMLMEPacketComplete);
- //For mgmt urb buffer, because we use sk_buff, so we need to notify the USB controller do dma mapping.
+ /*For mgmt urb buffer, because we use sk_buff, so we need to notify the USB controller do dma mapping. */
pUrb->transfer_dma = 0;
pUrb->transfer_flags &= (~URB_NO_TRANSFER_DMA_MAP);
@@ -680,8 +680,8 @@ VOID RTUSBBulkOutMLMEPacket(IN PRTMP_ADAPTER pAd, IN UCHAR Index)
return;
}
- //DBGPRINT_RAW(RT_DEBUG_INFO, ("<---RTUSBBulkOutMLMEPacket \n"));
-// printk("<---RTUSBBulkOutMLMEPacket,Cpu=%d!, Dma=%d, SwIdx=%d!\n", pAd->MgmtRing.TxCpuIdx, pAd->MgmtRing.TxDmaIdx, pAd->MgmtRing.TxSwFreeIdx);
+ /*DBGPRINT_RAW(RT_DEBUG_INFO, ("<---RTUSBBulkOutMLMEPacket \n")); */
+/* printk("<---RTUSBBulkOutMLMEPacket,Cpu=%d!, Dma=%d, SwIdx=%d!\n", pAd->MgmtRing.TxCpuIdx, pAd->MgmtRing.TxDmaIdx, pAd->MgmtRing.TxSwFreeIdx); */
}
VOID RTUSBBulkOutMLMEPacketComplete(purbb_t pUrb, struct pt_regs * pt_regs)
@@ -692,7 +692,7 @@ VOID RTUSBBulkOutMLMEPacketComplete(purbb_t pUrb, struct pt_regs * pt_regs)
POS_COOKIE pObj;
int index;
- //DBGPRINT_RAW(RT_DEBUG_INFO, ("--->RTUSBBulkOutMLMEPacketComplete\n"));
+ /*DBGPRINT_RAW(RT_DEBUG_INFO, ("--->RTUSBBulkOutMLMEPacketComplete\n")); */
pMLMEContext = (PTX_CONTEXT) pUrb->context;
pAd = pMLMEContext->pAd;
pObj = (POS_COOKIE) pAd->OS_Cookie;
@@ -734,10 +734,10 @@ VOID RTUSBBulkOutPsPoll(IN PRTMP_ADAPTER pAd)
pPsPollContext->IRPPending = TRUE;
RTMP_IRQ_UNLOCK(&pAd->BulkOutLock[0], IrqFlags);
- // Clear PS-Poll bulk flag
+ /* Clear PS-Poll bulk flag */
RTUSB_CLEAR_BULK_FLAG(pAd, fRTUSB_BULK_OUT_PSPOLL);
- // Init Tx context descriptor
+ /* Init Tx context descriptor */
RTUSBInitTxDesc(pAd, pPsPollContext, MGMTPIPEIDX,
(usb_complete_t) RTUSBBulkOutPsPollComplete);
@@ -757,7 +757,7 @@ VOID RTUSBBulkOutPsPoll(IN PRTMP_ADAPTER pAd)
}
-// PS-Poll frame use BulkOutPipeId = 0
+/* PS-Poll frame use BulkOutPipeId = 0 */
VOID RTUSBBulkOutPsPollComplete(purbb_t pUrb, struct pt_regs * pt_regs)
{
PRTMP_ADAPTER pAd;
@@ -794,12 +794,12 @@ VOID DoBulkIn(IN RTMP_ADAPTER * pAd)
pAd->BulkInReq++;
RTMP_IRQ_UNLOCK(&pAd->BulkInLock, IrqFlags);
- // Init Rx context descriptor
+ /* Init Rx context descriptor */
NdisZeroMemory(pRxContext->TransferBuffer, pRxContext->BulkInOffset);
RTUSBInitRxDesc(pAd, pRxContext);
pUrb = pRxContext->pUrb;
- if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { // fail
+ if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { /* fail */
RTMP_IRQ_LOCK(&pAd->BulkInLock, IrqFlags);
pRxContext->InUse = FALSE;
@@ -809,9 +809,9 @@ VOID DoBulkIn(IN RTMP_ADAPTER * pAd)
RTMP_IRQ_UNLOCK(&pAd->BulkInLock, IrqFlags);
DBGPRINT(RT_DEBUG_ERROR,
("RTUSBBulkReceive: Submit Rx URB failed %d\n", ret));
- } else { // success
+ } else { /* success */
ASSERT((pRxContext->InUse == pRxContext->IRPPending));
- //printk("BIDone, Pend=%d,BIIdx=%d,BIRIdx=%d!\n", pAd->PendingRx, pAd->NextRxBulkInIndex, pAd->NextRxBulkInReadIndex);
+ /*printk("BIDone, Pend=%d,BIIdx=%d,BIRIdx=%d!\n", pAd->PendingRx, pAd->NextRxBulkInIndex, pAd->NextRxBulkInReadIndex); */
}
}
@@ -864,10 +864,10 @@ VOID RTUSBBulkReceive(IN PRTMP_ADAPTER pAd)
pRxContext->bRxHandling = TRUE;
RTMP_IRQ_UNLOCK(&pAd->BulkInLock, IrqFlags);
- // read RxContext, Since not
+ /* read RxContext, Since not */
STARxDoneInterruptHandle(pAd, TRUE);
- // Finish to handle this bulkIn buffer.
+ /* Finish to handle this bulkIn buffer. */
RTMP_IRQ_LOCK(&pAd->BulkInLock, IrqFlags);
pRxContext->BulkInOffset = 0;
pRxContext->Readable = FALSE;
@@ -914,9 +914,9 @@ VOID RTUSBBulkReceive(IN PRTMP_ADAPTER pAd)
*/
VOID RTUSBBulkRxComplete(purbb_t pUrb, struct pt_regs *pt_regs)
{
- // use a receive tasklet to handle received packets;
- // or sometimes hardware IRQ will be disabled here, so we can not
- // use spin_lock_bh()/spin_unlock_bh() after IRQ is disabled. :<
+ /* use a receive tasklet to handle received packets; */
+ /* or sometimes hardware IRQ will be disabled here, so we can not */
+ /* use spin_lock_bh()/spin_unlock_bh() after IRQ is disabled. :< */
PRX_CONTEXT pRxContext;
PRTMP_ADAPTER pAd;
POS_COOKIE pObj;
@@ -945,19 +945,19 @@ VOID RTUSBBulkRxComplete(purbb_t pUrb, struct pt_regs *pt_regs)
*/
VOID RTUSBKickBulkOut(IN PRTMP_ADAPTER pAd)
{
- // BulkIn Reset will reset whole USB PHY. So we need to make sure fRTMP_ADAPTER_BULKIN_RESET not flaged.
+ /* BulkIn Reset will reset whole USB PHY. So we need to make sure fRTMP_ADAPTER_BULKIN_RESET not flaged. */
if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NEED_STOP_TX)
) {
- // 2. PS-Poll frame is next
+ /* 2. PS-Poll frame is next */
if (RTUSB_TEST_BULK_FLAG(pAd, fRTUSB_BULK_OUT_PSPOLL)) {
RTUSBBulkOutPsPoll(pAd);
}
- // 5. Mlme frame is next
+ /* 5. Mlme frame is next */
else if ((RTUSB_TEST_BULK_FLAG(pAd, fRTUSB_BULK_OUT_MLME)) ||
(pAd->MgmtRing.TxSwFreeIdx < MGMT_RING_SIZE)) {
RTUSBBulkOutMLMEPacket(pAd, pAd->MgmtRing.TxDmaIdx);
}
- // 6. Data frame normal is next
+ /* 6. Data frame normal is next */
if (RTUSB_TEST_BULK_FLAG(pAd, fRTUSB_BULK_OUT_DATA_NORMAL)) {
if (((!RTMP_TEST_FLAG
(pAd, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS))
@@ -1006,14 +1006,14 @@ VOID RTUSBKickBulkOut(IN PRTMP_ADAPTER pAd)
NextBulkOutIndex[3]);
}
}
- // 7. Null frame is the last
+ /* 7. Null frame is the last */
else if (RTUSB_TEST_BULK_FLAG(pAd, fRTUSB_BULK_OUT_DATA_NULL)) {
if (!RTMP_TEST_FLAG
(pAd, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS)) {
RTUSBBulkOutNullFrame(pAd);
}
}
- // 8. No data avaliable
+ /* 8. No data avaliable */
else {
}
@@ -1116,8 +1116,8 @@ VOID RTUSBCancelPendingBulkInIRP(IN PRTMP_ADAPTER pAd)
RTUSB_UNLINK_URB(pRxContext->pUrb);
pRxContext->IRPPending = FALSE;
pRxContext->InUse = FALSE;
- //NdisInterlockedDecrement(&pAd->PendingRx);
- //pAd->PendingRx--;
+ /*NdisInterlockedDecrement(&pAd->PendingRx); */
+ /*pAd->PendingRx--; */
}
}
DBGPRINT_RAW(RT_DEBUG_TRACE, ("<---RTUSBCancelPendingBulkInIRP\n"));
@@ -1145,65 +1145,65 @@ VOID RTUSBCancelPendingBulkOutIRP(IN PRTMP_ADAPTER pAd)
PTX_CONTEXT pPsPollContext;
PTX_CONTEXT pRTSContext;
UINT i, Idx;
-// unsigned int IrqFlags;
-// NDIS_SPIN_LOCK *pLock;
-// BOOLEAN *pPending;
+/* unsigned int IrqFlags; */
+/* NDIS_SPIN_LOCK *pLock; */
+/* BOOLEAN *pPending; */
-// pLock = &pAd->BulkOutLock[MGMTPIPEIDX];
-// pPending = &pAd->BulkOutPending[MGMTPIPEIDX];
+/* pLock = &pAd->BulkOutLock[MGMTPIPEIDX]; */
+/* pPending = &pAd->BulkOutPending[MGMTPIPEIDX]; */
for (Idx = 0; Idx < 4; Idx++) {
pHTTXContext = &(pAd->TxContext[Idx]);
if (pHTTXContext->IRPPending == TRUE) {
- // Get the USB_CONTEXT and cancel it's IRP; the completion routine will itself
- // remove it from the HeadPendingSendList and NULL out HeadPendingSendList
- // when the last IRP on the list has been cancelled; that's how we exit this loop
- //
+ /* Get the USB_CONTEXT and cancel it's IRP; the completion routine will itself */
+ /* remove it from the HeadPendingSendList and NULL out HeadPendingSendList */
+ /* when the last IRP on the list has been cancelled; that's how we exit this loop */
+ /* */
RTUSB_UNLINK_URB(pHTTXContext->pUrb);
- // Sleep 200 microseconds to give cancellation time to work
+ /* Sleep 200 microseconds to give cancellation time to work */
RTMPusecDelay(200);
}
pAd->BulkOutPending[Idx] = FALSE;
}
- //RTMP_IRQ_LOCK(pLock, IrqFlags);
+ /*RTMP_IRQ_LOCK(pLock, IrqFlags); */
for (i = 0; i < MGMT_RING_SIZE; i++) {
pMLMEContext = (PTX_CONTEXT) pAd->MgmtRing.Cell[i].AllocVa;
if (pMLMEContext && (pMLMEContext->IRPPending == TRUE)) {
- // Get the USB_CONTEXT and cancel it's IRP; the completion routine will itself
- // remove it from the HeadPendingSendList and NULL out HeadPendingSendList
- // when the last IRP on the list has been cancelled; that's how we exit this loop
- //
+ /* Get the USB_CONTEXT and cancel it's IRP; the completion routine will itself */
+ /* remove it from the HeadPendingSendList and NULL out HeadPendingSendList */
+ /* when the last IRP on the list has been cancelled; that's how we exit this loop */
+ /* */
RTUSB_UNLINK_URB(pMLMEContext->pUrb);
pMLMEContext->IRPPending = FALSE;
- // Sleep 200 microsecs to give cancellation time to work
+ /* Sleep 200 microsecs to give cancellation time to work */
RTMPusecDelay(200);
}
}
pAd->BulkOutPending[MGMTPIPEIDX] = FALSE;
- //RTMP_IRQ_UNLOCK(pLock, IrqFlags);
+ /*RTMP_IRQ_UNLOCK(pLock, IrqFlags); */
for (i = 0; i < BEACON_RING_SIZE; i++) {
pBeaconContext = &(pAd->BeaconContext[i]);
if (pBeaconContext->IRPPending == TRUE) {
- // Get the USB_CONTEXT and cancel it's IRP; the completion routine will itself
- // remove it from the HeadPendingSendList and NULL out HeadPendingSendList
- // when the last IRP on the list has been cancelled; that's how we exit this loop
- //
+ /* Get the USB_CONTEXT and cancel it's IRP; the completion routine will itself */
+ /* remove it from the HeadPendingSendList and NULL out HeadPendingSendList */
+ /* when the last IRP on the list has been cancelled; that's how we exit this loop */
+ /* */
RTUSB_UNLINK_URB(pBeaconContext->pUrb);
- // Sleep 200 microsecs to give cancellation time to work
+ /* Sleep 200 microsecs to give cancellation time to work */
RTMPusecDelay(200);
}
}
@@ -1227,4 +1227,4 @@ VOID RTUSBCancelPendingBulkOutIRP(IN PRTMP_ADAPTER pAd)
}
}
-#endif // RTMP_MAC_USB //
+#endif /* RTMP_MAC_USB // */
diff --git a/drivers/staging/rt2870/common/rtusb_data.c b/drivers/staging/rt2870/common/rtusb_data.c
index d662f7fe6b6b..e6b0afc817f1 100644
--- a/drivers/staging/rt2870/common/rtusb_data.c
+++ b/drivers/staging/rt2870/common/rtusb_data.c
@@ -41,7 +41,7 @@
#include "../rt_config.h"
-extern UCHAR Phy11BGNextRateUpward[]; // defined in mlme.c
+extern UCHAR Phy11BGNextRateUpward[]; /* defined in mlme.c */
extern UCHAR EpToQueue[];
VOID REPORT_AMSDU_FRAMES_TO_LLC(IN PRTMP_ADAPTER pAd,
@@ -89,8 +89,8 @@ NDIS_STATUS RTUSBFreeDescriptorRequest(IN PRTMP_ADAPTER pAd,
IN UCHAR BulkOutPipeId,
IN UINT32 NumberRequired)
{
-// UCHAR FreeNumber = 0;
-// UINT Index;
+/* UCHAR FreeNumber = 0; */
+/* UINT Index; */
NDIS_STATUS Status = NDIS_STATUS_FAILURE;
unsigned long IrqFlags;
HT_TX_CONTEXT *pHTTXContext;
@@ -251,7 +251,7 @@ VOID RTMPWriteTxInfo(IN PRTMP_ADAPTER pAd,
if (QueueSel != FIFO_EDCA)
DBGPRINT(RT_DEBUG_TRACE,
("====> QueueSel != FIFO_EDCA<============\n"));
- pTxInfo->USBDMANextVLD = FALSE; //NextValid; // Need to check with Jan about this.
+ pTxInfo->USBDMANextVLD = FALSE; /*NextValid; // Need to check with Jan about this. */
pTxInfo->USBDMATxburst = TxBurst;
pTxInfo->WIV = bWiv;
pTxInfo->SwUseLastRound = 0;
@@ -259,4 +259,4 @@ VOID RTMPWriteTxInfo(IN PRTMP_ADAPTER pAd,
pTxInfo->rsv2 = 0;
}
-#endif // RTMP_MAC_USB //
+#endif /* RTMP_MAC_USB // */
diff --git a/drivers/staging/rt2870/common/rtusb_io.c b/drivers/staging/rt2870/common/rtusb_io.c
index 9a32bc859c6b..dd2e0d051934 100644
--- a/drivers/staging/rt2870/common/rtusb_io.c
+++ b/drivers/staging/rt2870/common/rtusb_io.c
@@ -88,7 +88,7 @@ NTSTATUS RTUSBFirmwareWrite(IN PRTMP_ADAPTER pAd,
{
UINT32 MacReg;
NTSTATUS Status;
-// ULONG i;
+/* ULONG i; */
USHORT writeLen;
Status = RTUSBReadMACRegister(pAd, MAC_CSR0, &MacReg);
@@ -100,11 +100,11 @@ NTSTATUS RTUSBFirmwareWrite(IN PRTMP_ADAPTER pAd,
Status = RTUSBWriteMACRegister(pAd, 0x701c, 0xffffffff);
Status = RTUSBFirmwareRun(pAd);
- //2008/11/28:KH add to fix the dead rf frequency offset bug<--
+ /*2008/11/28:KH add to fix the dead rf frequency offset bug<-- */
RTMPusecDelay(10000);
RTUSBWriteMACRegister(pAd, H2M_MAILBOX_CSR, 0);
- AsicSendCommandToMcu(pAd, 0x72, 0x00, 0x00, 0x00); //reset rf by MCU supported by new firmware
- //2008/11/28:KH add to fix the dead rf frequency offset bug-->
+ AsicSendCommandToMcu(pAd, 0x72, 0x00, 0x00, 0x00); /*reset rf by MCU supported by new firmware */
+ /*2008/11/28:KH add to fix the dead rf frequency offset bug--> */
return Status;
}
@@ -171,7 +171,7 @@ NTSTATUS RTUSBMultiWrite_OneByte(IN PRTMP_ADAPTER pAd,
{
NTSTATUS Status;
- // TODO: In 2870, use this funciton carefully cause it's not stable.
+ /* TODO: In 2870, use this funciton carefully cause it's not stable. */
Status = RTUSB_VendorRequest(pAd,
USBD_TRANSFER_DIRECTION_OUT,
DEVICE_VENDOR_REQUEST_OUT,
@@ -304,7 +304,7 @@ NTSTATUS RTUSBReadBBPRegister(IN PRTMP_ADAPTER pAd,
UINT i = 0;
NTSTATUS status;
- // Verify the busy condition
+ /* Verify the busy condition */
do {
status = RTUSBReadMACRegister(pAd, BBP_CSR_CFG, &BbpCsr.word);
if (status >= 0) {
@@ -320,16 +320,16 @@ NTSTATUS RTUSBReadBBPRegister(IN PRTMP_ADAPTER pAd,
if ((i == RETRY_LIMIT)
|| (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))) {
- //
- // Read failed then Return Default value.
- //
+ /* */
+ /* Read failed then Return Default value. */
+ /* */
*pValue = pAd->BbpWriteLatch[Id];
DBGPRINT_RAW(RT_DEBUG_ERROR,
("Retry count exhausted or device removed!!!\n"));
return STATUS_UNSUCCESSFUL;
}
- // Prepare for write material
+ /* Prepare for write material */
BbpCsr.word = 0;
BbpCsr.field.fRead = 1;
BbpCsr.field.Busy = 1;
@@ -337,7 +337,7 @@ NTSTATUS RTUSBReadBBPRegister(IN PRTMP_ADAPTER pAd,
RTUSBWriteMACRegister(pAd, BBP_CSR_CFG, BbpCsr.word);
i = 0;
- // Verify the busy condition
+ /* Verify the busy condition */
do {
status = RTUSBReadMACRegister(pAd, BBP_CSR_CFG, &BbpCsr.word);
if (status >= 0) {
@@ -355,9 +355,9 @@ NTSTATUS RTUSBReadBBPRegister(IN PRTMP_ADAPTER pAd,
if ((i == RETRY_LIMIT)
|| (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))) {
- //
- // Read failed then Return Default value.
- //
+ /* */
+ /* Read failed then Return Default value. */
+ /* */
*pValue = pAd->BbpWriteLatch[Id];
DBGPRINT_RAW(RT_DEBUG_ERROR,
@@ -389,7 +389,7 @@ NTSTATUS RTUSBWriteBBPRegister(IN PRTMP_ADAPTER pAd,
BBP_CSR_CFG_STRUC BbpCsr;
UINT i = 0;
NTSTATUS status;
- // Verify the busy condition
+ /* Verify the busy condition */
do {
status = RTUSBReadMACRegister(pAd, BBP_CSR_CFG, &BbpCsr.word);
if (status >= 0) {
@@ -410,7 +410,7 @@ NTSTATUS RTUSBWriteBBPRegister(IN PRTMP_ADAPTER pAd,
("Retry count exhausted or device removed!!!\n"));
return STATUS_UNSUCCESSFUL;
}
- // Prepare for write material
+ /* Prepare for write material */
BbpCsr.word = 0;
BbpCsr.field.fRead = 0;
BbpCsr.field.Value = Value;
@@ -561,11 +561,11 @@ VOID RTUSBPutToSleep(IN PRTMP_ADAPTER pAd)
{
UINT32 value;
- // Timeout 0x40 x 50us
+ /* Timeout 0x40 x 50us */
value = (SLEEPCID << 16) + (OWNERMCU << 24) + (0x40 << 8) + 1;
RTUSBWriteMACRegister(pAd, 0x7010, value);
RTUSBWriteMACRegister(pAd, 0x404, 0x30);
- //RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS);
+ /*RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS); */
DBGPRINT_RAW(RT_DEBUG_ERROR, ("Sleep Mailbox testvalue %x\n", value));
}
@@ -959,7 +959,7 @@ NTSTATUS RTUSB_ResetDevice(IN PRTMP_ADAPTER pAd)
NTSTATUS Status = TRUE;
DBGPRINT_RAW(RT_DEBUG_TRACE, ("--->USB_ResetDevice\n"));
- //RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS);
+ /*RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS); */
return Status;
}
@@ -968,9 +968,9 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
PCmdQElmt cmdqelmt;
PUCHAR pData;
NDIS_STATUS NdisStatus = NDIS_STATUS_SUCCESS;
-// ULONG Now = 0;
+/* ULONG Now = 0; */
NTSTATUS ntStatus;
-// unsigned long IrqFlags;
+/* unsigned long IrqFlags; */
while (pAd && pAd->CmdQ.size > 0) {
NdisStatus = NDIS_STATUS_SUCCESS;
@@ -993,7 +993,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
UINT32 data;
{
- // Read GPIO pin2 as Hardware controlled radio state
+ /* Read GPIO pin2 as Hardware controlled radio state */
RTUSBReadMACRegister(pAd,
GPIO_CTRL_CFG,
@@ -1023,7 +1023,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
MlmeRadioOn
(pAd);
- // Update extra information
+ /* Update extra information */
pAd->ExtraInfo =
EXTRA_INFO_CLEAR;
} else {
@@ -1033,7 +1033,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
MlmeRadioOff
(pAd);
- // Update extra information
+ /* Update extra information */
pAd->ExtraInfo =
HW_RADIO_OFF;
}
@@ -1056,15 +1056,15 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
UCHAR Index;
int ret = 0;
PHT_TX_CONTEXT pHTTXContext;
-// RTMP_TX_RING *pTxRing;
+/* RTMP_TX_RING *pTxRing; */
unsigned long IrqFlags;
DBGPRINT_RAW(RT_DEBUG_TRACE,
("CmdThread : CMDTHREAD_RESET_BULK_OUT(ResetPipeid=0x%0x)===>\n",
pAd->bulkResetPipeid));
- // All transfers must be aborted or cancelled before attempting to reset the pipe.
- //RTUSBCancelPendingBulkOutIRP(pAd);
- // Wait 10ms to let previous packet that are already in HW FIFO to clear. by MAXLEE 12-25-2007
+ /* All transfers must be aborted or cancelled before attempting to reset the pipe. */
+ /*RTUSBCancelPendingBulkOutIRP(pAd); */
+ /* Wait 10ms to let previous packet that are already in HW FIFO to clear. by MAXLEE 12-25-2007 */
Index = 0;
do {
RTUSBReadMACRegister(pAd,
@@ -1079,12 +1079,12 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
MACValue = 0;
RTUSBReadMACRegister(pAd, USB_DMA_CFG,
&MACValue);
- // To prevent Read Register error, we 2nd check the validity.
+ /* To prevent Read Register error, we 2nd check the validity. */
if ((MACValue & 0xc00000) == 0)
RTUSBReadMACRegister(pAd,
USB_DMA_CFG,
&MACValue);
- // To prevent Read Register error, we 3rd check the validity.
+ /* To prevent Read Register error, we 3rd check the validity. */
if ((MACValue & 0xc00000) == 0)
RTUSBReadMACRegister(pAd,
USB_DMA_CFG,
@@ -1093,7 +1093,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
RTUSBWriteMACRegister(pAd, USB_DMA_CFG,
MACValue);
- // Wait 1ms to prevent next URB to bulkout before HW reset. by MAXLEE 12-25-2007
+ /* Wait 1ms to prevent next URB to bulkout before HW reset. by MAXLEE 12-25-2007 */
RTMPusecDelay(1000);
MACValue &= (~0x80000);
@@ -1102,8 +1102,8 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
DBGPRINT_RAW(RT_DEBUG_TRACE,
("\tSet 0x2a0 bit19. Clear USB DMA TX path\n"));
- // Wait 5ms to prevent next URB to bulkout before HW reset. by MAXLEE 12-25-2007
- //RTMPusecDelay(5000);
+ /* Wait 5ms to prevent next URB to bulkout before HW reset. by MAXLEE 12-25-2007 */
+ /*RTMPusecDelay(5000); */
if ((pAd->
bulkResetPipeid &
@@ -1127,7 +1127,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
&(pAd->
TxContext[pAd->
bulkResetPipeid]);
- //NdisAcquireSpinLock(&pAd->BulkOutLock[pAd->bulkResetPipeid]);
+ /*NdisAcquireSpinLock(&pAd->BulkOutLock[pAd->bulkResetPipeid]); */
RTMP_INT_LOCK(&pAd->
BulkOutLock[pAd->
bulkResetPipeid],
@@ -1148,11 +1148,11 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
bulkResetPipeid] =
1;
- // no matter what, clean the flag
+ /* no matter what, clean the flag */
RTMP_CLEAR_FLAG(pAd,
fRTMP_ADAPTER_BULKOUT_RESET);
- //NdisReleaseSpinLock(&pAd->BulkOutLock[pAd->bulkResetPipeid]);
+ /*NdisReleaseSpinLock(&pAd->BulkOutLock[pAd->bulkResetPipeid]); */
RTMP_INT_UNLOCK(&pAd->
BulkOutLock
[pAd->
@@ -1259,8 +1259,8 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
}
}
} else {
- //NdisReleaseSpinLock(&pAd->BulkOutLock[pAd->bulkResetPipeid]);
- //RTMP_INT_UNLOCK(&pAd->BulkOutLock[pAd->bulkResetPipeid], IrqFlags);
+ /*NdisReleaseSpinLock(&pAd->BulkOutLock[pAd->bulkResetPipeid]); */
+ /*RTMP_INT_UNLOCK(&pAd->BulkOutLock[pAd->bulkResetPipeid], IrqFlags); */
DBGPRINT_RAW
(RT_DEBUG_ERROR,
@@ -1338,7 +1338,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
("\tTX Occupied by %d!\n",
pendingContext));
}
- // no matter what, clean the flag
+ /* no matter what, clean the flag */
RTMP_CLEAR_FLAG(pAd,
fRTMP_ADAPTER_BULKOUT_RESET);
@@ -1358,7 +1358,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
RTMPDeQueuePacket(pAd, FALSE,
NUM_OF_TX_RING,
MAX_TX_PROCESS);
- //RTUSBKickBulkOut(pAd);
+ /*RTUSBKickBulkOut(pAd); */
}
}
@@ -1403,12 +1403,12 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
DBGPRINT_RAW(RT_DEBUG_TRACE,
("CmdThread : CMDTHREAD_RESET_BULK_IN === >\n"));
- // All transfers must be aborted or cancelled before attempting to reset the pipe.
+ /* All transfers must be aborted or cancelled before attempting to reset the pipe. */
{
UINT32 MACValue;
{
- //while ((atomic_read(&pAd->PendingRx) > 0) && (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)))
+ /*while ((atomic_read(&pAd->PendingRx) > 0) && (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))) */
if ((pAd->PendingRx > 0)
&&
(!RTMP_TEST_FLAG
@@ -1425,7 +1425,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
}
}
- // Wait 10ms before reading register.
+ /* Wait 10ms before reading register. */
RTMPusecDelay(10000);
ntStatus =
RTUSBReadMACRegister(pAd, MAC_CSR0,
@@ -1505,7 +1505,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
i <
pAd->CommonCfg.
NumOfBulkInIRP; i++) {
- //RTUSBBulkReceive(pAd);
+ /*RTUSBBulkReceive(pAd); */
PRX_CONTEXT pRxContext;
PURB pUrb;
int ret = 0;
@@ -1541,11 +1541,11 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
BulkInLock,
IrqFlags);
- // Init Rx context descriptor
+ /* Init Rx context descriptor */
RTUSBInitRxDesc(pAd,
pRxContext);
pUrb = pRxContext->pUrb;
- if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { // fail
+ if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { /* fail */
RTMP_IRQ_LOCK
(&pAd->
@@ -1571,9 +1571,9 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
ret,
pUrb->
status));
- } else { // success
- //DBGPRINT(RT_DEBUG_TRACE, ("BIDone, Pend=%d,BIIdx=%d,BIRIdx=%d!\n",
- // pAd->PendingRx, pAd->NextRxBulkInIndex, pAd->NextRxBulkInReadIndex));
+ } else { /* success */
+ /*DBGPRINT(RT_DEBUG_TRACE, ("BIDone, Pend=%d,BIIdx=%d,BIRIdx=%d!\n", */
+ /* pAd->PendingRx, pAd->NextRxBulkInIndex, pAd->NextRxBulkInReadIndex)); */
DBGPRINT_RAW
(RT_DEBUG_TRACE,
("CMDTHREAD_RESET_BULK_IN: Submit Rx URB Done, status=%d!\n",
@@ -1584,7 +1584,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
}
} else {
- // Card must be removed
+ /* Card must be removed */
if (NT_SUCCESS(ntStatus) !=
TRUE) {
RTMP_SET_FLAG(pAd,
@@ -1643,7 +1643,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
MACValue));
RTUSBWriteMACRegister(pAd, offset,
MACValue);
- // Read bitmask
+ /* Read bitmask */
RTUSBReadMACRegister(pAd, offset + 4,
&MACRValue);
if (SetAsicWcid.DeleteTid != 0xffffffff)
@@ -1693,7 +1693,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
("Cmd : CMDTHREAD_SET_ASIC_WCID_CIPHER : WCID = %ld, Cipher = %lx.\n",
SetAsicWcidAttri.WCID,
SetAsicWcidAttri.Cipher));
- // Read bitmask
+ /* Read bitmask */
RTUSBReadMACRegister(pAd, offset,
&MACRValue);
MACRValue = 0;
@@ -1725,10 +1725,10 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
("2-offset = %x , MACValue= %x,\n",
offset, MACRValue));
- //
- // Update cipher algorithm. WSTA always use BSS0
- //
- // for adhoc mode only ,because wep status slow than add key, when use zero config
+ /* */
+ /* Update cipher algorithm. WSTA always use BSS0 */
+ /* */
+ /* for adhoc mode only ,because wep status slow than add key, when use zero config */
if (pAd->StaCfg.BssType == BSS_ADHOC) {
offset =
MAC_WCID_ATTRIBUTE_BASE;
@@ -1745,7 +1745,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
offset,
MACRValue);
- //Update group key cipher,,because wep status slow than add key, when use zero config
+ /*Update group key cipher,,because wep status slow than add key, when use zero config */
RTUSBReadMACRegister(pAd,
SHARED_KEY_MODE_BASE
+
@@ -1770,8 +1770,8 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
}
break;
-//Benson modified for USB interface, avoid in interrupt when write key, 20080724 -->
- case RT_CMD_SET_KEY_TABLE: //General call for AsicAddPairwiseKeyEntry()
+/*Benson modified for USB interface, avoid in interrupt when write key, 20080724 --> */
+ case RT_CMD_SET_KEY_TABLE: /*General call for AsicAddPairwiseKeyEntry() */
{
RT_ADD_PAIRWISE_KEY_ENTRY KeyInfo;
KeyInfo =
@@ -1786,7 +1786,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
}
break;
- case RT_CMD_SET_RX_WCID_TABLE: //General call for RTMPAddWcidAttributeEntry()
+ case RT_CMD_SET_RX_WCID_TABLE: /*General call for RTMPAddWcidAttributeEntry() */
{
PMAC_TABLE_ENTRY pEntry;
UCHAR KeyIdx = 0;
@@ -1802,7 +1802,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
pEntry);
}
break;
-//Benson modified for USB interface, avoid in interrupt when write key, 20080724 <--
+/*Benson modified for USB interface, avoid in interrupt when write key, 20080724 <-- */
case CMDTHREAD_SET_CLIENT_MAC_ENTRY:
{
@@ -1865,17 +1865,17 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
DefaultKeyId].
CipherAlg, FALSE);
} else {
- //
- // Other case, disable engine.
- // Don't worry WPA key, we will add WPA Key after 4-Way handshaking.
- //
+ /* */
+ /* Other case, disable engine. */
+ /* Don't worry WPA key, we will add WPA Key after 4-Way handshaking. */
+ /* */
USHORT offset;
offset =
MAC_WCID_ATTRIBUTE_BASE
+
(pEntry->Aid *
HW_WCID_ATTRI_SIZE);
- // RX_PKEY_MODE:0 for no security; RX_KEY_TAB:0 for shared key table; BSS_IDX:0
+ /* RX_PKEY_MODE:0 for no security; RX_KEY_TAB:0 for shared key table; BSS_IDX:0 */
RTUSBWriteMACRegister
(pAd, offset, 0);
}
@@ -1894,7 +1894,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
}
break;
-// add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet
+/* add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet */
case CMDTHREAD_UPDATE_PROTECT:
{
AsicUpdateProtect(pAd, 0,
@@ -1902,7 +1902,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
TRUE, 0);
}
break;
-// end johnli
+/* end johnli */
case OID_802_11_ADD_WEP:
{
@@ -1916,7 +1916,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
pWepKey = (PNDIS_802_11_WEP) pData;
KeyIdx = pWepKey->KeyIndex & 0x0fffffff;
- // it is a shared key
+ /* it is a shared key */
if ((KeyIdx >= 4)
|| ((pWepKey->KeyLength != 5)
&& (pWepKey->KeyLength !=
@@ -1944,10 +1944,10 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
5) ? CIPHER_WEP64 :
CIPHER_WEP128;
- //
- // Change the WEP cipher to CKIP cipher if CKIP KP on.
- // Funk UI or Meetinghouse UI will add ckip key from this path.
- //
+ /* */
+ /* Change the WEP cipher to CKIP cipher if CKIP KP on. */
+ /* Funk UI or Meetinghouse UI will add ckip key from this path. */
+ /* */
if (pAd->OpMode == OPMODE_STA) {
pAd->MacTab.
@@ -1968,7 +1968,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
CipherAlg = CipherAlg;
if (pWepKey->
KeyIndex & 0x80000000) {
- // Default key for tx (shared key)
+ /* Default key for tx (shared key) */
UCHAR IVEIV[8];
UINT32 WCIDAttri, Value;
USHORT offset, offset2;
@@ -1977,8 +1977,8 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
pAd->StaCfg.
DefaultKeyId =
(UCHAR) KeyIdx;
- // Add BSSID to WCTable. because this is Tx wep key.
- // WCID Attribute UDF:3, BSSIdx:3, Alg:3, Keytable:1=PAIRWISE KEY, BSSIdx is 0
+ /* Add BSSID to WCTable. because this is Tx wep key. */
+ /* WCID Attribute UDF:3, BSSIdx:3, Alg:3, Keytable:1=PAIRWISE KEY, BSSIdx is 0 */
WCIDAttri =
(CipherAlg << 1) |
SHAREDKEYTABLE;
@@ -1991,9 +1991,9 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
RTUSBWriteMACRegister
(pAd, offset,
WCIDAttri);
- // 1. IV/EIV
- // Specify key index to find shared key.
- IVEIV[3] = (UCHAR) (KeyIdx << 6); //WEP Eiv bit off. groupkey index is not 0
+ /* 1. IV/EIV */
+ /* Specify key index to find shared key. */
+ IVEIV[3] = (UCHAR) (KeyIdx << 6); /*WEP Eiv bit off. groupkey index is not 0 */
offset =
PAIRWISE_IVEIV_TABLE_BASE
+
@@ -2030,7 +2030,7 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
i += 4;
}
- // 2. WCID Attribute UDF:3, BSSIdx:3, Alg:3, Keytable:use share key, BSSIdx is 0
+ /* 2. WCID Attribute UDF:3, BSSIdx:3, Alg:3, Keytable:use share key, BSSIdx is 0 */
WCIDAttri =
(pAd->
SharedKey[BSS0]
@@ -2109,4 +2109,4 @@ VOID CMDHandler(IN PRTMP_ADAPTER pAd)
} /* end of while */
}
-#endif // RTMP_MAC_USB //
+#endif /* RTMP_MAC_USB // */