mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 05:34:00 +08:00
Staging: rt2860: 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
55468fae98
commit
063f22af9d
@ -881,11 +881,6 @@ VOID ORIBATimerTimeout(
|
||||
INT i, total;
|
||||
UCHAR TID;
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
if (ATE_ON(pAd))
|
||||
return;
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
total = pAd->MacTab.Size * NUM_OF_TID;
|
||||
|
||||
for (i = 1; ((i <MAX_LEN_OF_BA_ORI_TABLE) && (total > 0)) ; i++)
|
||||
|
@ -1092,12 +1092,6 @@ VOID BAOriSessionSetupTimeout(
|
||||
}
|
||||
#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];
|
||||
|
||||
if ((pBAEntry->ORI_BA_Status == Originator_WaitRes) && (pBAEntry->Token < ORI_SESSION_MAX_RETRY))
|
||||
|
@ -1771,85 +1771,6 @@ BOOLEAN RTMPFreeTXDUponTxDmaDone(
|
||||
RTMP_IO_READ32(pAd, TX_DTX_IDX0 + QueIdx * RINGREG_DIFF, &pTxRing->TxDmaIdx);
|
||||
while (pTxRing->TxSwFreeIdx != pTxRing->TxDmaIdx)
|
||||
{
|
||||
#ifdef RALINK_ATE
|
||||
#ifdef RALINK_28xx_QA
|
||||
PHEADER_802_11 pHeader80211;
|
||||
|
||||
if ((ATE_ON(pAd)) && (pAd->ate.bQATxStart == TRUE))
|
||||
{
|
||||
if (pAd->ate.QID == QueIdx)
|
||||
{
|
||||
pAd->ate.TxDoneCount++;
|
||||
//pAd->ate.Repeat++;
|
||||
pAd->RalinkCounters.KickTxCount++;
|
||||
|
||||
/* always use QID_AC_BE and FIFO_EDCA */
|
||||
ASSERT(pAd->ate.QID == 0);
|
||||
pAd->ate.TxAc0++;
|
||||
|
||||
FREE++;
|
||||
#ifndef RT_BIG_ENDIAN
|
||||
pTxD = (PTXD_STRUC) (pTxRing->Cell[pTxRing->TxSwFreeIdx].AllocVa);
|
||||
pOriTxD = pTxD;
|
||||
NdisMoveMemory(&TxD, pTxD, sizeof(TXD_STRUC));
|
||||
pTxD = &TxD;
|
||||
#else
|
||||
pDestTxD = (PTXD_STRUC) (pTxRing->Cell[pTxRing->TxSwFreeIdx].AllocVa);
|
||||
pOriTxD = pDestTxD ;
|
||||
TxD = *pDestTxD;
|
||||
pTxD = &TxD;
|
||||
RTMPDescriptorEndianChange((PUCHAR)pTxD, TYPE_TXD);
|
||||
#endif
|
||||
pTxD->DMADONE = 0;
|
||||
|
||||
pHeader80211 = pTxRing->Cell[pTxRing->TxSwFreeIdx].DmaBuf.AllocVa + sizeof(TXWI_STRUC);
|
||||
#ifdef RT_BIG_ENDIAN
|
||||
RTMPFrameEndianChange(pAd, (PUCHAR)pHeader80211, DIR_READ, FALSE);
|
||||
#endif
|
||||
pHeader80211->Sequence = ++pAd->ate.seq;
|
||||
#ifdef RT_BIG_ENDIAN
|
||||
RTMPFrameEndianChange(pAd, (PUCHAR)pHeader80211, DIR_WRITE, FALSE);
|
||||
#endif
|
||||
|
||||
if ((pAd->ate.bQATxStart == TRUE) && (pAd->ate.Mode & ATE_TXFRAME) && (pAd->ate.TxDoneCount < pAd->ate.TxCount))
|
||||
{
|
||||
pAd->RalinkCounters.TransmittedByteCount += (pTxD->SDLen1 + pTxD->SDLen0);
|
||||
pAd->RalinkCounters.OneSecDmaDoneCount[QueIdx] ++;
|
||||
INC_RING_INDEX(pTxRing->TxSwFreeIdx, TX_RING_SIZE);
|
||||
/* get tx_tdx_idx again */
|
||||
RTMP_IO_READ32(pAd, TX_DTX_IDX0 + QueIdx * RINGREG_DIFF , &pTxRing->TxDmaIdx);
|
||||
goto kick_out;
|
||||
}
|
||||
else if ((pAd->ate.TxStatus == 1)/* or (pAd->ate.bQATxStart == TRUE) ??? */ && (pAd->ate.TxDoneCount == pAd->ate.TxCount))//<========================PETER
|
||||
{
|
||||
DBGPRINT(RT_DEBUG_TRACE,("all Tx is done\n"));
|
||||
// Tx status enters idle mode.
|
||||
pAd->ate.TxStatus = 0;
|
||||
}
|
||||
else if (!(pAd->ate.Mode & ATE_TXFRAME))
|
||||
{
|
||||
/* not complete sending yet, but someone press the Stop TX botton. */
|
||||
DBGPRINT(RT_DEBUG_ERROR,("not complete sending yet, but someone pressed the Stop TX bottom\n"));
|
||||
DBGPRINT(RT_DEBUG_ERROR,("pAd->ate.Mode = 0x%02x\n", pAd->ate.Mode));
|
||||
}
|
||||
else
|
||||
{
|
||||
DBGPRINT(RT_DEBUG_OFF,("pTxRing->TxSwFreeIdx = %d\n", pTxRing->TxSwFreeIdx));
|
||||
}
|
||||
#ifndef RT_BIG_ENDIAN
|
||||
NdisMoveMemory(pOriTxD, pTxD, sizeof(TXD_STRUC));
|
||||
#else
|
||||
RTMPDescriptorEndianChange((PUCHAR)pTxD, TYPE_TXD);
|
||||
*pDestTxD = TxD;
|
||||
#endif // RT_BIG_ENDIAN //
|
||||
|
||||
INC_RING_INDEX(pTxRing->TxSwFreeIdx, TX_RING_SIZE);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
#endif // RALINK_28xx_QA //
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
// static rate also need NICUpdateFifoStaCounters() function.
|
||||
//if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED))
|
||||
NICUpdateFifoStaCounters(pAd);
|
||||
@ -1871,11 +1792,6 @@ BOOLEAN RTMPFreeTXDUponTxDmaDone(
|
||||
|
||||
pTxD->DMADONE = 0;
|
||||
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
/* Execution of this block is not allowed when ATE is running. */
|
||||
if (!(ATE_ON(pAd)))
|
||||
#endif // RALINK_ATE //
|
||||
/*====================================================================*/
|
||||
{
|
||||
pPacket = pTxRing->Cell[pTxRing->TxSwFreeIdx].pNdisPacket;
|
||||
@ -1921,53 +1837,6 @@ BOOLEAN RTMPFreeTXDUponTxDmaDone(
|
||||
#else
|
||||
NdisMoveMemory(pOriTxD, pTxD, sizeof(TXD_STRUC));
|
||||
#endif
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
#ifdef RALINK_28xx_QA
|
||||
kick_out:
|
||||
#endif // RALINK_28xx_QA //
|
||||
|
||||
//
|
||||
// ATE_TXCONT mode also need to send some normal frames, so let it in.
|
||||
// ATE_STOP must be changed not to be 0xff
|
||||
// to prevent it from running into this block.
|
||||
//
|
||||
if ((pAd->ate.Mode & ATE_TXFRAME) && (pAd->ate.QID == QueIdx))
|
||||
{
|
||||
// TxDoneCount++ has been done if QA is used.
|
||||
if (pAd->ate.bQATxStart == FALSE)
|
||||
{
|
||||
pAd->ate.TxDoneCount++;
|
||||
}
|
||||
if (((pAd->ate.TxCount - pAd->ate.TxDoneCount + 1) >= TX_RING_SIZE))
|
||||
{
|
||||
/* Note : We increase TxCpuIdx here, not TxSwFreeIdx ! */
|
||||
INC_RING_INDEX(pAd->TxRing[QueIdx].TxCpuIdx, TX_RING_SIZE);
|
||||
#ifndef RT_BIG_ENDIAN//<==========================PETER
|
||||
pTxD = (PTXD_STRUC) (pTxRing->Cell[pAd->TxRing[QueIdx].TxCpuIdx].AllocVa);
|
||||
pOriTxD = pTxD;
|
||||
NdisMoveMemory(&TxD, pTxD, sizeof(TXD_STRUC));
|
||||
pTxD = &TxD;
|
||||
#else
|
||||
pDestTxD = (PTXD_STRUC) (pTxRing->Cell[pAd->TxRing[QueIdx].TxCpuIdx].AllocVa);
|
||||
pOriTxD = pDestTxD ;
|
||||
TxD = *pDestTxD;
|
||||
pTxD = &TxD;
|
||||
RTMPDescriptorEndianChange((PUCHAR)pTxD, TYPE_TXD);
|
||||
#endif
|
||||
pTxD->DMADONE = 0;
|
||||
#ifndef RT_BIG_ENDIAN//<==========================PETER
|
||||
NdisMoveMemory(pOriTxD, pTxD, sizeof(TXD_STRUC));
|
||||
#else
|
||||
RTMPDescriptorEndianChange((PUCHAR)pTxD, TYPE_TXD);
|
||||
*pDestTxD = TxD;
|
||||
#endif
|
||||
// kick Tx-Ring.
|
||||
RTMP_IO_WRITE32(pAd, TX_CTX_IDX0 + QueIdx * RINGREG_DIFF, pAd->TxRing[QueIdx].TxCpuIdx);
|
||||
pAd->RalinkCounters.KickTxCount++;
|
||||
}
|
||||
}
|
||||
#endif // RALINK_ATE //
|
||||
}
|
||||
|
||||
|
||||
|
@ -397,12 +397,6 @@ VOID ScanNextChannel(
|
||||
}
|
||||
#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->CommonCfg.BBPCurrentBW == BW_40)
|
||||
|
@ -589,14 +589,6 @@ VOID MlmeHandler(
|
||||
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
|
||||
if (MlmeDequeue(&pAd->Mlme.Queue, &Elem))
|
||||
{
|
||||
@ -906,18 +898,6 @@ VOID MlmePeriodicExec(
|
||||
|
||||
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
|
||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
||||
{
|
||||
@ -971,30 +951,6 @@ VOID MlmePeriodicExec(
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
||||
@ -1103,17 +1059,6 @@ VOID STAMlmePeriodicExec(
|
||||
{
|
||||
ULONG TxTotalCnt;
|
||||
|
||||
//
|
||||
// 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
|
||||
if (pAd->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_DISABLE)
|
||||
#endif // WPA_SUPPLICANT_SUPPORT //
|
||||
@ -2127,13 +2072,6 @@ VOID MlmeDynamicTxRateSwitching(
|
||||
ULONG TxRetransmit = 0, TxSuccess = 0, TxFailCount = 0;
|
||||
MAC_TABLE_ENTRY *pEntry;
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
if (ATE_ON(pAd))
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
/*if (pAd->Antenna.field.RxPath > 1)
|
||||
Rssi = (pAd->StaCfg.RssiSample.AvgRssi0 + pAd->StaCfg.RssiSample.AvgRssi1) >> 1;
|
||||
else
|
||||
@ -4922,12 +4860,6 @@ BOOLEAN MlmeEnqueueForRecv(
|
||||
INT MsgType;
|
||||
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.
|
||||
// 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))
|
||||
@ -5634,11 +5566,6 @@ VOID AsicUpdateProtect(
|
||||
UCHAR i;
|
||||
UINT32 MacReg = 0;
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
if (ATE_ON(pAd))
|
||||
return;
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
#ifdef DOT11_N_SUPPORT
|
||||
if (!(pAd->CommonCfg.bHTProtect) && (OperationMode != 8))
|
||||
{
|
||||
@ -7596,9 +7523,7 @@ BOOLEAN AsicSendCommandToMcu(
|
||||
HOST_CMD_CSR_STRUC H2MCmd;
|
||||
H2M_MAILBOX_STRUC H2MMailbox;
|
||||
ULONG i = 0;
|
||||
#ifdef RALINK_ATE
|
||||
static UINT32 j = 0;
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
do
|
||||
{
|
||||
RTMP_IO_READ32(pAd, H2M_MAILBOX_CSR, &H2MMailbox.word);
|
||||
@ -7610,30 +7535,6 @@ BOOLEAN AsicSendCommandToMcu(
|
||||
|
||||
if (i >= 100)
|
||||
{
|
||||
#ifdef RALINK_ATE
|
||||
if (pAd->ate.bFWLoading == TRUE)
|
||||
{
|
||||
/* reloading firmware when received iwpriv cmd "ATE=ATESTOP" */
|
||||
if (j > 0)
|
||||
{
|
||||
if (j % 64 != 0)
|
||||
{
|
||||
DBGPRINT(RT_DEBUG_ERROR, ("#"));
|
||||
}
|
||||
else
|
||||
{
|
||||
DBGPRINT(RT_DEBUG_ERROR, ("\n"));
|
||||
}
|
||||
++j;
|
||||
}
|
||||
else if (j == 0)
|
||||
{
|
||||
DBGPRINT(RT_DEBUG_ERROR, ("Loading firmware. Please wait for a moment...\n"));
|
||||
++j;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif // RALINK_ATE //
|
||||
{
|
||||
UINT32 Data;
|
||||
|
||||
@ -7661,16 +7562,6 @@ BOOLEAN AsicSendCommandToMcu(
|
||||
//return FALSE;
|
||||
}
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
else if (pAd->ate.bFWLoading == TRUE)
|
||||
{
|
||||
/* reloading of firmware is completed */
|
||||
pAd->ate.bFWLoading = FALSE;
|
||||
DBGPRINT(RT_DEBUG_ERROR, ("\n"));
|
||||
j = 0;
|
||||
}
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
H2MMailbox.field.Owner = 1; // pass ownership to MCU
|
||||
H2MMailbox.field.CmdToken = Token;
|
||||
H2MMailbox.field.HighByte = Arg1;
|
||||
@ -8126,12 +8017,6 @@ VOID AsicEvaluateRxAnt(
|
||||
{
|
||||
UCHAR BBPR3 = 0;
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
if (ATE_ON(pAd))
|
||||
return;
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
|
||||
#ifdef CONFIG_STA_SUPPORT
|
||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
||||
{
|
||||
@ -8211,12 +8096,6 @@ VOID AsicRxAntEvalTimeout(
|
||||
CHAR larger = -127, rssi0, rssi1, rssi2;
|
||||
#endif // CONFIG_STA_SUPPORT //
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
if (ATE_ON(pAd))
|
||||
return;
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
|
||||
#ifdef CONFIG_STA_SUPPORT
|
||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
||||
{
|
||||
|
@ -2214,12 +2214,6 @@ VOID NICUpdateFifoStaCounters(
|
||||
CHAR reTry;
|
||||
UCHAR succMCS;
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
/* Nothing to do in ATE mode */
|
||||
if (ATE_ON(pAd))
|
||||
return;
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
do
|
||||
{
|
||||
RTMP_IO_READ32(pAd, TX_STA_FIFO, &StaFifo.word);
|
||||
@ -3171,37 +3165,6 @@ VOID UserCfgInit(
|
||||
InitializeQueueHeader(&pAd->MacTab.McastPsQueue);
|
||||
NdisAllocateSpinLock(&pAd->MacTabLock);
|
||||
|
||||
#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;
|
||||
pAd->ate.bFWLoading = FALSE;
|
||||
#ifdef RALINK_28xx_QA
|
||||
//pAd->ate.Repeat = 0;
|
||||
pAd->ate.TxStatus = 0;
|
||||
pAd->ate.AtePid = THREAD_PID_INIT_VALUE;
|
||||
#endif // RALINK_28xx_QA //
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
|
||||
pAd->CommonCfg.bWiFiTest = FALSE;
|
||||
pAd->bPCIclkOff = FALSE;
|
||||
|
||||
@ -3472,13 +3435,6 @@ VOID RTMPSetLED(
|
||||
UCHAR HighByte = 0;
|
||||
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;
|
||||
switch (Status)
|
||||
{
|
||||
|
@ -82,9 +82,6 @@
|
||||
|
||||
#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_SET_IAPP_PID 0x0404
|
||||
#define RT_SET_APD_PID 0x0405
|
||||
@ -650,12 +647,6 @@ typedef struct _NDIS_802_11_CAPABILITY
|
||||
#define RTPRIV_IOCTL_E2P (SIOCIWFIRSTPRIV + 0x07)
|
||||
#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_ADD_PMKID_CACHE (SIOCIWFIRSTPRIV + 0x0A)
|
||||
#define RTPRIV_IOCTL_RADIUS_DATA (SIOCIWFIRSTPRIV + 0x0C)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,315 +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
|
||||
#define EEPROM_SIZE 0x200
|
||||
#ifdef CONFIG_STA_SUPPORT
|
||||
#define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2860STA/e2p.bin"
|
||||
#endif // CONFIG_STA_SUPPORT //
|
||||
|
||||
#define ATE_ON(_p) (((_p)->ate.Mode) != ATE_STOP)
|
||||
|
||||
/* RT2880_iNIC will define "RT2860". */
|
||||
#define ATE_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) \
|
||||
{ \
|
||||
BBP_CSR_CFG_STRUC BbpCsr; \
|
||||
int i, k; \
|
||||
for (i=0; i<MAX_BUSY_COUNT; i++) \
|
||||
{ \
|
||||
RTMP_IO_READ32(_A, BBP_CSR_CFG, &BbpCsr.word); \
|
||||
if (BbpCsr.field.Busy == BUSY) \
|
||||
{ \
|
||||
continue; \
|
||||
} \
|
||||
BbpCsr.word = 0; \
|
||||
BbpCsr.field.fRead = 1; \
|
||||
BbpCsr.field.BBP_RW_MODE = 1; \
|
||||
BbpCsr.field.Busy = 1; \
|
||||
BbpCsr.field.RegNum = _I; \
|
||||
RTMP_IO_WRITE32(_A, BBP_CSR_CFG, BbpCsr.word); \
|
||||
for (k=0; k<MAX_BUSY_COUNT; k++) \
|
||||
{ \
|
||||
RTMP_IO_READ32(_A, BBP_CSR_CFG, &BbpCsr.word); \
|
||||
if (BbpCsr.field.Busy == IDLE) \
|
||||
break; \
|
||||
} \
|
||||
if ((BbpCsr.field.Busy == IDLE) && \
|
||||
(BbpCsr.field.RegNum == _I)) \
|
||||
{ \
|
||||
*(_pV) = (UCHAR)BbpCsr.field.Value; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
if (BbpCsr.field.Busy == BUSY) \
|
||||
{ \
|
||||
ATEDBGPRINT(RT_DEBUG_ERROR, ("BBP read R%d fail\n", _I)); \
|
||||
*(_pV) = (_A)->BbpWriteLatch[_I]; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define ATE_BBP_IO_WRITE8_BY_REG_ID(_A, _I, _V) \
|
||||
{ \
|
||||
BBP_CSR_CFG_STRUC BbpCsr; \
|
||||
int BusyCnt; \
|
||||
for (BusyCnt=0; BusyCnt<MAX_BUSY_COUNT; BusyCnt++) \
|
||||
{ \
|
||||
RTMP_IO_READ32(_A, BBP_CSR_CFG, &BbpCsr.word); \
|
||||
if (BbpCsr.field.Busy == BUSY) \
|
||||
continue; \
|
||||
BbpCsr.word = 0; \
|
||||
BbpCsr.field.fRead = 0; \
|
||||
BbpCsr.field.BBP_RW_MODE = 1; \
|
||||
BbpCsr.field.Busy = 1; \
|
||||
BbpCsr.field.Value = _V; \
|
||||
BbpCsr.field.RegNum = _I; \
|
||||
RTMP_IO_WRITE32(_A, BBP_CSR_CFG, BbpCsr.word); \
|
||||
(_A)->BbpWriteLatch[_I] = _V; \
|
||||
break; \
|
||||
} \
|
||||
if (BusyCnt == MAX_BUSY_COUNT) \
|
||||
{ \
|
||||
ATEDBGPRINT(RT_DEBUG_ERROR, ("BBP write R%d fail\n", _I)); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* RT2880_iNIC will define RT2860. */
|
||||
#define EEPROM_SIZE 0x200
|
||||
/* iNIC has its own EEPROM_BIN_FILE_NAME */
|
||||
#ifdef CONFIG_STA_SUPPORT
|
||||
#define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2860STA/e2p.bin"
|
||||
#endif // CONFIG_STA_SUPPORT //
|
||||
|
||||
|
||||
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);
|
||||
|
||||
#if 0
|
||||
INT Set_TxStart_Proc(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN PUCHAR arg);
|
||||
#endif // 0 //
|
||||
|
||||
INT Set_TxStop_Proc(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN PUCHAR arg);
|
||||
|
||||
INT Set_RxStop_Proc(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN PUCHAR arg);
|
||||
|
||||
#if 0
|
||||
INT Set_EERead_Proc(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN PUCHAR arg);
|
||||
|
||||
INT Set_EEWrite_Proc(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN PUCHAR arg);
|
||||
|
||||
INT Set_BBPRead_Proc(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN PUCHAR arg);
|
||||
|
||||
INT Set_BBPWrite_Proc(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN PUCHAR arg);
|
||||
|
||||
INT Set_RFWrite_Proc(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN PUCHAR arg);
|
||||
#endif // end of #if 0 //
|
||||
#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__ //
|
@ -72,10 +72,6 @@
|
||||
#include "igmp_snoop.h"
|
||||
#endif // IGMP_SNOOP_SUPPORT //
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
#include "rt_ate.h"
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
#ifdef CONFIG_STA_SUPPORT
|
||||
#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
|
||||
#ifndef WPA_SUPPLICANT_SUPPORT
|
||||
|
@ -1274,15 +1274,6 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
|
||||
int status = 0;
|
||||
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
|
||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
||||
{
|
||||
|
@ -183,89 +183,6 @@ extern UCHAR PRE_N_HT_OUI[];
|
||||
|
||||
#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.
|
||||
BOOLEAN bFWLoading; // Reload firmware when ATE is done.
|
||||
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
|
||||
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;
|
||||
THREAD_PID 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
|
||||
struct reordering_mpdu
|
||||
{
|
||||
@ -2936,10 +2853,6 @@ typedef struct _RTMP_ADAPTER
|
||||
|
||||
struct wificonf WIFItestbed;
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
ATE_INFO ate;
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
#ifdef DOT11_N_SUPPORT
|
||||
struct reordering_mpdu_pool mpdu_blk_pool;
|
||||
#endif // DOT11_N_SUPPORT //
|
||||
|
@ -1332,26 +1332,6 @@
|
||||
#define INT_APCLI 0x0400
|
||||
#define INT_MESH 0x0500
|
||||
|
||||
// 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
|
||||
#define WEP_HEXADECIMAL_TYPE 0
|
||||
#define WEP_ASCII_TYPE 1
|
||||
|
@ -234,13 +234,6 @@ VOID CntlIdleProc(
|
||||
break;
|
||||
|
||||
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);
|
||||
MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_DISASSOC_REQ, sizeof(MLME_DISASSOC_REQ_STRUCT), &DisassocReq);
|
||||
pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_OID_DISASSOC;
|
||||
@ -283,13 +276,6 @@ VOID CntlOidScanProc(
|
||||
ULONG BssIdx = BSS_NOT_FOUND;
|
||||
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.
|
||||
// 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))
|
||||
@ -513,12 +499,6 @@ VOID CntlOidRTBssidProc(
|
||||
MLME_DISASSOC_REQ_STRUCT DisassocReq;
|
||||
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
|
||||
COPY_MAC_ADDR(pAd->MlmeAux.Bssid, pOidBssid);
|
||||
pAd->MlmeAux.BssType = pAd->StaCfg.BssType;
|
||||
@ -1973,12 +1953,6 @@ VOID LinkDown(
|
||||
if (MONITOR_ON(pAd))
|
||||
return;
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
// Nothing to do in ATE mode.
|
||||
if (ATE_ON(pAd))
|
||||
return;
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
RTMP_CLEAR_PSFLAG(pAd, fRTMP_PS_GO_TO_SLEEP_NOW);
|
||||
RTMPCancelTimer(&pAd->Mlme.PsPollTimer, &Cancelled);
|
||||
|
||||
|
@ -749,22 +749,6 @@ BOOLEAN STARxDoneInterruptHandle(
|
||||
break;
|
||||
}
|
||||
/* 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
|
||||
Status = RTMPCheckRxError(pAd, pHeader, pRxWI, pRxD);
|
||||
@ -1283,14 +1267,6 @@ VOID RTMPSendNullFrame(
|
||||
ULONG Length;
|
||||
PHEADER_802_11 pHeader_802_11;
|
||||
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
if(ATE_ON(pAd))
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
// WPA 802.1x secured port control
|
||||
if (((pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPA) ||
|
||||
(pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPAPSK) ||
|
||||
|
@ -1018,14 +1018,6 @@ VOID PeerBeacon(
|
||||
UCHAR AddHtInfoLen;
|
||||
UCHAR NewExtChannelOffset = 0xff;
|
||||
|
||||
|
||||
#ifdef RALINK_ATE
|
||||
if (ATE_ON(pAd))
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
if (!(INFRA_ON(pAd) || ADHOC_ON(pAd)
|
||||
))
|
||||
return;
|
||||
@ -1811,14 +1803,6 @@ VOID InvalidStateWhenStart(
|
||||
VOID EnqueuePsPoll(
|
||||
IN PRTMP_ADAPTER pAd)
|
||||
{
|
||||
#ifdef RALINK_ATE
|
||||
if (ATE_ON(pAd))
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif // RALINK_ATE //
|
||||
|
||||
|
||||
if (pAd->StaCfg.WindowsPowerMode == Ndis802_11PowerModeLegacy_PSP)
|
||||
pAd->PsPollFrame.FC.PwrMgmt = PWR_SAVE;
|
||||
MiniportMMRequest(pAd, 0, (PUCHAR)&pAd->PsPollFrame, sizeof(PSPOLL_FRAME));
|
||||
|
@ -274,40 +274,6 @@ static struct {
|
||||
{"Debug", Set_Debug_Proc},
|
||||
#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
|
||||
{"WpaSupport", Set_Wpa_Support},
|
||||
#endif // WPA_SUPPLICANT_SUPPORT //
|
||||
@ -1945,14 +1911,6 @@ rt_private_get_statistics(struct net_device *dev, struct iw_request_info *info,
|
||||
memset(extra, 0x00, IW_PRIV_SIZE_MASK);
|
||||
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 without retry = %ld\n", (ULONG)pAd->WlanCounters.TransmittedFragmentCount.QuadPart - (ULONG)pAd->WlanCounters.RetryCount.QuadPart);
|
||||
@ -1968,22 +1926,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), "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-B (if available) = %ld\n", (LONG)(pAd->StaCfg.RssiSample.LastRssi1 - pAd->BbpRssiToDbmDelta));
|
||||
@ -2889,13 +2831,6 @@ rt_private_ioctl_bbp(struct net_device *dev, struct iw_request_info *info,
|
||||
{
|
||||
if (bbpId <= 136)
|
||||
{
|
||||
#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);
|
||||
}
|
||||
@ -2921,15 +2856,6 @@ rt_private_ioctl_bbp(struct net_device *dev, struct iw_request_info *info,
|
||||
{
|
||||
if (bbpId <= 136)
|
||||
{
|
||||
#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);
|
||||
//Read it back for showing
|
||||
@ -2964,13 +2890,6 @@ next:
|
||||
{
|
||||
if (strlen(extra) >= (IW_PRIV_SIZE_MASK - 10))
|
||||
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);
|
||||
sprintf(extra+strlen(extra), "R%02d[0x%02X]:%02X ", bbpId, bbpId*2, regBBP);
|
||||
if (bbpId%5 == 4)
|
||||
@ -3298,13 +3217,6 @@ INT RTMPSetInformation(
|
||||
}
|
||||
break;
|
||||
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;
|
||||
DBGPRINT(RT_DEBUG_TRACE, ("Set::OID_802_11_BSSID_LIST_SCAN, TxCnt = %d \n", pAdapter->RalinkCounters.LastOneSecTotalTxCount));
|
||||
|
||||
@ -3406,13 +3318,6 @@ INT RTMPSetInformation(
|
||||
}
|
||||
break;
|
||||
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))
|
||||
Status = -EINVAL;
|
||||
else
|
||||
@ -4029,13 +3934,6 @@ INT RTMPSetInformation(
|
||||
break;
|
||||
|
||||
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.
|
||||
// Later on, NDIS_802_11_BSSID_LIST_EX->NumberOfItems should be 0
|
||||
@ -4617,16 +4515,6 @@ INT RTMPQueryInformation(
|
||||
Status = -EFAULT;
|
||||
}
|
||||
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:
|
||||
if (RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS))
|
||||
{
|
||||
@ -4768,14 +4656,6 @@ INT RTMPQueryInformation(
|
||||
Status = copy_to_user(wrq->u.data.pointer, &MediaState, wrq->u.data.length);
|
||||
break;
|
||||
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))
|
||||
{
|
||||
Status = copy_to_user(wrq->u.data.pointer, &pAdapter->CommonCfg.Bssid, sizeof(NDIS_802_11_MAC_ADDRESS));
|
||||
@ -5485,15 +5365,6 @@ INT rt28xx_sta_ioctl(
|
||||
|
||||
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:
|
||||
DBGPRINT(RT_DEBUG_TRACE, ("IOCTL::SIOCGIFHWADDR\n"));
|
||||
memcpy(wrq->u.name, pAd->CurrentAddress, ETH_ALEN);
|
||||
@ -6714,13 +6585,6 @@ VOID RTMPIoctlMAC(
|
||||
UCHAR R66;
|
||||
pAdapter->BbpTuning.bEnable = FALSE;
|
||||
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)));
|
||||
DBGPRINT(RT_DEBUG_TRACE,("turn off R17 tuning, restore to 0x%02x\n", R66));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user