Commit bdc0a173 authored by Mark Einon's avatar Mark Einon Committed by Greg Kroah-Hartman
Browse files

Staging: rt2860: Remove dependency on CFLAG RT2860



Removed the CFLAG RT2860 from Makefile and dependency on it in the driver code.

Signed-off-by: default avatarMark Einon <mark.einon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f72c4bf5
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@ obj-$(CONFIG_RT2860) += rt2860sta.o

# TODO: all of these should be removed
EXTRA_CFLAGS += -DLINUX -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT
EXTRA_CFLAGS += -DRT2860
EXTRA_CFLAGS += -DCONFIG_STA_SUPPORT
EXTRA_CFLAGS += -DDBG
EXTRA_CFLAGS += -DDOT11_N_SUPPORT
+1 −22
Original line number Diff line number Diff line
@@ -105,9 +105,7 @@ NDIS_STATUS MiniportMMRequest(
	PNDIS_PACKET	pPacket;
	NDIS_STATUS  	Status = NDIS_STATUS_SUCCESS;
	ULONG	 		FreeNum;
#ifdef RT2860
	unsigned long	IrqFlags = 0;
#endif // RT2860 //
	UCHAR			IrqState;
	UCHAR			rtmpHwHdr[TXINFO_SIZE + TXWI_SIZE]; //RTMP_HW_HDR_LEN];

@@ -118,10 +116,9 @@ NDIS_STATUS MiniportMMRequest(
	// 2860C use Tx Ring

	IrqState = pAd->irq_disabled;
#ifdef RT2860

	if ((pAd->MACVersion == 0x28600100) && (!IrqState))
		RTMP_IRQ_LOCK(&pAd->irq_lock, IrqFlags);
#endif // RT2860 //

	do
	{
@@ -175,17 +172,14 @@ NDIS_STATUS MiniportMMRequest(

	} while (FALSE);

#ifdef RT2860
	// 2860C use Tx Ring
	if ((pAd->MACVersion == 0x28600100) && (!IrqState))
		RTMP_IRQ_UNLOCK(&pAd->irq_lock, IrqFlags);
#endif // RT2860 //

	return Status;
}


#ifdef RT2860
NDIS_STATUS MiniportMMRequestUnlock(
	IN	PRTMP_ADAPTER	pAd,
	IN	UCHAR			QueIdx,
@@ -253,7 +247,6 @@ NDIS_STATUS MiniportMMRequestUnlock(

	return Status;
}
#endif // RT2860 //


/*
@@ -290,17 +283,14 @@ NDIS_STATUS MlmeHardTransmit(
		return NDIS_STATUS_FAILURE;
	}

#ifdef RT2860
	if ( pAd->MACVersion == 0x28600100 )
		return MlmeHardTransmitTxRing(pAd,QueIdx,pPacket);
	else
#endif // RT2860 //
		return MlmeHardTransmitMgmtRing(pAd,QueIdx,pPacket);

}


#ifdef RT2860
NDIS_STATUS MlmeHardTransmitTxRing(
	IN	PRTMP_ADAPTER	pAd,
	IN	UCHAR	QueIdx,
@@ -509,7 +499,6 @@ NDIS_STATUS MlmeHardTransmitTxRing(

	return NDIS_STATUS_SUCCESS;
}
#endif // RT2860 //


NDIS_STATUS MlmeHardTransmitMgmtRing(
@@ -1076,7 +1065,6 @@ VOID RTMPDeQueuePacket(
				break;
			}

#ifdef RT2860
			FreeNumber[QueIdx] = GET_TXRING_FREENO(pAd, QueIdx);

#ifdef DBG_DIAGNOSE
@@ -1101,7 +1089,6 @@ VOID RTMPDeQueuePacket(
				RTMPFreeTXDUponTxDmaDone(pAd, QueIdx);
				FreeNumber[QueIdx] = GET_TXRING_FREENO(pAd, QueIdx);
			}
#endif // RT2860 //

			// probe the Queue Head
			pQueue = &pAd->TxSwQueue[QueIdx];
@@ -1180,12 +1167,10 @@ VOID RTMPDeQueuePacket(
				Status = STAHardTransmit(pAd, pTxBlk, QueIdx);
#endif // CONFIG_STA_SUPPORT //

#ifdef RT2860
			DEQUEUE_UNLOCK(&pAd->irq_lock, bIntContext, IrqFlags);
			// static rate also need NICUpdateFifoStaCounters() function.
			//if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED))
				NICUpdateFifoStaCounters(pAd);
#endif // RT2860 //
		}

		RT28XX_STOP_DEQUEUE(pAd, QueIdx, IrqFlags);
@@ -1764,7 +1749,6 @@ PQUEUE_HEADER RTMPCheckTxSwQueue(
}


#ifdef RT2860
BOOLEAN  RTMPFreeTXDUponTxDmaDone(
	IN PRTMP_ADAPTER	pAd,
	IN UCHAR			QueIdx)
@@ -2309,7 +2293,6 @@ VOID DBGPRINT_RX_RING(
	DBGPRINT_RAW(RT_DEBUG_TRACE,(" 	RxSwReadIdx [%d]=", AC0freeIdx));
	DBGPRINT_RAW(RT_DEBUG_TRACE,("	pending-NDIS=%ld\n", pAd->RalinkCounters.PendingNdisPacketCount));
}
#endif // RT2860 //

/*
	========================================================================
@@ -2634,9 +2617,7 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(
					pEntry->AuthMode = pAd->StaCfg.AuthMode;
					pEntry->WepStatus = pAd->StaCfg.WepStatus;
					pEntry->PrivacyFilter = Ndis802_11PrivFilterAcceptAll;
#ifdef RT2860
					AsicRemovePairwiseKeyEntry(pAd, pEntry->apidx, (UCHAR)i);
#endif // RT2860 //
				}
#endif // CONFIG_STA_SUPPORT //
			}
@@ -2823,9 +2804,7 @@ VOID MacTableReset(

	for (i=1; i<MAX_LEN_OF_MAC_TABLE; i++)
	{
#ifdef RT2860
		RT28XX_STA_ENTRY_MAC_RESET(pAd, i);
#endif // RT2860 //
		if (pAd->MacTab.Content[i].ValidAsCLI == TRUE)
	   {

+0 −6
Original line number Diff line number Diff line
@@ -814,7 +814,6 @@ INT Show_DescInfo_Proc(
	IN	PRTMP_ADAPTER	pAd,
	IN	PUCHAR			arg)
{
#ifdef RT2860
	INT i, QueIdx=0;
	PRT28XX_RXD_STRUC pRxD;
    PTXD_STRUC pTxD;
@@ -845,7 +844,6 @@ INT Show_DescInfo_Proc(
	    hex_dump("Rx Descriptor", (char *)pRxD, 16);
		printk("pRxD->DDONE = %x\n", pRxD->DDONE);
	}
#endif // RT2860 //

	return TRUE;
}
@@ -1803,9 +1801,7 @@ VOID RTMPAddWcidAttributeEntry(
	}

	// For key index and ext IV bit, so only need to update the position(offset+3).
#ifdef RT2860
	RTMP_IO_WRITE8(pAd, offset+3, IVEIV);
#endif // RT2860 //

	DBGPRINT(RT_DEBUG_TRACE,("RTMPAddWcidAttributeEntry: WCID #%d, KeyIndex #%d, Alg=%s\n",Wcid, KeyIdx, CipherName[CipherAlg]));
	DBGPRINT(RT_DEBUG_TRACE,("	WCIDAttri = 0x%x \n",  WCIDAttri));
@@ -2827,9 +2823,7 @@ INT Set_OpMode_Proc(

	Value = simple_strtol(arg, 0, 10);

#ifdef RT2860
	if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE))
#endif // RT2860 //
	{
		DBGPRINT(RT_DEBUG_ERROR, ("Can not switch operate mode on interface up !! \n"));
		return FALSE;
+2 −49
Original line number Diff line number Diff line
@@ -527,7 +527,6 @@ NDIS_STATUS MlmeInit(


#ifdef CONFIG_STA_SUPPORT
#ifdef RT2860
		IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
		{
	        if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE))
@@ -537,7 +536,6 @@ NDIS_STATUS MlmeInit(
	    		RTMPInitTimer(pAd, &pAd->Mlme.RadioOnOffTimer, GET_TIMER_FUNCTION(RadioOnExec), pAd, FALSE);
	        }
		}
#endif // RT2860 //
#endif // CONFIG_STA_SUPPORT //

	} while (FALSE);
@@ -711,13 +709,11 @@ VOID MlmeHalt(
		RTMPCancelTimer(&pAd->MlmeAux.AuthTimer,		&Cancelled);
		RTMPCancelTimer(&pAd->MlmeAux.BeaconTimer,		&Cancelled);
		RTMPCancelTimer(&pAd->MlmeAux.ScanTimer,		&Cancelled);
#ifdef RT2860
	    if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE))
	    {
	   	    RTMPCancelTimer(&pAd->Mlme.PsPollTimer,		&Cancelled);
		    RTMPCancelTimer(&pAd->Mlme.RadioOnOffTimer,		&Cancelled);
		}
#endif // RT2860 //

#ifdef QOS_DLS_SUPPORT
		for (i=0; i<MAX_NUM_OF_DLS_ENTRY; i++)
@@ -822,7 +818,6 @@ VOID MlmePeriodicExec(
	}

#ifdef CONFIG_STA_SUPPORT
#ifdef RT2860
	IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
	{
	    // If Hardware controlled Radio enabled, we have to check GPIO pin2 every 2 second.
@@ -863,7 +858,6 @@ VOID MlmePeriodicExec(
			}
		}
	}
#endif // RT2860 //
#endif // CONFIG_STA_SUPPORT //

	// Do nothing if the driver is starting halt state.
@@ -1075,9 +1069,7 @@ VOID MlmePeriodicExec(
#ifdef CONFIG_STA_SUPPORT
		IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
		{
#ifdef RT2860
			if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST) && (pAd->bPCIclkOff == FALSE))
#endif // RT2860 //
			{
				// When Adhoc beacon is enabled and RTS/CTS is enabled, there is a chance that hardware MAC FSM will run into a deadlock
				// and sending CTS-to-self over and over.
@@ -5036,16 +5028,13 @@ BOOLEAN MlmeDequeue(
VOID	MlmeRestartStateMachine(
	IN	PRTMP_ADAPTER	pAd)
{
#ifdef RT2860
	MLME_QUEUE_ELEM		*Elem = NULL;
#endif // RT2860 //
#ifdef CONFIG_STA_SUPPORT
	BOOLEAN				Cancelled;
#endif // CONFIG_STA_SUPPORT //

	DBGPRINT(RT_DEBUG_TRACE, ("MlmeRestartStateMachine \n"));

#ifdef RT2860
	NdisAcquireSpinLock(&pAd->Mlme.TaskLock);
	if(pAd->Mlme.bRunning)
	{
@@ -5073,7 +5062,6 @@ VOID MlmeRestartStateMachine(
			DBGPRINT_ERR(("MlmeRestartStateMachine: MlmeQueue empty\n"));
		}
	}
#endif // RT2860 //

#ifdef CONFIG_STA_SUPPORT
	IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
@@ -5122,12 +5110,10 @@ VOID MlmeRestartStateMachine(
	}
#endif // CONFIG_STA_SUPPORT //

#ifdef RT2860
	// Remove running state
	NdisAcquireSpinLock(&pAd->Mlme.TaskLock);
	pAd->Mlme.bRunning = FALSE;
	NdisReleaseSpinLock(&pAd->Mlme.TaskLock);
#endif // RT2860 //
}

/*! \brief	test if the MLME Queue is empty
@@ -6799,7 +6785,6 @@ VOID AsicEnableIbssSync(
	csr9.field.bTsfTicking = 0;
	RTMP_IO_WRITE32(pAd, BCN_TIME_CFG, csr9.word);

#ifdef RT2860
	// move BEACON TXD and frame content to on-chip memory
	ptr = (PUCHAR)&pAd->BeaconTxWI;
	for (i=0; i<TXWI_SIZE; i+=4)  // 16-byte TXWI field
@@ -6817,7 +6802,6 @@ VOID AsicEnableIbssSync(
		RTMP_IO_WRITE32(pAd, HW_BEACON_BASE0 + TXWI_SIZE + i, longptr);
		ptr +=4;
	}
#endif // RT2860 //

	// start sending BEACON
	csr9.field.BeaconInterval = pAd->CommonCfg.BeaconPeriod << 4; // ASIC register in units of 1/16 TU
@@ -7186,9 +7170,7 @@ VOID AsicAddSharedKeyEntry(
{
	ULONG offset; //, csr0;
	SHAREDKEY_MODE_STRUC csr1;
#ifdef RT2860
	INT   i;
#endif // RT2860 //

	DBGPRINT(RT_DEBUG_TRACE, ("AsicAddSharedKeyEntry BssIndex=%d, KeyIdx=%d\n", BssIndex,KeyIdx));
//============================================================================================
@@ -7210,7 +7192,6 @@ VOID AsicAddSharedKeyEntry(
	//
	// fill key material - key + TX MIC + RX MIC
	//
#ifdef RT2860
	offset = SHARED_KEY_TABLE_BASE + (4*BssIndex + KeyIdx)*HW_KEY_ENTRY_SIZE;
	for (i=0; i<MAX_LEN_OF_SHARE_KEY; i++)
	{
@@ -7234,7 +7215,6 @@ VOID AsicAddSharedKeyEntry(
			RTMP_IO_WRITE8(pAd, offset + i, pRxMic[i]);
		}
	}
#endif // RT2860 //


	//
@@ -7409,9 +7389,7 @@ VOID AsicAddKeyEntry(
	PUCHAR		pTxtsc = pCipherKey->TxTsc;
	UCHAR		CipherAlg = pCipherKey->CipherAlg;
	SHAREDKEY_MODE_STRUC csr1;
#ifdef RT2860
	UCHAR		i;
#endif // RT2860 //

	DBGPRINT(RT_DEBUG_TRACE, ("==> AsicAddKeyEntry\n"));
	//
@@ -7426,7 +7404,6 @@ VOID AsicAddKeyEntry(
	// 2.) Set Key to Asic
	//
	//for (i = 0; i < KeyLen; i++)
#ifdef RT2860
	for (i = 0; i < MAX_LEN_OF_PEER_KEY; i++)
	{
		RTMP_IO_WRITE8(pAd, offset + i, pKey[i]);
@@ -7452,7 +7429,6 @@ VOID AsicAddKeyEntry(
			RTMP_IO_WRITE8(pAd, offset + i, pRxMic[i]);
		}
	}
#endif // RT2860 //


	//
@@ -7461,7 +7437,6 @@ VOID AsicAddKeyEntry(
	//
	if (bTxKey)
	{
#ifdef RT2860
		offset = MAC_IVEIV_TABLE_BASE + (WCID * HW_IVEIV_ENTRY_SIZE);
		//
		// Write IV
@@ -7484,7 +7459,6 @@ VOID AsicAddKeyEntry(
		{
			RTMP_IO_WRITE8(pAd, offset + i, pTxtsc[i + 2]);
		}
#endif // RT2860 //

		AsicUpdateWCIDAttribute(pAd, WCID, BssIndex, CipherAlg, bUsePairewiseKeyTable);
	}
@@ -7550,12 +7524,10 @@ VOID AsicAddPairwiseKeyEntry(

	// EKEY
	offset = PAIRWISE_KEY_TABLE_BASE + (WCID * HW_KEY_ENTRY_SIZE);
#ifdef RT2860
	for (i=0; i<MAX_LEN_OF_PEER_KEY; i++)
	{
		RTMP_IO_WRITE8(pAd, offset + i, pKey[i]);
	}
#endif // RT2860 //
	for (i=0; i<MAX_LEN_OF_PEER_KEY; i+=4)
	{
		UINT32 Value;
@@ -7567,22 +7539,18 @@ VOID AsicAddPairwiseKeyEntry(
	//  MIC KEY
	if (pTxMic)
	{
#ifdef RT2860
		for (i=0; i<8; i++)
		{
			RTMP_IO_WRITE8(pAd, offset+i, pTxMic[i]);
		}
#endif // RT2860 //
	}
	offset += 8;
	if (pRxMic)
	{
#ifdef RT2860
		for (i=0; i<8; i++)
		{
			RTMP_IO_WRITE8(pAd, offset+i, pRxMic[i]);
		}
#endif // RT2860 //
	}

	DBGPRINT(RT_DEBUG_TRACE,("AsicAddPairwiseKeyEntry: WCID #%d Alg=%s\n",WCID, CipherName[CipherAlg]));
@@ -7631,11 +7599,9 @@ BOOLEAN AsicSendCommandToMcu(
	HOST_CMD_CSR_STRUC	H2MCmd;
	H2M_MAILBOX_STRUC	H2MMailbox;
	ULONG				i = 0;
#ifdef RT2860
#ifdef RALINK_ATE
	static UINT32 j = 0;
#endif // RALINK_ATE //
#endif // RT2860 //
	do
	{
		RTMP_IO_READ32(pAd, H2M_MAILBOX_CSR, &H2MMailbox.word);
@@ -7647,7 +7613,6 @@ BOOLEAN AsicSendCommandToMcu(

	if (i >= 100)
	{
#ifdef RT2860
#ifdef RALINK_ATE
		if (pAd->ate.bFWLoading == TRUE)
		{
@@ -7672,7 +7637,6 @@ BOOLEAN AsicSendCommandToMcu(
		}
		else
#endif // RALINK_ATE //
#endif // RT2860 //
		{
			UINT32 Data;

@@ -7700,7 +7664,6 @@ BOOLEAN AsicSendCommandToMcu(
		//return FALSE;
	}

#ifdef RT2860
#ifdef RALINK_ATE
	else if (pAd->ate.bFWLoading == TRUE)
	{
@@ -7710,7 +7673,6 @@ BOOLEAN AsicSendCommandToMcu(
		j = 0;
	}
#endif // RALINK_ATE //
#endif // RT2860 //

	H2MMailbox.field.Owner	  = 1;	   // pass ownership to MCU
	H2MMailbox.field.CmdToken = Token;
@@ -7729,7 +7691,6 @@ BOOLEAN AsicSendCommandToMcu(
	return TRUE;
}

#ifdef RT2860
BOOLEAN AsicCheckCommanOk(
	IN PRTMP_ADAPTER pAd,
	IN UCHAR		 Command)
@@ -7794,7 +7755,6 @@ BOOLEAN AsicCheckCommanOk(

	return FALSE;
}
#endif // RT2860 //

/*
	========================================================================
@@ -8206,10 +8166,8 @@ VOID AsicEvaluateRxAnt(
	}
	RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3);
#ifdef CONFIG_STA_SUPPORT
#ifdef RT2860
	IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
    	pAd->StaCfg.BBPR3 = BBPR3;
#endif // RT2860 //
#endif // CONFIG_STA_SUPPORT //
	if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)
		)
@@ -8321,9 +8279,7 @@ VOID AsicRxAntEvalTimeout(
			BBPR3 |= (0x0);
		}
		RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3);
#ifdef RT2860
		pAd->StaCfg.BBPR3 = BBPR3;
#endif // RT2860 //
	}

#endif // CONFIG_STA_SUPPORT //
@@ -8549,10 +8505,7 @@ VOID AsicStaBbpTuning(
		&& (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)
			)
		&& !(OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE))
#ifdef RT2860
		&& (pAd->bPCIclkOff == FALSE)
#endif // RT2860 //
		)
		&& (pAd->bPCIclkOff == FALSE))
	{
		RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R66, &OrigR66Value);
		R66 = OrigR66Value;
+1 −28
Original line number Diff line number Diff line
@@ -149,9 +149,7 @@ RTMP_REG_PAIR MACRegTable[] = {
	{GF20_PROT_CFG,			0x01744004},    // set 19:18 --> Short NAV for MIMO PS
	{GF40_PROT_CFG,			0x03F44084},
	{MM20_PROT_CFG,			0x01744004},
#ifdef RT2860
	{MM40_PROT_CFG,			0x03F54084},
#endif // RT2860 //
	{TXOP_CTRL_CFG,			0x0000583f, /*0x0000243f*/ /*0x000024bf*/},	//Extension channel backoff.
	{TX_RTS_CFG,			0x00092b20},
	{EXP_ACK_TIME,			0x002400ca},	// default value
@@ -188,9 +186,7 @@ RTMP_REG_PAIR STAMACRegTable[] = {
#define FIRMWAREIMAGEV1_LENGTH	0x1000
#define FIRMWAREIMAGEV2_LENGTH	0x1000

#ifdef RT2860
#define FIRMWARE_MINOR_VERSION	2
#endif // RT2860 //


/*
@@ -248,9 +244,7 @@ NDIS_STATUS RTMPAllocAdapterBlock(

		// Init spin locks
		NdisAllocateSpinLock(&pAd->MgmtRingLock);
#ifdef RT2860
		NdisAllocateSpinLock(&pAd->RxRingLock);
#endif // RT2860 //

		for (index =0 ; index < NUM_OF_TX_RING; index++)
		{
@@ -1555,10 +1549,7 @@ VOID NICInitAsicFromEEPROM(
		pAd->LedCntl.word = 0x01;
		pAd->Led1 = 0x5555;
		pAd->Led2 = 0x2221;

#ifdef RT2860
		pAd->Led3 = 0xA9F8;
#endif // RT2860 //
	}

	AsicSendCommandToMcu(pAd, 0x52, 0xff, (UCHAR)pAd->Led1, (UCHAR)(pAd->Led1 >> 8));
@@ -1594,12 +1585,10 @@ VOID NICInitAsicFromEEPROM(
		else
		{
			RTMPSetLED(pAd, LED_RADIO_ON);
#ifdef RT2860
			AsicSendCommandToMcu(pAd, 0x30, 0xff, 0xff, 0x02);
			AsicSendCommandToMcu(pAd, 0x31, PowerWakeCID, 0x00, 0x00);
			// 2-1. wait command ok.
			AsicCheckCommanOk(pAd, PowerWakeCID);
#endif // RT2860 //
		}
	}
#endif // CONFIG_STA_SUPPORT //
@@ -1677,10 +1666,8 @@ NDIS_STATUS NICInitializeAdapter(
{
	NDIS_STATUS     Status = NDIS_STATUS_SUCCESS;
	WPDMA_GLO_CFG_STRUC	GloCfg;
#ifdef RT2860
	UINT32			Value;
	DELAY_INT_CFG_STRUC	IntCfg;
#endif // RT2860 //
	ULONG	i =0, j=0;
	AC_TXOP_CSR0_STRUC	csr0;

@@ -1719,11 +1706,9 @@ NDIS_STATUS NICInitializeAdapter(

	// asic simulation sequence put this ahead before loading firmware.
	// pbf hardware reset
#ifdef RT2860
	RTMP_IO_WRITE32(pAd, WPDMA_RST_IDX, 0x1003f);	// 0x10000 for reset rx, 0x3f resets all 6 tx rings.
	RTMP_IO_WRITE32(pAd, PBF_SYS_CTRL, 0xe1f);
	RTMP_IO_WRITE32(pAd, PBF_SYS_CTRL, 0xe00);
#endif // RT2860 //

	// Initialze ASIC for TX & Rx operation
	if (NICInitializeAsic(pAd , bHardReset) != NDIS_STATUS_SUCCESS)
@@ -1737,7 +1722,6 @@ NDIS_STATUS NICInitializeAdapter(
	}


#ifdef RT2860
	// Write AC_BK base address register
	Value = RTMP_GetPhysicalAddressLow(pAd->TxRing[QID_AC_BK].Cell[0].AllocPa);
	RTMP_IO_WRITE32(pAd, TX_BASE_PTR1, Value);
@@ -1810,7 +1794,6 @@ NDIS_STATUS NICInitializeAdapter(
	// Write RX_RING_CSR register
	Value = RX_RING_SIZE;
	RTMP_IO_WRITE32(pAd, RX_MAX_CNT, Value);
#endif // RT2860 //


	// WMM parameter
@@ -1829,7 +1812,6 @@ NDIS_STATUS NICInitializeAdapter(
	RTMP_IO_WRITE32(pAd, WMM_TXOP1_CFG, csr0.word);


#ifdef RT2860
	// 3. Set DMA global configuration except TX_DMA_EN and RX_DMA_EN bits:
	i = 0;
	do
@@ -1848,7 +1830,6 @@ NDIS_STATUS NICInitializeAdapter(

	IntCfg.word = 0;
	RTMP_IO_WRITE32(pAd, DELAY_INT_CFG, IntCfg.word);
#endif // RT2860 //


	// reset action
@@ -1889,7 +1870,6 @@ NDIS_STATUS NICInitializeAsic(

	DBGPRINT(RT_DEBUG_TRACE, ("--> NICInitializeAsic\n"));

#ifdef RT2860
	if (bHardReset == TRUE)
	{
		RTMP_IO_WRITE32(pAd, MAC_SYS_CTRL, 0x3);
@@ -1914,7 +1894,6 @@ NDIS_STATUS NICInitializeAsic(
		}
	}
#endif // CONFIG_STA_SUPPORT //
#endif // RT2860 //


	//
@@ -3153,12 +3132,10 @@ VOID UserCfgInit(
	pAd->CommonCfg.BBPCurrentBW = BW_20;

	pAd->LedCntl.word = 0;
#ifdef RT2860
	pAd->LedIndicatorStregth = 0;
	pAd->RLnkCtrlOffset = 0;
	pAd->HostLnkCtrlOffset = 0;
	pAd->CheckDmaBusyCount = 0;
#endif // RT2860 //

	pAd->bAutoTxAgcA = FALSE;			// Default is OFF
	pAd->bAutoTxAgcG = FALSE;			// Default is OFF
@@ -3418,9 +3395,7 @@ VOID UserCfgInit(
	pAd->ate.bRxFer = 0;
	pAd->ate.bQATxStart = FALSE;
	pAd->ate.bQARxStart = FALSE;
#ifdef RT2860
	pAd->ate.bFWLoading = FALSE;
#endif // RT2860 //
#ifdef RALINK_28xx_QA
	//pAd->ate.Repeat = 0;
	pAd->ate.TxStatus = 0;
@@ -3430,9 +3405,7 @@ VOID UserCfgInit(


	pAd->CommonCfg.bWiFiTest = FALSE;
#ifdef RT2860
	pAd->bPCIclkOff = FALSE;
#endif // RT2860 //

	RTMP_SET_PSFLAG(pAd, fRTMP_PS_CAN_GO_SLEEP);
	DBGPRINT(RT_DEBUG_TRACE, ("<-- UserCfgInit\n"));
Loading