mirror of https://gitee.com/openkylin/linux.git
Staging: rt3070: remove dead RALINK_ATE code
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
ae2d5411cd
commit
99db6000cf
|
@ -503,10 +503,6 @@ NDIS_STATUS RTMPAllocTxRxRingMemory(
|
||||||
NdisAllocateSpinLock(&pAd->TxContextQueueLock[num]);
|
NdisAllocateSpinLock(&pAd->TxContextQueueLock[num]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
NdisAllocateSpinLock(&pAd->GenericLock);
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
// NdisAllocateSpinLock(&pAd->MemLock); // Not used in RT28XX
|
// NdisAllocateSpinLock(&pAd->MemLock); // Not used in RT28XX
|
||||||
|
|
||||||
// NdisAllocateSpinLock(&pAd->MacTabLock); // init it in UserCfgInit()
|
// NdisAllocateSpinLock(&pAd->MacTabLock); // init it in UserCfgInit()
|
||||||
|
@ -672,9 +668,7 @@ VOID RTMPFreeTxRxRingMemory(
|
||||||
NdisFreeSpinLock(&pAd->MLMEBulkOutLock);
|
NdisFreeSpinLock(&pAd->MLMEBulkOutLock);
|
||||||
|
|
||||||
NdisFreeSpinLock(&pAd->CmdQLock);
|
NdisFreeSpinLock(&pAd->CmdQLock);
|
||||||
#ifdef RALINK_ATE
|
|
||||||
NdisFreeSpinLock(&pAd->GenericLock);
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
// Clear all pending bulk-out request flags.
|
// Clear all pending bulk-out request flags.
|
||||||
RTUSB_CLEAR_BULK_FLAG(pAd, 0xffffffff);
|
RTUSB_CLEAR_BULK_FLAG(pAd, 0xffffffff);
|
||||||
|
|
||||||
|
@ -1182,17 +1176,6 @@ static void rx_done_tasklet(unsigned long data)
|
||||||
|
|
||||||
ASSERT((pRxContext->InUse == pRxContext->IRPPending));
|
ASSERT((pRxContext->InUse == pRxContext->IRPPending));
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
// If the driver is in ATE mode and Rx frame is set into here.
|
|
||||||
if (pAd->ContinBulkIn == TRUE)
|
|
||||||
{
|
|
||||||
RTUSBBulkReceive(pAd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
RTUSBBulkReceive(pAd);
|
RTUSBBulkReceive(pAd);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -881,11 +881,6 @@ VOID ORIBATimerTimeout(
|
||||||
// USHORT Sequence;
|
// USHORT Sequence;
|
||||||
UCHAR TID;
|
UCHAR TID;
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
return;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
total = pAd->MacTab.Size * NUM_OF_TID;
|
total = pAd->MacTab.Size * NUM_OF_TID;
|
||||||
|
|
||||||
for (i = 1; ((i <MAX_LEN_OF_BA_ORI_TABLE) && (total > 0)) ; i++)
|
for (i = 1; ((i <MAX_LEN_OF_BA_ORI_TABLE) && (total > 0)) ; i++)
|
||||||
|
|
|
@ -1081,12 +1081,6 @@ VOID BAOriSessionSetupTimeout(
|
||||||
}
|
}
|
||||||
#endif // CONFIG_STA_SUPPORT //
|
#endif // CONFIG_STA_SUPPORT //
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
// Nothing to do in ATE mode.
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
return;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
pEntry = &pAd->MacTab.Content[pBAEntry->Wcid];
|
pEntry = &pAd->MacTab.Content[pBAEntry->Wcid];
|
||||||
|
|
||||||
if ((pBAEntry->ORI_BA_Status == Originator_WaitRes) && (pBAEntry->Token < ORI_SESSION_MAX_RETRY))
|
if ((pBAEntry->ORI_BA_Status == Originator_WaitRes) && (pBAEntry->Token < ORI_SESSION_MAX_RETRY))
|
||||||
|
|
|
@ -397,12 +397,6 @@ VOID ScanNextChannel(
|
||||||
}
|
}
|
||||||
#endif // CONFIG_STA_SUPPORT //
|
#endif // CONFIG_STA_SUPPORT //
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
// Nothing to do in ATE mode.
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
return;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
if (pAd->MlmeAux.Channel == 0)
|
if (pAd->MlmeAux.Channel == 0)
|
||||||
{
|
{
|
||||||
if ((pAd->CommonCfg.BBPCurrentBW == BW_40)
|
if ((pAd->CommonCfg.BBPCurrentBW == BW_40)
|
||||||
|
|
|
@ -590,14 +590,6 @@ VOID MlmeHandler(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if(ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("The driver is in ATE mode now in MlmeHandler\n"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
//From message type, determine which state machine I should drive
|
//From message type, determine which state machine I should drive
|
||||||
if (MlmeDequeue(&pAd->Mlme.Queue, &Elem))
|
if (MlmeDequeue(&pAd->Mlme.Queue, &Elem))
|
||||||
{
|
{
|
||||||
|
@ -844,18 +836,6 @@ VOID MlmePeriodicExec(
|
||||||
|
|
||||||
RT28XX_MLME_PRE_SANITY_CHECK(pAd);
|
RT28XX_MLME_PRE_SANITY_CHECK(pAd);
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
/* Do not show RSSI until "Normal 1 second Mlme PeriodicExec". */
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
if (pAd->Mlme.PeriodicRound % MLME_TASK_EXEC_MULTIPLE != (MLME_TASK_EXEC_MULTIPLE - 1))
|
|
||||||
{
|
|
||||||
pAd->Mlme.PeriodicRound ++;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
#ifdef CONFIG_STA_SUPPORT
|
#ifdef CONFIG_STA_SUPPORT
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
||||||
{
|
{
|
||||||
|
@ -913,30 +893,6 @@ VOID MlmePeriodicExec(
|
||||||
{
|
{
|
||||||
pAd->Mlme.OneSecPeriodicRound ++;
|
pAd->Mlme.OneSecPeriodicRound ++;
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
/* request from Baron : move this routine from later to here */
|
|
||||||
/* for showing Rx error count in ATE RXFRAME */
|
|
||||||
NICUpdateRawCounters(pAd);
|
|
||||||
if (pAd->ate.bRxFer == 1)
|
|
||||||
{
|
|
||||||
pAd->ate.RxTotalCnt += pAd->ate.RxCntPerSec;
|
|
||||||
ate_print(KERN_EMERG "MlmePeriodicExec: Rx packet cnt = %d/%d\n", pAd->ate.RxCntPerSec, pAd->ate.RxTotalCnt);
|
|
||||||
pAd->ate.RxCntPerSec = 0;
|
|
||||||
|
|
||||||
if (pAd->ate.RxAntennaSel == 0)
|
|
||||||
ate_print(KERN_EMERG "MlmePeriodicExec: Rx AvgRssi0=%d, AvgRssi1=%d, AvgRssi2=%d\n\n",
|
|
||||||
pAd->ate.AvgRssi0, pAd->ate.AvgRssi1, pAd->ate.AvgRssi2);
|
|
||||||
else
|
|
||||||
ate_print(KERN_EMERG "MlmePeriodicExec: Rx AvgRssi=%d\n\n", pAd->ate.AvgRssi0);
|
|
||||||
}
|
|
||||||
MlmeResetRalinkCounters(pAd);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
|
|
||||||
if (rx_Total)
|
if (rx_Total)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1052,17 +1008,6 @@ VOID STAMlmePeriodicExec(
|
||||||
ULONG TxTotalCnt;
|
ULONG TxTotalCnt;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
//
|
|
||||||
// We return here in ATE mode, because the statistics
|
|
||||||
// that ATE needs are not collected via this routine.
|
|
||||||
//
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
// It is supposed that we will never reach here in ATE mode.
|
|
||||||
ASSERT(!(ATE_ON(pAd)));
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
return;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
#ifdef WPA_SUPPLICANT_SUPPORT
|
#ifdef WPA_SUPPLICANT_SUPPORT
|
||||||
if (pAd->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_DISABLE)
|
if (pAd->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_DISABLE)
|
||||||
#endif // WPA_SUPPLICANT_SUPPORT //
|
#endif // WPA_SUPPLICANT_SUPPORT //
|
||||||
|
@ -2024,13 +1969,6 @@ VOID MlmeDynamicTxRateSwitching(
|
||||||
ULONG TxRetransmit = 0, TxSuccess = 0, TxFailCount = 0;
|
ULONG TxRetransmit = 0, TxSuccess = 0, TxFailCount = 0;
|
||||||
MAC_TABLE_ENTRY *pEntry;
|
MAC_TABLE_ENTRY *pEntry;
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// walk through MAC table, see if need to change AP's TX rate toward each entry
|
// walk through MAC table, see if need to change AP's TX rate toward each entry
|
||||||
//
|
//
|
||||||
|
@ -4870,12 +4808,6 @@ BOOLEAN MlmeEnqueueForRecv(
|
||||||
INT MsgType;
|
INT MsgType;
|
||||||
MLME_QUEUE *Queue = (MLME_QUEUE *)&pAd->Mlme.Queue;
|
MLME_QUEUE *Queue = (MLME_QUEUE *)&pAd->Mlme.Queue;
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
/* Nothing to do in ATE mode */
|
|
||||||
if(ATE_ON(pAd))
|
|
||||||
return FALSE;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
// Do nothing if the driver is starting halt state.
|
// Do nothing if the driver is starting halt state.
|
||||||
// This might happen when timer already been fired before cancel timer with mlmehalt
|
// This might happen when timer already been fired before cancel timer with mlmehalt
|
||||||
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS | fRTMP_ADAPTER_NIC_NOT_EXIST))
|
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS | fRTMP_ADAPTER_NIC_NOT_EXIST))
|
||||||
|
@ -5550,11 +5482,6 @@ VOID AsicUpdateProtect(
|
||||||
UCHAR i;
|
UCHAR i;
|
||||||
UINT32 MacReg = 0;
|
UINT32 MacReg = 0;
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
return;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
#ifdef DOT11_N_SUPPORT
|
#ifdef DOT11_N_SUPPORT
|
||||||
if (!(pAd->CommonCfg.bHTProtect) && (OperationMode != 8))
|
if (!(pAd->CommonCfg.bHTProtect) && (OperationMode != 8))
|
||||||
{
|
{
|
||||||
|
@ -8411,11 +8338,6 @@ VOID AsicEvaluateRxAnt(
|
||||||
{
|
{
|
||||||
UCHAR BBPR3 = 0;
|
UCHAR BBPR3 = 0;
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
return;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS |
|
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS |
|
||||||
fRTMP_ADAPTER_HALT_IN_PROGRESS |
|
fRTMP_ADAPTER_HALT_IN_PROGRESS |
|
||||||
fRTMP_ADAPTER_RADIO_OFF |
|
fRTMP_ADAPTER_RADIO_OFF |
|
||||||
|
@ -8530,11 +8452,6 @@ VOID AsicRxAntEvalTimeout(
|
||||||
CHAR larger = -127, rssi0, rssi1, rssi2;
|
CHAR larger = -127, rssi0, rssi1, rssi2;
|
||||||
#endif // CONFIG_STA_SUPPORT //
|
#endif // CONFIG_STA_SUPPORT //
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
return;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS |
|
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS |
|
||||||
fRTMP_ADAPTER_HALT_IN_PROGRESS |
|
fRTMP_ADAPTER_HALT_IN_PROGRESS |
|
||||||
fRTMP_ADAPTER_RADIO_OFF |
|
fRTMP_ADAPTER_RADIO_OFF |
|
||||||
|
|
|
@ -2478,12 +2478,6 @@ VOID NICUpdateFifoStaCounters(
|
||||||
CHAR reTry;
|
CHAR reTry;
|
||||||
UCHAR succMCS;
|
UCHAR succMCS;
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
/* Nothing to do in ATE mode */
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
return;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
RTMP_IO_READ32(pAd, TX_STA_FIFO, &StaFifo.word);
|
RTMP_IO_READ32(pAd, TX_STA_FIFO, &StaFifo.word);
|
||||||
|
@ -3512,36 +3506,6 @@ VOID UserCfgInit(
|
||||||
//RTMPInitTimer(pAd, &pAd->RECBATimer, RECBATimerTimeout, pAd, TRUE);
|
//RTMPInitTimer(pAd, &pAd->RECBATimer, RECBATimerTimeout, pAd, TRUE);
|
||||||
//RTMPSetTimer(&pAd->RECBATimer, REORDER_EXEC_INTV);
|
//RTMPSetTimer(&pAd->RECBATimer, REORDER_EXEC_INTV);
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
NdisZeroMemory(&pAd->ate, sizeof(ATE_INFO));
|
|
||||||
pAd->ate.Mode = ATE_STOP;
|
|
||||||
pAd->ate.TxCount = 200;/* to exceed TX_RING_SIZE ... */
|
|
||||||
pAd->ate.TxLength = 1024;
|
|
||||||
pAd->ate.TxWI.ShortGI = 0;// LONG GI : 800 ns
|
|
||||||
pAd->ate.TxWI.PHYMODE = MODE_CCK;
|
|
||||||
pAd->ate.TxWI.MCS = 3;
|
|
||||||
pAd->ate.TxWI.BW = BW_20;
|
|
||||||
pAd->ate.Channel = 1;
|
|
||||||
pAd->ate.QID = QID_AC_BE;
|
|
||||||
pAd->ate.Addr1[0] = 0x00;
|
|
||||||
pAd->ate.Addr1[1] = 0x11;
|
|
||||||
pAd->ate.Addr1[2] = 0x22;
|
|
||||||
pAd->ate.Addr1[3] = 0xAA;
|
|
||||||
pAd->ate.Addr1[4] = 0xBB;
|
|
||||||
pAd->ate.Addr1[5] = 0xCC;
|
|
||||||
NdisMoveMemory(pAd->ate.Addr2, pAd->ate.Addr1, ETH_LENGTH_OF_ADDRESS);
|
|
||||||
NdisMoveMemory(pAd->ate.Addr3, pAd->ate.Addr1, ETH_LENGTH_OF_ADDRESS);
|
|
||||||
pAd->ate.bRxFer = 0;
|
|
||||||
pAd->ate.bQATxStart = FALSE;
|
|
||||||
pAd->ate.bQARxStart = FALSE;
|
|
||||||
#ifdef RALINK_28xx_QA
|
|
||||||
//pAd->ate.Repeat = 0;
|
|
||||||
pAd->ate.TxStatus = 0;
|
|
||||||
pAd->ate.AtePid = 0;
|
|
||||||
#endif // RALINK_28xx_QA //
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
|
|
||||||
pAd->CommonCfg.bWiFiTest = FALSE;
|
pAd->CommonCfg.bWiFiTest = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
@ -3820,13 +3784,6 @@ VOID RTMPSetLED(
|
||||||
UCHAR HighByte = 0;
|
UCHAR HighByte = 0;
|
||||||
UCHAR LowByte;
|
UCHAR LowByte;
|
||||||
|
|
||||||
// In ATE mode of RT2860 AP/STA, we have erased 8051 firmware.
|
|
||||||
// So LED mode is not supported when ATE is running.
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
return;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
LowByte = pAd->LedCntl.field.LedMode&0x7f;
|
LowByte = pAd->LedCntl.field.LedMode&0x7f;
|
||||||
switch (Status)
|
switch (Status)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1039,9 +1039,6 @@ VOID RTUSBKickBulkOut(
|
||||||
{
|
{
|
||||||
// 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)
|
if (!RTMP_TEST_FLAG(pAd ,fRTMP_ADAPTER_NEED_STOP_TX)
|
||||||
#ifdef RALINK_ATE
|
|
||||||
&& !(ATE_ON(pAd))
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// 2. PS-Poll frame is next
|
// 2. PS-Poll frame is next
|
||||||
|
@ -1119,18 +1116,6 @@ VOID RTUSBKickBulkOut(
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef RALINK_ATE
|
|
||||||
/* If the mode is in ATE mode. */
|
|
||||||
else if((ATE_ON(pAd)) &&
|
|
||||||
!RTMP_TEST_FLAG(pAd ,fRTMP_ADAPTER_NEED_STOP_TX))// PETER : watch out !
|
|
||||||
{
|
|
||||||
if (RTUSB_TEST_BULK_FLAG(pAd, fRTUSB_BULK_OUT_DATA_ATE))
|
|
||||||
{
|
|
||||||
ATE_RTUSBBulkOutDataPacket(pAd, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1295,14 +1280,6 @@ VOID RTUSBCancelPendingBulkOutIRP(
|
||||||
RTMPusecDelay(200);
|
RTMPusecDelay(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
pHTTXContext->bCopySavePad = 0;
|
|
||||||
pHTTXContext->CurWritePosition = 0;
|
|
||||||
pHTTXContext->CurWriteRealPos = 0;
|
|
||||||
pHTTXContext->bCurWriting = FALSE;
|
|
||||||
pHTTXContext->NextBulkOutPosition = 0;
|
|
||||||
pHTTXContext->ENextBulkOutPosition = 0;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
pAd->BulkOutPending[Idx] = FALSE;
|
pAd->BulkOutPending[Idx] = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1217,13 +1217,6 @@ VOID CMDHandler(
|
||||||
#ifdef CONFIG_STA_SUPPORT
|
#ifdef CONFIG_STA_SUPPORT
|
||||||
UINT32 data;
|
UINT32 data;
|
||||||
#endif // CONFIG_STA_SUPPORT //
|
#endif // CONFIG_STA_SUPPORT //
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if(ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("The driver is in ATE mode now\n"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
#ifdef CONFIG_STA_SUPPORT
|
#ifdef CONFIG_STA_SUPPORT
|
||||||
|
|
||||||
|
@ -1284,9 +1277,6 @@ VOID CMDHandler(
|
||||||
PHT_TX_CONTEXT pHTTXContext;
|
PHT_TX_CONTEXT pHTTXContext;
|
||||||
// RTMP_TX_RING *pTxRing;
|
// RTMP_TX_RING *pTxRing;
|
||||||
unsigned long IrqFlags;
|
unsigned long IrqFlags;
|
||||||
#ifdef RALINK_ATE
|
|
||||||
PTX_CONTEXT pNullContext = &(pAd->NullContext);
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
DBGPRINT_RAW(RT_DEBUG_TRACE, ("CmdThread : CMDTHREAD_RESET_BULK_OUT(ResetPipeid=0x%0x)===>\n", pAd->bulkResetPipeid));
|
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.
|
// All transfers must be aborted or cancelled before attempting to reset the pipe.
|
||||||
//RTUSBCancelPendingBulkOutIRP(pAd);
|
//RTUSBCancelPendingBulkOutIRP(pAd);
|
||||||
|
@ -1349,32 +1339,6 @@ VOID CMDHandler(
|
||||||
//NdisReleaseSpinLock(&pAd->BulkOutLock[pAd->bulkResetPipeid]);
|
//NdisReleaseSpinLock(&pAd->BulkOutLock[pAd->bulkResetPipeid]);
|
||||||
RTMP_INT_UNLOCK(&pAd->BulkOutLock[pAd->bulkResetPipeid], IrqFlags);
|
RTMP_INT_UNLOCK(&pAd->BulkOutLock[pAd->bulkResetPipeid], IrqFlags);
|
||||||
/*-----------------------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------------------*/
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if(ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
pNullContext->IRPPending = TRUE;
|
|
||||||
//
|
|
||||||
// If driver is still in ATE TXFRAME mode,
|
|
||||||
// keep on transmitting ATE frames.
|
|
||||||
//
|
|
||||||
DBGPRINT_RAW(RT_DEBUG_TRACE, ("pAd->ate.Mode == %d\npAd->ContinBulkOut == %d\npAd->BulkOutRemained == %d\n", pAd->ate.Mode, pAd->ContinBulkOut, atomic_read(&pAd->BulkOutRemained)));
|
|
||||||
if((pAd->ate.Mode == ATE_TXFRAME) && ((pAd->ContinBulkOut == TRUE) || (atomic_read(&pAd->BulkOutRemained) > 0)))
|
|
||||||
{
|
|
||||||
DBGPRINT_RAW(RT_DEBUG_TRACE, ("After CMDTHREAD_RESET_BULK_OUT, continue to bulk out frames !\n"));
|
|
||||||
|
|
||||||
// Init Tx context descriptor
|
|
||||||
RTUSBInitTxDesc(pAd, pNullContext, 0/* pAd->bulkResetPipeid */, (usb_complete_t)ATE_RTUSBBulkOutDataPacketComplete);
|
|
||||||
|
|
||||||
if((ret = RTUSB_SUBMIT_URB(pNullContext->pUrb))!=0)
|
|
||||||
{
|
|
||||||
DBGPRINT(RT_DEBUG_ERROR, ("ATE_RTUSBBulkOutDataPacket: Submit Tx URB failed %d\n", ret));
|
|
||||||
}
|
|
||||||
|
|
||||||
pAd->BulkOutReq++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
/*-----------------------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------------------*/
|
||||||
{
|
{
|
||||||
RTUSBInitHTTxDesc(pAd, pHTTXContext, pAd->bulkResetPipeid, pHTTXContext->BulkOutSize, (usb_complete_t)RTUSBBulkOutDataPacketComplete);
|
RTUSBInitHTTxDesc(pAd, pHTTXContext, pAd->bulkResetPipeid, pHTTXContext->BulkOutSize, (usb_complete_t)RTUSBBulkOutDataPacketComplete);
|
||||||
|
@ -1487,19 +1451,6 @@ VOID CMDHandler(
|
||||||
{
|
{
|
||||||
UINT32 MACValue;
|
UINT32 MACValue;
|
||||||
/*-----------------------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------------------*/
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
if((pAd->PendingRx > 0) && (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)))
|
|
||||||
{
|
|
||||||
DBGPRINT_RAW(RT_DEBUG_ERROR, ("ATE : BulkIn IRP Pending!!!\n"));
|
|
||||||
ATE_RTUSBCancelPendingBulkInIRP(pAd);
|
|
||||||
RTMPusecDelay(100000);
|
|
||||||
pAd->PendingRx = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
/*-----------------------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------------------*/
|
||||||
{
|
{
|
||||||
//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)))
|
||||||
|
|
|
@ -84,9 +84,6 @@
|
||||||
|
|
||||||
#define OID_GEN_MACHINE_NAME 0x0001021A
|
#define OID_GEN_MACHINE_NAME 0x0001021A
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
#define RT_QUERY_ATE_TXDONE_COUNT 0x0401
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
#define RT_QUERY_SIGNAL_CONTEXT 0x0402
|
#define RT_QUERY_SIGNAL_CONTEXT 0x0402
|
||||||
#define RT_SET_IAPP_PID 0x0404
|
#define RT_SET_IAPP_PID 0x0404
|
||||||
#define RT_SET_APD_PID 0x0405
|
#define RT_SET_APD_PID 0x0405
|
||||||
|
@ -667,12 +664,6 @@ typedef struct _NDIS_802_11_CAPABILITY
|
||||||
#define RTPRIV_IOCTL_E2P (SIOCIWFIRSTPRIV + 0x07)
|
#define RTPRIV_IOCTL_E2P (SIOCIWFIRSTPRIV + 0x07)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
#ifdef RALINK_28xx_QA
|
|
||||||
#define RTPRIV_IOCTL_ATE (SIOCIWFIRSTPRIV + 0x08)
|
|
||||||
#endif // RALINK_28xx_QA //
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
#define RTPRIV_IOCTL_STATISTICS (SIOCIWFIRSTPRIV + 0x09)
|
#define RTPRIV_IOCTL_STATISTICS (SIOCIWFIRSTPRIV + 0x09)
|
||||||
#define RTPRIV_IOCTL_ADD_PMKID_CACHE (SIOCIWFIRSTPRIV + 0x0A)
|
#define RTPRIV_IOCTL_ADD_PMKID_CACHE (SIOCIWFIRSTPRIV + 0x0A)
|
||||||
#define RTPRIV_IOCTL_RADIUS_DATA (SIOCIWFIRSTPRIV + 0x0C)
|
#define RTPRIV_IOCTL_RADIUS_DATA (SIOCIWFIRSTPRIV + 0x0C)
|
||||||
|
|
|
@ -69,10 +69,6 @@
|
||||||
#define fRTUSB_BULK_OUT_DATA_FRAG_3 0x00000100
|
#define fRTUSB_BULK_OUT_DATA_FRAG_3 0x00000100
|
||||||
#define fRTUSB_BULK_OUT_DATA_FRAG_4 0x00000200
|
#define fRTUSB_BULK_OUT_DATA_FRAG_4 0x00000200
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
#define fRTUSB_BULK_OUT_DATA_ATE 0x00100000
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
#define RT2870_USB_DEVICES \
|
#define RT2870_USB_DEVICES \
|
||||||
{ \
|
{ \
|
||||||
{USB_DEVICE(0x148F,0x2770)}, /* Ralink */ \
|
{USB_DEVICE(0x148F,0x2770)}, /* Ralink */ \
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,262 +0,0 @@
|
||||||
/*
|
|
||||||
*************************************************************************
|
|
||||||
* Ralink Tech Inc.
|
|
||||||
* 5F., No.36, Taiyuan St., Jhubei City,
|
|
||||||
* Hsinchu County 302,
|
|
||||||
* Taiwan, R.O.C.
|
|
||||||
*
|
|
||||||
* (c) Copyright 2002-2007, Ralink Technology, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
|
||||||
* it under the terms of the GNU General Public License as published by *
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or *
|
|
||||||
* (at your option) any later version. *
|
|
||||||
* *
|
|
||||||
* This program is distributed in the hope that it will be useful, *
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
||||||
* GNU General Public License for more details. *
|
|
||||||
* *
|
|
||||||
* You should have received a copy of the GNU General Public License *
|
|
||||||
* along with this program; if not, write to the *
|
|
||||||
* Free Software Foundation, Inc., *
|
|
||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
||||||
* *
|
|
||||||
*************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __ATE_H__
|
|
||||||
#define __ATE_H__
|
|
||||||
|
|
||||||
#define ate_print printk
|
|
||||||
#define ATEDBGPRINT DBGPRINT
|
|
||||||
|
|
||||||
#ifdef RT2870
|
|
||||||
#define EEPROM_SIZE 0x400
|
|
||||||
#ifdef CONFIG_STA_SUPPORT
|
|
||||||
#define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2870STA/e2p.bin"
|
|
||||||
#endif // CONFIG_STA_SUPPORT //
|
|
||||||
#endif // RT2870 //
|
|
||||||
|
|
||||||
#define ATE_ON(_p) (((_p)->ate.Mode) != ATE_STOP)
|
|
||||||
|
|
||||||
/* RT2880_iNIC will define "RT2860". */
|
|
||||||
|
|
||||||
/* RT2880_iNIC will define RT2860. */
|
|
||||||
|
|
||||||
#ifdef RT2870
|
|
||||||
#define EEPROM_SIZE 0x400
|
|
||||||
#ifdef CONFIG_STA_SUPPORT
|
|
||||||
#define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2870STA/e2p.bin"
|
|
||||||
#endif // CONFIG_STA_SUPPORT //
|
|
||||||
#endif // RT2870 //
|
|
||||||
|
|
||||||
#ifdef RT2870
|
|
||||||
#define ATE_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) RTMP_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV)
|
|
||||||
#define ATE_BBP_IO_WRITE8_BY_REG_ID(_A, _I, _V) RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, _I, _V)
|
|
||||||
|
|
||||||
#define BULK_OUT_LOCK(pLock, IrqFlags) \
|
|
||||||
if(1 /*!(in_interrupt() & 0xffff0000)*/) \
|
|
||||||
RTMP_IRQ_LOCK((pLock), IrqFlags);
|
|
||||||
|
|
||||||
#define BULK_OUT_UNLOCK(pLock, IrqFlags) \
|
|
||||||
if(1 /*!(in_interrupt() & 0xffff0000)*/) \
|
|
||||||
RTMP_IRQ_UNLOCK((pLock), IrqFlags);
|
|
||||||
|
|
||||||
// Prototypes of completion funuc.
|
|
||||||
VOID ATE_RTUSBBulkOutDataPacketComplete(
|
|
||||||
IN purbb_t purb,
|
|
||||||
OUT struct pt_regs *pt_regs);
|
|
||||||
|
|
||||||
VOID ATE_RTUSBBulkOutDataPacket(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN UCHAR BulkOutPipeId);
|
|
||||||
|
|
||||||
VOID ATE_RTUSBCancelPendingBulkInIRP(
|
|
||||||
IN PRTMP_ADAPTER pAd);
|
|
||||||
#endif // RT2870 //
|
|
||||||
|
|
||||||
#ifdef RT30xx
|
|
||||||
#define ATE_RF_IO_READ8_BY_REG_ID(_A, _I, _pV) RTMP_RF_IO_READ8_BY_REG_ID(_A, _I, _pV)
|
|
||||||
#define ATE_RF_IO_WRITE8_BY_REG_ID(_A, _I, _V) RTMP_RF_IO_WRITE8_BY_REG_ID(_A, _I, _V)
|
|
||||||
#endif // RT30xx //
|
|
||||||
|
|
||||||
|
|
||||||
VOID rt_ee_read_all(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
OUT USHORT *Data);
|
|
||||||
|
|
||||||
|
|
||||||
VOID rt_ee_write_all(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN USHORT *Data);
|
|
||||||
|
|
||||||
INT Set_ATE_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_DA_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_SA_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_BSSID_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_CHANNEL_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_TX_POWER0_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_TX_POWER1_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_TX_Antenna_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_RX_Antenna_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_TX_FREQOFFSET_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_TX_BW_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_TX_LENGTH_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_TX_COUNT_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_TX_MCS_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_TX_MODE_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_TX_GI_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
|
|
||||||
INT Set_ATE_RX_FER_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_Read_RF_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_Write_RF1_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_Write_RF2_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_Write_RF3_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_Write_RF4_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_Load_E2P_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_Read_E2P_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_Show_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_ATE_Help_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
#ifdef RALINK_28xx_QA
|
|
||||||
VOID ATE_QA_Statistics(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PRXWI_STRUC pRxWI,
|
|
||||||
IN PRT28XX_RXD_STRUC p28xxRxD,
|
|
||||||
IN PHEADER_802_11 pHeader);
|
|
||||||
|
|
||||||
VOID RtmpDoAte(
|
|
||||||
IN PRTMP_ADAPTER pAdapter,
|
|
||||||
IN struct iwreq *wrq);
|
|
||||||
|
|
||||||
VOID BubbleSort(
|
|
||||||
IN INT32 n,
|
|
||||||
IN INT32 a[]);
|
|
||||||
|
|
||||||
VOID CalNoiseLevel(
|
|
||||||
IN PRTMP_ADAPTER pAdapter,
|
|
||||||
IN UCHAR channel,
|
|
||||||
OUT INT32 buffer[3][10]);
|
|
||||||
|
|
||||||
BOOLEAN SyncTxRxConfig(
|
|
||||||
IN PRTMP_ADAPTER pAdapter,
|
|
||||||
IN USHORT offset,
|
|
||||||
IN UCHAR value);
|
|
||||||
|
|
||||||
INT Set_TxStop_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
INT Set_RxStop_Proc(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PUCHAR arg);
|
|
||||||
|
|
||||||
#endif // RALINK_28xx_QA //
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
VOID ATEAsicSwitchChannel(
|
|
||||||
IN PRTMP_ADAPTER pAd);
|
|
||||||
|
|
||||||
VOID ATEAsicAdjustTxPower(
|
|
||||||
IN PRTMP_ADAPTER pAd);
|
|
||||||
|
|
||||||
VOID ATEDisableAsicProtect(
|
|
||||||
IN PRTMP_ADAPTER pAd);
|
|
||||||
|
|
||||||
CHAR ATEConvertToRssi(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN CHAR Rssi,
|
|
||||||
IN UCHAR RssiNumber);
|
|
||||||
|
|
||||||
VOID ATESampleRssi(
|
|
||||||
IN PRTMP_ADAPTER pAd,
|
|
||||||
IN PRXWI_STRUC pRxWI);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_STA_SUPPORT
|
|
||||||
VOID RTMPStationStop(
|
|
||||||
IN PRTMP_ADAPTER pAd);
|
|
||||||
|
|
||||||
VOID RTMPStationStart(
|
|
||||||
IN PRTMP_ADAPTER pAd);
|
|
||||||
#endif // CONFIG_STA_SUPPORT //
|
|
||||||
#endif // __ATE_H__ //
|
|
|
@ -77,10 +77,6 @@
|
||||||
#include "igmp_snoop.h"
|
#include "igmp_snoop.h"
|
||||||
#endif // IGMP_SNOOP_SUPPORT //
|
#endif // IGMP_SNOOP_SUPPORT //
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
#include "rt_ate.h"
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
#ifdef CONFIG_STA_SUPPORT
|
#ifdef CONFIG_STA_SUPPORT
|
||||||
#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
|
#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
|
||||||
#ifndef WPA_SUPPLICANT_SUPPORT
|
#ifndef WPA_SUPPLICANT_SUPPORT
|
||||||
|
|
|
@ -1410,15 +1410,6 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
|
||||||
int status = 0;
|
int status = 0;
|
||||||
PNDIS_PACKET pPacket = (PNDIS_PACKET) skb;
|
PNDIS_PACKET pPacket = (PNDIS_PACKET) skb;
|
||||||
|
|
||||||
/* RT2870STA does this in RTMPSendPackets() */
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
RELEASE_NDIS_PACKET(pAd, pPacket, NDIS_STATUS_RESOURCES);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
#ifdef CONFIG_STA_SUPPORT
|
#ifdef CONFIG_STA_SUPPORT
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
||||||
{
|
{
|
||||||
|
|
|
@ -285,92 +285,6 @@ extern UCHAR PRE_N_HT_OUI[];
|
||||||
|
|
||||||
#define MAXSEQ (0xFFF)
|
#define MAXSEQ (0xFFF)
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
typedef struct _ATE_INFO {
|
|
||||||
UCHAR Mode;
|
|
||||||
CHAR TxPower0;
|
|
||||||
CHAR TxPower1;
|
|
||||||
CHAR TxAntennaSel;
|
|
||||||
CHAR RxAntennaSel;
|
|
||||||
TXWI_STRUC TxWI; // TXWI
|
|
||||||
USHORT QID;
|
|
||||||
UCHAR Addr1[MAC_ADDR_LEN];
|
|
||||||
UCHAR Addr2[MAC_ADDR_LEN];
|
|
||||||
UCHAR Addr3[MAC_ADDR_LEN];
|
|
||||||
UCHAR Channel;
|
|
||||||
UINT32 TxLength;
|
|
||||||
UINT32 TxCount;
|
|
||||||
UINT32 TxDoneCount; // Tx DMA Done
|
|
||||||
UINT32 RFFreqOffset;
|
|
||||||
BOOLEAN bRxFer;
|
|
||||||
BOOLEAN bQATxStart; // Have compiled QA in and use it to ATE tx.
|
|
||||||
BOOLEAN bQARxStart; // Have compiled QA in and use it to ATE rx.
|
|
||||||
UINT32 RxTotalCnt;
|
|
||||||
UINT32 RxCntPerSec;
|
|
||||||
|
|
||||||
CHAR LastSNR0; // last received SNR
|
|
||||||
CHAR LastSNR1; // last received SNR for 2nd antenna
|
|
||||||
CHAR LastRssi0; // last received RSSI
|
|
||||||
CHAR LastRssi1; // last received RSSI for 2nd antenna
|
|
||||||
CHAR LastRssi2; // last received RSSI for 3rd antenna
|
|
||||||
CHAR AvgRssi0; // last 8 frames' average RSSI
|
|
||||||
CHAR AvgRssi1; // last 8 frames' average RSSI
|
|
||||||
CHAR AvgRssi2; // last 8 frames' average RSSI
|
|
||||||
SHORT AvgRssi0X8; // sum of last 8 frames' RSSI
|
|
||||||
SHORT AvgRssi1X8; // sum of last 8 frames' RSSI
|
|
||||||
SHORT AvgRssi2X8; // sum of last 8 frames' RSSI
|
|
||||||
|
|
||||||
UINT32 NumOfAvgRssiSample;
|
|
||||||
|
|
||||||
#ifdef RALINK_28xx_QA
|
|
||||||
// Tx frame
|
|
||||||
#ifdef RT2870
|
|
||||||
/* not used in RT2860 */
|
|
||||||
TXINFO_STRUC TxInfo; // TxInfo
|
|
||||||
#endif // RT2870 //
|
|
||||||
USHORT HLen; // Header Length
|
|
||||||
USHORT PLen; // Pattern Length
|
|
||||||
UCHAR Header[32]; // Header buffer
|
|
||||||
UCHAR Pattern[32]; // Pattern buffer
|
|
||||||
USHORT DLen; // Data Length
|
|
||||||
USHORT seq;
|
|
||||||
UINT32 CID;
|
|
||||||
pid_t AtePid;
|
|
||||||
// counters
|
|
||||||
UINT32 U2M;
|
|
||||||
UINT32 OtherData;
|
|
||||||
UINT32 Beacon;
|
|
||||||
UINT32 OtherCount;
|
|
||||||
UINT32 TxAc0;
|
|
||||||
UINT32 TxAc1;
|
|
||||||
UINT32 TxAc2;
|
|
||||||
UINT32 TxAc3;
|
|
||||||
UINT32 TxHCCA;
|
|
||||||
UINT32 TxMgmt;
|
|
||||||
UINT32 RSSI0;
|
|
||||||
UINT32 RSSI1;
|
|
||||||
UINT32 RSSI2;
|
|
||||||
UINT32 SNR0;
|
|
||||||
UINT32 SNR1;
|
|
||||||
// control
|
|
||||||
//UINT32 Repeat; // Tx Cpu count
|
|
||||||
UCHAR TxStatus; // task Tx status // 0 --> task is idle, 1 --> task is running
|
|
||||||
#endif // RALINK_28xx_QA //
|
|
||||||
} ATE_INFO, *PATE_INFO;
|
|
||||||
|
|
||||||
#ifdef RALINK_28xx_QA
|
|
||||||
struct ate_racfghdr {
|
|
||||||
UINT32 magic_no;
|
|
||||||
USHORT command_type;
|
|
||||||
USHORT command_id;
|
|
||||||
USHORT length;
|
|
||||||
USHORT sequence;
|
|
||||||
USHORT status;
|
|
||||||
UCHAR data[2046];
|
|
||||||
} __attribute__((packed));
|
|
||||||
#endif // RALINK_28xx_QA //
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
#ifdef DOT11_N_SUPPORT
|
#ifdef DOT11_N_SUPPORT
|
||||||
struct reordering_mpdu
|
struct reordering_mpdu
|
||||||
{
|
{
|
||||||
|
@ -2753,12 +2667,6 @@ typedef struct _RTMP_ADAPTER
|
||||||
struct completion mlmeComplete;
|
struct completion mlmeComplete;
|
||||||
struct completion CmdQComplete;
|
struct completion CmdQComplete;
|
||||||
wait_queue_head_t *wait;
|
wait_queue_head_t *wait;
|
||||||
|
|
||||||
//======Lock for 2870 ATE
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
NDIS_SPIN_LOCK GenericLock; // ATE Tx/Rx generic spinlock
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
#endif // RT2870 //
|
#endif // RT2870 //
|
||||||
|
|
||||||
|
|
||||||
|
@ -3075,16 +2983,6 @@ typedef struct _RTMP_ADAPTER
|
||||||
|
|
||||||
struct wificonf WIFItestbed;
|
struct wificonf WIFItestbed;
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
ATE_INFO ate;
|
|
||||||
#ifdef RT2870
|
|
||||||
BOOLEAN ContinBulkOut; //ATE bulk out control
|
|
||||||
BOOLEAN ContinBulkIn; //ATE bulk in control
|
|
||||||
atomic_t BulkOutRemained;
|
|
||||||
atomic_t BulkInRemained;
|
|
||||||
#endif // RT2870 //
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
#ifdef DOT11_N_SUPPORT
|
#ifdef DOT11_N_SUPPORT
|
||||||
struct reordering_mpdu_pool mpdu_blk_pool;
|
struct reordering_mpdu_pool mpdu_blk_pool;
|
||||||
#endif // DOT11_N_SUPPORT //
|
#endif // DOT11_N_SUPPORT //
|
||||||
|
|
|
@ -1359,24 +1359,6 @@
|
||||||
#define INT_MESH 0x0500
|
#define INT_MESH 0x0500
|
||||||
|
|
||||||
// Use bitmap to allow coexist of ATE_TXFRAME and ATE_RXFRAME(i.e.,to support LoopBack mode)
|
// Use bitmap to allow coexist of ATE_TXFRAME and ATE_RXFRAME(i.e.,to support LoopBack mode)
|
||||||
#ifdef RALINK_ATE
|
|
||||||
#define ATE_START 0x00 // Start ATE
|
|
||||||
#define ATE_STOP 0x80 // Stop ATE
|
|
||||||
#define ATE_TXCONT 0x05 // Continuous Transmit
|
|
||||||
#define ATE_TXCARR 0x09 // Transmit Carrier
|
|
||||||
#define ATE_TXCARRSUPP 0x11 // Transmit Carrier Suppression
|
|
||||||
#define ATE_TXFRAME 0x01 // Transmit Frames
|
|
||||||
#define ATE_RXFRAME 0x02 // Receive Frames
|
|
||||||
#ifdef RALINK_28xx_QA
|
|
||||||
#define ATE_TXSTOP 0xe2 // Stop Transmition(i.e., TXCONT, TXCARR, TXCARRSUPP, and TXFRAME)
|
|
||||||
#define ATE_RXSTOP 0xfd // Stop receiving Frames
|
|
||||||
#define BBP22_TXFRAME 0x00 // Transmit Frames
|
|
||||||
#define BBP22_TXCONT_OR_CARRSUPP 0x80 // Continuous Transmit or Carrier Suppression
|
|
||||||
#define BBP22_TXCARR 0xc1 // Transmit Carrier
|
|
||||||
#define BBP24_TXCONT 0x00 // Continuous Transmit
|
|
||||||
#define BBP24_CARRSUPP 0x01 // Carrier Suppression
|
|
||||||
#endif // RALINK_28xx_QA //
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
// WEP Key TYPE
|
// WEP Key TYPE
|
||||||
#define WEP_HEXADECIMAL_TYPE 0
|
#define WEP_HEXADECIMAL_TYPE 0
|
||||||
|
|
|
@ -266,13 +266,6 @@ VOID CntlIdleProc(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OID_802_11_DISASSOCIATE:
|
case OID_802_11_DISASSOCIATE:
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if(ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("The driver is in ATE mode now\n"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
DisassocParmFill(pAd, &DisassocReq, pAd->CommonCfg.Bssid, REASON_DISASSOC_STA_LEAVING);
|
DisassocParmFill(pAd, &DisassocReq, pAd->CommonCfg.Bssid, REASON_DISASSOC_STA_LEAVING);
|
||||||
MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_DISASSOC_REQ, sizeof(MLME_DISASSOC_REQ_STRUCT), &DisassocReq);
|
MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_DISASSOC_REQ, sizeof(MLME_DISASSOC_REQ_STRUCT), &DisassocReq);
|
||||||
pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_OID_DISASSOC;
|
pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_OID_DISASSOC;
|
||||||
|
@ -315,13 +308,6 @@ VOID CntlOidScanProc(
|
||||||
ULONG BssIdx = BSS_NOT_FOUND;
|
ULONG BssIdx = BSS_NOT_FOUND;
|
||||||
BSS_ENTRY CurrBss;
|
BSS_ENTRY CurrBss;
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
/* Disable scanning when ATE is running. */
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
return;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
|
|
||||||
// record current BSS if network is connected.
|
// record current BSS if network is connected.
|
||||||
// 2003-2-13 do not include current IBSS if this is the only STA in this IBSS.
|
// 2003-2-13 do not include current IBSS if this is the only STA in this IBSS.
|
||||||
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED))
|
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED))
|
||||||
|
@ -541,12 +527,6 @@ VOID CntlOidRTBssidProc(
|
||||||
MLME_DISASSOC_REQ_STRUCT DisassocReq;
|
MLME_DISASSOC_REQ_STRUCT DisassocReq;
|
||||||
MLME_JOIN_REQ_STRUCT JoinReq;
|
MLME_JOIN_REQ_STRUCT JoinReq;
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
/* No need to perform this routine when ATE is running. */
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
return;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
// record user desired settings
|
// record user desired settings
|
||||||
COPY_MAC_ADDR(pAd->MlmeAux.Bssid, pOidBssid);
|
COPY_MAC_ADDR(pAd->MlmeAux.Bssid, pOidBssid);
|
||||||
pAd->MlmeAux.BssType = pAd->StaCfg.BssType;
|
pAd->MlmeAux.BssType = pAd->StaCfg.BssType;
|
||||||
|
@ -2035,12 +2015,6 @@ VOID LinkDown(
|
||||||
if (MONITOR_ON(pAd))
|
if (MONITOR_ON(pAd))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
// Nothing to do in ATE mode.
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
return;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
if (pAd->CommonCfg.bWirelessEvent)
|
if (pAd->CommonCfg.bWirelessEvent)
|
||||||
{
|
{
|
||||||
RTMPSendWirelessEvent(pAd, IW_STA_LINKDOWN_EVENT_FLAG, pAd->MacTab.Content[BSSID_WCID].Addr, BSS0, 0);
|
RTMPSendWirelessEvent(pAd, IW_STA_LINKDOWN_EVENT_FLAG, pAd->MacTab.Content[BSSID_WCID].Addr, BSS0, 0);
|
||||||
|
|
|
@ -771,22 +771,6 @@ BOOLEAN STARxDoneInterruptHandle(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* RT2870 invokes STARxDoneInterruptHandle() in rtusb_bulk.c */
|
/* RT2870 invokes STARxDoneInterruptHandle() in rtusb_bulk.c */
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
pAd->ate.RxCntPerSec++;
|
|
||||||
ATESampleRssi(pAd, pRxWI);
|
|
||||||
#ifdef RALINK_28xx_QA
|
|
||||||
if (pAd->ate.bQARxStart == TRUE)
|
|
||||||
{
|
|
||||||
/* (*pRxD) has been swapped in GetPacketFromRxRing() */
|
|
||||||
ATE_QA_Statistics(pAd, pRxWI, pRxD, pHeader);
|
|
||||||
}
|
|
||||||
#endif // RALINK_28xx_QA //
|
|
||||||
RELEASE_NDIS_PACKET(pAd, pRxPacket, NDIS_STATUS_SUCCESS);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
// Check for all RxD errors
|
// Check for all RxD errors
|
||||||
Status = RTMPCheckRxError(pAd, pHeader, pRxWI, pRxD);
|
Status = RTMPCheckRxError(pAd, pHeader, pRxWI, pRxD);
|
||||||
|
@ -1314,14 +1298,6 @@ VOID RTMPSendNullFrame(
|
||||||
ULONG Length;
|
ULONG Length;
|
||||||
PHEADER_802_11 pHeader_802_11;
|
PHEADER_802_11 pHeader_802_11;
|
||||||
|
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if(ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
// WPA 802.1x secured port control
|
// WPA 802.1x secured port control
|
||||||
if (((pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPA) ||
|
if (((pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPA) ||
|
||||||
(pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPAPSK) ||
|
(pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPAPSK) ||
|
||||||
|
|
|
@ -973,14 +973,6 @@ VOID PeerBeacon(
|
||||||
UCHAR AddHtInfoLen;
|
UCHAR AddHtInfoLen;
|
||||||
UCHAR NewExtChannelOffset = 0xff;
|
UCHAR NewExtChannelOffset = 0xff;
|
||||||
|
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
if (!(INFRA_ON(pAd) || ADHOC_ON(pAd)
|
if (!(INFRA_ON(pAd) || ADHOC_ON(pAd)
|
||||||
))
|
))
|
||||||
return;
|
return;
|
||||||
|
@ -1615,14 +1607,6 @@ VOID InvalidStateWhenStart(
|
||||||
VOID EnqueuePsPoll(
|
VOID EnqueuePsPoll(
|
||||||
IN PRTMP_ADAPTER pAd)
|
IN PRTMP_ADAPTER pAd)
|
||||||
{
|
{
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
|
|
||||||
if (pAd->StaCfg.WindowsPowerMode == Ndis802_11PowerModeLegacy_PSP)
|
if (pAd->StaCfg.WindowsPowerMode == Ndis802_11PowerModeLegacy_PSP)
|
||||||
pAd->PsPollFrame.FC.PwrMgmt = PWR_SAVE;
|
pAd->PsPollFrame.FC.PwrMgmt = PWR_SAVE;
|
||||||
MiniportMMRequest(pAd, 0, (PUCHAR)&pAd->PsPollFrame, sizeof(PSPOLL_FRAME));
|
MiniportMMRequest(pAd, 0, (PUCHAR)&pAd->PsPollFrame, sizeof(PSPOLL_FRAME));
|
||||||
|
|
|
@ -284,40 +284,6 @@ static struct {
|
||||||
{"Debug", Set_Debug_Proc},
|
{"Debug", Set_Debug_Proc},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
{"ATE", Set_ATE_Proc},
|
|
||||||
{"ATEDA", Set_ATE_DA_Proc},
|
|
||||||
{"ATESA", Set_ATE_SA_Proc},
|
|
||||||
{"ATEBSSID", Set_ATE_BSSID_Proc},
|
|
||||||
{"ATECHANNEL", Set_ATE_CHANNEL_Proc},
|
|
||||||
{"ATETXPOW0", Set_ATE_TX_POWER0_Proc},
|
|
||||||
{"ATETXPOW1", Set_ATE_TX_POWER1_Proc},
|
|
||||||
{"ATETXANT", Set_ATE_TX_Antenna_Proc},
|
|
||||||
{"ATERXANT", Set_ATE_RX_Antenna_Proc},
|
|
||||||
{"ATETXFREQOFFSET", Set_ATE_TX_FREQOFFSET_Proc},
|
|
||||||
{"ATETXBW", Set_ATE_TX_BW_Proc},
|
|
||||||
{"ATETXLEN", Set_ATE_TX_LENGTH_Proc},
|
|
||||||
{"ATETXCNT", Set_ATE_TX_COUNT_Proc},
|
|
||||||
{"ATETXMCS", Set_ATE_TX_MCS_Proc},
|
|
||||||
{"ATETXMODE", Set_ATE_TX_MODE_Proc},
|
|
||||||
{"ATETXGI", Set_ATE_TX_GI_Proc},
|
|
||||||
{"ATERXFER", Set_ATE_RX_FER_Proc},
|
|
||||||
{"ATERRF", Set_ATE_Read_RF_Proc},
|
|
||||||
{"ATEWRF1", Set_ATE_Write_RF1_Proc},
|
|
||||||
{"ATEWRF2", Set_ATE_Write_RF2_Proc},
|
|
||||||
{"ATEWRF3", Set_ATE_Write_RF3_Proc},
|
|
||||||
{"ATEWRF4", Set_ATE_Write_RF4_Proc},
|
|
||||||
{"ATELDE2P", Set_ATE_Load_E2P_Proc},
|
|
||||||
{"ATERE2P", Set_ATE_Read_E2P_Proc},
|
|
||||||
{"ATESHOW", Set_ATE_Show_Proc},
|
|
||||||
{"ATEHELP", Set_ATE_Help_Proc},
|
|
||||||
|
|
||||||
#ifdef RALINK_28xx_QA
|
|
||||||
{"TxStop", Set_TxStop_Proc},
|
|
||||||
{"RxStop", Set_RxStop_Proc},
|
|
||||||
#endif // RALINK_28xx_QA //
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
#ifdef WPA_SUPPLICANT_SUPPORT
|
#ifdef WPA_SUPPLICANT_SUPPORT
|
||||||
{"WpaSupport", Set_Wpa_Support},
|
{"WpaSupport", Set_Wpa_Support},
|
||||||
#endif // WPA_SUPPLICANT_SUPPORT //
|
#endif // WPA_SUPPLICANT_SUPPORT //
|
||||||
|
@ -1881,14 +1847,6 @@ rt_private_get_statistics(struct net_device *dev, struct iw_request_info *info,
|
||||||
memset(extra, 0x00, IW_PRIV_SIZE_MASK);
|
memset(extra, 0x00, IW_PRIV_SIZE_MASK);
|
||||||
sprintf(extra, "\n\n");
|
sprintf(extra, "\n\n");
|
||||||
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
sprintf(extra+strlen(extra), "Tx success = %ld\n", (ULONG)pAd->ate.TxDoneCount);
|
|
||||||
//sprintf(extra+strlen(extra), "Tx success without retry = %ld\n", (ULONG)pAd->ate.TxDoneCount);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
{
|
{
|
||||||
sprintf(extra+strlen(extra), "Tx success = %ld\n", (ULONG)pAd->WlanCounters.TransmittedFragmentCount.QuadPart);
|
sprintf(extra+strlen(extra), "Tx success = %ld\n", (ULONG)pAd->WlanCounters.TransmittedFragmentCount.QuadPart);
|
||||||
sprintf(extra+strlen(extra), "Tx success without retry = %ld\n", (ULONG)pAd->WlanCounters.TransmittedFragmentCount.QuadPart - (ULONG)pAd->WlanCounters.RetryCount.QuadPart);
|
sprintf(extra+strlen(extra), "Tx success without retry = %ld\n", (ULONG)pAd->WlanCounters.TransmittedFragmentCount.QuadPart - (ULONG)pAd->WlanCounters.RetryCount.QuadPart);
|
||||||
|
@ -1904,22 +1862,6 @@ rt_private_get_statistics(struct net_device *dev, struct iw_request_info *info,
|
||||||
sprintf(extra+strlen(extra), "Rx duplicate frame = %ld\n", (ULONG)pAd->WlanCounters.FrameDuplicateCount.QuadPart);
|
sprintf(extra+strlen(extra), "Rx duplicate frame = %ld\n", (ULONG)pAd->WlanCounters.FrameDuplicateCount.QuadPart);
|
||||||
|
|
||||||
sprintf(extra+strlen(extra), "False CCA (one second) = %ld\n", (ULONG)pAd->RalinkCounters.OneSecFalseCCACnt);
|
sprintf(extra+strlen(extra), "False CCA (one second) = %ld\n", (ULONG)pAd->RalinkCounters.OneSecFalseCCACnt);
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAd))
|
|
||||||
{
|
|
||||||
if (pAd->ate.RxAntennaSel == 0)
|
|
||||||
{
|
|
||||||
sprintf(extra+strlen(extra), "RSSI-A = %ld\n", (LONG)(pAd->ate.LastRssi0 - pAd->BbpRssiToDbmDelta));
|
|
||||||
sprintf(extra+strlen(extra), "RSSI-B (if available) = %ld\n", (LONG)(pAd->ate.LastRssi1 - pAd->BbpRssiToDbmDelta));
|
|
||||||
sprintf(extra+strlen(extra), "RSSI-C (if available) = %ld\n\n", (LONG)(pAd->ate.LastRssi2 - pAd->BbpRssiToDbmDelta));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sprintf(extra+strlen(extra), "RSSI = %ld\n", (LONG)(pAd->ate.LastRssi0 - pAd->BbpRssiToDbmDelta));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
{
|
{
|
||||||
sprintf(extra+strlen(extra), "RSSI-A = %ld\n", (LONG)(pAd->StaCfg.RssiSample.LastRssi0 - pAd->BbpRssiToDbmDelta));
|
sprintf(extra+strlen(extra), "RSSI-A = %ld\n", (LONG)(pAd->StaCfg.RssiSample.LastRssi0 - pAd->BbpRssiToDbmDelta));
|
||||||
sprintf(extra+strlen(extra), "RSSI-B (if available) = %ld\n", (LONG)(pAd->StaCfg.RssiSample.LastRssi1 - pAd->BbpRssiToDbmDelta));
|
sprintf(extra+strlen(extra), "RSSI-B (if available) = %ld\n", (LONG)(pAd->StaCfg.RssiSample.LastRssi1 - pAd->BbpRssiToDbmDelta));
|
||||||
|
@ -2821,13 +2763,6 @@ rt_private_ioctl_bbp(struct net_device *dev, struct iw_request_info *info,
|
||||||
if (bbpId <= 138) // edit by johnli, RF power sequence setup, add BBP R138 for ADC dynamic on/off control
|
if (bbpId <= 138) // edit by johnli, RF power sequence setup, add BBP R138 for ADC dynamic on/off control
|
||||||
#endif // RT30xx //
|
#endif // RT30xx //
|
||||||
{
|
{
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAdapter))
|
|
||||||
{
|
|
||||||
ATE_BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
{
|
{
|
||||||
RTMP_BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP);
|
RTMP_BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP);
|
||||||
}
|
}
|
||||||
|
@ -2858,15 +2793,6 @@ rt_private_ioctl_bbp(struct net_device *dev, struct iw_request_info *info,
|
||||||
if (bbpId <= 138) // edit by johnli, RF power sequence setup, add BBP R138 for ADC dynamic on/off control
|
if (bbpId <= 138) // edit by johnli, RF power sequence setup, add BBP R138 for ADC dynamic on/off control
|
||||||
#endif // RT30xx //
|
#endif // RT30xx //
|
||||||
{
|
{
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAdapter))
|
|
||||||
{
|
|
||||||
ATE_BBP_IO_WRITE8_BY_REG_ID(pAdapter, bbpId, bbpValue);
|
|
||||||
//Read it back for showing
|
|
||||||
ATE_BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
{
|
{
|
||||||
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAdapter, bbpId, bbpValue);
|
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAdapter, bbpId, bbpValue);
|
||||||
//Read it back for showing
|
//Read it back for showing
|
||||||
|
@ -2906,13 +2832,6 @@ rt_private_ioctl_bbp(struct net_device *dev, struct iw_request_info *info,
|
||||||
{
|
{
|
||||||
if (strlen(extra) >= (IW_PRIV_SIZE_MASK - 10))
|
if (strlen(extra) >= (IW_PRIV_SIZE_MASK - 10))
|
||||||
break;
|
break;
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAdapter))
|
|
||||||
{
|
|
||||||
ATE_BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
RTMP_BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP);
|
RTMP_BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP);
|
||||||
/*
|
/*
|
||||||
sprintf(extra+strlen(extra), "R%02d[0x%02X]:%02X ", bbpId, bbpId*2, regBBP);
|
sprintf(extra+strlen(extra), "R%02d[0x%02X]:%02X ", bbpId, bbpId*2, regBBP);
|
||||||
|
@ -3244,13 +3163,6 @@ INT RTMPSetInformation(
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OID_802_11_BSSID_LIST_SCAN:
|
case OID_802_11_BSSID_LIST_SCAN:
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAdapter))
|
|
||||||
{
|
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("The driver is in ATE mode now\n"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
Now = jiffies;
|
Now = jiffies;
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("Set::OID_802_11_BSSID_LIST_SCAN, TxCnt = %d \n", pAdapter->RalinkCounters.LastOneSecTotalTxCount));
|
DBGPRINT(RT_DEBUG_TRACE, ("Set::OID_802_11_BSSID_LIST_SCAN, TxCnt = %d \n", pAdapter->RalinkCounters.LastOneSecTotalTxCount));
|
||||||
|
|
||||||
|
@ -3352,13 +3264,6 @@ INT RTMPSetInformation(
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OID_802_11_BSSID:
|
case OID_802_11_BSSID:
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAdapter))
|
|
||||||
{
|
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("The driver is in ATE mode now\n"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
if (wrq->u.data.length != sizeof(NDIS_802_11_MAC_ADDRESS))
|
if (wrq->u.data.length != sizeof(NDIS_802_11_MAC_ADDRESS))
|
||||||
Status = -EINVAL;
|
Status = -EINVAL;
|
||||||
else
|
else
|
||||||
|
@ -3984,13 +3889,6 @@ INT RTMPSetInformation(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OID_802_11_DISASSOCIATE:
|
case OID_802_11_DISASSOCIATE:
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAdapter))
|
|
||||||
{
|
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("The driver is in ATE mode now\n"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
//
|
//
|
||||||
// Set NdisRadioStateOff to TRUE, instead of called MlmeRadioOff.
|
// Set NdisRadioStateOff to TRUE, instead of called MlmeRadioOff.
|
||||||
// Later on, NDIS_802_11_BSSID_LIST_EX->NumberOfItems should be 0
|
// Later on, NDIS_802_11_BSSID_LIST_EX->NumberOfItems should be 0
|
||||||
|
@ -4556,16 +4454,6 @@ INT RTMPQueryInformation(
|
||||||
Status = -EFAULT;
|
Status = -EFAULT;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifdef RALINK_ATE
|
|
||||||
case RT_QUERY_ATE_TXDONE_COUNT:
|
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_QUERY_ATE_TXDONE_COUNT \n"));
|
|
||||||
wrq->u.data.length = sizeof(UINT32);
|
|
||||||
if (copy_to_user(wrq->u.data.pointer, &pAdapter->ate.TxDoneCount, wrq->u.data.length))
|
|
||||||
{
|
|
||||||
Status = -EFAULT;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
case OID_802_11_BSSID_LIST:
|
case OID_802_11_BSSID_LIST:
|
||||||
if (RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS))
|
if (RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS))
|
||||||
{
|
{
|
||||||
|
@ -4707,14 +4595,6 @@ INT RTMPQueryInformation(
|
||||||
Status = copy_to_user(wrq->u.data.pointer, &MediaState, wrq->u.data.length);
|
Status = copy_to_user(wrq->u.data.pointer, &MediaState, wrq->u.data.length);
|
||||||
break;
|
break;
|
||||||
case OID_802_11_BSSID:
|
case OID_802_11_BSSID:
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAdapter))
|
|
||||||
{
|
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("The driver is in ATE mode now\n"));
|
|
||||||
Status = NDIS_STATUS_RESOURCES;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
if (INFRA_ON(pAdapter) || ADHOC_ON(pAdapter))
|
if (INFRA_ON(pAdapter) || ADHOC_ON(pAdapter))
|
||||||
{
|
{
|
||||||
Status = copy_to_user(wrq->u.data.pointer, &pAdapter->CommonCfg.Bssid, sizeof(NDIS_802_11_MAC_ADDRESS));
|
Status = copy_to_user(wrq->u.data.pointer, &pAdapter->CommonCfg.Bssid, sizeof(NDIS_802_11_MAC_ADDRESS));
|
||||||
|
@ -5419,15 +5299,6 @@ INT rt28xx_sta_ioctl(
|
||||||
|
|
||||||
switch(cmd)
|
switch(cmd)
|
||||||
{
|
{
|
||||||
#ifdef RALINK_ATE
|
|
||||||
#ifdef RALINK_28xx_QA
|
|
||||||
case RTPRIV_IOCTL_ATE:
|
|
||||||
{
|
|
||||||
RtmpDoAte(pAd, wrq);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif // RALINK_28xx_QA //
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
case SIOCGIFHWADDR:
|
case SIOCGIFHWADDR:
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("IOCTL::SIOCGIFHWADDR\n"));
|
DBGPRINT(RT_DEBUG_TRACE, ("IOCTL::SIOCGIFHWADDR\n"));
|
||||||
memcpy(wrq->u.name, pAd->CurrentAddress, ETH_ALEN);
|
memcpy(wrq->u.name, pAd->CurrentAddress, ETH_ALEN);
|
||||||
|
@ -6659,13 +6530,6 @@ VOID RTMPIoctlMAC(
|
||||||
UCHAR R66;
|
UCHAR R66;
|
||||||
pAdapter->BbpTuning.bEnable = FALSE;
|
pAdapter->BbpTuning.bEnable = FALSE;
|
||||||
R66 = 0x26 + GET_LNA_GAIN(pAdapter);
|
R66 = 0x26 + GET_LNA_GAIN(pAdapter);
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAdapter))
|
|
||||||
{
|
|
||||||
ATE_BBP_IO_WRITE8_BY_REG_ID(pAdapter, BBP_R66, (0x26 + GET_LNA_GAIN(pAdapter)));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAdapter, BBP_R66, (0x26 + GET_LNA_GAIN(pAdapter)));
|
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAdapter, BBP_R66, (0x26 + GET_LNA_GAIN(pAdapter)));
|
||||||
DBGPRINT(RT_DEBUG_TRACE,("turn off R17 tuning, restore to 0x%02x\n", R66));
|
DBGPRINT(RT_DEBUG_TRACE,("turn off R17 tuning, restore to 0x%02x\n", R66));
|
||||||
}
|
}
|
||||||
|
@ -6984,13 +6848,6 @@ VOID RTMPIoctlRF(
|
||||||
// In RT2860 ATE mode, we do not load 8051 firmware.
|
// In RT2860 ATE mode, we do not load 8051 firmware.
|
||||||
//We must access RF directly.
|
//We must access RF directly.
|
||||||
// For RT2870 ATE mode, ATE_RF_IO_WRITE8(/READ8)_BY_REG_ID are redefined.
|
// For RT2870 ATE mode, ATE_RF_IO_WRITE8(/READ8)_BY_REG_ID are redefined.
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAdapter))
|
|
||||||
{
|
|
||||||
ATE_RF_IO_READ8_BY_REG_ID(pAdapter, rfId, ®RF);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
// according to Andy, Gary, David require.
|
// according to Andy, Gary, David require.
|
||||||
// the command rf shall read rf register directly for dubug.
|
// the command rf shall read rf register directly for dubug.
|
||||||
// BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP);
|
// BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP);
|
||||||
|
@ -7019,17 +6876,6 @@ VOID RTMPIoctlRF(
|
||||||
// In RT2860 ATE mode, we do not load 8051 firmware.
|
// In RT2860 ATE mode, we do not load 8051 firmware.
|
||||||
// We should access RF registers directly.
|
// We should access RF registers directly.
|
||||||
// For RT2870 ATE mode, ATE_RF_IO_WRITE8/READ8_BY_REG_ID are redefined.
|
// For RT2870 ATE mode, ATE_RF_IO_WRITE8/READ8_BY_REG_ID are redefined.
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAdapter))
|
|
||||||
{
|
|
||||||
ATE_RF_IO_READ8_BY_REG_ID(pAdapter, rfId, ®RF);
|
|
||||||
ATE_RF_IO_WRITE8_BY_REG_ID(pAdapter, (UCHAR)rfId,(UCHAR) rfValue);
|
|
||||||
//Read it back for showing
|
|
||||||
ATE_RF_IO_READ8_BY_REG_ID(pAdapter, rfId, ®RF);
|
|
||||||
sprintf(msg+strlen(msg), "R%02d[0x%02X]:%02X\n", rfId, rfId*2, regRF);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
{
|
{
|
||||||
// according to Andy, Gary, David require.
|
// according to Andy, Gary, David require.
|
||||||
// the command RF shall read/write RF register directly for dubug.
|
// the command RF shall read/write RF register directly for dubug.
|
||||||
|
@ -7063,17 +6909,6 @@ VOID RTMPIoctlRF(
|
||||||
sprintf(msg, "\n");
|
sprintf(msg, "\n");
|
||||||
for (rfId = 0; rfId <= 31; rfId++)
|
for (rfId = 0; rfId <= 31; rfId++)
|
||||||
{
|
{
|
||||||
// In RT2860 ATE mode, we do not load 8051 firmware.
|
|
||||||
// We should access RF registers directly.
|
|
||||||
// For RT2870 ATE mode, ATE_RF_IO_WRITE8/READ8_BY_REG_ID are redefined.
|
|
||||||
#ifdef RALINK_ATE
|
|
||||||
if (ATE_ON(pAdapter))
|
|
||||||
{
|
|
||||||
ATE_RF_IO_READ8_BY_REG_ID(pAdapter, rfId, ®RF);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // RALINK_ATE //
|
|
||||||
|
|
||||||
// according to Andy, Gary, David require.
|
// according to Andy, Gary, David require.
|
||||||
// the command RF shall read/write RF register directly for dubug.
|
// the command RF shall read/write RF register directly for dubug.
|
||||||
RT30xxReadRFRegister(pAdapter, rfId, ®RF);
|
RT30xxReadRFRegister(pAdapter, rfId, ®RF);
|
||||||
|
|
Loading…
Reference in New Issue