aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rt2860
diff options
context:
space:
mode:
authorMark Einon <mark.einon@gmail.com>2009-03-13 19:28:15 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 17:53:31 -0400
commitbdc0a1739fee93152bf33ed83b9cc07d328e4013 (patch)
treeaffff969922f65840d7864f1a89da92c5a1466ec /drivers/staging/rt2860
parentf72c4bf5e184353bd848b9b6de87fe2b07a3066c (diff)
Staging: rt2860: Remove dependency on CFLAG RT2860
Removed the CFLAG RT2860 from Makefile and dependency on it in the driver code. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt2860')
-rw-r--r--drivers/staging/rt2860/Makefile1
-rw-r--r--drivers/staging/rt2860/common/cmm_data.c23
-rw-r--r--drivers/staging/rt2860/common/cmm_info.c6
-rw-r--r--drivers/staging/rt2860/common/mlme.c51
-rw-r--r--drivers/staging/rt2860/common/rtmp_init.c29
-rw-r--r--drivers/staging/rt2860/config.mk4
-rw-r--r--drivers/staging/rt2860/rt28xx.h4
-rw-r--r--drivers/staging/rt2860/rt_ate.c18
-rw-r--r--drivers/staging/rt2860/rt_ate.h6
-rw-r--r--drivers/staging/rt2860/rt_config.h2
-rw-r--r--drivers/staging/rt2860/rt_linux.c4
-rw-r--r--drivers/staging/rt2860/rt_linux.h16
-rw-r--r--drivers/staging/rt2860/rt_main_dev.c12
-rw-r--r--drivers/staging/rt2860/rtmp.h24
-rw-r--r--drivers/staging/rt2860/rtmp_def.h2
-rw-r--r--drivers/staging/rt2860/sta/connect.c12
-rw-r--r--drivers/staging/rt2860/sta/dls.c4
-rw-r--r--drivers/staging/rt2860/sta/rtmp_data.c6
-rw-r--r--drivers/staging/rt2860/sta/sync.c10
-rw-r--r--drivers/staging/rt2860/sta_ioctl.c4
20 files changed, 5 insertions, 233 deletions
diff --git a/drivers/staging/rt2860/Makefile b/drivers/staging/rt2860/Makefile
index 6162212b588..b9563647846 100644
--- a/drivers/staging/rt2860/Makefile
+++ b/drivers/staging/rt2860/Makefile
@@ -2,7 +2,6 @@ obj-$(CONFIG_RT2860) += rt2860sta.o
2 2
3# TODO: all of these should be removed 3# TODO: all of these should be removed
4EXTRA_CFLAGS += -DLINUX -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT 4EXTRA_CFLAGS += -DLINUX -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT
5EXTRA_CFLAGS += -DRT2860
6EXTRA_CFLAGS += -DCONFIG_STA_SUPPORT 5EXTRA_CFLAGS += -DCONFIG_STA_SUPPORT
7EXTRA_CFLAGS += -DDBG 6EXTRA_CFLAGS += -DDBG
8EXTRA_CFLAGS += -DDOT11_N_SUPPORT 7EXTRA_CFLAGS += -DDOT11_N_SUPPORT
diff --git a/drivers/staging/rt2860/common/cmm_data.c b/drivers/staging/rt2860/common/cmm_data.c
index 14a99b3e321..b3f88f52af7 100644
--- a/drivers/staging/rt2860/common/cmm_data.c
+++ b/drivers/staging/rt2860/common/cmm_data.c
@@ -105,9 +105,7 @@ NDIS_STATUS MiniportMMRequest(
105 PNDIS_PACKET pPacket; 105 PNDIS_PACKET pPacket;
106 NDIS_STATUS Status = NDIS_STATUS_SUCCESS; 106 NDIS_STATUS Status = NDIS_STATUS_SUCCESS;
107 ULONG FreeNum; 107 ULONG FreeNum;
108#ifdef RT2860
109 unsigned long IrqFlags = 0; 108 unsigned long IrqFlags = 0;
110#endif // RT2860 //
111 UCHAR IrqState; 109 UCHAR IrqState;
112 UCHAR rtmpHwHdr[TXINFO_SIZE + TXWI_SIZE]; //RTMP_HW_HDR_LEN]; 110 UCHAR rtmpHwHdr[TXINFO_SIZE + TXWI_SIZE]; //RTMP_HW_HDR_LEN];
113 111
@@ -118,10 +116,9 @@ NDIS_STATUS MiniportMMRequest(
118 // 2860C use Tx Ring 116 // 2860C use Tx Ring
119 117
120 IrqState = pAd->irq_disabled; 118 IrqState = pAd->irq_disabled;
121#ifdef RT2860 119
122 if ((pAd->MACVersion == 0x28600100) && (!IrqState)) 120 if ((pAd->MACVersion == 0x28600100) && (!IrqState))
123 RTMP_IRQ_LOCK(&pAd->irq_lock, IrqFlags); 121 RTMP_IRQ_LOCK(&pAd->irq_lock, IrqFlags);
124#endif // RT2860 //
125 122
126 do 123 do
127 { 124 {
@@ -175,17 +172,14 @@ NDIS_STATUS MiniportMMRequest(
175 172
176 } while (FALSE); 173 } while (FALSE);
177 174
178#ifdef RT2860
179 // 2860C use Tx Ring 175 // 2860C use Tx Ring
180 if ((pAd->MACVersion == 0x28600100) && (!IrqState)) 176 if ((pAd->MACVersion == 0x28600100) && (!IrqState))
181 RTMP_IRQ_UNLOCK(&pAd->irq_lock, IrqFlags); 177 RTMP_IRQ_UNLOCK(&pAd->irq_lock, IrqFlags);
182#endif // RT2860 //
183 178
184 return Status; 179 return Status;
185} 180}
186 181
187 182
188#ifdef RT2860
189NDIS_STATUS MiniportMMRequestUnlock( 183NDIS_STATUS MiniportMMRequestUnlock(
190 IN PRTMP_ADAPTER pAd, 184 IN PRTMP_ADAPTER pAd,
191 IN UCHAR QueIdx, 185 IN UCHAR QueIdx,
@@ -253,7 +247,6 @@ NDIS_STATUS MiniportMMRequestUnlock(
253 247
254 return Status; 248 return Status;
255} 249}
256#endif // RT2860 //
257 250
258 251
259/* 252/*
@@ -290,17 +283,14 @@ NDIS_STATUS MlmeHardTransmit(
290 return NDIS_STATUS_FAILURE; 283 return NDIS_STATUS_FAILURE;
291 } 284 }
292 285
293#ifdef RT2860
294 if ( pAd->MACVersion == 0x28600100 ) 286 if ( pAd->MACVersion == 0x28600100 )
295 return MlmeHardTransmitTxRing(pAd,QueIdx,pPacket); 287 return MlmeHardTransmitTxRing(pAd,QueIdx,pPacket);
296 else 288 else
297#endif // RT2860 //
298 return MlmeHardTransmitMgmtRing(pAd,QueIdx,pPacket); 289 return MlmeHardTransmitMgmtRing(pAd,QueIdx,pPacket);
299 290
300} 291}
301 292
302 293
303#ifdef RT2860
304NDIS_STATUS MlmeHardTransmitTxRing( 294NDIS_STATUS MlmeHardTransmitTxRing(
305 IN PRTMP_ADAPTER pAd, 295 IN PRTMP_ADAPTER pAd,
306 IN UCHAR QueIdx, 296 IN UCHAR QueIdx,
@@ -509,7 +499,6 @@ NDIS_STATUS MlmeHardTransmitTxRing(
509 499
510 return NDIS_STATUS_SUCCESS; 500 return NDIS_STATUS_SUCCESS;
511} 501}
512#endif // RT2860 //
513 502
514 503
515NDIS_STATUS MlmeHardTransmitMgmtRing( 504NDIS_STATUS MlmeHardTransmitMgmtRing(
@@ -1076,7 +1065,6 @@ VOID RTMPDeQueuePacket(
1076 break; 1065 break;
1077 } 1066 }
1078 1067
1079#ifdef RT2860
1080 FreeNumber[QueIdx] = GET_TXRING_FREENO(pAd, QueIdx); 1068 FreeNumber[QueIdx] = GET_TXRING_FREENO(pAd, QueIdx);
1081 1069
1082#ifdef DBG_DIAGNOSE 1070#ifdef DBG_DIAGNOSE
@@ -1101,7 +1089,6 @@ VOID RTMPDeQueuePacket(
1101 RTMPFreeTXDUponTxDmaDone(pAd, QueIdx); 1089 RTMPFreeTXDUponTxDmaDone(pAd, QueIdx);
1102 FreeNumber[QueIdx] = GET_TXRING_FREENO(pAd, QueIdx); 1090 FreeNumber[QueIdx] = GET_TXRING_FREENO(pAd, QueIdx);
1103 } 1091 }
1104#endif // RT2860 //
1105 1092
1106 // probe the Queue Head 1093 // probe the Queue Head
1107 pQueue = &pAd->TxSwQueue[QueIdx]; 1094 pQueue = &pAd->TxSwQueue[QueIdx];
@@ -1180,12 +1167,10 @@ VOID RTMPDeQueuePacket(
1180 Status = STAHardTransmit(pAd, pTxBlk, QueIdx); 1167 Status = STAHardTransmit(pAd, pTxBlk, QueIdx);
1181#endif // CONFIG_STA_SUPPORT // 1168#endif // CONFIG_STA_SUPPORT //
1182 1169
1183#ifdef RT2860
1184 DEQUEUE_UNLOCK(&pAd->irq_lock, bIntContext, IrqFlags); 1170 DEQUEUE_UNLOCK(&pAd->irq_lock, bIntContext, IrqFlags);
1185 // static rate also need NICUpdateFifoStaCounters() function. 1171 // static rate also need NICUpdateFifoStaCounters() function.
1186 //if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED)) 1172 //if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED))
1187 NICUpdateFifoStaCounters(pAd); 1173 NICUpdateFifoStaCounters(pAd);
1188#endif // RT2860 //
1189 } 1174 }
1190 1175
1191 RT28XX_STOP_DEQUEUE(pAd, QueIdx, IrqFlags); 1176 RT28XX_STOP_DEQUEUE(pAd, QueIdx, IrqFlags);
@@ -1764,7 +1749,6 @@ PQUEUE_HEADER RTMPCheckTxSwQueue(
1764} 1749}
1765 1750
1766 1751
1767#ifdef RT2860
1768BOOLEAN RTMPFreeTXDUponTxDmaDone( 1752BOOLEAN RTMPFreeTXDUponTxDmaDone(
1769 IN PRTMP_ADAPTER pAd, 1753 IN PRTMP_ADAPTER pAd,
1770 IN UCHAR QueIdx) 1754 IN UCHAR QueIdx)
@@ -2309,7 +2293,6 @@ VOID DBGPRINT_RX_RING(
2309 DBGPRINT_RAW(RT_DEBUG_TRACE,(" RxSwReadIdx [%d]=", AC0freeIdx)); 2293 DBGPRINT_RAW(RT_DEBUG_TRACE,(" RxSwReadIdx [%d]=", AC0freeIdx));
2310 DBGPRINT_RAW(RT_DEBUG_TRACE,(" pending-NDIS=%ld\n", pAd->RalinkCounters.PendingNdisPacketCount)); 2294 DBGPRINT_RAW(RT_DEBUG_TRACE,(" pending-NDIS=%ld\n", pAd->RalinkCounters.PendingNdisPacketCount));
2311} 2295}
2312#endif // RT2860 //
2313 2296
2314/* 2297/*
2315 ======================================================================== 2298 ========================================================================
@@ -2634,9 +2617,7 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(
2634 pEntry->AuthMode = pAd->StaCfg.AuthMode; 2617 pEntry->AuthMode = pAd->StaCfg.AuthMode;
2635 pEntry->WepStatus = pAd->StaCfg.WepStatus; 2618 pEntry->WepStatus = pAd->StaCfg.WepStatus;
2636 pEntry->PrivacyFilter = Ndis802_11PrivFilterAcceptAll; 2619 pEntry->PrivacyFilter = Ndis802_11PrivFilterAcceptAll;
2637#ifdef RT2860
2638 AsicRemovePairwiseKeyEntry(pAd, pEntry->apidx, (UCHAR)i); 2620 AsicRemovePairwiseKeyEntry(pAd, pEntry->apidx, (UCHAR)i);
2639#endif // RT2860 //
2640 } 2621 }
2641#endif // CONFIG_STA_SUPPORT // 2622#endif // CONFIG_STA_SUPPORT //
2642 } 2623 }
@@ -2823,9 +2804,7 @@ VOID MacTableReset(
2823 2804
2824 for (i=1; i<MAX_LEN_OF_MAC_TABLE; i++) 2805 for (i=1; i<MAX_LEN_OF_MAC_TABLE; i++)
2825 { 2806 {
2826#ifdef RT2860
2827 RT28XX_STA_ENTRY_MAC_RESET(pAd, i); 2807 RT28XX_STA_ENTRY_MAC_RESET(pAd, i);
2828#endif // RT2860 //
2829 if (pAd->MacTab.Content[i].ValidAsCLI == TRUE) 2808 if (pAd->MacTab.Content[i].ValidAsCLI == TRUE)
2830 { 2809 {
2831 2810
diff --git a/drivers/staging/rt2860/common/cmm_info.c b/drivers/staging/rt2860/common/cmm_info.c
index dd92ac6eaed..c3e13195e12 100644
--- a/drivers/staging/rt2860/common/cmm_info.c
+++ b/drivers/staging/rt2860/common/cmm_info.c
@@ -814,7 +814,6 @@ INT Show_DescInfo_Proc(
814 IN PRTMP_ADAPTER pAd, 814 IN PRTMP_ADAPTER pAd,
815 IN PUCHAR arg) 815 IN PUCHAR arg)
816{ 816{
817#ifdef RT2860
818 INT i, QueIdx=0; 817 INT i, QueIdx=0;
819 PRT28XX_RXD_STRUC pRxD; 818 PRT28XX_RXD_STRUC pRxD;
820 PTXD_STRUC pTxD; 819 PTXD_STRUC pTxD;
@@ -845,7 +844,6 @@ INT Show_DescInfo_Proc(
845 hex_dump("Rx Descriptor", (char *)pRxD, 16); 844 hex_dump("Rx Descriptor", (char *)pRxD, 16);
846 printk("pRxD->DDONE = %x\n", pRxD->DDONE); 845 printk("pRxD->DDONE = %x\n", pRxD->DDONE);
847 } 846 }
848#endif // RT2860 //
849 847
850 return TRUE; 848 return TRUE;
851} 849}
@@ -1803,9 +1801,7 @@ VOID RTMPAddWcidAttributeEntry(
1803 } 1801 }
1804 1802
1805 // For key index and ext IV bit, so only need to update the position(offset+3). 1803 // For key index and ext IV bit, so only need to update the position(offset+3).
1806#ifdef RT2860
1807 RTMP_IO_WRITE8(pAd, offset+3, IVEIV); 1804 RTMP_IO_WRITE8(pAd, offset+3, IVEIV);
1808#endif // RT2860 //
1809 1805
1810 DBGPRINT(RT_DEBUG_TRACE,("RTMPAddWcidAttributeEntry: WCID #%d, KeyIndex #%d, Alg=%s\n",Wcid, KeyIdx, CipherName[CipherAlg])); 1806 DBGPRINT(RT_DEBUG_TRACE,("RTMPAddWcidAttributeEntry: WCID #%d, KeyIndex #%d, Alg=%s\n",Wcid, KeyIdx, CipherName[CipherAlg]));
1811 DBGPRINT(RT_DEBUG_TRACE,(" WCIDAttri = 0x%x \n", WCIDAttri)); 1807 DBGPRINT(RT_DEBUG_TRACE,(" WCIDAttri = 0x%x \n", WCIDAttri));
@@ -2827,9 +2823,7 @@ INT Set_OpMode_Proc(
2827 2823
2828 Value = simple_strtol(arg, 0, 10); 2824 Value = simple_strtol(arg, 0, 10);
2829 2825
2830#ifdef RT2860
2831 if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE)) 2826 if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE))
2832#endif // RT2860 //
2833 { 2827 {
2834 DBGPRINT(RT_DEBUG_ERROR, ("Can not switch operate mode on interface up !! \n")); 2828 DBGPRINT(RT_DEBUG_ERROR, ("Can not switch operate mode on interface up !! \n"));
2835 return FALSE; 2829 return FALSE;
diff --git a/drivers/staging/rt2860/common/mlme.c b/drivers/staging/rt2860/common/mlme.c
index 4562cf538dc..c00f9ab9c46 100644
--- a/drivers/staging/rt2860/common/mlme.c
+++ b/drivers/staging/rt2860/common/mlme.c
@@ -527,7 +527,6 @@ NDIS_STATUS MlmeInit(
527 527
528 528
529#ifdef CONFIG_STA_SUPPORT 529#ifdef CONFIG_STA_SUPPORT
530#ifdef RT2860
531 IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 530 IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
532 { 531 {
533 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE)) 532 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE))
@@ -537,7 +536,6 @@ NDIS_STATUS MlmeInit(
537 RTMPInitTimer(pAd, &pAd->Mlme.RadioOnOffTimer, GET_TIMER_FUNCTION(RadioOnExec), pAd, FALSE); 536 RTMPInitTimer(pAd, &pAd->Mlme.RadioOnOffTimer, GET_TIMER_FUNCTION(RadioOnExec), pAd, FALSE);
538 } 537 }
539 } 538 }
540#endif // RT2860 //
541#endif // CONFIG_STA_SUPPORT // 539#endif // CONFIG_STA_SUPPORT //
542 540
543 } while (FALSE); 541 } while (FALSE);
@@ -711,13 +709,11 @@ VOID MlmeHalt(
711 RTMPCancelTimer(&pAd->MlmeAux.AuthTimer, &Cancelled); 709 RTMPCancelTimer(&pAd->MlmeAux.AuthTimer, &Cancelled);
712 RTMPCancelTimer(&pAd->MlmeAux.BeaconTimer, &Cancelled); 710 RTMPCancelTimer(&pAd->MlmeAux.BeaconTimer, &Cancelled);
713 RTMPCancelTimer(&pAd->MlmeAux.ScanTimer, &Cancelled); 711 RTMPCancelTimer(&pAd->MlmeAux.ScanTimer, &Cancelled);
714#ifdef RT2860
715 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE)) 712 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE))
716 { 713 {
717 RTMPCancelTimer(&pAd->Mlme.PsPollTimer, &Cancelled); 714 RTMPCancelTimer(&pAd->Mlme.PsPollTimer, &Cancelled);
718 RTMPCancelTimer(&pAd->Mlme.RadioOnOffTimer, &Cancelled); 715 RTMPCancelTimer(&pAd->Mlme.RadioOnOffTimer, &Cancelled);
719 } 716 }
720#endif // RT2860 //
721 717
722#ifdef QOS_DLS_SUPPORT 718#ifdef QOS_DLS_SUPPORT
723 for (i=0; i<MAX_NUM_OF_DLS_ENTRY; i++) 719 for (i=0; i<MAX_NUM_OF_DLS_ENTRY; i++)
@@ -822,7 +818,6 @@ VOID MlmePeriodicExec(
822 } 818 }
823 819
824#ifdef CONFIG_STA_SUPPORT 820#ifdef CONFIG_STA_SUPPORT
825#ifdef RT2860
826 IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 821 IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
827 { 822 {
828 // If Hardware controlled Radio enabled, we have to check GPIO pin2 every 2 second. 823 // If Hardware controlled Radio enabled, we have to check GPIO pin2 every 2 second.
@@ -863,7 +858,6 @@ VOID MlmePeriodicExec(
863 } 858 }
864 } 859 }
865 } 860 }
866#endif // RT2860 //
867#endif // CONFIG_STA_SUPPORT // 861#endif // CONFIG_STA_SUPPORT //
868 862
869 // Do nothing if the driver is starting halt state. 863 // Do nothing if the driver is starting halt state.
@@ -1075,9 +1069,7 @@ VOID MlmePeriodicExec(
1075#ifdef CONFIG_STA_SUPPORT 1069#ifdef CONFIG_STA_SUPPORT
1076 IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 1070 IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
1077 { 1071 {
1078#ifdef RT2860
1079 if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST) && (pAd->bPCIclkOff == FALSE)) 1072 if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST) && (pAd->bPCIclkOff == FALSE))
1080#endif // RT2860 //
1081 { 1073 {
1082 // When Adhoc beacon is enabled and RTS/CTS is enabled, there is a chance that hardware MAC FSM will run into a deadlock 1074 // When Adhoc beacon is enabled and RTS/CTS is enabled, there is a chance that hardware MAC FSM will run into a deadlock
1083 // and sending CTS-to-self over and over. 1075 // and sending CTS-to-self over and over.
@@ -5036,16 +5028,13 @@ BOOLEAN MlmeDequeue(
5036VOID MlmeRestartStateMachine( 5028VOID MlmeRestartStateMachine(
5037 IN PRTMP_ADAPTER pAd) 5029 IN PRTMP_ADAPTER pAd)
5038{ 5030{
5039#ifdef RT2860
5040 MLME_QUEUE_ELEM *Elem = NULL; 5031 MLME_QUEUE_ELEM *Elem = NULL;
5041#endif // RT2860 //
5042#ifdef CONFIG_STA_SUPPORT 5032#ifdef CONFIG_STA_SUPPORT
5043 BOOLEAN Cancelled; 5033 BOOLEAN Cancelled;
5044#endif // CONFIG_STA_SUPPORT // 5034#endif // CONFIG_STA_SUPPORT //
5045 5035
5046 DBGPRINT(RT_DEBUG_TRACE, ("MlmeRestartStateMachine \n")); 5036 DBGPRINT(RT_DEBUG_TRACE, ("MlmeRestartStateMachine \n"));
5047 5037
5048#ifdef RT2860
5049 NdisAcquireSpinLock(&pAd->Mlme.TaskLock); 5038 NdisAcquireSpinLock(&pAd->Mlme.TaskLock);
5050 if(pAd->Mlme.bRunning) 5039 if(pAd->Mlme.bRunning)
5051 { 5040 {
@@ -5073,7 +5062,6 @@ VOID MlmeRestartStateMachine(
5073 DBGPRINT_ERR(("MlmeRestartStateMachine: MlmeQueue empty\n")); 5062 DBGPRINT_ERR(("MlmeRestartStateMachine: MlmeQueue empty\n"));
5074 } 5063 }
5075 } 5064 }
5076#endif // RT2860 //
5077 5065
5078#ifdef CONFIG_STA_SUPPORT 5066#ifdef CONFIG_STA_SUPPORT
5079 IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 5067 IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
@@ -5122,12 +5110,10 @@ VOID MlmeRestartStateMachine(
5122 } 5110 }
5123#endif // CONFIG_STA_SUPPORT // 5111#endif // CONFIG_STA_SUPPORT //
5124 5112
5125#ifdef RT2860
5126 // Remove running state 5113 // Remove running state
5127 NdisAcquireSpinLock(&pAd->Mlme.TaskLock); 5114 NdisAcquireSpinLock(&pAd->Mlme.TaskLock);
5128 pAd->Mlme.bRunning = FALSE; 5115 pAd->Mlme.bRunning = FALSE;
5129 NdisReleaseSpinLock(&pAd->Mlme.TaskLock); 5116 NdisReleaseSpinLock(&pAd->Mlme.TaskLock);
5130#endif // RT2860 //
5131} 5117}
5132 5118
5133/*! \brief test if the MLME Queue is empty 5119/*! \brief test if the MLME Queue is empty
@@ -6799,7 +6785,6 @@ VOID AsicEnableIbssSync(
6799 csr9.field.bTsfTicking = 0; 6785 csr9.field.bTsfTicking = 0;
6800 RTMP_IO_WRITE32(pAd, BCN_TIME_CFG, csr9.word); 6786 RTMP_IO_WRITE32(pAd, BCN_TIME_CFG, csr9.word);
6801 6787
6802#ifdef RT2860
6803 // move BEACON TXD and frame content to on-chip memory 6788 // move BEACON TXD and frame content to on-chip memory
6804 ptr = (PUCHAR)&pAd->BeaconTxWI; 6789 ptr = (PUCHAR)&pAd->BeaconTxWI;
6805 for (i=0; i<TXWI_SIZE; i+=4) // 16-byte TXWI field 6790 for (i=0; i<TXWI_SIZE; i+=4) // 16-byte TXWI field
@@ -6817,7 +6802,6 @@ VOID AsicEnableIbssSync(
6817 RTMP_IO_WRITE32(pAd, HW_BEACON_BASE0 + TXWI_SIZE + i, longptr); 6802 RTMP_IO_WRITE32(pAd, HW_BEACON_BASE0 + TXWI_SIZE + i, longptr);
6818 ptr +=4; 6803 ptr +=4;
6819 } 6804 }
6820#endif // RT2860 //
6821 6805
6822 // start sending BEACON 6806 // start sending BEACON
6823 csr9.field.BeaconInterval = pAd->CommonCfg.BeaconPeriod << 4; // ASIC register in units of 1/16 TU 6807 csr9.field.BeaconInterval = pAd->CommonCfg.BeaconPeriod << 4; // ASIC register in units of 1/16 TU
@@ -7186,9 +7170,7 @@ VOID AsicAddSharedKeyEntry(
7186{ 7170{
7187 ULONG offset; //, csr0; 7171 ULONG offset; //, csr0;
7188 SHAREDKEY_MODE_STRUC csr1; 7172 SHAREDKEY_MODE_STRUC csr1;
7189#ifdef RT2860
7190 INT i; 7173 INT i;
7191#endif // RT2860 //
7192 7174
7193 DBGPRINT(RT_DEBUG_TRACE, ("AsicAddSharedKeyEntry BssIndex=%d, KeyIdx=%d\n", BssIndex,KeyIdx)); 7175 DBGPRINT(RT_DEBUG_TRACE, ("AsicAddSharedKeyEntry BssIndex=%d, KeyIdx=%d\n", BssIndex,KeyIdx));
7194//============================================================================================ 7176//============================================================================================
@@ -7210,7 +7192,6 @@ VOID AsicAddSharedKeyEntry(
7210 // 7192 //
7211 // fill key material - key + TX MIC + RX MIC 7193 // fill key material - key + TX MIC + RX MIC
7212 // 7194 //
7213#ifdef RT2860
7214 offset = SHARED_KEY_TABLE_BASE + (4*BssIndex + KeyIdx)*HW_KEY_ENTRY_SIZE; 7195 offset = SHARED_KEY_TABLE_BASE + (4*BssIndex + KeyIdx)*HW_KEY_ENTRY_SIZE;
7215 for (i=0; i<MAX_LEN_OF_SHARE_KEY; i++) 7196 for (i=0; i<MAX_LEN_OF_SHARE_KEY; i++)
7216 { 7197 {
@@ -7234,7 +7215,6 @@ VOID AsicAddSharedKeyEntry(
7234 RTMP_IO_WRITE8(pAd, offset + i, pRxMic[i]); 7215 RTMP_IO_WRITE8(pAd, offset + i, pRxMic[i]);
7235 } 7216 }
7236 } 7217 }
7237#endif // RT2860 //
7238 7218
7239 7219
7240 // 7220 //
@@ -7409,9 +7389,7 @@ VOID AsicAddKeyEntry(
7409 PUCHAR pTxtsc = pCipherKey->TxTsc; 7389 PUCHAR pTxtsc = pCipherKey->TxTsc;
7410 UCHAR CipherAlg = pCipherKey->CipherAlg; 7390 UCHAR CipherAlg = pCipherKey->CipherAlg;
7411 SHAREDKEY_MODE_STRUC csr1; 7391 SHAREDKEY_MODE_STRUC csr1;
7412#ifdef RT2860
7413 UCHAR i; 7392 UCHAR i;
7414#endif // RT2860 //
7415 7393
7416 DBGPRINT(RT_DEBUG_TRACE, ("==> AsicAddKeyEntry\n")); 7394 DBGPRINT(RT_DEBUG_TRACE, ("==> AsicAddKeyEntry\n"));
7417 // 7395 //
@@ -7426,7 +7404,6 @@ VOID AsicAddKeyEntry(
7426 // 2.) Set Key to Asic 7404 // 2.) Set Key to Asic
7427 // 7405 //
7428 //for (i = 0; i < KeyLen; i++) 7406 //for (i = 0; i < KeyLen; i++)
7429#ifdef RT2860
7430 for (i = 0; i < MAX_LEN_OF_PEER_KEY; i++) 7407 for (i = 0; i < MAX_LEN_OF_PEER_KEY; i++)
7431 { 7408 {
7432 RTMP_IO_WRITE8(pAd, offset + i, pKey[i]); 7409 RTMP_IO_WRITE8(pAd, offset + i, pKey[i]);
@@ -7452,7 +7429,6 @@ VOID AsicAddKeyEntry(
7452 RTMP_IO_WRITE8(pAd, offset + i, pRxMic[i]); 7429 RTMP_IO_WRITE8(pAd, offset + i, pRxMic[i]);
7453 } 7430 }
7454 } 7431 }
7455#endif // RT2860 //
7456 7432
7457 7433
7458 // 7434 //
@@ -7461,7 +7437,6 @@ VOID AsicAddKeyEntry(
7461 // 7437 //
7462 if (bTxKey) 7438 if (bTxKey)
7463 { 7439 {
7464#ifdef RT2860
7465 offset = MAC_IVEIV_TABLE_BASE + (WCID * HW_IVEIV_ENTRY_SIZE); 7440 offset = MAC_IVEIV_TABLE_BASE + (WCID * HW_IVEIV_ENTRY_SIZE);
7466 // 7441 //
7467 // Write IV 7442 // Write IV
@@ -7484,7 +7459,6 @@ VOID AsicAddKeyEntry(
7484 { 7459 {
7485 RTMP_IO_WRITE8(pAd, offset + i, pTxtsc[i + 2]); 7460 RTMP_IO_WRITE8(pAd, offset + i, pTxtsc[i + 2]);
7486 } 7461 }
7487#endif // RT2860 //
7488 7462
7489 AsicUpdateWCIDAttribute(pAd, WCID, BssIndex, CipherAlg, bUsePairewiseKeyTable); 7463 AsicUpdateWCIDAttribute(pAd, WCID, BssIndex, CipherAlg, bUsePairewiseKeyTable);
7490 } 7464 }
@@ -7550,12 +7524,10 @@ VOID AsicAddPairwiseKeyEntry(
7550 7524
7551 // EKEY 7525 // EKEY
7552 offset = PAIRWISE_KEY_TABLE_BASE + (WCID * HW_KEY_ENTRY_SIZE); 7526 offset = PAIRWISE_KEY_TABLE_BASE + (WCID * HW_KEY_ENTRY_SIZE);
7553#ifdef RT2860
7554 for (i=0; i<MAX_LEN_OF_PEER_KEY; i++) 7527 for (i=0; i<MAX_LEN_OF_PEER_KEY; i++)
7555 { 7528 {
7556 RTMP_IO_WRITE8(pAd, offset + i, pKey[i]); 7529 RTMP_IO_WRITE8(pAd, offset + i, pKey[i]);
7557 } 7530 }
7558#endif // RT2860 //
7559 for (i=0; i<MAX_LEN_OF_PEER_KEY; i+=4) 7531 for (i=0; i<MAX_LEN_OF_PEER_KEY; i+=4)
7560 { 7532 {
7561 UINT32 Value; 7533 UINT32 Value;
@@ -7567,22 +7539,18 @@ VOID AsicAddPairwiseKeyEntry(
7567 // MIC KEY 7539 // MIC KEY
7568 if (pTxMic) 7540 if (pTxMic)
7569 { 7541 {
7570#ifdef RT2860
7571 for (i=0; i<8; i++) 7542 for (i=0; i<8; i++)
7572 { 7543 {
7573 RTMP_IO_WRITE8(pAd, offset+i, pTxMic[i]); 7544 RTMP_IO_WRITE8(pAd, offset+i, pTxMic[i]);
7574 } 7545 }
7575#endif // RT2860 //
7576 } 7546 }
7577 offset += 8; 7547 offset += 8;
7578 if (pRxMic) 7548 if (pRxMic)
7579 { 7549 {
7580#ifdef RT2860
7581 for (i=0; i<8; i++) 7550 for (i=0; i<8; i++)
7582 { 7551 {
7583 RTMP_IO_WRITE8(pAd, offset+i, pRxMic[i]); 7552 RTMP_IO_WRITE8(pAd, offset+i, pRxMic[i]);
7584 } 7553 }
7585#endif // RT2860 //
7586 } 7554 }
7587 7555
7588 DBGPRINT(RT_DEBUG_TRACE,("AsicAddPairwiseKeyEntry: WCID #%d Alg=%s\n",WCID, CipherName[CipherAlg])); 7556 DBGPRINT(RT_DEBUG_TRACE,("AsicAddPairwiseKeyEntry: WCID #%d Alg=%s\n",WCID, CipherName[CipherAlg]));
@@ -7631,11 +7599,9 @@ BOOLEAN AsicSendCommandToMcu(
7631 HOST_CMD_CSR_STRUC H2MCmd; 7599 HOST_CMD_CSR_STRUC H2MCmd;
7632 H2M_MAILBOX_STRUC H2MMailbox; 7600 H2M_MAILBOX_STRUC H2MMailbox;
7633 ULONG i = 0; 7601 ULONG i = 0;
7634#ifdef RT2860
7635#ifdef RALINK_ATE 7602#ifdef RALINK_ATE
7636 static UINT32 j = 0; 7603 static UINT32 j = 0;
7637#endif // RALINK_ATE // 7604#endif // RALINK_ATE //
7638#endif // RT2860 //
7639 do 7605 do
7640 { 7606 {
7641 RTMP_IO_READ32(pAd, H2M_MAILBOX_CSR, &H2MMailbox.word); 7607 RTMP_IO_READ32(pAd, H2M_MAILBOX_CSR, &H2MMailbox.word);
@@ -7647,7 +7613,6 @@ BOOLEAN AsicSendCommandToMcu(
7647 7613
7648 if (i >= 100) 7614 if (i >= 100)
7649 { 7615 {
7650#ifdef RT2860
7651#ifdef RALINK_ATE 7616#ifdef RALINK_ATE
7652 if (pAd->ate.bFWLoading == TRUE) 7617 if (pAd->ate.bFWLoading == TRUE)
7653 { 7618 {
@@ -7672,7 +7637,6 @@ BOOLEAN AsicSendCommandToMcu(
7672 } 7637 }
7673 else 7638 else
7674#endif // RALINK_ATE // 7639#endif // RALINK_ATE //
7675#endif // RT2860 //
7676 { 7640 {
7677 UINT32 Data; 7641 UINT32 Data;
7678 7642
@@ -7700,7 +7664,6 @@ BOOLEAN AsicSendCommandToMcu(
7700 //return FALSE; 7664 //return FALSE;
7701 } 7665 }
7702 7666
7703#ifdef RT2860
7704#ifdef RALINK_ATE 7667#ifdef RALINK_ATE
7705 else if (pAd->ate.bFWLoading == TRUE) 7668 else if (pAd->ate.bFWLoading == TRUE)
7706 { 7669 {
@@ -7710,7 +7673,6 @@ BOOLEAN AsicSendCommandToMcu(
7710 j = 0; 7673 j = 0;
7711 } 7674 }
7712#endif // RALINK_ATE // 7675#endif // RALINK_ATE //
7713#endif // RT2860 //
7714 7676
7715 H2MMailbox.field.Owner = 1; // pass ownership to MCU 7677 H2MMailbox.field.Owner = 1; // pass ownership to MCU
7716 H2MMailbox.field.CmdToken = Token; 7678 H2MMailbox.field.CmdToken = Token;
@@ -7729,7 +7691,6 @@ BOOLEAN AsicSendCommandToMcu(
7729 return TRUE; 7691 return TRUE;
7730} 7692}
7731 7693
7732#ifdef RT2860
7733BOOLEAN AsicCheckCommanOk( 7694BOOLEAN AsicCheckCommanOk(
7734 IN PRTMP_ADAPTER pAd, 7695 IN PRTMP_ADAPTER pAd,
7735 IN UCHAR Command) 7696 IN UCHAR Command)
@@ -7794,7 +7755,6 @@ BOOLEAN AsicCheckCommanOk(
7794 7755
7795 return FALSE; 7756 return FALSE;
7796} 7757}
7797#endif // RT2860 //
7798 7758
7799/* 7759/*
7800 ======================================================================== 7760 ========================================================================
@@ -8206,10 +8166,8 @@ VOID AsicEvaluateRxAnt(
8206 } 8166 }
8207 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3); 8167 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3);
8208#ifdef CONFIG_STA_SUPPORT 8168#ifdef CONFIG_STA_SUPPORT
8209#ifdef RT2860
8210 IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 8169 IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
8211 pAd->StaCfg.BBPR3 = BBPR3; 8170 pAd->StaCfg.BBPR3 = BBPR3;
8212#endif // RT2860 //
8213#endif // CONFIG_STA_SUPPORT // 8171#endif // CONFIG_STA_SUPPORT //
8214 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED) 8172 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)
8215 ) 8173 )
@@ -8321,9 +8279,7 @@ VOID AsicRxAntEvalTimeout(
8321 BBPR3 |= (0x0); 8279 BBPR3 |= (0x0);
8322 } 8280 }
8323 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3); 8281 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3);
8324#ifdef RT2860 8282 pAd->StaCfg.BBPR3 = BBPR3;
8325 pAd->StaCfg.BBPR3 = BBPR3;
8326#endif // RT2860 //
8327 } 8283 }
8328 8284
8329#endif // CONFIG_STA_SUPPORT // 8285#endif // CONFIG_STA_SUPPORT //
@@ -8549,10 +8505,7 @@ VOID AsicStaBbpTuning(
8549 && (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED) 8505 && (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)
8550 ) 8506 )
8551 && !(OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)) 8507 && !(OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE))
8552#ifdef RT2860 8508 && (pAd->bPCIclkOff == FALSE))
8553 && (pAd->bPCIclkOff == FALSE)
8554#endif // RT2860 //
8555 )
8556 { 8509 {
8557 RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R66, &OrigR66Value); 8510 RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R66, &OrigR66Value);
8558 R66 = OrigR66Value; 8511 R66 = OrigR66Value;
diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c
index b9b735dc571..8a00cee3ee9 100644
--- a/drivers/staging/rt2860/common/rtmp_init.c
+++ b/drivers/staging/rt2860/common/rtmp_init.c
@@ -149,9 +149,7 @@ RTMP_REG_PAIR MACRegTable[] = {
149 {GF20_PROT_CFG, 0x01744004}, // set 19:18 --> Short NAV for MIMO PS 149 {GF20_PROT_CFG, 0x01744004}, // set 19:18 --> Short NAV for MIMO PS
150 {GF40_PROT_CFG, 0x03F44084}, 150 {GF40_PROT_CFG, 0x03F44084},
151 {MM20_PROT_CFG, 0x01744004}, 151 {MM20_PROT_CFG, 0x01744004},
152#ifdef RT2860
153 {MM40_PROT_CFG, 0x03F54084}, 152 {MM40_PROT_CFG, 0x03F54084},
154#endif // RT2860 //
155 {TXOP_CTRL_CFG, 0x0000583f, /*0x0000243f*/ /*0x000024bf*/}, //Extension channel backoff. 153 {TXOP_CTRL_CFG, 0x0000583f, /*0x0000243f*/ /*0x000024bf*/}, //Extension channel backoff.
156 {TX_RTS_CFG, 0x00092b20}, 154 {TX_RTS_CFG, 0x00092b20},
157 {EXP_ACK_TIME, 0x002400ca}, // default value 155 {EXP_ACK_TIME, 0x002400ca}, // default value
@@ -188,9 +186,7 @@ RTMP_REG_PAIR STAMACRegTable[] = {
188#define FIRMWAREIMAGEV1_LENGTH 0x1000 186#define FIRMWAREIMAGEV1_LENGTH 0x1000
189#define FIRMWAREIMAGEV2_LENGTH 0x1000 187#define FIRMWAREIMAGEV2_LENGTH 0x1000
190 188
191#ifdef RT2860
192#define FIRMWARE_MINOR_VERSION 2 189#define FIRMWARE_MINOR_VERSION 2
193#endif // RT2860 //
194 190
195 191
196/* 192/*
@@ -248,9 +244,7 @@ NDIS_STATUS RTMPAllocAdapterBlock(
248 244
249 // Init spin locks 245 // Init spin locks
250 NdisAllocateSpinLock(&pAd->MgmtRingLock); 246 NdisAllocateSpinLock(&pAd->MgmtRingLock);
251#ifdef RT2860
252 NdisAllocateSpinLock(&pAd->RxRingLock); 247 NdisAllocateSpinLock(&pAd->RxRingLock);
253#endif // RT2860 //
254 248
255 for (index =0 ; index < NUM_OF_TX_RING; index++) 249 for (index =0 ; index < NUM_OF_TX_RING; index++)
256 { 250 {
@@ -1555,10 +1549,7 @@ VOID NICInitAsicFromEEPROM(
1555 pAd->LedCntl.word = 0x01; 1549 pAd->LedCntl.word = 0x01;
1556 pAd->Led1 = 0x5555; 1550 pAd->Led1 = 0x5555;
1557 pAd->Led2 = 0x2221; 1551 pAd->Led2 = 0x2221;
1558
1559#ifdef RT2860
1560 pAd->Led3 = 0xA9F8; 1552 pAd->Led3 = 0xA9F8;
1561#endif // RT2860 //
1562 } 1553 }
1563 1554
1564 AsicSendCommandToMcu(pAd, 0x52, 0xff, (UCHAR)pAd->Led1, (UCHAR)(pAd->Led1 >> 8)); 1555 AsicSendCommandToMcu(pAd, 0x52, 0xff, (UCHAR)pAd->Led1, (UCHAR)(pAd->Led1 >> 8));
@@ -1594,12 +1585,10 @@ VOID NICInitAsicFromEEPROM(
1594 else 1585 else
1595 { 1586 {
1596 RTMPSetLED(pAd, LED_RADIO_ON); 1587 RTMPSetLED(pAd, LED_RADIO_ON);
1597#ifdef RT2860
1598 AsicSendCommandToMcu(pAd, 0x30, 0xff, 0xff, 0x02); 1588 AsicSendCommandToMcu(pAd, 0x30, 0xff, 0xff, 0x02);
1599 AsicSendCommandToMcu(pAd, 0x31, PowerWakeCID, 0x00, 0x00); 1589 AsicSendCommandToMcu(pAd, 0x31, PowerWakeCID, 0x00, 0x00);
1600 // 2-1. wait command ok. 1590 // 2-1. wait command ok.
1601 AsicCheckCommanOk(pAd, PowerWakeCID); 1591 AsicCheckCommanOk(pAd, PowerWakeCID);
1602#endif // RT2860 //
1603 } 1592 }
1604 } 1593 }
1605#endif // CONFIG_STA_SUPPORT // 1594#endif // CONFIG_STA_SUPPORT //
@@ -1677,10 +1666,8 @@ NDIS_STATUS NICInitializeAdapter(
1677{ 1666{
1678 NDIS_STATUS Status = NDIS_STATUS_SUCCESS; 1667 NDIS_STATUS Status = NDIS_STATUS_SUCCESS;
1679 WPDMA_GLO_CFG_STRUC GloCfg; 1668 WPDMA_GLO_CFG_STRUC GloCfg;
1680#ifdef RT2860
1681 UINT32 Value; 1669 UINT32 Value;
1682 DELAY_INT_CFG_STRUC IntCfg; 1670 DELAY_INT_CFG_STRUC IntCfg;
1683#endif // RT2860 //
1684 ULONG i =0, j=0; 1671 ULONG i =0, j=0;
1685 AC_TXOP_CSR0_STRUC csr0; 1672 AC_TXOP_CSR0_STRUC csr0;
1686 1673
@@ -1719,11 +1706,9 @@ retry:
1719 1706
1720 // asic simulation sequence put this ahead before loading firmware. 1707 // asic simulation sequence put this ahead before loading firmware.
1721 // pbf hardware reset 1708 // pbf hardware reset
1722#ifdef RT2860
1723 RTMP_IO_WRITE32(pAd, WPDMA_RST_IDX, 0x1003f); // 0x10000 for reset rx, 0x3f resets all 6 tx rings. 1709 RTMP_IO_WRITE32(pAd, WPDMA_RST_IDX, 0x1003f); // 0x10000 for reset rx, 0x3f resets all 6 tx rings.
1724 RTMP_IO_WRITE32(pAd, PBF_SYS_CTRL, 0xe1f); 1710 RTMP_IO_WRITE32(pAd, PBF_SYS_CTRL, 0xe1f);
1725 RTMP_IO_WRITE32(pAd, PBF_SYS_CTRL, 0xe00); 1711 RTMP_IO_WRITE32(pAd, PBF_SYS_CTRL, 0xe00);
1726#endif // RT2860 //
1727 1712
1728 // Initialze ASIC for TX & Rx operation 1713 // Initialze ASIC for TX & Rx operation
1729 if (NICInitializeAsic(pAd , bHardReset) != NDIS_STATUS_SUCCESS) 1714 if (NICInitializeAsic(pAd , bHardReset) != NDIS_STATUS_SUCCESS)
@@ -1737,7 +1722,6 @@ retry:
1737 } 1722 }
1738 1723
1739 1724
1740#ifdef RT2860
1741 // Write AC_BK base address register 1725 // Write AC_BK base address register
1742 Value = RTMP_GetPhysicalAddressLow(pAd->TxRing[QID_AC_BK].Cell[0].AllocPa); 1726 Value = RTMP_GetPhysicalAddressLow(pAd->TxRing[QID_AC_BK].Cell[0].AllocPa);
1743 RTMP_IO_WRITE32(pAd, TX_BASE_PTR1, Value); 1727 RTMP_IO_WRITE32(pAd, TX_BASE_PTR1, Value);
@@ -1810,7 +1794,6 @@ retry:
1810 // Write RX_RING_CSR register 1794 // Write RX_RING_CSR register
1811 Value = RX_RING_SIZE; 1795 Value = RX_RING_SIZE;
1812 RTMP_IO_WRITE32(pAd, RX_MAX_CNT, Value); 1796 RTMP_IO_WRITE32(pAd, RX_MAX_CNT, Value);
1813#endif // RT2860 //
1814 1797
1815 1798
1816 // WMM parameter 1799 // WMM parameter
@@ -1829,7 +1812,6 @@ retry:
1829 RTMP_IO_WRITE32(pAd, WMM_TXOP1_CFG, csr0.word); 1812 RTMP_IO_WRITE32(pAd, WMM_TXOP1_CFG, csr0.word);
1830 1813
1831 1814
1832#ifdef RT2860
1833 // 3. Set DMA global configuration except TX_DMA_EN and RX_DMA_EN bits: 1815 // 3. Set DMA global configuration except TX_DMA_EN and RX_DMA_EN bits:
1834 i = 0; 1816 i = 0;
1835 do 1817 do
@@ -1848,7 +1830,6 @@ retry:
1848 1830
1849 IntCfg.word = 0; 1831 IntCfg.word = 0;
1850 RTMP_IO_WRITE32(pAd, DELAY_INT_CFG, IntCfg.word); 1832 RTMP_IO_WRITE32(pAd, DELAY_INT_CFG, IntCfg.word);
1851#endif // RT2860 //
1852 1833
1853 1834
1854 // reset action 1835 // reset action
@@ -1889,7 +1870,6 @@ NDIS_STATUS NICInitializeAsic(
1889 1870
1890 DBGPRINT(RT_DEBUG_TRACE, ("--> NICInitializeAsic\n")); 1871 DBGPRINT(RT_DEBUG_TRACE, ("--> NICInitializeAsic\n"));
1891 1872
1892#ifdef RT2860
1893 if (bHardReset == TRUE) 1873 if (bHardReset == TRUE)
1894 { 1874 {
1895 RTMP_IO_WRITE32(pAd, MAC_SYS_CTRL, 0x3); 1875 RTMP_IO_WRITE32(pAd, MAC_SYS_CTRL, 0x3);
@@ -1914,7 +1894,6 @@ NDIS_STATUS NICInitializeAsic(
1914 } 1894 }
1915 } 1895 }
1916#endif // CONFIG_STA_SUPPORT // 1896#endif // CONFIG_STA_SUPPORT //
1917#endif // RT2860 //
1918 1897
1919 1898
1920 // 1899 //
@@ -3153,12 +3132,10 @@ VOID UserCfgInit(
3153 pAd->CommonCfg.BBPCurrentBW = BW_20; 3132 pAd->CommonCfg.BBPCurrentBW = BW_20;
3154 3133
3155 pAd->LedCntl.word = 0; 3134 pAd->LedCntl.word = 0;
3156#ifdef RT2860
3157 pAd->LedIndicatorStregth = 0; 3135 pAd->LedIndicatorStregth = 0;
3158 pAd->RLnkCtrlOffset = 0; 3136 pAd->RLnkCtrlOffset = 0;
3159 pAd->HostLnkCtrlOffset = 0; 3137 pAd->HostLnkCtrlOffset = 0;
3160 pAd->CheckDmaBusyCount = 0; 3138 pAd->CheckDmaBusyCount = 0;
3161#endif // RT2860 //
3162 3139
3163 pAd->bAutoTxAgcA = FALSE; // Default is OFF 3140 pAd->bAutoTxAgcA = FALSE; // Default is OFF
3164 pAd->bAutoTxAgcG = FALSE; // Default is OFF 3141 pAd->bAutoTxAgcG = FALSE; // Default is OFF
@@ -3418,9 +3395,7 @@ VOID UserCfgInit(
3418 pAd->ate.bRxFer = 0; 3395 pAd->ate.bRxFer = 0;
3419 pAd->ate.bQATxStart = FALSE; 3396 pAd->ate.bQATxStart = FALSE;
3420 pAd->ate.bQARxStart = FALSE; 3397 pAd->ate.bQARxStart = FALSE;
3421#ifdef RT2860
3422 pAd->ate.bFWLoading = FALSE; 3398 pAd->ate.bFWLoading = FALSE;
3423#endif // RT2860 //
3424#ifdef RALINK_28xx_QA 3399#ifdef RALINK_28xx_QA
3425 //pAd->ate.Repeat = 0; 3400 //pAd->ate.Repeat = 0;
3426 pAd->ate.TxStatus = 0; 3401 pAd->ate.TxStatus = 0;
@@ -3430,9 +3405,7 @@ VOID UserCfgInit(
3430 3405
3431 3406
3432 pAd->CommonCfg.bWiFiTest = FALSE; 3407 pAd->CommonCfg.bWiFiTest = FALSE;
3433#ifdef RT2860 3408 pAd->bPCIclkOff = FALSE;
3434 pAd->bPCIclkOff = FALSE;
3435#endif // RT2860 //
3436 3409
3437 RTMP_SET_PSFLAG(pAd, fRTMP_PS_CAN_GO_SLEEP); 3410 RTMP_SET_PSFLAG(pAd, fRTMP_PS_CAN_GO_SLEEP);
3438 DBGPRINT(RT_DEBUG_TRACE, ("<-- UserCfgInit\n")); 3411 DBGPRINT(RT_DEBUG_TRACE, ("<-- UserCfgInit\n"));
diff --git a/drivers/staging/rt2860/config.mk b/drivers/staging/rt2860/config.mk
index f57d7bbffb2..25bd55a7aab 100644
--- a/drivers/staging/rt2860/config.mk
+++ b/drivers/staging/rt2860/config.mk
@@ -108,10 +108,6 @@ ifeq ($(HAS_EXT_BUILD_CHANNEL_LIST),y)
108WFLAGS += -DEXT_BUILD_CHANNEL_LIST 108WFLAGS += -DEXT_BUILD_CHANNEL_LIST
109endif 109endif
110 110
111ifeq ($(CHIPSET),2860)
112WFLAGS +=-DRT2860
113endif
114
115ifeq ($(CHIPSET),2870) 111ifeq ($(CHIPSET),2870)
116WFLAGS +=-DRT2870 112WFLAGS +=-DRT2870
117endif 113endif
diff --git a/drivers/staging/rt2860/rt28xx.h b/drivers/staging/rt2860/rt28xx.h
index ff23043e560..e5e6f0a8de6 100644
--- a/drivers/staging/rt2860/rt28xx.h
+++ b/drivers/staging/rt2860/rt28xx.h
@@ -1670,11 +1670,9 @@ typedef struct _HW_WCID_ENTRY { // 8-byte per entry
1670#define E2PROM_CSR 0x0004 1670#define E2PROM_CSR 0x0004
1671#define IO_CNTL_CSR 0x77d0 1671#define IO_CNTL_CSR 0x77d0
1672 1672
1673#ifdef RT2860
1674// 8051 firmware image for RT2860 - base address = 0x4000 1673// 8051 firmware image for RT2860 - base address = 0x4000
1675#define FIRMWARE_IMAGE_BASE 0x2000 1674#define FIRMWARE_IMAGE_BASE 0x2000
1676#define MAX_FIRMWARE_IMAGE_SIZE 0x2000 // 8kbyte 1675#define MAX_FIRMWARE_IMAGE_SIZE 0x2000 // 8kbyte
1677#endif // RT2860 //
1678 1676
1679 1677
1680// ================================================================ 1678// ================================================================
@@ -2029,7 +2027,6 @@ typedef struct PACKED _TXWI_STRUC {
2029// 2027//
2030// Rx descriptor format, Rx Ring 2028// Rx descriptor format, Rx Ring
2031// 2029//
2032#ifdef RT2860
2033#ifdef RT_BIG_ENDIAN 2030#ifdef RT_BIG_ENDIAN
2034typedef struct PACKED _RXD_STRUC { 2031typedef struct PACKED _RXD_STRUC {
2035 // Word 0 2032 // Word 0
@@ -2098,7 +2095,6 @@ typedef struct PACKED _RXD_STRUC {
2098 UINT32 Rsv1:13; 2095 UINT32 Rsv1:13;
2099} RXD_STRUC, *PRXD_STRUC, RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC; 2096} RXD_STRUC, *PRXD_STRUC, RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC;
2100#endif 2097#endif
2101#endif // RT2860 //
2102// 2098//
2103// RXWI wireless information format, in PBF. invisible in driver. 2099// RXWI wireless information format, in PBF. invisible in driver.
2104// 2100//
diff --git a/drivers/staging/rt2860/rt_ate.c b/drivers/staging/rt2860/rt_ate.c
index f3316ec0b15..1ed73c9e6b6 100644
--- a/drivers/staging/rt2860/rt_ate.c
+++ b/drivers/staging/rt2860/rt_ate.c
@@ -68,7 +68,6 @@ static int CheckMCSValid(
68 IN UCHAR Mode, 68 IN UCHAR Mode,
69 IN UCHAR Mcs); 69 IN UCHAR Mcs);
70 70
71#ifdef RT2860
72static VOID ATEWriteTxWI( 71static VOID ATEWriteTxWI(
73 IN PRTMP_ADAPTER pAd, 72 IN PRTMP_ADAPTER pAd,
74 IN PTXWI_STRUC pOutTxWI, 73 IN PTXWI_STRUC pOutTxWI,
@@ -87,7 +86,6 @@ static VOID ATEWriteTxWI(
87 IN UCHAR Txopmode, 86 IN UCHAR Txopmode,
88 IN BOOLEAN CfAck, 87 IN BOOLEAN CfAck,
89 IN HTTRANSMIT_SETTING *pTransmit); 88 IN HTTRANSMIT_SETTING *pTransmit);
90#endif // RT2860 //
91 89
92 90
93static VOID SetJapanFilter( 91static VOID SetJapanFilter(
@@ -95,7 +93,6 @@ static VOID SetJapanFilter(
95 93
96/*=========================end of prototype=========================*/ 94/*=========================end of prototype=========================*/
97 95
98#ifdef RT2860
99static INT TxDmaBusy( 96static INT TxDmaBusy(
100 IN PRTMP_ADAPTER pAd) 97 IN PRTMP_ADAPTER pAd)
101{ 98{
@@ -153,7 +150,6 @@ static VOID RtmpDmaEnable(
153 150
154 return; 151 return;
155} 152}
156#endif // RT2860 //
157 153
158 154
159static VOID BbpSoftReset( 155static VOID BbpSoftReset(
@@ -488,7 +484,6 @@ static INT ATETxPwrHandler(
488 TRUE if all parameters are OK, FALSE otherwise 484 TRUE if all parameters are OK, FALSE otherwise
489 ========================================================================== 485 ==========================================================================
490*/ 486*/
491#ifdef RT2860
492static INT ATECmdHandler( 487static INT ATECmdHandler(
493 IN PRTMP_ADAPTER pAd, 488 IN PRTMP_ADAPTER pAd,
494 IN PUCHAR arg) 489 IN PUCHAR arg)
@@ -1297,7 +1292,6 @@ static INT ATECmdHandler(
1297 1292
1298 return TRUE; 1293 return TRUE;
1299} 1294}
1300#endif // RT2860 //
1301/* */ 1295/* */
1302/* */ 1296/* */
1303/*=======================End of RT2860=======================*/ 1297/*=======================End of RT2860=======================*/
@@ -2907,7 +2901,6 @@ VOID ATEAsicAdjustTxPower(
2907 None 2901 None
2908 ======================================================================== 2902 ========================================================================
2909*/ 2903*/
2910#ifdef RT2860
2911static VOID ATEWriteTxWI( 2904static VOID ATEWriteTxWI(
2912 IN PRTMP_ADAPTER pAd, 2905 IN PRTMP_ADAPTER pAd,
2913 IN PTXWI_STRUC pOutTxWI, 2906 IN PTXWI_STRUC pOutTxWI,
@@ -2972,7 +2965,6 @@ static VOID ATEWriteTxWI(
2972 2965
2973 return; 2966 return;
2974} 2967}
2975#endif // RT2860 //
2976 2968
2977/* 2969/*
2978 ======================================================================== 2970 ========================================================================
@@ -3249,13 +3241,11 @@ VOID RTMPStationStart(
3249 IN PRTMP_ADAPTER pAd) 3241 IN PRTMP_ADAPTER pAd)
3250{ 3242{
3251 ATEDBGPRINT(RT_DEBUG_TRACE, ("==> RTMPStationStart\n")); 3243 ATEDBGPRINT(RT_DEBUG_TRACE, ("==> RTMPStationStart\n"));
3252#ifdef RT2860 3244epAd->Mlme.CntlMachine.CurrState = CNTL_IDLE;
3253 pAd->Mlme.CntlMachine.CurrState = CNTL_IDLE;
3254 // 3245 //
3255 // We did not cancel this timer when entering ATE mode. 3246 // We did not cancel this timer when entering ATE mode.
3256 // 3247 //
3257// RTMPSetTimer(&pAd->Mlme.PeriodicTimer, MLME_TASK_EXEC_INTV); 3248// RTMPSetTimer(&pAd->Mlme.PeriodicTimer, MLME_TASK_EXEC_INTV);
3258#endif // RT2860 //
3259 ATEDBGPRINT(RT_DEBUG_TRACE, ("<== RTMPStationStart\n")); 3249 ATEDBGPRINT(RT_DEBUG_TRACE, ("<== RTMPStationStart\n"));
3260} 3250}
3261#endif // CONFIG_STA_SUPPORT // 3251#endif // CONFIG_STA_SUPPORT //
@@ -3268,7 +3258,6 @@ VOID RTMPStationStart(
3268 This routine should only be used in ATE mode. 3258 This routine should only be used in ATE mode.
3269 ========================================================================== 3259 ==========================================================================
3270 */ 3260 */
3271#ifdef RT2860
3272static INT ATESetUpFrame( 3261static INT ATESetUpFrame(
3273 IN PRTMP_ADAPTER pAd, 3262 IN PRTMP_ADAPTER pAd,
3274 IN UINT32 TxIdx) 3263 IN UINT32 TxIdx)
@@ -3455,7 +3444,6 @@ static INT ATESetUpFrame(
3455/* */ 3444/* */
3456/* */ 3445/* */
3457/*=======================End of RT2860=======================*/ 3446/*=======================End of RT2860=======================*/
3458#endif // RT2860 //
3459 3447
3460 3448
3461VOID rt_ee_read_all(PRTMP_ADAPTER pAd, USHORT *Data) 3449VOID rt_ee_read_all(PRTMP_ADAPTER pAd, USHORT *Data)
@@ -4578,9 +4566,7 @@ VOID RtmpDoAte(
4578 { 4566 {
4579 if (pAdapter->ate.TxCount == 0) 4567 if (pAdapter->ate.TxCount == 0)
4580 { 4568 {
4581#ifdef RT2860
4582 pAdapter->ate.TxCount = 0xFFFFFFFF; 4569 pAdapter->ate.TxCount = 0xFFFFFFFF;
4583#endif // RT2860 //
4584 } 4570 }
4585 ATEDBGPRINT(RT_DEBUG_TRACE,("START TXFRAME\n")); 4571 ATEDBGPRINT(RT_DEBUG_TRACE,("START TXFRAME\n"));
4586 pAdapter->ate.bQATxStart = TRUE; 4572 pAdapter->ate.bQATxStart = TRUE;
@@ -5375,7 +5361,6 @@ TX_START_ERROR:
5375 5361
5376 memcpy((PUCHAR)&value, (PUCHAR)&(pRaCfg->status), 2); 5362 memcpy((PUCHAR)&value, (PUCHAR)&(pRaCfg->status), 2);
5377 value = ntohs(value); 5363 value = ntohs(value);
5378#ifdef RT2860
5379 /* TX_FRAME_COUNT == 0 means tx infinitely */ 5364 /* TX_FRAME_COUNT == 0 means tx infinitely */
5380 if (value == 0) 5365 if (value == 0)
5381 { 5366 {
@@ -5387,7 +5372,6 @@ TX_START_ERROR:
5387 5372
5388 } 5373 }
5389 else 5374 else
5390#endif // RT2860 //
5391 { 5375 {
5392 sprintf((PCHAR)str, "%d", value); 5376 sprintf((PCHAR)str, "%d", value);
5393 Set_ATE_TX_COUNT_Proc(pAdapter, str); 5377 Set_ATE_TX_COUNT_Proc(pAdapter, str);
diff --git a/drivers/staging/rt2860/rt_ate.h b/drivers/staging/rt2860/rt_ate.h
index 48aa70d2f01..38f5c4af546 100644
--- a/drivers/staging/rt2860/rt_ate.h
+++ b/drivers/staging/rt2860/rt_ate.h
@@ -31,12 +31,10 @@
31#ifndef UCOS 31#ifndef UCOS
32#define ate_print printk 32#define ate_print printk
33#define ATEDBGPRINT DBGPRINT 33#define ATEDBGPRINT DBGPRINT
34#ifdef RT2860
35#define EEPROM_SIZE 0x200 34#define EEPROM_SIZE 0x200
36#ifdef CONFIG_STA_SUPPORT 35#ifdef CONFIG_STA_SUPPORT
37#define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2860STA/e2p.bin" 36#define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2860STA/e2p.bin"
38#endif // CONFIG_STA_SUPPORT // 37#endif // CONFIG_STA_SUPPORT //
39#endif // RT2860 //
40 38
41#else // !UCOS // 39#else // !UCOS //
42#define fATE_LOAD_EEPROM 0x0C43 40#define fATE_LOAD_EEPROM 0x0C43
@@ -69,7 +67,6 @@ do{ int (*org_remote_display)(char *) = NULL; \
69#define ATE_ON(_p) (((_p)->ate.Mode) != ATE_STOP) 67#define ATE_ON(_p) (((_p)->ate.Mode) != ATE_STOP)
70 68
71/* RT2880_iNIC will define "RT2860". */ 69/* RT2880_iNIC will define "RT2860". */
72#ifdef RT2860
73#define ATE_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) \ 70#define ATE_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) \
74{ \ 71{ \
75 BBP_CSR_CFG_STRUC BbpCsr; \ 72 BBP_CSR_CFG_STRUC BbpCsr; \
@@ -131,10 +128,8 @@ do{ int (*org_remote_display)(char *) = NULL; \
131 ATEDBGPRINT(RT_DEBUG_ERROR, ("BBP write R%d fail\n", _I)); \ 128 ATEDBGPRINT(RT_DEBUG_ERROR, ("BBP write R%d fail\n", _I)); \
132 } \ 129 } \
133} 130}
134#endif // RT2860 //
135 131
136/* RT2880_iNIC will define RT2860. */ 132/* RT2880_iNIC will define RT2860. */
137#ifdef RT2860
138#define EEPROM_SIZE 0x200 133#define EEPROM_SIZE 0x200
139/* iNIC has its own EEPROM_BIN_FILE_NAME */ 134/* iNIC has its own EEPROM_BIN_FILE_NAME */
140#ifndef UCOS 135#ifndef UCOS
@@ -142,7 +137,6 @@ do{ int (*org_remote_display)(char *) = NULL; \
142#define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2860STA/e2p.bin" 137#define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2860STA/e2p.bin"
143#endif // CONFIG_STA_SUPPORT // 138#endif // CONFIG_STA_SUPPORT //
144#endif // !UCOS // 139#endif // !UCOS //
145#endif // RT2860 //
146 140
147 141
148 142
diff --git a/drivers/staging/rt2860/rt_config.h b/drivers/staging/rt2860/rt_config.h
index 7ee7a405b02..a67024fb437 100644
--- a/drivers/staging/rt2860/rt_config.h
+++ b/drivers/staging/rt2860/rt_config.h
@@ -53,9 +53,7 @@
53#include "rtmp_def.h" 53#include "rtmp_def.h"
54#include "rt28xx.h" 54#include "rt28xx.h"
55 55
56#ifdef RT2860
57#include "rt2860.h" 56#include "rt2860.h"
58#endif // RT2860 //
59 57
60 58
61#include "oid.h" 59#include "oid.h"
diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c
index 10710b5aaf4..f3c128c72a2 100644
--- a/drivers/staging/rt2860/rt_linux.c
+++ b/drivers/staging/rt2860/rt_linux.c
@@ -48,10 +48,8 @@ BUILD_TIMER_FUNCTION(LeapAuthTimeout);
48#endif 48#endif
49BUILD_TIMER_FUNCTION(StaQuickResponeForRateUpExec); 49BUILD_TIMER_FUNCTION(StaQuickResponeForRateUpExec);
50BUILD_TIMER_FUNCTION(WpaDisassocApAndBlockAssoc); 50BUILD_TIMER_FUNCTION(WpaDisassocApAndBlockAssoc);
51#ifdef RT2860
52BUILD_TIMER_FUNCTION(PsPollWakeExec); 51BUILD_TIMER_FUNCTION(PsPollWakeExec);
53BUILD_TIMER_FUNCTION(RadioOnExec); 52BUILD_TIMER_FUNCTION(RadioOnExec);
54#endif // RT2860 //
55#ifdef QOS_DLS_SUPPORT 53#ifdef QOS_DLS_SUPPORT
56BUILD_TIMER_FUNCTION(DlsTimeoutAction); 54BUILD_TIMER_FUNCTION(DlsTimeoutAction);
57#endif // QOS_DLS_SUPPORT // 55#endif // QOS_DLS_SUPPORT //
@@ -293,9 +291,7 @@ VOID RTMPFreeAdapter(
293 291
294 NdisFreeSpinLock(&pAd->MgmtRingLock); 292 NdisFreeSpinLock(&pAd->MgmtRingLock);
295 293
296#ifdef RT2860
297 NdisFreeSpinLock(&pAd->RxRingLock); 294 NdisFreeSpinLock(&pAd->RxRingLock);
298#endif // RT2860 //
299 295
300 for (index =0 ; index < NUM_OF_TX_RING; index++) 296 for (index =0 ; index < NUM_OF_TX_RING; index++)
301 { 297 {
diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h
index 713d031c28f..708923cecaa 100644
--- a/drivers/staging/rt2860/rt_linux.h
+++ b/drivers/staging/rt2860/rt_linux.h
@@ -89,7 +89,6 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_
89// add by kathy 89// add by kathy
90 90
91#ifdef CONFIG_STA_SUPPORT 91#ifdef CONFIG_STA_SUPPORT
92#ifdef RT2860
93#define STA_PROFILE_PATH "/etc/Wireless/RT2860STA/RT2860STA.dat" 92#define STA_PROFILE_PATH "/etc/Wireless/RT2860STA/RT2860STA.dat"
94#define STA_RTMP_FIRMWARE_FILE_NAME "/etc/Wireless/RT2860STA/RT2860STA.bin" 93#define STA_RTMP_FIRMWARE_FILE_NAME "/etc/Wireless/RT2860STA/RT2860STA.bin"
95#define STA_NIC_DEVICE_NAME "RT2860STA" 94#define STA_NIC_DEVICE_NAME "RT2860STA"
@@ -97,18 +96,15 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_
97#ifdef MULTIPLE_CARD_SUPPORT 96#ifdef MULTIPLE_CARD_SUPPORT
98#define CARD_INFO_PATH "/etc/Wireless/RT2860STA/RT2860STACard.dat" 97#define CARD_INFO_PATH "/etc/Wireless/RT2860STA/RT2860STACard.dat"
99#endif // MULTIPLE_CARD_SUPPORT // 98#endif // MULTIPLE_CARD_SUPPORT //
100#endif // RT2860 //
101 99
102 100
103#endif // CONFIG_STA_SUPPORT // 101#endif // CONFIG_STA_SUPPORT //
104 102
105#ifdef RT2860
106#ifndef PCI_DEVICE 103#ifndef PCI_DEVICE
107#define PCI_DEVICE(vend,dev) \ 104#define PCI_DEVICE(vend,dev) \
108 .vendor = (vend), .device = (dev), \ 105 .vendor = (vend), .device = (dev), \
109 .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID 106 .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
110#endif // PCI_DEVICE // 107#endif // PCI_DEVICE //
111#endif // RT2860 //
112 108
113#define RTMP_TIME_AFTER(a,b) \ 109#define RTMP_TIME_AFTER(a,b) \
114 (typecheck(unsigned long, (unsigned long)a) && \ 110 (typecheck(unsigned long, (unsigned long)a) && \
@@ -174,11 +170,9 @@ struct os_lock {
174 170
175 171
176struct os_cookie { 172struct os_cookie {
177#ifdef RT2860
178 struct pci_dev *pci_dev; 173 struct pci_dev *pci_dev;
179 struct pci_dev *parent_pci_dev; 174 struct pci_dev *parent_pci_dev;
180 dma_addr_t pAd_pa; 175 dma_addr_t pAd_pa;
181#endif // RT2860 //
182 176
183 177
184 struct tasklet_struct rx_done_task; 178 struct tasklet_struct rx_done_task;
@@ -189,9 +183,7 @@ struct os_cookie {
189 struct tasklet_struct ac3_dma_done_task; 183 struct tasklet_struct ac3_dma_done_task;
190 struct tasklet_struct hcca_dma_done_task; 184 struct tasklet_struct hcca_dma_done_task;
191 struct tasklet_struct tbtt_task; 185 struct tasklet_struct tbtt_task;
192#ifdef RT2860
193 struct tasklet_struct fifo_statistic_full_task; 186 struct tasklet_struct fifo_statistic_full_task;
194#endif // RT2860 //
195 187
196 188
197 unsigned long apd_pid; //802.1x daemon pid 189 unsigned long apd_pid; //802.1x daemon pid
@@ -246,7 +238,6 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, int
246 238
247#define RT2860_PCI_DEVICE_ID 0x0601 239#define RT2860_PCI_DEVICE_ID 0x0601
248 240
249#ifdef RT2860
250#define PCI_MAP_SINGLE(_handle, _ptr, _size, _sd_idx, _dir) \ 241#define PCI_MAP_SINGLE(_handle, _ptr, _size, _sd_idx, _dir) \
251 linux_pci_map_single(_handle, _ptr, _size, _sd_idx, _dir) 242 linux_pci_map_single(_handle, _ptr, _size, _sd_idx, _dir)
252 243
@@ -261,7 +252,6 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, int
261 252
262#define DEV_ALLOC_SKB(_length) \ 253#define DEV_ALLOC_SKB(_length) \
263 dev_alloc_skb(_length) 254 dev_alloc_skb(_length)
264#endif // RT2860 //
265 255
266 256
267 257
@@ -381,7 +371,6 @@ extern ULONG RTDebugLevel;
381 spin_unlock_irqrestore((spinlock_t *)(__lock), ((unsigned long)__irqflag)); \ 371 spin_unlock_irqrestore((spinlock_t *)(__lock), ((unsigned long)__irqflag)); \
382} 372}
383 373
384#ifdef RT2860
385#if defined(INF_TWINPASS) || defined(INF_DANUBE) || defined(IKANOS_VX_1X0) 374#if defined(INF_TWINPASS) || defined(INF_DANUBE) || defined(IKANOS_VX_1X0)
386//Patch for ASIC turst read/write bug, needs to remove after metel fix 375//Patch for ASIC turst read/write bug, needs to remove after metel fix
387#define RTMP_IO_READ32(_A, _R, _pV) \ 376#define RTMP_IO_READ32(_A, _R, _pV) \
@@ -483,7 +472,6 @@ extern ULONG RTDebugLevel;
483 writew((_V), (PUSHORT)((_A)->CSRBaseAddress + (_R))); \ 472 writew((_V), (PUSHORT)((_A)->CSRBaseAddress + (_R))); \
484} 473}
485#endif 474#endif
486#endif // RT2860 //
487 475
488 476
489#ifndef wait_event_interruptible_timeout 477#ifndef wait_event_interruptible_timeout
@@ -535,7 +523,6 @@ typedef void (*TIMER_FUNCTION)(unsigned long);
535#define MlmeAllocateMemory(_pAd, _ppVA) os_alloc_mem(_pAd, _ppVA, MGMT_DMA_BUFFER_SIZE) 523#define MlmeAllocateMemory(_pAd, _ppVA) os_alloc_mem(_pAd, _ppVA, MGMT_DMA_BUFFER_SIZE)
536#define MlmeFreeMemory(_pAd, _pVA) os_free_mem(_pAd, _pVA) 524#define MlmeFreeMemory(_pAd, _pVA) os_free_mem(_pAd, _pVA)
537 525
538#ifdef RT2860
539#define BUILD_TIMER_FUNCTION(_func) \ 526#define BUILD_TIMER_FUNCTION(_func) \
540void linux_##_func(unsigned long data) \ 527void linux_##_func(unsigned long data) \
541{ \ 528{ \
@@ -545,7 +532,6 @@ void linux_##_func(unsigned long data) \
545 if (pTimer->Repeat) \ 532 if (pTimer->Repeat) \
546 RTMP_OS_Add_Timer(&pTimer->TimerObj, pTimer->TimerValue); \ 533 RTMP_OS_Add_Timer(&pTimer->TimerObj, pTimer->TimerValue); \
547} 534}
548#endif // RT2860 //
549 535
550 536
551 537
@@ -898,7 +884,6 @@ int rt28xx_packet_xmit(struct sk_buff *skb);
898 884
899void rtmp_os_thread_init(PUCHAR pThreadName, PVOID pNotify); 885void rtmp_os_thread_init(PUCHAR pThreadName, PVOID pNotify);
900 886
901#ifdef RT2860
902#if !defined(PCI_CAP_ID_EXP) 887#if !defined(PCI_CAP_ID_EXP)
903#define PCI_CAP_ID_EXP 0x10 888#define PCI_CAP_ID_EXP 0x10
904#endif 889#endif
@@ -912,6 +897,5 @@ void rtmp_os_thread_init(PUCHAR pThreadName, PVOID pNotify);
912#endif 897#endif
913 898
914#define PCIBUS_INTEL_VENDOR 0x8086 899#define PCIBUS_INTEL_VENDOR 0x8086
915#endif // RT2860 //
916 900
917 901
diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c
index 429d78d0635..cf17bcdd733 100644
--- a/drivers/staging/rt2860/rt_main_dev.c
+++ b/drivers/staging/rt2860/rt_main_dev.c
@@ -71,9 +71,7 @@ extern void ba_reordering_resource_release(PRTMP_ADAPTER pAd);
71#endif // DOT11_N_SUPPORT // 71#endif // DOT11_N_SUPPORT //
72extern NDIS_STATUS NICLoadRateSwitchingParams(IN PRTMP_ADAPTER pAd); 72extern NDIS_STATUS NICLoadRateSwitchingParams(IN PRTMP_ADAPTER pAd);
73 73
74#ifdef RT2860
75extern void init_thread_task(PRTMP_ADAPTER pAd); 74extern void init_thread_task(PRTMP_ADAPTER pAd);
76#endif // RT2860 //
77 75
78// public function prototype 76// public function prototype
79INT __devinit rt28xx_probe(IN void *_dev_p, IN void *_dev_id_p, 77INT __devinit rt28xx_probe(IN void *_dev_p, IN void *_dev_id_p,
@@ -310,9 +308,7 @@ int rt28xx_close(IN PNET_DEV dev)
310#endif // WPA_SUPPLICANT_SUPPORT // 308#endif // WPA_SUPPLICANT_SUPPORT //
311 309
312 MlmeRadioOff(pAd); 310 MlmeRadioOff(pAd);
313#ifdef RT2860
314 pAd->bPCIclkOff = FALSE; 311 pAd->bPCIclkOff = FALSE;
315#endif // RT2860 //
316 } 312 }
317#endif // CONFIG_STA_SUPPORT // 313#endif // CONFIG_STA_SUPPORT //
318 314
@@ -346,7 +342,6 @@ int rt28xx_close(IN PNET_DEV dev)
346 TpcReqTabExit(pAd); 342 TpcReqTabExit(pAd);
347 343
348 344
349#ifdef RT2860
350 if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_ACTIVE)) 345 if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_ACTIVE))
351 { 346 {
352 NICDisableInterrupt(pAd); 347 NICDisableInterrupt(pAd);
@@ -362,7 +357,6 @@ int rt28xx_close(IN PNET_DEV dev)
362 RT28XX_IRQ_RELEASE(net_dev) 357 RT28XX_IRQ_RELEASE(net_dev)
363 RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE); 358 RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE);
364 } 359 }
365#endif // RT2860 //
366 360
367 361
368 // Free Ring or USB buffers 362 // Free Ring or USB buffers
@@ -426,12 +420,10 @@ static int rt28xx_init(IN struct net_device *net_dev)
426 420
427 // Disable interrupts here which is as soon as possible 421 // Disable interrupts here which is as soon as possible
428 // This statement should never be true. We might consider to remove it later 422 // This statement should never be true. We might consider to remove it later
429#ifdef RT2860
430 if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_ACTIVE)) 423 if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_ACTIVE))
431 { 424 {
432 NICDisableInterrupt(pAd); 425 NICDisableInterrupt(pAd);
433 } 426 }
434#endif // RT2860 //
435 427
436 Status = RTMPAllocTxRxRingMemory(pAd); 428 Status = RTMPAllocTxRxRingMemory(pAd);
437 if (Status != NDIS_STATUS_SUCCESS) 429 if (Status != NDIS_STATUS_SUCCESS)
@@ -720,10 +712,8 @@ int rt28xx_open(IN PNET_DEV dev)
720 } 712 }
721 713
722#ifdef CONFIG_STA_SUPPORT 714#ifdef CONFIG_STA_SUPPORT
723#ifdef RT2860
724 IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 715 IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
725 RTMPInitPCIeLinkCtrlValue(pAd); 716 RTMPInitPCIeLinkCtrlValue(pAd);
726#endif // RT2860 //
727#endif // CONFIG_STA_SUPPORT // 717#endif // CONFIG_STA_SUPPORT //
728 718
729 return (retval); 719 return (retval);
@@ -1203,9 +1193,7 @@ INT __devinit rt28xx_probe(
1203 PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) NULL; 1193 PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) NULL;
1204 INT status; 1194 INT status;
1205 PVOID handle; 1195 PVOID handle;
1206#ifdef RT2860
1207 struct pci_dev *dev_p = (struct pci_dev *)_dev_p; 1196 struct pci_dev *dev_p = (struct pci_dev *)_dev_p;
1208#endif // RT2860 //
1209 1197
1210 1198
1211#ifdef CONFIG_STA_SUPPORT 1199#ifdef CONFIG_STA_SUPPORT
diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h
index bef9c199022..b904b7886c2 100644
--- a/drivers/staging/rt2860/rtmp.h
+++ b/drivers/staging/rt2860/rtmp.h
@@ -203,9 +203,7 @@ typedef struct _ATE_INFO {
203 BOOLEAN bRxFer; 203 BOOLEAN bRxFer;
204 BOOLEAN bQATxStart; // Have compiled QA in and use it to ATE tx. 204 BOOLEAN bQATxStart; // Have compiled QA in and use it to ATE tx.
205 BOOLEAN bQARxStart; // Have compiled QA in and use it to ATE rx. 205 BOOLEAN bQARxStart; // Have compiled QA in and use it to ATE rx.
206#ifdef RT2860
207 BOOLEAN bFWLoading; // Reload firmware when ATE is done. 206 BOOLEAN bFWLoading; // Reload firmware when ATE is done.
208#endif // RT2860 //
209 UINT32 RxTotalCnt; 207 UINT32 RxTotalCnt;
210 UINT32 RxCntPerSec; 208 UINT32 RxCntPerSec;
211 209
@@ -485,7 +483,6 @@ typedef struct _QUEUE_HEADER {
485// 483//
486#define MAX_BUSY_COUNT 100 // Number of retry before failing access BBP & RF indirect register 484#define MAX_BUSY_COUNT 100 // Number of retry before failing access BBP & RF indirect register
487// 485//
488#ifdef RT2860
489#define RTMP_RF_IO_WRITE32(_A, _V) \ 486#define RTMP_RF_IO_WRITE32(_A, _V) \
490{ \ 487{ \
491 PHY_CSR4_STRUC Value; \ 488 PHY_CSR4_STRUC Value; \
@@ -649,7 +646,6 @@ typedef struct _QUEUE_HEADER {
649 } \ 646 } \
650 } \ 647 } \
651} 648}
652#endif // RT2860 //
653 649
654 650
655#define MAP_CHANNEL_ID_TO_KHZ(ch, khz) { \ 651#define MAP_CHANNEL_ID_TO_KHZ(ch, khz) { \
@@ -901,7 +897,6 @@ typedef struct _RTMP_SCATTER_GATHER_LIST {
901// Enqueue this frame to MLME engine 897// Enqueue this frame to MLME engine
902// We need to enqueue the whole frame because MLME need to pass data type 898// We need to enqueue the whole frame because MLME need to pass data type
903// information from 802.11 header 899// information from 802.11 header
904#ifdef RT2860
905#define REPORT_MGMT_FRAME_TO_MLME(_pAd, Wcid, _pFrame, _FrameSize, _Rssi0, _Rssi1, _Rssi2, _PlcpSignal) \ 900#define REPORT_MGMT_FRAME_TO_MLME(_pAd, Wcid, _pFrame, _FrameSize, _Rssi0, _Rssi1, _Rssi2, _PlcpSignal) \
906{ \ 901{ \
907 UINT32 High32TSF, Low32TSF; \ 902 UINT32 High32TSF, Low32TSF; \
@@ -909,7 +904,6 @@ typedef struct _RTMP_SCATTER_GATHER_LIST {
909 RTMP_IO_READ32(_pAd, TSF_TIMER_DW0, &Low32TSF); \ 904 RTMP_IO_READ32(_pAd, TSF_TIMER_DW0, &Low32TSF); \
910 MlmeEnqueueForRecv(_pAd, Wcid, High32TSF, Low32TSF, (UCHAR)_Rssi0, (UCHAR)_Rssi1,(UCHAR)_Rssi2,_FrameSize, _pFrame, (UCHAR)_PlcpSignal); \ 905 MlmeEnqueueForRecv(_pAd, Wcid, High32TSF, Low32TSF, (UCHAR)_Rssi0, (UCHAR)_Rssi1,(UCHAR)_Rssi2,_FrameSize, _pFrame, (UCHAR)_PlcpSignal); \
911} 906}
912#endif // RT2860 //
913 907
914#define NDIS_QUERY_BUFFER(_NdisBuf, _ppVA, _pBufLen) \ 908#define NDIS_QUERY_BUFFER(_NdisBuf, _ppVA, _pBufLen) \
915 NdisQueryBuffer(_NdisBuf, _ppVA, _pBufLen) 909 NdisQueryBuffer(_NdisBuf, _ppVA, _pBufLen)
@@ -1008,9 +1002,7 @@ typedef struct _RTMP_REORDERBUF
1008 UCHAR DataOffset; 1002 UCHAR DataOffset;
1009 USHORT Datasize; 1003 USHORT Datasize;
1010 ULONG AllocSize; 1004 ULONG AllocSize;
1011#ifdef RT2860
1012 NDIS_PHYSICAL_ADDRESS AllocPa; // TxBuf physical address 1005 NDIS_PHYSICAL_ADDRESS AllocPa; // TxBuf physical address
1013#endif // RT2860 //
1014} RTMP_REORDERBUF, *PRTMP_REORDERBUF; 1006} RTMP_REORDERBUF, *PRTMP_REORDERBUF;
1015 1007
1016// 1008//
@@ -1445,11 +1437,9 @@ typedef struct _MLME_STRUCT {
1445 RALINK_TIMER_STRUCT APSDPeriodicTimer; 1437 RALINK_TIMER_STRUCT APSDPeriodicTimer;
1446 RALINK_TIMER_STRUCT LinkDownTimer; 1438 RALINK_TIMER_STRUCT LinkDownTimer;
1447 RALINK_TIMER_STRUCT LinkUpTimer; 1439 RALINK_TIMER_STRUCT LinkUpTimer;
1448#ifdef RT2860
1449 UCHAR bPsPollTimerRunning; 1440 UCHAR bPsPollTimerRunning;
1450 RALINK_TIMER_STRUCT PsPollTimer; 1441 RALINK_TIMER_STRUCT PsPollTimer;
1451 RALINK_TIMER_STRUCT RadioOnOffTimer; 1442 RALINK_TIMER_STRUCT RadioOnOffTimer;
1452#endif // RT2860 //
1453 ULONG PeriodicRound; 1443 ULONG PeriodicRound;
1454 ULONG OneSecPeriodicRound; 1444 ULONG OneSecPeriodicRound;
1455 1445
@@ -2237,9 +2227,7 @@ typedef struct _STA_ADMIN_CONFIG {
2237 RT_HT_PHY_INFO DesiredHtPhyInfo; 2227 RT_HT_PHY_INFO DesiredHtPhyInfo;
2238 BOOLEAN bAutoTxRateSwitch; 2228 BOOLEAN bAutoTxRateSwitch;
2239 2229
2240#ifdef RT2860
2241 UCHAR BBPR3; 2230 UCHAR BBPR3;
2242#endif // RT2860 //
2243 2231
2244#ifdef EXT_BUILD_CHANNEL_LIST 2232#ifdef EXT_BUILD_CHANNEL_LIST
2245 UCHAR IEEE80211dClientMode; 2233 UCHAR IEEE80211dClientMode;
@@ -2672,7 +2660,6 @@ typedef struct _RTMP_ADAPTER
2672 PNET_DEV net_dev; 2660 PNET_DEV net_dev;
2673 ULONG VirtualIfCnt; 2661 ULONG VirtualIfCnt;
2674 2662
2675#ifdef RT2860
2676 USHORT LnkCtrlBitMask; 2663 USHORT LnkCtrlBitMask;
2677 USHORT RLnkCtrlConfiguration; 2664 USHORT RLnkCtrlConfiguration;
2678 USHORT RLnkCtrlOffset; 2665 USHORT RLnkCtrlOffset;
@@ -2699,7 +2686,6 @@ typedef struct _RTMP_ADAPTER
2699 RTMP_DMABUF RxDescRing; // Shared memory for RX descriptors 2686 RTMP_DMABUF RxDescRing; // Shared memory for RX descriptors
2700 RTMP_DMABUF TxDescRing[NUM_OF_TX_RING]; // Shared memory for Tx descriptors 2687 RTMP_DMABUF TxDescRing[NUM_OF_TX_RING]; // Shared memory for Tx descriptors
2701 RTMP_TX_RING TxRing[NUM_OF_TX_RING]; // AC0~4 + HCCA 2688 RTMP_TX_RING TxRing[NUM_OF_TX_RING]; // AC0~4 + HCCA
2702#endif // RT2860 //
2703 2689
2704 2690
2705 NDIS_SPIN_LOCK irq_lock; 2691 NDIS_SPIN_LOCK irq_lock;
@@ -2732,10 +2718,8 @@ typedef struct _RTMP_ADAPTER
2732/* Rx related parameters */ 2718/* Rx related parameters */
2733/*****************************************************************************************/ 2719/*****************************************************************************************/
2734 2720
2735#ifdef RT2860
2736 RTMP_RX_RING RxRing; 2721 RTMP_RX_RING RxRing;
2737 NDIS_SPIN_LOCK RxRingLock; // Rx Ring spinlock 2722 NDIS_SPIN_LOCK RxRingLock; // Rx Ring spinlock
2738#endif // RT2860 //
2739 2723
2740 2724
2741 2725
@@ -3193,7 +3177,6 @@ typedef struct _TX_BLK_
3193//------------------------------------------------------------------------------------------ 3177//------------------------------------------------------------------------------------------
3194 3178
3195 3179
3196#ifdef RT2860
3197// 3180//
3198// Enable & Disable NIC interrupt via writing interrupt mask register 3181// Enable & Disable NIC interrupt via writing interrupt mask register
3199// Since it use ADAPTER structure, it have to be put after structure definition. 3182// Since it use ADAPTER structure, it have to be put after structure definition.
@@ -3226,7 +3209,6 @@ __inline VOID NICEnableInterrupt(
3226 //RTMP_IO_WRITE32(pAd, PBF_INT_ENA, 0x00000030); // 1 : enable 3209 //RTMP_IO_WRITE32(pAd, PBF_INT_ENA, 0x00000030); // 1 : enable
3227 RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_ACTIVE); 3210 RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_ACTIVE);
3228} 3211}
3229#endif // RT2860 //
3230 3212
3231#ifdef RT_BIG_ENDIAN 3213#ifdef RT_BIG_ENDIAN
3232static inline VOID WriteBackToDescriptor( 3214static inline VOID WriteBackToDescriptor(
@@ -3303,7 +3285,6 @@ static inline VOID RTMPWIEndianChange(
3303 Call this function when read or update descriptor 3285 Call this function when read or update descriptor
3304 ======================================================================== 3286 ========================================================================
3305*/ 3287*/
3306#ifdef RT2860
3307static inline VOID RTMPDescriptorEndianChange( 3288static inline VOID RTMPDescriptorEndianChange(
3308 IN PUCHAR pData, 3289 IN PUCHAR pData,
3309 IN ULONG DescriptorType) 3290 IN ULONG DescriptorType)
@@ -3313,7 +3294,6 @@ static inline VOID RTMPDescriptorEndianChange(
3313 *((UINT32 *)(pData +12)) = SWAP32(*((UINT32 *)(pData + 12))); // Byte 12~15 3294 *((UINT32 *)(pData +12)) = SWAP32(*((UINT32 *)(pData + 12))); // Byte 12~15
3314 *((UINT32 *)(pData + 4)) = SWAP32(*((UINT32 *)(pData + 4))); // Byte 4~7, this must be swapped last 3295 *((UINT32 *)(pData + 4)) = SWAP32(*((UINT32 *)(pData + 4))); // Byte 4~7, this must be swapped last
3315} 3296}
3316#endif // RT2860 //
3317 3297
3318/* 3298/*
3319 ======================================================================== 3299 ========================================================================
@@ -4319,11 +4299,9 @@ BOOLEAN AsicSendCommandToMcu(
4319 IN UCHAR Arg0, 4299 IN UCHAR Arg0,
4320 IN UCHAR Arg1); 4300 IN UCHAR Arg1);
4321 4301
4322#ifdef RT2860
4323BOOLEAN AsicCheckCommanOk( 4302BOOLEAN AsicCheckCommanOk(
4324 IN PRTMP_ADAPTER pAd, 4303 IN PRTMP_ADAPTER pAd,
4325 IN UCHAR Command); 4304 IN UCHAR Command);
4326#endif // RT2860 //
4327 4305
4328VOID MacAddrRandomBssid( 4306VOID MacAddrRandomBssid(
4329 IN PRTMP_ADAPTER pAd, 4307 IN PRTMP_ADAPTER pAd,
@@ -6993,7 +6971,6 @@ void kill_thread_task(PRTMP_ADAPTER pAd);
6993 6971
6994void tbtt_tasklet(unsigned long data); 6972void tbtt_tasklet(unsigned long data);
6995 6973
6996#ifdef RT2860
6997// 6974//
6998// Function Prototype in cmm_data_2860.c 6975// Function Prototype in cmm_data_2860.c
6999// 6976//
@@ -7108,7 +7085,6 @@ VOID RT28xxPciMlmeRadioOn(
7108 7085
7109VOID RT28xxPciMlmeRadioOFF( 7086VOID RT28xxPciMlmeRadioOFF(
7110 IN PRTMP_ADAPTER pAd); 7087 IN PRTMP_ADAPTER pAd);
7111#endif // RT2860 //
7112 7088
7113VOID AsicTurnOffRFClk( 7089VOID AsicTurnOffRFClk(
7114 IN PRTMP_ADAPTER pAd, 7090 IN PRTMP_ADAPTER pAd,
diff --git a/drivers/staging/rt2860/rtmp_def.h b/drivers/staging/rt2860/rtmp_def.h
index 9532eccfd9b..25a53d83a0d 100644
--- a/drivers/staging/rt2860/rtmp_def.h
+++ b/drivers/staging/rt2860/rtmp_def.h
@@ -111,7 +111,6 @@
111// Entry number for each DMA descriptor ring 111// Entry number for each DMA descriptor ring
112// 112//
113 113
114#ifdef RT2860
115#define TX_RING_SIZE 64 //64 114#define TX_RING_SIZE 64 //64
116#define MGMT_RING_SIZE 128 115#define MGMT_RING_SIZE 128
117#define RX_RING_SIZE 128 //64 116#define RX_RING_SIZE 128 //64
@@ -119,7 +118,6 @@
119#define MAX_DMA_DONE_PROCESS TX_RING_SIZE 118#define MAX_DMA_DONE_PROCESS TX_RING_SIZE
120#define MAX_TX_DONE_PROCESS TX_RING_SIZE //8 119#define MAX_TX_DONE_PROCESS TX_RING_SIZE //8
121#define LOCAL_TXBUF_SIZE 2 120#define LOCAL_TXBUF_SIZE 2
122#endif // RT2860 //
123 121
124 122
125#ifdef MULTIPLE_CARD_SUPPORT 123#ifdef MULTIPLE_CARD_SUPPORT
diff --git a/drivers/staging/rt2860/sta/connect.c b/drivers/staging/rt2860/sta/connect.c
index bbe803312cc..d8bcc76688a 100644
--- a/drivers/staging/rt2860/sta/connect.c
+++ b/drivers/staging/rt2860/sta/connect.c
@@ -1275,7 +1275,6 @@ VOID LinkUp(
1275 //rt2860b. Don't know why need this 1275 //rt2860b. Don't know why need this
1276 SwitchBetweenWepAndCkip(pAd); 1276 SwitchBetweenWepAndCkip(pAd);
1277 1277
1278#ifdef RT2860
1279 // Before power save before link up function, We will force use 1R. 1278 // Before power save before link up function, We will force use 1R.
1280 // So after link up, check Rx antenna # again. 1279 // So after link up, check Rx antenna # again.
1281 RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &Value); 1280 RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &Value);
@@ -1293,7 +1292,6 @@ VOID LinkUp(
1293 } 1292 }
1294 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, Value); 1293 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, Value);
1295 pAd->StaCfg.BBPR3 = Value; 1294 pAd->StaCfg.BBPR3 = Value;
1296#endif // RT2860 //
1297 1295
1298 if (BssType == BSS_ADHOC) 1296 if (BssType == BSS_ADHOC)
1299 { 1297 {
@@ -1341,9 +1339,7 @@ VOID LinkUp(
1341 RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &Value); 1339 RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &Value);
1342 Value &= (~0x20); 1340 Value &= (~0x20);
1343 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, Value); 1341 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, Value);
1344#ifdef RT2860
1345 pAd->StaCfg.BBPR3 = Value; 1342 pAd->StaCfg.BBPR3 = Value;
1346#endif // RT2860 //
1347 1343
1348 RTMP_IO_READ32(pAd, TX_BAND_CFG, &Data); 1344 RTMP_IO_READ32(pAd, TX_BAND_CFG, &Data);
1349 Data &= 0xfffffffe; 1345 Data &= 0xfffffffe;
@@ -1378,9 +1374,7 @@ VOID LinkUp(
1378 RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &Value); 1374 RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &Value);
1379 Value |= (0x20); 1375 Value |= (0x20);
1380 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, Value); 1376 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, Value);
1381#ifdef RT2860
1382 pAd->StaCfg.BBPR3 = Value; 1377 pAd->StaCfg.BBPR3 = Value;
1383#endif // RT2860 //
1384 1378
1385 if (pAd->MACVersion == 0x28600100) 1379 if (pAd->MACVersion == 0x28600100)
1386 { 1380 {
@@ -1411,9 +1405,7 @@ VOID LinkUp(
1411 RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &Value); 1405 RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &Value);
1412 Value &= (~0x20); 1406 Value &= (~0x20);
1413 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, Value); 1407 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, Value);
1414#ifdef RT2860
1415 pAd->StaCfg.BBPR3 = Value; 1408 pAd->StaCfg.BBPR3 = Value;
1416#endif // RT2860 //
1417 1409
1418 if (pAd->MACVersion == 0x28600100) 1410 if (pAd->MACVersion == 0x28600100)
1419 { 1411 {
@@ -2001,7 +1993,6 @@ VOID LinkDown(
2001 DBGPRINT(RT_DEBUG_TRACE, ("!!! LINK DOWN !!!\n")); 1993 DBGPRINT(RT_DEBUG_TRACE, ("!!! LINK DOWN !!!\n"));
2002 OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_AGGREGATION_INUSED); 1994 OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_AGGREGATION_INUSED);
2003 1995
2004#ifdef RT2860
2005 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE)) 1996 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE))
2006 { 1997 {
2007 BOOLEAN Cancelled; 1998 BOOLEAN Cancelled;
@@ -2018,7 +2009,6 @@ VOID LinkDown(
2018 } 2009 }
2019 2010
2020 pAd->bPCIclkOff = FALSE; 2011 pAd->bPCIclkOff = FALSE;
2021#endif // RT2860 //
2022 if (ADHOC_ON(pAd)) // Adhoc mode link down 2012 if (ADHOC_ON(pAd)) // Adhoc mode link down
2023 { 2013 {
2024 DBGPRINT(RT_DEBUG_TRACE, ("!!! LINK DOWN 1!!!\n")); 2014 DBGPRINT(RT_DEBUG_TRACE, ("!!! LINK DOWN 1!!!\n"));
@@ -2533,7 +2523,6 @@ VOID AuthParmFill(
2533 2523
2534 ========================================================================== 2524 ==========================================================================
2535 */ 2525 */
2536#ifdef RT2860
2537VOID ComposePsPoll( 2526VOID ComposePsPoll(
2538 IN PRTMP_ADAPTER pAd) 2527 IN PRTMP_ADAPTER pAd)
2539{ 2528{
@@ -2557,7 +2546,6 @@ VOID ComposeNullFrame(
2557 COPY_MAC_ADDR(pAd->NullFrame.Addr2, pAd->CurrentAddress); 2546 COPY_MAC_ADDR(pAd->NullFrame.Addr2, pAd->CurrentAddress);
2558 COPY_MAC_ADDR(pAd->NullFrame.Addr3, pAd->CommonCfg.Bssid); 2547 COPY_MAC_ADDR(pAd->NullFrame.Addr3, pAd->CommonCfg.Bssid);
2559} 2548}
2560#endif // RT2860 //
2561 2549
2562 2550
2563 2551
diff --git a/drivers/staging/rt2860/sta/dls.c b/drivers/staging/rt2860/sta/dls.c
index 78fb28976fd..873cf7f1de9 100644
--- a/drivers/staging/rt2860/sta/dls.c
+++ b/drivers/staging/rt2860/sta/dls.c
@@ -1419,7 +1419,6 @@ BOOLEAN RTMPRcvFrameDLSCheck(
1419 //AsicAddKeyEntry(pAd, (USHORT)(i + 2), BSS0, 0, &PairwiseKey, TRUE, TRUE); // reserve 0 for multicast, 1 for unicast 1419 //AsicAddKeyEntry(pAd, (USHORT)(i + 2), BSS0, 0, &PairwiseKey, TRUE, TRUE); // reserve 0 for multicast, 1 for unicast
1420 //AsicUpdateRxWCIDTable(pAd, (USHORT)(i + 2), pAddr); 1420 //AsicUpdateRxWCIDTable(pAd, (USHORT)(i + 2), pAddr);
1421 // Add Pair-wise key to Asic 1421 // Add Pair-wise key to Asic
1422#ifdef RT2860
1423 AsicAddPairwiseKeyEntry(pAd, 1422 AsicAddPairwiseKeyEntry(pAd,
1424 pAd->StaCfg.DLSEntry[i].MacAddr, 1423 pAd->StaCfg.DLSEntry[i].MacAddr,
1425 (UCHAR)pAd->StaCfg.DLSEntry[i].MacTabMatchWCID, 1424 (UCHAR)pAd->StaCfg.DLSEntry[i].MacTabMatchWCID,
@@ -1431,7 +1430,6 @@ BOOLEAN RTMPRcvFrameDLSCheck(
1431 PairwiseKey.CipherAlg, 1430 PairwiseKey.CipherAlg,
1432 pEntry); 1431 pEntry);
1433 1432
1434#endif // RT2860 //
1435 NdisMoveMemory(&pEntry->PairwiseKey, &PairwiseKey, sizeof(CIPHER_KEY)); 1433 NdisMoveMemory(&pEntry->PairwiseKey, &PairwiseKey, sizeof(CIPHER_KEY));
1436 DBGPRINT(RT_DEBUG_TRACE,("DLS - Receive STAKey Message-1 (Peer STA MAC Address STAKey) \n")); 1434 DBGPRINT(RT_DEBUG_TRACE,("DLS - Receive STAKey Message-1 (Peer STA MAC Address STAKey) \n"));
1437 1435
@@ -1477,7 +1475,6 @@ BOOLEAN RTMPRcvFrameDLSCheck(
1477 //AsicAddKeyEntry(pAd, (USHORT)(i + 2), BSS0, 0, &PairwiseKey, TRUE, TRUE); // reserve 0 for multicast, 1 for unicast 1475 //AsicAddKeyEntry(pAd, (USHORT)(i + 2), BSS0, 0, &PairwiseKey, TRUE, TRUE); // reserve 0 for multicast, 1 for unicast
1478 //AsicUpdateRxWCIDTable(pAd, (USHORT)(i + 2), pAddr); 1476 //AsicUpdateRxWCIDTable(pAd, (USHORT)(i + 2), pAddr);
1479 // Add Pair-wise key to Asic 1477 // Add Pair-wise key to Asic
1480#ifdef RT2860
1481 AsicAddPairwiseKeyEntry(pAd, 1478 AsicAddPairwiseKeyEntry(pAd,
1482 pAd->StaCfg.DLSEntry[i].MacAddr, 1479 pAd->StaCfg.DLSEntry[i].MacAddr,
1483 (UCHAR)pAd->StaCfg.DLSEntry[i].MacTabMatchWCID, 1480 (UCHAR)pAd->StaCfg.DLSEntry[i].MacTabMatchWCID,
@@ -1488,7 +1485,6 @@ BOOLEAN RTMPRcvFrameDLSCheck(
1488 0, 1485 0,
1489 PairwiseKey.CipherAlg, 1486 PairwiseKey.CipherAlg,
1490 pEntry); 1487 pEntry);
1491#endif // RT2860 //
1492 NdisMoveMemory(&pEntry->PairwiseKey, &PairwiseKey, sizeof(CIPHER_KEY)); 1488 NdisMoveMemory(&pEntry->PairwiseKey, &PairwiseKey, sizeof(CIPHER_KEY));
1493 DBGPRINT(RT_DEBUG_TRACE,("DLS - Receive STAKey Message-1 (Initiator STA MAC Address STAKey)\n")); 1489 DBGPRINT(RT_DEBUG_TRACE,("DLS - Receive STAKey Message-1 (Initiator STA MAC Address STAKey)\n"));
1494 1490
diff --git a/drivers/staging/rt2860/sta/rtmp_data.c b/drivers/staging/rt2860/sta/rtmp_data.c
index 5b3fb2deee8..c5e76a2da56 100644
--- a/drivers/staging/rt2860/sta/rtmp_data.c
+++ b/drivers/staging/rt2860/sta/rtmp_data.c
@@ -75,7 +75,6 @@ VOID STARxEAPOLFrameIndicate(
75 75
76 if (pAd->StaCfg.DesireSharedKey[idx].KeyLen > 0) 76 if (pAd->StaCfg.DesireSharedKey[idx].KeyLen > 0)
77 { 77 {
78#ifdef RT2860
79 MAC_TABLE_ENTRY *pEntry = &pAd->MacTab.Content[BSSID_WCID]; 78 MAC_TABLE_ENTRY *pEntry = &pAd->MacTab.Content[BSSID_WCID];
80 79
81 // Set key material and cipherAlg to Asic 80 // Set key material and cipherAlg to Asic
@@ -89,7 +88,6 @@ VOID STARxEAPOLFrameIndicate(
89 88
90 pAd->IndicateMediaState = NdisMediaStateConnected; 89 pAd->IndicateMediaState = NdisMediaStateConnected;
91 pAd->ExtraInfo = GENERAL_LINK_UP; 90 pAd->ExtraInfo = GENERAL_LINK_UP;
92#endif // RT2860 //
93 // For Preventing ShardKey Table is cleared by remove key procedure. 91 // For Preventing ShardKey Table is cleared by remove key procedure.
94 pAd->SharedKey[BSS0][idx].CipherAlg = CipherAlg; 92 pAd->SharedKey[BSS0][idx].CipherAlg = CipherAlg;
95 pAd->SharedKey[BSS0][idx].KeyLen = pAd->StaCfg.DesireSharedKey[idx].KeyLen; 93 pAd->SharedKey[BSS0][idx].KeyLen = pAd->StaCfg.DesireSharedKey[idx].KeyLen;
@@ -693,14 +691,12 @@ BOOLEAN STARxDoneInterruptHandle(
693 break; 691 break;
694 } 692 }
695 693
696#ifdef RT2860
697 if (RxProcessed++ > MAX_RX_PROCESS_CNT) 694 if (RxProcessed++ > MAX_RX_PROCESS_CNT)
698 { 695 {
699 // need to reschedule rx handle 696 // need to reschedule rx handle
700 bReschedule = TRUE; 697 bReschedule = TRUE;
701 break; 698 break;
702 } 699 }
703#endif // RT2860 //
704 700
705 RxProcessed ++; // test 701 RxProcessed ++; // test
706 702
@@ -1227,7 +1223,6 @@ NDIS_STATUS STASendPacket(
1227 1223
1228 ======================================================================== 1224 ========================================================================
1229*/ 1225*/
1230#ifdef RT2860
1231NDIS_STATUS RTMPFreeTXDRequest( 1226NDIS_STATUS RTMPFreeTXDRequest(
1232 IN PRTMP_ADAPTER pAd, 1227 IN PRTMP_ADAPTER pAd,
1233 IN UCHAR QueIdx, 1228 IN UCHAR QueIdx,
@@ -1271,7 +1266,6 @@ NDIS_STATUS RTMPFreeTXDRequest(
1271 1266
1272 return (Status); 1267 return (Status);
1273} 1268}
1274#endif // RT2860 //
1275 1269
1276 1270
1277 1271
diff --git a/drivers/staging/rt2860/sta/sync.c b/drivers/staging/rt2860/sta/sync.c
index 28bf929cba0..148037a79d5 100644
--- a/drivers/staging/rt2860/sta/sync.c
+++ b/drivers/staging/rt2860/sta/sync.c
@@ -228,7 +228,6 @@ VOID MlmeScanReqAction(
228 // Increase the scan retry counters. 228 // Increase the scan retry counters.
229 pAd->StaCfg.ScanCnt++; 229 pAd->StaCfg.ScanCnt++;
230 230
231#ifdef RT2860
232 if ((OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE)) && 231 if ((OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE)) &&
233 (IDLE_ON(pAd)) && 232 (IDLE_ON(pAd)) &&
234 (pAd->StaCfg.bRadio == TRUE) && 233 (pAd->StaCfg.bRadio == TRUE) &&
@@ -236,7 +235,6 @@ VOID MlmeScanReqAction(
236 { 235 {
237 RT28xxPciAsicRadioOn(pAd, GUI_IDLE_POWER_SAVE); 236 RT28xxPciAsicRadioOn(pAd, GUI_IDLE_POWER_SAVE);
238 } 237 }
239#endif // RT2860 //
240 238
241 // first check the parameter sanity 239 // first check the parameter sanity
242 if (MlmeScanReqSanity(pAd, 240 if (MlmeScanReqSanity(pAd,
@@ -349,7 +347,6 @@ VOID MlmeJoinReqAction(
349 347
350 DBGPRINT(RT_DEBUG_TRACE, ("SYNC - MlmeJoinReqAction(BSS #%ld)\n", pInfo->BssIdx)); 348 DBGPRINT(RT_DEBUG_TRACE, ("SYNC - MlmeJoinReqAction(BSS #%ld)\n", pInfo->BssIdx));
351 349
352#ifdef RT2860
353 if ((OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE)) && 350 if ((OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE)) &&
354 (IDLE_ON(pAd)) && 351 (IDLE_ON(pAd)) &&
355 (pAd->StaCfg.bRadio == TRUE) && 352 (pAd->StaCfg.bRadio == TRUE) &&
@@ -357,7 +354,6 @@ VOID MlmeJoinReqAction(
357 { 354 {
358 RT28xxPciAsicRadioOn(pAd, GUI_IDLE_POWER_SAVE); 355 RT28xxPciAsicRadioOn(pAd, GUI_IDLE_POWER_SAVE);
359 } 356 }
360#endif // RT2860 //
361 357
362 // reset all the timers 358 // reset all the timers
363 RTMPCancelTimer(&pAd->MlmeAux.ScanTimer, &TimerCancelled); 359 RTMPCancelTimer(&pAd->MlmeAux.ScanTimer, &TimerCancelled);
@@ -1532,12 +1528,10 @@ VOID PeerBeacon(
1532 // 5. otherwise, put PHY back to sleep to save battery. 1528 // 5. otherwise, put PHY back to sleep to save battery.
1533 if (MessageToMe) 1529 if (MessageToMe)
1534 { 1530 {
1535#ifdef RT2860
1536 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE)) 1531 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE))
1537 { 1532 {
1538 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, pAd->StaCfg.BBPR3); 1533 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, pAd->StaCfg.BBPR3);
1539 } 1534 }
1540#endif // RT2860 //
1541 if (pAd->CommonCfg.bAPSDCapable && pAd->CommonCfg.APEdcaParm.bAPSDCapable && 1535 if (pAd->CommonCfg.bAPSDCapable && pAd->CommonCfg.APEdcaParm.bAPSDCapable &&
1542 pAd->CommonCfg.bAPSDAC_BE && pAd->CommonCfg.bAPSDAC_BK && pAd->CommonCfg.bAPSDAC_VI && pAd->CommonCfg.bAPSDAC_VO) 1536 pAd->CommonCfg.bAPSDAC_BE && pAd->CommonCfg.bAPSDAC_BK && pAd->CommonCfg.bAPSDAC_VI && pAd->CommonCfg.bAPSDAC_VO)
1543 { 1537 {
@@ -1548,12 +1542,10 @@ VOID PeerBeacon(
1548 } 1542 }
1549 else if (BcastFlag && (DtimCount == 0) && OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_RECEIVE_DTIM)) 1543 else if (BcastFlag && (DtimCount == 0) && OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_RECEIVE_DTIM))
1550 { 1544 {
1551#ifdef RT2860
1552 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE)) 1545 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE))
1553 { 1546 {
1554 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, pAd->StaCfg.BBPR3); 1547 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, pAd->StaCfg.BBPR3);
1555 } 1548 }
1556#endif // RT2860 //
1557 } 1549 }
1558 else if ((pAd->TxSwQueue[QID_AC_BK].Number != 0) || 1550 else if ((pAd->TxSwQueue[QID_AC_BK].Number != 0) ||
1559 (pAd->TxSwQueue[QID_AC_BE].Number != 0) || 1551 (pAd->TxSwQueue[QID_AC_BE].Number != 0) ||
@@ -1567,12 +1559,10 @@ VOID PeerBeacon(
1567 { 1559 {
1568 // TODO: consider scheduled HCCA. might not be proper to use traditional DTIM-based power-saving scheme 1560 // TODO: consider scheduled HCCA. might not be proper to use traditional DTIM-based power-saving scheme
1569 // can we cheat here (i.e. just check MGMT & AC_BE) for better performance? 1561 // can we cheat here (i.e. just check MGMT & AC_BE) for better performance?
1570#ifdef RT2860
1571 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE)) 1562 if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE))
1572 { 1563 {
1573 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, pAd->StaCfg.BBPR3); 1564 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, pAd->StaCfg.BBPR3);
1574 } 1565 }
1575#endif // RT2860 //
1576 } 1566 }
1577 else 1567 else
1578 { 1568 {
diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c
index 11366e32b03..c5452f152a2 100644
--- a/drivers/staging/rt2860/sta_ioctl.c
+++ b/drivers/staging/rt2860/sta_ioctl.c
@@ -583,9 +583,7 @@ rt_ioctl_giwname(struct net_device *dev,
583{ 583{
584// PRTMP_ADAPTER pAdapter = dev->ml_priv; 584// PRTMP_ADAPTER pAdapter = dev->ml_priv;
585 585
586#ifdef RT2860
587 strncpy(name, "RT2860 Wireless", IFNAMSIZ); 586 strncpy(name, "RT2860 Wireless", IFNAMSIZ);
588#endif // RT2860 //
589 return 0; 587 return 0;
590} 588}
591 589
@@ -5321,7 +5319,6 @@ INT RTMPQueryInformation(
5321 case RT_OID_802_11_PRODUCTID: 5319 case RT_OID_802_11_PRODUCTID:
5322 DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_PRODUCTID \n")); 5320 DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_PRODUCTID \n"));
5323 5321
5324#ifdef RT2860
5325 { 5322 {
5326 5323
5327 USHORT device_id; 5324 USHORT device_id;
@@ -5331,7 +5328,6 @@ INT RTMPQueryInformation(
5331 DBGPRINT(RT_DEBUG_TRACE, (" pci_dev = NULL\n")); 5328 DBGPRINT(RT_DEBUG_TRACE, (" pci_dev = NULL\n"));
5332 sprintf(tmp, "%04x %04x\n", NIC_PCI_VENDOR_ID, device_id); 5329 sprintf(tmp, "%04x %04x\n", NIC_PCI_VENDOR_ID, device_id);
5333 } 5330 }
5334#endif // RT2860 //
5335 wrq->u.data.length = strlen(tmp); 5331 wrq->u.data.length = strlen(tmp);
5336 Status = copy_to_user(wrq->u.data.pointer, tmp, wrq->u.data.length); 5332 Status = copy_to_user(wrq->u.data.pointer, tmp, wrq->u.data.length);
5337 break; 5333 break;