diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-04-26 10:06:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 14:00:49 -0400 |
commit | 12e95a6366cbf30341e0e4330c04c6b6d8895f16 (patch) | |
tree | 39ad31d7b2ec0539c258b2ee5f95115ac553b232 /drivers | |
parent | ac7e7d5a88b9db7b7557e22893cdf94013fafa31 (diff) |
Staging: rt3070: remove dead code
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
26 files changed, 3 insertions, 575 deletions
diff --git a/drivers/staging/rt3070/2870_main_dev.c b/drivers/staging/rt3070/2870_main_dev.c index 809b2aa7825d..93f112765fbc 100644 --- a/drivers/staging/rt3070/2870_main_dev.c +++ b/drivers/staging/rt3070/2870_main_dev.c | |||
@@ -55,12 +55,6 @@ MODULE_VERSION(STA_DRIVER_VERSION); | |||
55 | * packets that have a "complete" function are sent here. This way, the | 55 | * packets that have a "complete" function are sent here. This way, the |
56 | * completion is run out of kernel context, and doesn't block the rest of | 56 | * completion is run out of kernel context, and doesn't block the rest of |
57 | * the stack. */ | 57 | * the stack. */ |
58 | //static int mlme_kill = 0; // Mlme kernel thread | ||
59 | //static int RTUSBCmd_kill = 0; // Command kernel thread | ||
60 | //static int TimerFunc_kill = 0; // TimerQ kernel thread | ||
61 | |||
62 | //static wait_queue_head_t timerWaitQ; | ||
63 | //static wait_queue_t waitQ; | ||
64 | 58 | ||
65 | extern INT __devinit rt28xx_probe(IN void *_dev_p, IN void *_dev_id_p, | 59 | extern INT __devinit rt28xx_probe(IN void *_dev_p, IN void *_dev_id_p, |
66 | IN UINT argc, OUT PRTMP_ADAPTER *ppAd); | 60 | IN UINT argc, OUT PRTMP_ADAPTER *ppAd); |
@@ -1224,7 +1218,6 @@ VOID RT28xx_UpdateBeaconToAsic( | |||
1224 | UINT i, padding; | 1218 | UINT i, padding; |
1225 | BEACON_SYNC_STRUCT *pBeaconSync = pAd->CommonCfg.pBeaconSync; | 1219 | BEACON_SYNC_STRUCT *pBeaconSync = pAd->CommonCfg.pBeaconSync; |
1226 | UINT32 longValue; | 1220 | UINT32 longValue; |
1227 | // USHORT shortValue; | ||
1228 | BOOLEAN bBcnReq = FALSE; | 1221 | BOOLEAN bBcnReq = FALSE; |
1229 | UCHAR bcn_idx = 0; | 1222 | UCHAR bcn_idx = 0; |
1230 | 1223 | ||
diff --git a/drivers/staging/rt3070/ap.h b/drivers/staging/rt3070/ap.h index bd2829b278dc..92818845f848 100644 --- a/drivers/staging/rt3070/ap.h +++ b/drivers/staging/rt3070/ap.h | |||
@@ -163,18 +163,6 @@ USHORT APBuildAssociation( | |||
163 | IN UCHAR HtCapabilityLen, | 163 | IN UCHAR HtCapabilityLen, |
164 | OUT USHORT *pAid); | 164 | OUT USHORT *pAid); |
165 | 165 | ||
166 | /* | ||
167 | VOID RTMPAddClientSec( | ||
168 | IN PRTMP_ADAPTER pAd, | ||
169 | IN UCHAR BssIdx, | ||
170 | IN UCHAR KeyIdx, | ||
171 | IN UCHAR CipherAlg, | ||
172 | IN PUCHAR pKey, | ||
173 | IN PUCHAR pTxMic, | ||
174 | IN PUCHAR pRxMic, | ||
175 | IN MAC_TABLE_ENTRY *pEntry); | ||
176 | */ | ||
177 | |||
178 | // ap_auth.c | 166 | // ap_auth.c |
179 | 167 | ||
180 | void APAuthStateMachineInit( | 168 | void APAuthStateMachineInit( |
diff --git a/drivers/staging/rt3070/common/action.c b/drivers/staging/rt3070/common/action.c index 7ec701faa3f6..7fe503bcc30d 100644 --- a/drivers/staging/rt3070/common/action.c +++ b/drivers/staging/rt3070/common/action.c | |||
@@ -152,7 +152,6 @@ VOID MlmeADDBAAction( | |||
152 | sizeof(FRAME_ADDBA_REQ), &Frame, | 152 | sizeof(FRAME_ADDBA_REQ), &Frame, |
153 | END_OF_ARGS); | 153 | END_OF_ARGS); |
154 | MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen); | 154 | MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen); |
155 | //MiniportDataMMRequest(pAd, MapUserPriorityToAccessCategory[pInfo->TID], pOutBuffer, FrameLen); | ||
156 | MlmeFreeMemory(pAd, pOutBuffer); | 155 | MlmeFreeMemory(pAd, pOutBuffer); |
157 | 156 | ||
158 | DBGPRINT(RT_DEBUG_TRACE, ("BA - Send ADDBA request. StartSeq = %x, FrameLen = %ld. BufSize = %d\n", Frame.BaStartSeq.field.StartSeq, FrameLen, Frame.BaParm.BufSize)); | 157 | DBGPRINT(RT_DEBUG_TRACE, ("BA - Send ADDBA request. StartSeq = %x, FrameLen = %ld. BufSize = %d\n", Frame.BaStartSeq.field.StartSeq, FrameLen, Frame.BaParm.BufSize)); |
@@ -468,11 +467,6 @@ VOID ORIBATimerTimeout( | |||
468 | { | 467 | { |
469 | MAC_TABLE_ENTRY *pEntry; | 468 | MAC_TABLE_ENTRY *pEntry; |
470 | INT i, total; | 469 | INT i, total; |
471 | // FRAME_BAR FrameBar; | ||
472 | // ULONG FrameLen; | ||
473 | // NDIS_STATUS NStatus; | ||
474 | // PUCHAR pOutBuffer = NULL; | ||
475 | // USHORT Sequence; | ||
476 | UCHAR TID; | 470 | UCHAR TID; |
477 | 471 | ||
478 | total = pAd->MacTab.Size * NUM_OF_TID; | 472 | total = pAd->MacTab.Size * NUM_OF_TID; |
@@ -537,12 +531,9 @@ VOID SendRefreshBAR( | |||
537 | MakeOutgoingFrame(pOutBuffer, &FrameLen, | 531 | MakeOutgoingFrame(pOutBuffer, &FrameLen, |
538 | sizeof(FRAME_BAR), &FrameBar, | 532 | sizeof(FRAME_BAR), &FrameBar, |
539 | END_OF_ARGS); | 533 | END_OF_ARGS); |
540 | //if (!(CLIENT_STATUS_TEST_FLAG(pEntry, fCLIENT_STATUS_RALINK_CHIPSET))) | ||
541 | if (1) // Now we always send BAR. | 534 | if (1) // Now we always send BAR. |
542 | { | 535 | { |
543 | //MiniportMMRequestUnlock(pAd, 0, pOutBuffer, FrameLen); | ||
544 | MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen); | 536 | MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen); |
545 | //MiniportDataMMRequest(pAd, MapUserPriorityToAccessCategory[TID], pOutBuffer, FrameLen); | ||
546 | } | 537 | } |
547 | MlmeFreeMemory(pAd, pOutBuffer); | 538 | MlmeFreeMemory(pAd, pOutBuffer); |
548 | } | 539 | } |
@@ -571,8 +562,6 @@ VOID BarHeaderInit( | |||
571 | IN PUCHAR pDA, | 562 | IN PUCHAR pDA, |
572 | IN PUCHAR pSA) | 563 | IN PUCHAR pSA) |
573 | { | 564 | { |
574 | // USHORT Duration; | ||
575 | |||
576 | NdisZeroMemory(pCntlBar, sizeof(FRAME_BAR)); | 565 | NdisZeroMemory(pCntlBar, sizeof(FRAME_BAR)); |
577 | pCntlBar->FC.Type = BTYPE_CNTL; | 566 | pCntlBar->FC.Type = BTYPE_CNTL; |
578 | pCntlBar->FC.SubType = SUBTYPE_BLOCK_ACK_REQ; | 567 | pCntlBar->FC.SubType = SUBTYPE_BLOCK_ACK_REQ; |
diff --git a/drivers/staging/rt3070/common/ba_action.c b/drivers/staging/rt3070/common/ba_action.c index c5cb9d9e2442..70b5cb1c60f2 100644 --- a/drivers/staging/rt3070/common/ba_action.c +++ b/drivers/staging/rt3070/common/ba_action.c | |||
@@ -445,9 +445,6 @@ void ba_flush_reordering_timeout_mpdus( | |||
445 | && (pBAEntry->list.qlen > 0) | 445 | && (pBAEntry->list.qlen > 0) |
446 | ) | 446 | ) |
447 | { | 447 | { |
448 | // printk("timeout[%d] (%lx-%lx = %d > %d): %x, ", pBAEntry->list.qlen, Now32, (pBAEntry->LastIndSeqAtTimer), | ||
449 | // (int)((long) Now32 - (long)(pBAEntry->LastIndSeqAtTimer)), REORDERING_PACKET_TIMEOUT, | ||
450 | // pBAEntry->LastIndSeq); | ||
451 | // | 448 | // |
452 | // force LastIndSeq to shift to LastIndSeq+1 | 449 | // force LastIndSeq to shift to LastIndSeq+1 |
453 | // | 450 | // |
@@ -464,8 +461,6 @@ void ba_flush_reordering_timeout_mpdus( | |||
464 | pBAEntry->LastIndSeq = Sequence; | 461 | pBAEntry->LastIndSeq = Sequence; |
465 | } | 462 | } |
466 | 463 | ||
467 | //printk("%x, flush one!\n", pBAEntry->LastIndSeq); | ||
468 | |||
469 | } | 464 | } |
470 | } | 465 | } |
471 | 466 | ||
@@ -1082,7 +1077,6 @@ VOID BAOriSessionSetupTimeout( | |||
1082 | AddbaReq.Token = pBAEntry->Token; | 1077 | AddbaReq.Token = pBAEntry->Token; |
1083 | MlmeEnqueue(pAd, ACTION_STATE_MACHINE, MT2_MLME_ADD_BA_CATE, sizeof(MLME_ADDBA_REQ_STRUCT), (PVOID)&AddbaReq); | 1078 | MlmeEnqueue(pAd, ACTION_STATE_MACHINE, MT2_MLME_ADD_BA_CATE, sizeof(MLME_ADDBA_REQ_STRUCT), (PVOID)&AddbaReq); |
1084 | RT28XX_MLME_HANDLER(pAd); | 1079 | RT28XX_MLME_HANDLER(pAd); |
1085 | //DBGPRINT(RT_DEBUG_TRACE,("BA Ori Session Timeout(%d) : Send ADD BA again\n", pBAEntry->Token)); | ||
1086 | 1080 | ||
1087 | DBGPRINT(RT_DEBUG_TRACE,("BA Ori Session Timeout(%d) to %02x:%02x:%02x:%02x:%02x:%02x Tid:%d Wcid:%d\n" | 1081 | DBGPRINT(RT_DEBUG_TRACE,("BA Ori Session Timeout(%d) to %02x:%02x:%02x:%02x:%02x:%02x Tid:%d Wcid:%d\n" |
1088 | ,pBAEntry->Token | 1082 | ,pBAEntry->Token |
diff --git a/drivers/staging/rt3070/common/cmm_data.c b/drivers/staging/rt3070/common/cmm_data.c index 2ad448fb2c16..5a5ee0aa16d4 100644 --- a/drivers/staging/rt3070/common/cmm_data.c +++ b/drivers/staging/rt3070/common/cmm_data.c | |||
@@ -67,7 +67,6 @@ UCHAR RxwiMCSToOfdmRate[12] = { | |||
67 | char* MCSToMbps[] = {"1Mbps","2Mbps","5.5Mbps","11Mbps","06Mbps","09Mbps","12Mbps","18Mbps","24Mbps","36Mbps","48Mbps","54Mbps","MM-0","MM-1","MM-2","MM-3","MM-4","MM-5","MM-6","MM-7","MM-8","MM-9","MM-10","MM-11","MM-12","MM-13","MM-14","MM-15","MM-32","ee1","ee2","ee3"}; | 67 | char* MCSToMbps[] = {"1Mbps","2Mbps","5.5Mbps","11Mbps","06Mbps","09Mbps","12Mbps","18Mbps","24Mbps","36Mbps","48Mbps","54Mbps","MM-0","MM-1","MM-2","MM-3","MM-4","MM-5","MM-6","MM-7","MM-8","MM-9","MM-10","MM-11","MM-12","MM-13","MM-14","MM-15","MM-32","ee1","ee2","ee3"}; |
68 | 68 | ||
69 | UCHAR default_cwmin[]={CW_MIN_IN_BITS, CW_MIN_IN_BITS, CW_MIN_IN_BITS-1, CW_MIN_IN_BITS-2}; | 69 | UCHAR default_cwmin[]={CW_MIN_IN_BITS, CW_MIN_IN_BITS, CW_MIN_IN_BITS-1, CW_MIN_IN_BITS-2}; |
70 | //UCHAR default_cwmax[]={CW_MAX_IN_BITS, CW_MAX_IN_BITS, CW_MIN_IN_BITS, CW_MIN_IN_BITS-1}; | ||
71 | UCHAR default_sta_aifsn[]={3,7,2,2}; | 70 | UCHAR default_sta_aifsn[]={3,7,2,2}; |
72 | 71 | ||
73 | UCHAR MapUserPriorityToAccessCategory[8] = {QID_AC_BE, QID_AC_BK, QID_AC_BK, QID_AC_BE, QID_AC_VI, QID_AC_VI, QID_AC_VO, QID_AC_VO}; | 72 | UCHAR MapUserPriorityToAccessCategory[8] = {QID_AC_BE, QID_AC_BK, QID_AC_BK, QID_AC_BE, QID_AC_VI, QID_AC_VI, QID_AC_VO, QID_AC_VO}; |
@@ -362,17 +361,11 @@ NDIS_STATUS MlmeHardTransmitMgmtRing( | |||
362 | 361 | ||
363 | RTMP_QueryPacketInfo(pPacket, &PacketInfo, &pSrcBufVA, &SrcBufLen); | 362 | RTMP_QueryPacketInfo(pPacket, &PacketInfo, &pSrcBufVA, &SrcBufLen); |
364 | 363 | ||
365 | // Make sure MGMT ring resource won't be used by other threads | ||
366 | // sample, for IRQ LOCK -> SEM LOCK | ||
367 | // IrqState = pAd->irq_disabled; | ||
368 | // if (!IrqState) | ||
369 | RTMP_SEM_LOCK(&pAd->MgmtRingLock); | 364 | RTMP_SEM_LOCK(&pAd->MgmtRingLock); |
370 | 365 | ||
371 | 366 | ||
372 | if (pSrcBufVA == NULL) | 367 | if (pSrcBufVA == NULL) |
373 | { | 368 | { |
374 | // The buffer shouldn't be NULL | ||
375 | // if (!IrqState) | ||
376 | RTMP_SEM_UNLOCK(&pAd->MgmtRingLock); | 369 | RTMP_SEM_UNLOCK(&pAd->MgmtRingLock); |
377 | return NDIS_STATUS_FAILURE; | 370 | return NDIS_STATUS_FAILURE; |
378 | } | 371 | } |
@@ -447,9 +440,6 @@ NDIS_STATUS MlmeHardTransmitMgmtRing( | |||
447 | } | 440 | } |
448 | else // BTYPE_MGMT or BTYPE_DATA(must be NULL frame) | 441 | else // BTYPE_MGMT or BTYPE_DATA(must be NULL frame) |
449 | { | 442 | { |
450 | //pAd->Sequence++; | ||
451 | //pHeader_802_11->Sequence = pAd->Sequence; | ||
452 | |||
453 | if (pHeader_802_11->Addr1[0] & 0x01) // MULTICAST, BROADCAST | 443 | if (pHeader_802_11->Addr1[0] & 0x01) // MULTICAST, BROADCAST |
454 | { | 444 | { |
455 | bAckRequired = FALSE; | 445 | bAckRequired = FALSE; |
@@ -477,7 +467,6 @@ NDIS_STATUS MlmeHardTransmitMgmtRing( | |||
477 | && (pAd->CommonCfg.RadarDetect.RDMode != RD_NORMAL_MODE)) | 467 | && (pAd->CommonCfg.RadarDetect.RDMode != RD_NORMAL_MODE)) |
478 | { | 468 | { |
479 | DBGPRINT(RT_DEBUG_ERROR,("MlmeHardTransmit --> radar detect not in normal mode !!!\n")); | 469 | DBGPRINT(RT_DEBUG_ERROR,("MlmeHardTransmit --> radar detect not in normal mode !!!\n")); |
480 | // if (!IrqState) | ||
481 | RTMP_SEM_UNLOCK(&pAd->MgmtRingLock); | 470 | RTMP_SEM_UNLOCK(&pAd->MgmtRingLock); |
482 | return (NDIS_STATUS_FAILURE); | 471 | return (NDIS_STATUS_FAILURE); |
483 | } | 472 | } |
@@ -491,7 +480,6 @@ NDIS_STATUS MlmeHardTransmitMgmtRing( | |||
491 | // Initialize TX Descriptor | 480 | // Initialize TX Descriptor |
492 | // For inter-frame gap, the number is for this frame and next frame | 481 | // For inter-frame gap, the number is for this frame and next frame |
493 | // For MLME rate, we will fix as 2Mb to match other vendor's implement | 482 | // For MLME rate, we will fix as 2Mb to match other vendor's implement |
494 | // pAd->CommonCfg.MlmeTransmit.field.MODE = 1; | ||
495 | 483 | ||
496 | // management frame doesn't need encryption. so use RESERVED_WCID no matter u are sending to specific wcid or not. | 484 | // management frame doesn't need encryption. so use RESERVED_WCID no matter u are sending to specific wcid or not. |
497 | if (pMacEntry == NULL) | 485 | if (pMacEntry == NULL) |
@@ -513,7 +501,6 @@ NDIS_STATUS MlmeHardTransmitMgmtRing( | |||
513 | HAL_KickOutMgmtTx(pAd, QueIdx, pPacket, pSrcBufVA, SrcBufLen); | 501 | HAL_KickOutMgmtTx(pAd, QueIdx, pPacket, pSrcBufVA, SrcBufLen); |
514 | 502 | ||
515 | // Make sure to release MGMT ring resource | 503 | // Make sure to release MGMT ring resource |
516 | // if (!IrqState) | ||
517 | RTMP_SEM_UNLOCK(&pAd->MgmtRingLock); | 504 | RTMP_SEM_UNLOCK(&pAd->MgmtRingLock); |
518 | return NDIS_STATUS_SUCCESS; | 505 | return NDIS_STATUS_SUCCESS; |
519 | } | 506 | } |
@@ -712,9 +699,6 @@ BOOLEAN RTMP_FillTxBlkInfo( | |||
712 | if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED) && | 699 | if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED) && |
713 | CLIENT_STATUS_TEST_FLAG(pMacEntry, fCLIENT_STATUS_WMM_CAPABLE)) | 700 | CLIENT_STATUS_TEST_FLAG(pMacEntry, fCLIENT_STATUS_WMM_CAPABLE)) |
714 | TX_BLK_SET_FLAG(pTxBlk, fTX_bWMM); | 701 | TX_BLK_SET_FLAG(pTxBlk, fTX_bWMM); |
715 | |||
716 | // if (pAd->StaCfg.bAutoTxRateSwitch) | ||
717 | // TX_BLK_SET_FLAG(pTxBlk, fTX_AutoRateSwitch); | ||
718 | } | 702 | } |
719 | 703 | ||
720 | if (pTxBlk->TxFrameType == TX_LEGACY_FRAME) | 704 | if (pTxBlk->TxFrameType == TX_LEGACY_FRAME) |
@@ -905,7 +889,6 @@ VOID RTMPDeQueuePacket( | |||
905 | 889 | ||
906 | pTxBlk = &TxBlk; | 890 | pTxBlk = &TxBlk; |
907 | NdisZeroMemory((PUCHAR)pTxBlk, sizeof(TX_BLK)); | 891 | NdisZeroMemory((PUCHAR)pTxBlk, sizeof(TX_BLK)); |
908 | //InitializeQueueHeader(&pTxBlk->TxPacketList); // Didn't need it because we already memzero it. | ||
909 | pTxBlk->QueIdx = QueIdx; | 892 | pTxBlk->QueIdx = QueIdx; |
910 | 893 | ||
911 | pPacket = QUEUE_ENTRY_TO_PKT(pEntry); | 894 | pPacket = QUEUE_ENTRY_TO_PKT(pEntry); |
@@ -1266,7 +1249,7 @@ VOID RTMPWriteTxWI_Cache( | |||
1266 | IN OUT PTXWI_STRUC pTxWI, | 1249 | IN OUT PTXWI_STRUC pTxWI, |
1267 | IN TX_BLK *pTxBlk) | 1250 | IN TX_BLK *pTxBlk) |
1268 | { | 1251 | { |
1269 | PHTTRANSMIT_SETTING /*pTxHTPhyMode,*/ pTransmit; | 1252 | PHTTRANSMIT_SETTING pTransmit; |
1270 | PMAC_TABLE_ENTRY pMacEntry; | 1253 | PMAC_TABLE_ENTRY pMacEntry; |
1271 | 1254 | ||
1272 | // | 1255 | // |
@@ -1275,9 +1258,6 @@ VOID RTMPWriteTxWI_Cache( | |||
1275 | pMacEntry = pTxBlk->pMacEntry; | 1258 | pMacEntry = pTxBlk->pMacEntry; |
1276 | pTransmit = pTxBlk->pTransmit; | 1259 | pTransmit = pTxBlk->pTransmit; |
1277 | 1260 | ||
1278 | //if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED)) | ||
1279 | //if (RTMPCheckEntryEnableAutoRateSwitch(pAd, pMacEntry)) | ||
1280 | //if (TX_BLK_TEST_FLAG(pTxBlk, fTX_AutoRateSwitch)) | ||
1281 | if (pMacEntry->bAutoTxRateSwitch) | 1261 | if (pMacEntry->bAutoTxRateSwitch) |
1282 | { | 1262 | { |
1283 | pTxWI->txop = IFS_HTTXOP; | 1263 | pTxWI->txop = IFS_HTTXOP; |
@@ -1471,9 +1451,6 @@ PQUEUE_HEADER RTMPCheckTxSwQueue( | |||
1471 | { | 1451 | { |
1472 | 1452 | ||
1473 | ULONG Number; | 1453 | ULONG Number; |
1474 | // 2004-11-15 to be removed. test aggregation only | ||
1475 | // if ((OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_AGGREGATION_INUSED)) && (*pNumber < 2)) | ||
1476 | // return NULL; | ||
1477 | 1454 | ||
1478 | Number = pAd->TxSwQueue[QID_AC_BK].Number | 1455 | Number = pAd->TxSwQueue[QID_AC_BK].Number |
1479 | + pAd->TxSwQueue[QID_AC_BE].Number | 1456 | + pAd->TxSwQueue[QID_AC_BE].Number |
@@ -1573,8 +1550,6 @@ VOID RTMPSuspendMsduTransmission( | |||
1573 | VOID RTMPResumeMsduTransmission( | 1550 | VOID RTMPResumeMsduTransmission( |
1574 | IN PRTMP_ADAPTER pAd) | 1551 | IN PRTMP_ADAPTER pAd) |
1575 | { | 1552 | { |
1576 | // UCHAR IrqState; | ||
1577 | |||
1578 | DBGPRINT(RT_DEBUG_TRACE,("SCAN done, resume MSDU transmission ...\n")); | 1553 | DBGPRINT(RT_DEBUG_TRACE,("SCAN done, resume MSDU transmission ...\n")); |
1579 | 1554 | ||
1580 | 1555 | ||
@@ -1588,11 +1563,6 @@ VOID RTMPResumeMsduTransmission( | |||
1588 | RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R66, pAd->BbpTuning.R66CurrentValue); | 1563 | RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R66, pAd->BbpTuning.R66CurrentValue); |
1589 | 1564 | ||
1590 | RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS); | 1565 | RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS); |
1591 | // sample, for IRQ LOCK to SEM LOCK | ||
1592 | // IrqState = pAd->irq_disabled; | ||
1593 | // if (IrqState) | ||
1594 | // RTMPDeQueuePacket(pAd, TRUE, NUM_OF_TX_RING, MAX_TX_PROCESS); | ||
1595 | // else | ||
1596 | RTMPDeQueuePacket(pAd, FALSE, NUM_OF_TX_RING, MAX_TX_PROCESS); | 1566 | RTMPDeQueuePacket(pAd, FALSE, NUM_OF_TX_RING, MAX_TX_PROCESS); |
1597 | } | 1567 | } |
1598 | 1568 | ||
@@ -1621,9 +1591,7 @@ UINT deaggregate_AMSDU_announce( | |||
1621 | 1591 | ||
1622 | nMSDU++; | 1592 | nMSDU++; |
1623 | 1593 | ||
1624 | //hex_dump("subheader", pData, 64); | ||
1625 | pAMSDUsubheader = (PHEADER_802_3)pData; | 1594 | pAMSDUsubheader = (PHEADER_802_3)pData; |
1626 | //pData += LENGTH_802_3; | ||
1627 | PayloadSize = pAMSDUsubheader->Octet[1] + (pAMSDUsubheader->Octet[0]<<8); | 1595 | PayloadSize = pAMSDUsubheader->Octet[1] + (pAMSDUsubheader->Octet[0]<<8); |
1628 | SubFrameSize = PayloadSize + LENGTH_802_3; | 1596 | SubFrameSize = PayloadSize + LENGTH_802_3; |
1629 | 1597 | ||
@@ -1633,8 +1601,6 @@ UINT deaggregate_AMSDU_announce( | |||
1633 | break; | 1601 | break; |
1634 | } | 1602 | } |
1635 | 1603 | ||
1636 | //printk("%d subframe: Size = %d\n", nMSDU, PayloadSize); | ||
1637 | |||
1638 | pPayload = pData + LENGTH_802_3; | 1604 | pPayload = pData + LENGTH_802_3; |
1639 | pDA = pData; | 1605 | pDA = pData; |
1640 | pSA = pData + MAC_ADDR_LEN; | 1606 | pSA = pData + MAC_ADDR_LEN; |
@@ -1754,8 +1720,6 @@ MAC_TABLE_ENTRY *MacTableInsertEntry( | |||
1754 | UCHAR HashIdx; | 1720 | UCHAR HashIdx; |
1755 | int i, FirstWcid; | 1721 | int i, FirstWcid; |
1756 | MAC_TABLE_ENTRY *pEntry = NULL, *pCurrEntry; | 1722 | MAC_TABLE_ENTRY *pEntry = NULL, *pCurrEntry; |
1757 | // USHORT offset; | ||
1758 | // ULONG addr; | ||
1759 | 1723 | ||
1760 | // if FULL, return | 1724 | // if FULL, return |
1761 | if (pAd->MacTab.Size >= MAX_LEN_OF_MAC_TABLE) | 1725 | if (pAd->MacTab.Size >= MAX_LEN_OF_MAC_TABLE) |
@@ -1885,8 +1849,6 @@ BOOLEAN MacTableDeleteEntry( | |||
1885 | USHORT HashIdx; | 1849 | USHORT HashIdx; |
1886 | MAC_TABLE_ENTRY *pEntry, *pPrevEntry, *pProbeEntry; | 1850 | MAC_TABLE_ENTRY *pEntry, *pPrevEntry, *pProbeEntry; |
1887 | BOOLEAN Cancelled; | 1851 | BOOLEAN Cancelled; |
1888 | //USHORT offset; // unused variable | ||
1889 | //UCHAR j; // unused variable | ||
1890 | 1852 | ||
1891 | if (wcid >= MAX_LEN_OF_MAC_TABLE) | 1853 | if (wcid >= MAX_LEN_OF_MAC_TABLE) |
1892 | return FALSE; | 1854 | return FALSE; |
@@ -1894,7 +1856,6 @@ BOOLEAN MacTableDeleteEntry( | |||
1894 | NdisAcquireSpinLock(&pAd->MacTabLock); | 1856 | NdisAcquireSpinLock(&pAd->MacTabLock); |
1895 | 1857 | ||
1896 | HashIdx = MAC_ADDR_HASH_INDEX(pAddr); | 1858 | HashIdx = MAC_ADDR_HASH_INDEX(pAddr); |
1897 | //pEntry = pAd->MacTab.Hash[HashIdx]; | ||
1898 | pEntry = &pAd->MacTab.Content[wcid]; | 1859 | pEntry = &pAd->MacTab.Content[wcid]; |
1899 | 1860 | ||
1900 | if (pEntry && (pEntry->ValidAsCLI || pEntry->ValidAsApCli || pEntry->ValidAsWDS || pEntry->ValidAsMesh | 1861 | if (pEntry && (pEntry->ValidAsCLI || pEntry->ValidAsApCli || pEntry->ValidAsWDS || pEntry->ValidAsMesh |
@@ -1962,7 +1923,6 @@ BOOLEAN MacTableDeleteEntry( | |||
1962 | if (pAd->MacTab.Size == 0) | 1923 | if (pAd->MacTab.Size == 0) |
1963 | { | 1924 | { |
1964 | pAd->CommonCfg.AddHTInfo.AddHtInfo2.OperaionMode = 0; | 1925 | pAd->CommonCfg.AddHTInfo.AddHtInfo2.OperaionMode = 0; |
1965 | //AsicUpdateProtect(pAd, 0 /*pAd->CommonCfg.AddHTInfo.AddHtInfo2.OperaionMode*/, (ALLN_SETPROTECT), TRUE, 0 /*pAd->MacTab.fAnyStationNonGF*/); | ||
1966 | RT28XX_UPDATE_PROTECT(pAd); // edit by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet | 1926 | RT28XX_UPDATE_PROTECT(pAd); // edit by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet |
1967 | } | 1927 | } |
1968 | 1928 | ||
diff --git a/drivers/staging/rt3070/common/cmm_data_2870.c b/drivers/staging/rt3070/common/cmm_data_2870.c index b3860eafb4f8..c943daf5e4ce 100644 --- a/drivers/staging/rt3070/common/cmm_data_2870.c +++ b/drivers/staging/rt3070/common/cmm_data_2870.c | |||
@@ -931,15 +931,6 @@ VOID RT28xxUsbMlmeRadioOFF( | |||
931 | Value &= (0xfffffff3); | 931 | Value &= (0xfffffff3); |
932 | RTMP_IO_WRITE32(pAd, MAC_SYS_CTRL, Value); | 932 | RTMP_IO_WRITE32(pAd, MAC_SYS_CTRL, Value); |
933 | 933 | ||
934 | // MAC_SYS_CTRL => value = 0x0 => 40mA | ||
935 | //RTMP_IO_WRITE32(pAd, MAC_SYS_CTRL, 0); | ||
936 | |||
937 | // PWR_PIN_CFG => value = 0x0 => 40mA | ||
938 | //RTMP_IO_WRITE32(pAd, PWR_PIN_CFG, 0); | ||
939 | |||
940 | // TX_PIN_CFG => value = 0x0 => 20mA | ||
941 | //RTMP_IO_WRITE32(pAd, TX_PIN_CFG, 0); | ||
942 | |||
943 | AsicSendCommandToMcu(pAd, 0x30, 0xff, 0xff, 0x02); | 934 | AsicSendCommandToMcu(pAd, 0x30, 0xff, 0xff, 0x02); |
944 | } | 935 | } |
945 | 936 | ||
diff --git a/drivers/staging/rt3070/common/cmm_info.c b/drivers/staging/rt3070/common/cmm_info.c index 92b42616df23..12c4ebc6c8b6 100644 --- a/drivers/staging/rt3070/common/cmm_info.c +++ b/drivers/staging/rt3070/common/cmm_info.c | |||
@@ -783,9 +783,6 @@ INT Set_ResetStatCounter_Proc( | |||
783 | IN PRTMP_ADAPTER pAd, | 783 | IN PRTMP_ADAPTER pAd, |
784 | IN PUCHAR arg) | 784 | IN PUCHAR arg) |
785 | { | 785 | { |
786 | //UCHAR i; | ||
787 | //MAC_TABLE_ENTRY *pEntry; | ||
788 | |||
789 | DBGPRINT(RT_DEBUG_TRACE, ("==>Set_ResetStatCounter_Proc\n")); | 786 | DBGPRINT(RT_DEBUG_TRACE, ("==>Set_ResetStatCounter_Proc\n")); |
790 | 787 | ||
791 | // add the most up-to-date h/w raw counters into software counters | 788 | // add the most up-to-date h/w raw counters into software counters |
@@ -1950,7 +1947,6 @@ INT Set_BASetup_Proc( | |||
1950 | =>The six 2 digit hex-decimal number previous are the Mac address, | 1947 | =>The six 2 digit hex-decimal number previous are the Mac address, |
1951 | =>The seventh decimal number is the tid value. | 1948 | =>The seventh decimal number is the tid value. |
1952 | */ | 1949 | */ |
1953 | //printk("\n%s\n", arg); | ||
1954 | 1950 | ||
1955 | if(strlen(arg) < 19) //Mac address acceptable format 01:02:03:04:05:06 length 17 plus the "-" and tid value in decimal format. | 1951 | if(strlen(arg) < 19) //Mac address acceptable format 01:02:03:04:05:06 length 17 plus the "-" and tid value in decimal format. |
1956 | return FALSE; | 1952 | return FALSE; |
@@ -2024,7 +2020,6 @@ INT Set_BAOriTearDown_Proc( | |||
2024 | INT i; | 2020 | INT i; |
2025 | MAC_TABLE_ENTRY *pEntry; | 2021 | MAC_TABLE_ENTRY *pEntry; |
2026 | 2022 | ||
2027 | //printk("\n%s\n", arg); | ||
2028 | /* | 2023 | /* |
2029 | The BAOriTearDown inupt string format should be xx:xx:xx:xx:xx:xx-d, | 2024 | The BAOriTearDown inupt string format should be xx:xx:xx:xx:xx:xx-d, |
2030 | =>The six 2 digit hex-decimal number previous are the Mac address, | 2025 | =>The six 2 digit hex-decimal number previous are the Mac address, |
diff --git a/drivers/staging/rt3070/common/cmm_sanity.c b/drivers/staging/rt3070/common/cmm_sanity.c index c75fe68c218c..49330ef758c0 100644 --- a/drivers/staging/rt3070/common/cmm_sanity.c +++ b/drivers/staging/rt3070/common/cmm_sanity.c | |||
@@ -81,14 +81,6 @@ BOOLEAN MlmeAddBAReqSanity( | |||
81 | return FALSE; | 81 | return FALSE; |
82 | } | 82 | } |
83 | 83 | ||
84 | /* | ||
85 | if ((pInfo->BaBufSize > MAX_RX_REORDERBUF) || (pInfo->BaBufSize < 2)) | ||
86 | { | ||
87 | DBGPRINT(RT_DEBUG_TRACE, ("MlmeAddBAReqSanity fail - Rx Reordering buffer too big or too small\n")); | ||
88 | return FALSE; | ||
89 | } | ||
90 | */ | ||
91 | |||
92 | if ((pInfo->pAddr[0]&0x01) == 0x01) | 84 | if ((pInfo->pAddr[0]&0x01) == 0x01) |
93 | { | 85 | { |
94 | DBGPRINT(RT_DEBUG_TRACE, ("MlmeAddBAReqSanity fail - broadcast address not support BA\n")); | 86 | DBGPRINT(RT_DEBUG_TRACE, ("MlmeAddBAReqSanity fail - broadcast address not support BA\n")); |
@@ -185,7 +177,6 @@ BOOLEAN PeerAddBARspActionSanity( | |||
185 | IN VOID *pMsg, | 177 | IN VOID *pMsg, |
186 | IN ULONG MsgLen) | 178 | IN ULONG MsgLen) |
187 | { | 179 | { |
188 | //PFRAME_802_11 pFrame = (PFRAME_802_11)pMsg; | ||
189 | PFRAME_ADDBA_RSP pAddFrame; | 180 | PFRAME_ADDBA_RSP pAddFrame; |
190 | 181 | ||
191 | pAddFrame = (PFRAME_ADDBA_RSP)(pMsg); | 182 | pAddFrame = (PFRAME_ADDBA_RSP)(pMsg); |
@@ -341,8 +332,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity( | |||
341 | COPY_MAC_ADDR(pAddr2, pFrame->Hdr.Addr2); | 332 | COPY_MAC_ADDR(pAddr2, pFrame->Hdr.Addr2); |
342 | COPY_MAC_ADDR(pBssid, pFrame->Hdr.Addr3); | 333 | COPY_MAC_ADDR(pBssid, pFrame->Hdr.Addr3); |
343 | 334 | ||
344 | // hex_dump("Beacon", Msg, MsgLen); | ||
345 | |||
346 | Ptr = pFrame->Octet; | 335 | Ptr = pFrame->Octet; |
347 | Length += LENGTH_802_11; | 336 | Length += LENGTH_802_11; |
348 | 337 | ||
@@ -556,26 +545,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity( | |||
556 | // Wifi WMM use the same IE vale, need to parse that too | 545 | // Wifi WMM use the same IE vale, need to parse that too |
557 | // case IE_WPA: | 546 | // case IE_WPA: |
558 | case IE_VENDOR_SPECIFIC: | 547 | case IE_VENDOR_SPECIFIC: |
559 | // Check Broadcom/Atheros 802.11n OUI version, for HT Capability IE. | ||
560 | // This HT IE is before IEEE draft set HT IE value.2006-09-28 by Jan. | ||
561 | /*if (NdisEqualMemory(pEid->Octet, BROADCOM_OUI, 3) && (pEid->Len >= 4)) | ||
562 | { | ||
563 | if ((pEid->Octet[3] == OUI_BROADCOM_HT) && (pEid->Len >= 30)) | ||
564 | { | ||
565 | { | ||
566 | NdisMoveMemory(pHtCapability, &pEid->Octet[4], sizeof(HT_CAPABILITY_IE)); | ||
567 | *pHtCapabilityLen = SIZE_HT_CAP_IE; // Nnow we only support 26 bytes. | ||
568 | } | ||
569 | } | ||
570 | if ((pEid->Octet[3] == OUI_BROADCOM_HT) && (pEid->Len >= 26)) | ||
571 | { | ||
572 | { | ||
573 | NdisMoveMemory(AddHtInfo, &pEid->Octet[4], sizeof(ADD_HT_INFO_IE)); | ||
574 | *AddHtInfoLen = SIZE_ADD_HT_INFO_IE; // Nnow we only support 26 bytes. | ||
575 | } | ||
576 | } | ||
577 | } | ||
578 | */ | ||
579 | // Check the OUI version, filter out non-standard usage | 548 | // Check the OUI version, filter out non-standard usage |
580 | if (NdisEqualMemory(pEid->Octet, RALINK_OUI, 3) && (pEid->Len == 7)) | 549 | if (NdisEqualMemory(pEid->Octet, RALINK_OUI, 3) && (pEid->Len == 7)) |
581 | { | 550 | { |
diff --git a/drivers/staging/rt3070/common/mlme.c b/drivers/staging/rt3070/common/mlme.c index dda4cc3127af..a814fbba302c 100644 --- a/drivers/staging/rt3070/common/mlme.c +++ b/drivers/staging/rt3070/common/mlme.c | |||
@@ -243,19 +243,11 @@ UCHAR RateSwitchTable11BGN3S[] = { // 3*3 | |||
243 | 0x02, 0x21, 2, 20, 50, | 243 | 0x02, 0x21, 2, 20, 50, |
244 | 0x03, 0x21, 3, 20, 50, | 244 | 0x03, 0x21, 3, 20, 50, |
245 | 0x04, 0x21, 4, 15, 50, | 245 | 0x04, 0x21, 4, 15, 50, |
246 | #if 1 | ||
247 | 0x05, 0x20, 20, 15, 30, | 246 | 0x05, 0x20, 20, 15, 30, |
248 | 0x06, 0x20, 21, 8, 20, | 247 | 0x06, 0x20, 21, 8, 20, |
249 | 0x07, 0x20, 22, 8, 20, | 248 | 0x07, 0x20, 22, 8, 20, |
250 | 0x08, 0x20, 23, 8, 25, | 249 | 0x08, 0x20, 23, 8, 25, |
251 | 0x09, 0x22, 23, 8, 25, | 250 | 0x09, 0x22, 23, 8, 25, |
252 | #else // for RT2860 2*3 test | ||
253 | 0x05, 0x20, 12, 15, 30, | ||
254 | 0x06, 0x20, 13, 8, 20, | ||
255 | 0x07, 0x20, 14, 8, 20, | ||
256 | 0x08, 0x20, 15, 8, 25, | ||
257 | 0x09, 0x22, 15, 8, 25, | ||
258 | #endif | ||
259 | }; | 251 | }; |
260 | 252 | ||
261 | UCHAR RateSwitchTable11BGN2SForABand[] = { | 253 | UCHAR RateSwitchTable11BGN2SForABand[] = { |
@@ -839,8 +831,6 @@ VOID MlmePeriodicExec( | |||
839 | rx_Total = 0; | 831 | rx_Total = 0; |
840 | } | 832 | } |
841 | 833 | ||
842 | //ORIBATimerTimeout(pAd); | ||
843 | |||
844 | // Media status changed, report to NDIS | 834 | // Media status changed, report to NDIS |
845 | if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_MEDIA_STATE_CHANGE)) | 835 | if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_MEDIA_STATE_CHANGE)) |
846 | { | 836 | { |
@@ -990,8 +980,6 @@ VOID STAMlmePeriodicExec( | |||
990 | DBGPRINT(RT_DEBUG_TRACE, ("MMCHK - No BEACON. restore R66 to the low bound(%d) \n", (0x2E + GET_LNA_GAIN(pAd)))); | 980 | DBGPRINT(RT_DEBUG_TRACE, ("MMCHK - No BEACON. restore R66 to the low bound(%d) \n", (0x2E + GET_LNA_GAIN(pAd)))); |
991 | } | 981 | } |
992 | 982 | ||
993 | //if ((pAd->RalinkCounters.OneSecTxNoRetryOkCount == 0) && | ||
994 | // (pAd->RalinkCounters.OneSecTxRetryOkCount == 0)) | ||
995 | { | 983 | { |
996 | if (pAd->CommonCfg.bAPSDCapable && pAd->CommonCfg.APEdcaParm.bAPSDCapable) | 984 | if (pAd->CommonCfg.bAPSDCapable && pAd->CommonCfg.APEdcaParm.bAPSDCapable) |
997 | { | 985 | { |
@@ -1027,7 +1015,6 @@ VOID STAMlmePeriodicExec( | |||
1027 | wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL); | 1015 | wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL); |
1028 | } | 1016 | } |
1029 | 1017 | ||
1030 | // RTMPPatchMacBbpBug(pAd); | ||
1031 | MlmeAutoReconnectLastSSID(pAd); | 1018 | MlmeAutoReconnectLastSSID(pAd); |
1032 | } | 1019 | } |
1033 | else if (CQI_IS_BAD(pAd->Mlme.ChannelQuality)) | 1020 | else if (CQI_IS_BAD(pAd->Mlme.ChannelQuality)) |
@@ -1307,8 +1294,6 @@ VOID MlmeSelectTxRateTable( | |||
1307 | break; | 1294 | break; |
1308 | } | 1295 | } |
1309 | 1296 | ||
1310 | //if ((pAd->StaActive.SupRateLen + pAd->StaActive.ExtRateLen == 12) && (pAd->StaActive.SupportedPhyInfo.MCSSet[0] == 0xff) && | ||
1311 | // ((pAd->StaActive.SupportedPhyInfo.MCSSet[1] == 0x00) || (pAd->Antenna.field.TxPath == 1))) | ||
1312 | if ((pEntry->RateLen == 12) && (pEntry->HTCapability.MCSSet[0] == 0xff) && | 1297 | if ((pEntry->RateLen == 12) && (pEntry->HTCapability.MCSSet[0] == 0xff) && |
1313 | ((pEntry->HTCapability.MCSSet[1] == 0x00) || (pAd->CommonCfg.TxStream == 1))) | 1298 | ((pEntry->HTCapability.MCSSet[1] == 0x00) || (pAd->CommonCfg.TxStream == 1))) |
1314 | {// 11BGN 1S AP | 1299 | {// 11BGN 1S AP |
@@ -1319,8 +1304,6 @@ VOID MlmeSelectTxRateTable( | |||
1319 | break; | 1304 | break; |
1320 | } | 1305 | } |
1321 | 1306 | ||
1322 | //else if ((pAd->StaActive.SupRateLen + pAd->StaActive.ExtRateLen == 12) && (pAd->StaActive.SupportedPhyInfo.MCSSet[0] == 0xff) && | ||
1323 | // (pAd->StaActive.SupportedPhyInfo.MCSSet[1] == 0xff) && (pAd->Antenna.field.TxPath == 2)) | ||
1324 | if ((pEntry->RateLen == 12) && (pEntry->HTCapability.MCSSet[0] == 0xff) && | 1307 | if ((pEntry->RateLen == 12) && (pEntry->HTCapability.MCSSet[0] == 0xff) && |
1325 | (pEntry->HTCapability.MCSSet[1] == 0xff) && (pAd->CommonCfg.TxStream == 2)) | 1308 | (pEntry->HTCapability.MCSSet[1] == 0xff) && (pAd->CommonCfg.TxStream == 2)) |
1326 | {// 11BGN 2S AP | 1309 | {// 11BGN 2S AP |
@@ -1341,7 +1324,6 @@ VOID MlmeSelectTxRateTable( | |||
1341 | break; | 1324 | break; |
1342 | } | 1325 | } |
1343 | 1326 | ||
1344 | //else if ((pAd->StaActive.SupportedPhyInfo.MCSSet[0] == 0xff) && ((pAd->StaActive.SupportedPhyInfo.MCSSet[1] == 0x00) || (pAd->Antenna.field.TxPath == 1))) | ||
1345 | if ((pEntry->HTCapability.MCSSet[0] == 0xff) && ((pEntry->HTCapability.MCSSet[1] == 0x00) || (pAd->CommonCfg.TxStream == 1))) | 1327 | if ((pEntry->HTCapability.MCSSet[0] == 0xff) && ((pEntry->HTCapability.MCSSet[1] == 0x00) || (pAd->CommonCfg.TxStream == 1))) |
1346 | {// 11N 1S AP | 1328 | {// 11N 1S AP |
1347 | *ppTable = RateSwitchTable11N1S; | 1329 | *ppTable = RateSwitchTable11N1S; |
@@ -1351,7 +1333,6 @@ VOID MlmeSelectTxRateTable( | |||
1351 | break; | 1333 | break; |
1352 | } | 1334 | } |
1353 | 1335 | ||
1354 | //else if ((pAd->StaActive.SupportedPhyInfo.MCSSet[0] == 0xff) && (pAd->StaActive.SupportedPhyInfo.MCSSet[1] == 0xff) && (pAd->Antenna.field.TxPath == 2)) | ||
1355 | if ((pEntry->HTCapability.MCSSet[0] == 0xff) && (pEntry->HTCapability.MCSSet[1] == 0xff) && (pAd->CommonCfg.TxStream == 2)) | 1336 | if ((pEntry->HTCapability.MCSSet[0] == 0xff) && (pEntry->HTCapability.MCSSet[1] == 0xff) && (pAd->CommonCfg.TxStream == 2)) |
1356 | {// 11N 2S AP | 1337 | {// 11N 2S AP |
1357 | if (pAd->LatchRfRegs.Channel <= 14) | 1338 | if (pAd->LatchRfRegs.Channel <= 14) |
@@ -2086,7 +2067,6 @@ VOID MlmeDynamicTxRateSwitching( | |||
2086 | else | 2067 | else |
2087 | TxRateIdx = MCS0; | 2068 | TxRateIdx = MCS0; |
2088 | } | 2069 | } |
2089 | // else if ((pTable == RateSwitchTable11BGN2S) || (pTable == RateSwitchTable11BGN2SForABand) ||(pTable == RateSwitchTable11N2S) ||(pTable == RateSwitchTable11N2SForABand) || (pTable == RateSwitchTable)) | ||
2090 | else if ((pTable == RateSwitchTable11BGN2S) || (pTable == RateSwitchTable11BGN2SForABand) ||(pTable == RateSwitchTable11N2S) ||(pTable == RateSwitchTable11N2SForABand)) // 3*3 | 2070 | else if ((pTable == RateSwitchTable11BGN2S) || (pTable == RateSwitchTable11BGN2SForABand) ||(pTable == RateSwitchTable11N2S) ||(pTable == RateSwitchTable11N2SForABand)) // 3*3 |
2091 | {// N mode with 2 stream | 2071 | {// N mode with 2 stream |
2092 | if (MCS15 && (Rssi >= (-70+RssiOffset))) | 2072 | if (MCS15 && (Rssi >= (-70+RssiOffset))) |
@@ -2149,7 +2129,6 @@ VOID MlmeDynamicTxRateSwitching( | |||
2149 | TxRateIdx = MCS0; | 2129 | TxRateIdx = MCS0; |
2150 | } | 2130 | } |
2151 | 2131 | ||
2152 | // if (TxRateIdx != pAd->CommonCfg.TxRateIndex) | ||
2153 | { | 2132 | { |
2154 | pEntry->CurrTxRateIndex = TxRateIdx; | 2133 | pEntry->CurrTxRateIndex = TxRateIdx; |
2155 | pNextTxRate = (PRTMP_TX_RATE_SWITCH) &pTable[(pEntry->CurrTxRateIndex+1)*5]; | 2134 | pNextTxRate = (PRTMP_TX_RATE_SWITCH) &pTable[(pEntry->CurrTxRateIndex+1)*5]; |
@@ -2753,28 +2732,20 @@ VOID MlmeUpdateTxRates( | |||
2753 | // specified; otherwise disabled | 2732 | // specified; otherwise disabled |
2754 | if (num <= 1) | 2733 | if (num <= 1) |
2755 | { | 2734 | { |
2756 | //OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED); | ||
2757 | //pAd->CommonCfg.bAutoTxRateSwitch = FALSE; | ||
2758 | *auto_rate_cur_p = FALSE; | 2735 | *auto_rate_cur_p = FALSE; |
2759 | } | 2736 | } |
2760 | else | 2737 | else |
2761 | { | 2738 | { |
2762 | //OPSTATUS_SET_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED); | ||
2763 | //pAd->CommonCfg.bAutoTxRateSwitch = TRUE; | ||
2764 | *auto_rate_cur_p = TRUE; | 2739 | *auto_rate_cur_p = TRUE; |
2765 | } | 2740 | } |
2766 | 2741 | ||
2767 | #if 1 | 2742 | #if 1 |
2768 | if (HtMcs != MCS_AUTO) | 2743 | if (HtMcs != MCS_AUTO) |
2769 | { | 2744 | { |
2770 | //OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED); | ||
2771 | //pAd->CommonCfg.bAutoTxRateSwitch = FALSE; | ||
2772 | *auto_rate_cur_p = FALSE; | 2745 | *auto_rate_cur_p = FALSE; |
2773 | } | 2746 | } |
2774 | else | 2747 | else |
2775 | { | 2748 | { |
2776 | //OPSTATUS_SET_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED); | ||
2777 | //pAd->CommonCfg.bAutoTxRateSwitch = TRUE; | ||
2778 | *auto_rate_cur_p = TRUE; | 2749 | *auto_rate_cur_p = TRUE; |
2779 | } | 2750 | } |
2780 | #endif | 2751 | #endif |
@@ -2860,14 +2831,6 @@ VOID MlmeUpdateTxRates( | |||
2860 | pAd->CommonCfg.MaxTxRate = MaxDesire; | 2831 | pAd->CommonCfg.MaxTxRate = MaxDesire; |
2861 | 2832 | ||
2862 | pAd->CommonCfg.MinTxRate = MinSupport; | 2833 | pAd->CommonCfg.MinTxRate = MinSupport; |
2863 | // 2003-07-31 john - 2500 doesn't have good sensitivity at high OFDM rates. to increase the success | ||
2864 | // ratio of initial DHCP packet exchange, TX rate starts from a lower rate depending | ||
2865 | // on average RSSI | ||
2866 | // 1. RSSI >= -70db, start at 54 Mbps (short distance) | ||
2867 | // 2. -70 > RSSI >= -75, start at 24 Mbps (mid distance) | ||
2868 | // 3. -75 > RSSI, start at 11 Mbps (long distance) | ||
2869 | //if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED)/* && | ||
2870 | // OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)*/) | ||
2871 | if (*auto_rate_cur_p) | 2834 | if (*auto_rate_cur_p) |
2872 | { | 2835 | { |
2873 | short dbm = 0; | 2836 | short dbm = 0; |
@@ -2936,11 +2899,7 @@ VOID MlmeUpdateTxRates( | |||
2936 | pAd->CommonCfg.MlmeTransmit.field.MODE = MODE_CCK; | 2899 | pAd->CommonCfg.MlmeTransmit.field.MODE = MODE_CCK; |
2937 | pAd->CommonCfg.MlmeTransmit.field.MCS = RATE_1; | 2900 | pAd->CommonCfg.MlmeTransmit.field.MCS = RATE_1; |
2938 | 2901 | ||
2939 | //#ifdef WIFI_TEST | ||
2940 | pAd->CommonCfg.RtsRate = RATE_11; | 2902 | pAd->CommonCfg.RtsRate = RATE_11; |
2941 | //#else | ||
2942 | // pAd->CommonCfg.RtsRate = RATE_1; | ||
2943 | //#endif | ||
2944 | break; | 2903 | break; |
2945 | case PHY_11G: | 2904 | case PHY_11G: |
2946 | case PHY_11A: | 2905 | case PHY_11A: |
@@ -4289,8 +4248,6 @@ VOID MgtMacHeaderInit( | |||
4289 | 4248 | ||
4290 | pHdr80211->FC.Type = BTYPE_MGMT; | 4249 | pHdr80211->FC.Type = BTYPE_MGMT; |
4291 | pHdr80211->FC.SubType = SubType; | 4250 | pHdr80211->FC.SubType = SubType; |
4292 | // if (SubType == SUBTYPE_ACK) // sample, no use, it will conflict with ACTION frame sub type | ||
4293 | // pHdr80211->FC.Type = BTYPE_CNTL; | ||
4294 | pHdr80211->FC.ToDs = ToDs; | 4251 | pHdr80211->FC.ToDs = ToDs; |
4295 | COPY_MAC_ADDR(pHdr80211->Addr1, pDA); | 4252 | COPY_MAC_ADDR(pHdr80211->Addr1, pDA); |
4296 | 4253 | ||
@@ -6193,10 +6150,7 @@ VOID AsicAdjustTxPower( | |||
6193 | break; | 6150 | break; |
6194 | } | 6151 | } |
6195 | // The index is the step we should decrease, idx = 0 means there is nothing to compensate | 6152 | // The index is the step we should decrease, idx = 0 means there is nothing to compensate |
6196 | // if (R3 > (ULONG) (TxAgcStep * (idx-1))) | ||
6197 | *pTxAgcCompensate = -(TxAgcStep * (idx-1)); | 6153 | *pTxAgcCompensate = -(TxAgcStep * (idx-1)); |
6198 | // else | ||
6199 | // *pTxAgcCompensate = -((UCHAR)R3); | ||
6200 | 6154 | ||
6201 | DeltaPwr += (*pTxAgcCompensate); | 6155 | DeltaPwr += (*pTxAgcCompensate); |
6202 | DBGPRINT(RT_DEBUG_TRACE, ("-- Tx Power, BBP R1=%x, TssiRef=%x, TxAgcStep=%x, step = -%d\n", | 6156 | DBGPRINT(RT_DEBUG_TRACE, ("-- Tx Power, BBP R1=%x, TssiRef=%x, TxAgcStep=%x, step = -%d\n", |
@@ -6479,11 +6433,6 @@ VOID AsicDisableRDG( | |||
6479 | RTMP_IO_READ32(pAd, EDCA_AC0_CFG, &Data); | 6433 | RTMP_IO_READ32(pAd, EDCA_AC0_CFG, &Data); |
6480 | 6434 | ||
6481 | Data &= 0xFFFFFF00; | 6435 | Data &= 0xFFFFFF00; |
6482 | //Data |= 0x20; | ||
6483 | #ifndef WIFI_TEST | ||
6484 | //if ( pAd->CommonCfg.bEnableTxBurst ) | ||
6485 | // Data |= 0x60; // for performance issue not set the TXOP to 0 | ||
6486 | #endif | ||
6487 | if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_DYNAMIC_BE_TXOP_ACTIVE) | 6436 | if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_DYNAMIC_BE_TXOP_ACTIVE) |
6488 | && (pAd->MacTab.fAnyStationMIMOPSDynamic == FALSE) | 6437 | && (pAd->MacTab.fAnyStationMIMOPSDynamic == FALSE) |
6489 | ) | 6438 | ) |
@@ -6540,7 +6489,6 @@ VOID AsicEnableBssSync( | |||
6540 | DBGPRINT(RT_DEBUG_TRACE, ("--->AsicEnableBssSync(INFRA mode)\n")); | 6489 | DBGPRINT(RT_DEBUG_TRACE, ("--->AsicEnableBssSync(INFRA mode)\n")); |
6541 | 6490 | ||
6542 | RTMP_IO_READ32(pAd, BCN_TIME_CFG, &csr.word); | 6491 | RTMP_IO_READ32(pAd, BCN_TIME_CFG, &csr.word); |
6543 | // RTMP_IO_WRITE32(pAd, BCN_TIME_CFG, 0x00000000); | ||
6544 | 6492 | ||
6545 | { | 6493 | { |
6546 | csr.field.BeaconInterval = pAd->CommonCfg.BeaconPeriod << 4; // ASIC register in units of 1/16 TU | 6494 | csr.field.BeaconInterval = pAd->CommonCfg.BeaconPeriod << 4; // ASIC register in units of 1/16 TU |
@@ -6586,8 +6534,6 @@ VOID AsicEnableIbssSync( | |||
6586 | ptr = (PUCHAR)&pAd->BeaconTxWI; | 6534 | ptr = (PUCHAR)&pAd->BeaconTxWI; |
6587 | for (i=0; i<TXWI_SIZE; i+=2) // 16-byte TXWI field | 6535 | for (i=0; i<TXWI_SIZE; i+=2) // 16-byte TXWI field |
6588 | { | 6536 | { |
6589 | //UINT32 longptr = *ptr + (*(ptr+1)<<8) + (*(ptr+2)<<16) + (*(ptr+3)<<24); | ||
6590 | //RTMP_IO_WRITE32(pAd, HW_BEACON_BASE0 + i, longptr); | ||
6591 | RTUSBMultiWrite(pAd, HW_BEACON_BASE0 + i, ptr, 2); | 6537 | RTUSBMultiWrite(pAd, HW_BEACON_BASE0 + i, ptr, 2); |
6592 | ptr += 2; | 6538 | ptr += 2; |
6593 | } | 6539 | } |
@@ -6596,19 +6542,11 @@ VOID AsicEnableIbssSync( | |||
6596 | ptr = pAd->BeaconBuf; | 6542 | ptr = pAd->BeaconBuf; |
6597 | for (i=0; i< pAd->BeaconTxWI.MPDUtotalByteCount; i+=2) | 6543 | for (i=0; i< pAd->BeaconTxWI.MPDUtotalByteCount; i+=2) |
6598 | { | 6544 | { |
6599 | //UINT32 longptr = *ptr + (*(ptr+1)<<8) + (*(ptr+2)<<16) + (*(ptr+3)<<24); | ||
6600 | //RTMP_IO_WRITE32(pAd, HW_BEACON_BASE0 + TXWI_SIZE + i, longptr); | ||
6601 | RTUSBMultiWrite(pAd, HW_BEACON_BASE0 + TXWI_SIZE + i, ptr, 2); | 6545 | RTUSBMultiWrite(pAd, HW_BEACON_BASE0 + TXWI_SIZE + i, ptr, 2); |
6602 | ptr +=2; | 6546 | ptr +=2; |
6603 | } | 6547 | } |
6604 | #endif // RT2870 // | 6548 | #endif // RT2870 // |
6605 | 6549 | ||
6606 | // | ||
6607 | // For Wi-Fi faily generated beacons between participating stations. | ||
6608 | // Set TBTT phase adaptive adjustment step to 8us (default 16us) | ||
6609 | // don't change settings 2006-5- by Jerry | ||
6610 | //RTMP_IO_WRITE32(pAd, TBTT_SYNC_CFG, 0x00001010); | ||
6611 | |||
6612 | // start sending BEACON | 6550 | // start sending BEACON |
6613 | csr9.field.BeaconInterval = pAd->CommonCfg.BeaconPeriod << 4; // ASIC register in units of 1/16 TU | 6551 | csr9.field.BeaconInterval = pAd->CommonCfg.BeaconPeriod << 4; // ASIC register in units of 1/16 TU |
6614 | csr9.field.bTsfTicking = 1; | 6552 | csr9.field.bTsfTicking = 1; |
@@ -6656,7 +6594,6 @@ VOID AsicSetEdcaParm( | |||
6656 | //======================================================== | 6594 | //======================================================== |
6657 | // MAC Register has a copy . | 6595 | // MAC Register has a copy . |
6658 | //======================================================== | 6596 | //======================================================== |
6659 | //#ifndef WIFI_TEST | ||
6660 | if( pAd->CommonCfg.bEnableTxBurst ) | 6597 | if( pAd->CommonCfg.bEnableTxBurst ) |
6661 | { | 6598 | { |
6662 | // For CWC test, change txop from 0x30 to 0x20 in TxBurst mode | 6599 | // For CWC test, change txop from 0x30 to 0x20 in TxBurst mode |
@@ -6664,9 +6601,6 @@ VOID AsicSetEdcaParm( | |||
6664 | } | 6601 | } |
6665 | else | 6602 | else |
6666 | Ac0Cfg.field.AcTxop = 0; // QID_AC_BE | 6603 | Ac0Cfg.field.AcTxop = 0; // QID_AC_BE |
6667 | //#else | ||
6668 | // Ac0Cfg.field.AcTxop = 0; // QID_AC_BE | ||
6669 | //#endif | ||
6670 | Ac0Cfg.field.Cwmin = CW_MIN_IN_BITS; | 6604 | Ac0Cfg.field.Cwmin = CW_MIN_IN_BITS; |
6671 | Ac0Cfg.field.Cwmax = CW_MAX_IN_BITS; | 6605 | Ac0Cfg.field.Cwmax = CW_MAX_IN_BITS; |
6672 | Ac0Cfg.field.Aifsn = 2; | 6606 | Ac0Cfg.field.Aifsn = 2; |
@@ -7175,18 +7109,14 @@ VOID AsicAddKeyEntry( | |||
7175 | IN BOOLEAN bTxKey) | 7109 | IN BOOLEAN bTxKey) |
7176 | { | 7110 | { |
7177 | ULONG offset; | 7111 | ULONG offset; |
7178 | // ULONG WCIDAttri = 0; | ||
7179 | UCHAR IV4 = 0; | 7112 | UCHAR IV4 = 0; |
7180 | PUCHAR pKey = pCipherKey->Key; | 7113 | PUCHAR pKey = pCipherKey->Key; |
7181 | // ULONG KeyLen = pCipherKey->KeyLen; | ||
7182 | PUCHAR pTxMic = pCipherKey->TxMic; | 7114 | PUCHAR pTxMic = pCipherKey->TxMic; |
7183 | PUCHAR pRxMic = pCipherKey->RxMic; | 7115 | PUCHAR pRxMic = pCipherKey->RxMic; |
7184 | PUCHAR pTxtsc = pCipherKey->TxTsc; | 7116 | PUCHAR pTxtsc = pCipherKey->TxTsc; |
7185 | UCHAR CipherAlg = pCipherKey->CipherAlg; | 7117 | UCHAR CipherAlg = pCipherKey->CipherAlg; |
7186 | SHAREDKEY_MODE_STRUC csr1; | 7118 | SHAREDKEY_MODE_STRUC csr1; |
7187 | 7119 | ||
7188 | // ASSERT(KeyLen <= MAX_LEN_OF_PEER_KEY); | ||
7189 | |||
7190 | DBGPRINT(RT_DEBUG_TRACE, ("==> AsicAddKeyEntry\n")); | 7120 | DBGPRINT(RT_DEBUG_TRACE, ("==> AsicAddKeyEntry\n")); |
7191 | // | 7121 | // |
7192 | // 1.) decide key table offset | 7122 | // 1.) decide key table offset |
@@ -8054,19 +7984,6 @@ VOID APSDPeriodicExec( | |||
8054 | return; | 7984 | return; |
8055 | 7985 | ||
8056 | pAd->CommonCfg.TriggerTimerCount++; | 7986 | pAd->CommonCfg.TriggerTimerCount++; |
8057 | |||
8058 | // Driver should not send trigger frame, it should be send by application layer | ||
8059 | /* | ||
8060 | if (pAd->CommonCfg.bAPSDCapable && pAd->CommonCfg.APEdcaParm.bAPSDCapable | ||
8061 | && (pAd->CommonCfg.bNeedSendTriggerFrame || | ||
8062 | (((pAd->CommonCfg.TriggerTimerCount%20) == 19) && (!pAd->CommonCfg.bAPSDAC_BE || !pAd->CommonCfg.bAPSDAC_BK || !pAd->CommonCfg.bAPSDAC_VI || !pAd->CommonCfg.bAPSDAC_VO)))) | ||
8063 | { | ||
8064 | DBGPRINT(RT_DEBUG_TRACE,("Sending trigger frame and enter service period when support APSD\n")); | ||
8065 | RTMPSendNullFrame(pAd, pAd->CommonCfg.TxRate, TRUE); | ||
8066 | pAd->CommonCfg.bNeedSendTriggerFrame = FALSE; | ||
8067 | pAd->CommonCfg.TriggerTimerCount = 0; | ||
8068 | pAd->CommonCfg.bInServicePeriod = TRUE; | ||
8069 | }*/ | ||
8070 | } | 7987 | } |
8071 | 7988 | ||
8072 | /* | 7989 | /* |
diff --git a/drivers/staging/rt3070/common/rtmp_init.c b/drivers/staging/rt3070/common/rtmp_init.c index dec92bc22f3e..29a9c653dc25 100644 --- a/drivers/staging/rt3070/common/rtmp_init.c +++ b/drivers/staging/rt3070/common/rtmp_init.c | |||
@@ -172,18 +172,13 @@ RTMP_REG_PAIR MACRegTable[] = { | |||
172 | {MAC_SYS_CTRL, 0x00}, // 0x1004, , default Disable RX | 172 | {MAC_SYS_CTRL, 0x00}, // 0x1004, , default Disable RX |
173 | {RX_FILTR_CFG, 0x17f97}, //0x1400 , RX filter control, | 173 | {RX_FILTR_CFG, 0x17f97}, //0x1400 , RX filter control, |
174 | {BKOFF_SLOT_CFG, 0x209}, // default set short slot time, CC_DELAY_TIME should be 2 | 174 | {BKOFF_SLOT_CFG, 0x209}, // default set short slot time, CC_DELAY_TIME should be 2 |
175 | //{TX_SW_CFG0, 0x40a06}, // Gary,2006-08-23 | ||
176 | {TX_SW_CFG0, 0x0}, // Gary,2008-05-21 for CWC test | 175 | {TX_SW_CFG0, 0x0}, // Gary,2008-05-21 for CWC test |
177 | {TX_SW_CFG1, 0x80606}, // Gary,2006-08-23 | 176 | {TX_SW_CFG1, 0x80606}, // Gary,2006-08-23 |
178 | {TX_LINK_CFG, 0x1020}, // Gary,2006-08-23 | 177 | {TX_LINK_CFG, 0x1020}, // Gary,2006-08-23 |
179 | {TX_TIMEOUT_CFG, 0x000a2090}, | 178 | {TX_TIMEOUT_CFG, 0x000a2090}, |
180 | {MAX_LEN_CFG, MAX_AGGREGATION_SIZE | 0x00001000}, // 0x3018, MAX frame length. Max PSDU = 16kbytes. | 179 | {MAX_LEN_CFG, MAX_AGGREGATION_SIZE | 0x00001000}, // 0x3018, MAX frame length. Max PSDU = 16kbytes. |
181 | {LED_CFG, 0x7f031e46}, // Gary, 2006-08-23 | 180 | {LED_CFG, 0x7f031e46}, // Gary, 2006-08-23 |
182 | // {WMM_AIFSN_CFG, 0x00002273}, | ||
183 | // {WMM_CWMIN_CFG, 0x00002344}, | ||
184 | // {WMM_CWMAX_CFG, 0x000034aa}, | ||
185 | {PBF_MAX_PCNT, 0x1F3FBF9F}, //0x1F3f7f9f}, //Jan, 2006/04/20 | 181 | {PBF_MAX_PCNT, 0x1F3FBF9F}, //0x1F3f7f9f}, //Jan, 2006/04/20 |
186 | //{TX_RTY_CFG, 0x6bb80408}, // Jan, 2006/11/16 | ||
187 | {TX_RTY_CFG, 0x47d01f0f}, // Jan, 2006/11/16, Set TxWI->ACK =0 in Probe Rsp Modify for 2860E ,2007-08-03 | 182 | {TX_RTY_CFG, 0x47d01f0f}, // Jan, 2006/11/16, Set TxWI->ACK =0 in Probe Rsp Modify for 2860E ,2007-08-03 |
188 | {AUTO_RSP_CFG, 0x00000013}, // Initial Auto_Responder, because QA will turn off Auto-Responder | 183 | {AUTO_RSP_CFG, 0x00000013}, // Initial Auto_Responder, because QA will turn off Auto-Responder |
189 | {CCK_PROT_CFG, 0x05740003 /*0x01740003*/}, // Initial Auto_Responder, because QA will turn off Auto-Responder. And RTS threshold is enabled. | 184 | {CCK_PROT_CFG, 0x05740003 /*0x01740003*/}, // Initial Auto_Responder, because QA will turn off Auto-Responder. And RTS threshold is enabled. |
@@ -199,11 +194,7 @@ RTMP_REG_PAIR MACRegTable[] = { | |||
199 | {MM20_PROT_CFG, 0x01744004}, | 194 | {MM20_PROT_CFG, 0x01744004}, |
200 | {TXOP_CTRL_CFG, 0x0000583f, /*0x0000243f*/ /*0x000024bf*/}, //Extension channel backoff. | 195 | {TXOP_CTRL_CFG, 0x0000583f, /*0x0000243f*/ /*0x000024bf*/}, //Extension channel backoff. |
201 | {TX_RTS_CFG, 0x00092b20}, | 196 | {TX_RTS_CFG, 0x00092b20}, |
202 | //#ifdef WIFI_TEST | ||
203 | {EXP_ACK_TIME, 0x002400ca}, // default value | 197 | {EXP_ACK_TIME, 0x002400ca}, // default value |
204 | //#else | ||
205 | // {EXP_ACK_TIME, 0x005400ca}, // suggested by Gray @ 20070323 for 11n intel-sta throughput | ||
206 | //#endif // end - WIFI_TEST // | ||
207 | {TXOP_HLDR_ET, 0x00000002}, | 198 | {TXOP_HLDR_ET, 0x00000002}, |
208 | 199 | ||
209 | /* Jerry comments 2008/01/16: we use SIFS = 10us in CCK defaultly, but it seems that 10us | 200 | /* Jerry comments 2008/01/16: we use SIFS = 10us in CCK defaultly, but it seems that 10us |
@@ -880,8 +871,6 @@ VOID RTMPReadChannelPwr( | |||
880 | // 0. 11b/g, ch1 - ch 14 | 871 | // 0. 11b/g, ch1 - ch 14 |
881 | for (i = 0; i < 7; i++) | 872 | for (i = 0; i < 7; i++) |
882 | { | 873 | { |
883 | // Power.word = RTMP_EEPROM_READ16(pAd, EEPROM_G_TX_PWR_OFFSET + i * 2); | ||
884 | // Power2.word = RTMP_EEPROM_READ16(pAd, EEPROM_G_TX2_PWR_OFFSET + i * 2); | ||
885 | RT28xx_EEPROM_READ16(pAd, EEPROM_G_TX_PWR_OFFSET + i * 2, Power.word); | 874 | RT28xx_EEPROM_READ16(pAd, EEPROM_G_TX_PWR_OFFSET + i * 2, Power.word); |
886 | RT28xx_EEPROM_READ16(pAd, EEPROM_G_TX2_PWR_OFFSET + i * 2, Power2.word); | 875 | RT28xx_EEPROM_READ16(pAd, EEPROM_G_TX2_PWR_OFFSET + i * 2, Power2.word); |
887 | pAd->TxPower[i * 2].Channel = i * 2 + 1; | 876 | pAd->TxPower[i * 2].Channel = i * 2 + 1; |
@@ -929,8 +918,6 @@ VOID RTMPReadChannelPwr( | |||
929 | // 1.2 Fill up power | 918 | // 1.2 Fill up power |
930 | for (i = 0; i < 6; i++) | 919 | for (i = 0; i < 6; i++) |
931 | { | 920 | { |
932 | // Power.word = RTMP_EEPROM_READ16(pAd, EEPROM_A_TX_PWR_OFFSET + i * 2); | ||
933 | // Power2.word = RTMP_EEPROM_READ16(pAd, EEPROM_A_TX2_PWR_OFFSET + i * 2); | ||
934 | RT28xx_EEPROM_READ16(pAd, EEPROM_A_TX_PWR_OFFSET + i * 2, Power.word); | 921 | RT28xx_EEPROM_READ16(pAd, EEPROM_A_TX_PWR_OFFSET + i * 2, Power.word); |
935 | RT28xx_EEPROM_READ16(pAd, EEPROM_A_TX2_PWR_OFFSET + i * 2, Power2.word); | 922 | RT28xx_EEPROM_READ16(pAd, EEPROM_A_TX2_PWR_OFFSET + i * 2, Power2.word); |
936 | 923 | ||
@@ -971,8 +958,6 @@ VOID RTMPReadChannelPwr( | |||
971 | // 2.2 Fill up power | 958 | // 2.2 Fill up power |
972 | for (i = 0; i < 8; i++) | 959 | for (i = 0; i < 8; i++) |
973 | { | 960 | { |
974 | // Power.word = RTMP_EEPROM_READ16(pAd, EEPROM_A_TX_PWR_OFFSET + (choffset - 14) + i * 2); | ||
975 | // Power2.word = RTMP_EEPROM_READ16(pAd, EEPROM_A_TX2_PWR_OFFSET + (choffset - 14) + i * 2); | ||
976 | RT28xx_EEPROM_READ16(pAd, EEPROM_A_TX_PWR_OFFSET + (choffset - 14) + i * 2, Power.word); | 961 | RT28xx_EEPROM_READ16(pAd, EEPROM_A_TX_PWR_OFFSET + (choffset - 14) + i * 2, Power.word); |
977 | RT28xx_EEPROM_READ16(pAd, EEPROM_A_TX2_PWR_OFFSET + (choffset - 14) + i * 2, Power2.word); | 962 | RT28xx_EEPROM_READ16(pAd, EEPROM_A_TX2_PWR_OFFSET + (choffset - 14) + i * 2, Power2.word); |
978 | 963 | ||
@@ -1013,8 +998,6 @@ VOID RTMPReadChannelPwr( | |||
1013 | // 3.2 Fill up power | 998 | // 3.2 Fill up power |
1014 | for (i = 0; i < 4; i++) | 999 | for (i = 0; i < 4; i++) |
1015 | { | 1000 | { |
1016 | // Power.word = RTMP_EEPROM_READ16(pAd, EEPROM_A_TX_PWR_OFFSET + (choffset - 14) + i * 2); | ||
1017 | // Power2.word = RTMP_EEPROM_READ16(pAd, EEPROM_A_TX2_PWR_OFFSET + (choffset - 14) + i * 2); | ||
1018 | RT28xx_EEPROM_READ16(pAd, EEPROM_A_TX_PWR_OFFSET + (choffset - 14) + i * 2, Power.word); | 1001 | RT28xx_EEPROM_READ16(pAd, EEPROM_A_TX_PWR_OFFSET + (choffset - 14) + i * 2, Power.word); |
1019 | RT28xx_EEPROM_READ16(pAd, EEPROM_A_TX2_PWR_OFFSET + (choffset - 14) + i * 2, Power2.word); | 1002 | RT28xx_EEPROM_READ16(pAd, EEPROM_A_TX2_PWR_OFFSET + (choffset - 14) + i * 2, Power2.word); |
1020 | 1003 | ||
@@ -1860,7 +1843,6 @@ VOID NICInitAsicFromEEPROM( | |||
1860 | { | 1843 | { |
1861 | pAd->StaCfg.bHwRadio = FALSE; | 1844 | pAd->StaCfg.bHwRadio = FALSE; |
1862 | pAd->StaCfg.bRadio = FALSE; | 1845 | pAd->StaCfg.bRadio = FALSE; |
1863 | // RTMP_IO_WRITE32(pAd, PWR_PIN_CFG, 0x00001818); | ||
1864 | RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF); | 1846 | RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF); |
1865 | } | 1847 | } |
1866 | } | 1848 | } |
@@ -1880,7 +1862,6 @@ VOID NICInitAsicFromEEPROM( | |||
1880 | // Turn off patching for cardbus controller | 1862 | // Turn off patching for cardbus controller |
1881 | if (NicConfig2.field.CardbusAcceleration == 1) | 1863 | if (NicConfig2.field.CardbusAcceleration == 1) |
1882 | { | 1864 | { |
1883 | // pAd->bTest1 = TRUE; | ||
1884 | } | 1865 | } |
1885 | 1866 | ||
1886 | if (NicConfig2.field.DynamicTxAgcControl == 1) | 1867 | if (NicConfig2.field.DynamicTxAgcControl == 1) |
@@ -1949,7 +1930,6 @@ NDIS_STATUS NICInitializeAdapter( | |||
1949 | { | 1930 | { |
1950 | NDIS_STATUS Status = NDIS_STATUS_SUCCESS; | 1931 | NDIS_STATUS Status = NDIS_STATUS_SUCCESS; |
1951 | WPDMA_GLO_CFG_STRUC GloCfg; | 1932 | WPDMA_GLO_CFG_STRUC GloCfg; |
1952 | // INT_MASK_CSR_STRUC IntMask; | ||
1953 | ULONG i =0, j=0; | 1933 | ULONG i =0, j=0; |
1954 | AC_TXOP_CSR0_STRUC csr0; | 1934 | AC_TXOP_CSR0_STRUC csr0; |
1955 | 1935 | ||
@@ -2303,9 +2283,6 @@ NDIS_STATUS NICInitializeAsic( | |||
2303 | } | 2283 | } |
2304 | } | 2284 | } |
2305 | 2285 | ||
2306 | // assert HOST ready bit | ||
2307 | // RTMP_IO_WRITE32(pAd, MAC_CSR1, 0x0); // 2004-09-14 asked by Mark | ||
2308 | // RTMP_IO_WRITE32(pAd, MAC_CSR1, 0x4); | ||
2309 | 2286 | ||
2310 | // It isn't necessary to clear this space when not hard reset. | 2287 | // It isn't necessary to clear this space when not hard reset. |
2311 | if (bHardReset == TRUE) | 2288 | if (bHardReset == TRUE) |
@@ -2382,9 +2359,6 @@ VOID NICIssueReset( | |||
2382 | UINT32 Value = 0; | 2359 | UINT32 Value = 0; |
2383 | DBGPRINT(RT_DEBUG_TRACE, ("--> NICIssueReset\n")); | 2360 | DBGPRINT(RT_DEBUG_TRACE, ("--> NICIssueReset\n")); |
2384 | 2361 | ||
2385 | // Abort Tx, prevent ASIC from writing to Host memory | ||
2386 | //RTMP_IO_WRITE32(pAd, TX_CNTL_CSR, 0x001f0000); | ||
2387 | |||
2388 | // Disable Rx, register value supposed will remain after reset | 2362 | // Disable Rx, register value supposed will remain after reset |
2389 | RTMP_IO_READ32(pAd, MAC_SYS_CTRL, &Value); | 2363 | RTMP_IO_READ32(pAd, MAC_SYS_CTRL, &Value); |
2390 | Value &= (0xfffffff3); | 2364 | Value &= (0xfffffff3); |
@@ -2566,9 +2540,7 @@ VOID NICUpdateFifoStaCounters( | |||
2566 | VOID NICUpdateRawCounters( | 2540 | VOID NICUpdateRawCounters( |
2567 | IN PRTMP_ADAPTER pAd) | 2541 | IN PRTMP_ADAPTER pAd) |
2568 | { | 2542 | { |
2569 | UINT32 OldValue;//, Value2; | 2543 | UINT32 OldValue; |
2570 | //ULONG PageSum, OneSecTransmitCount; | ||
2571 | //ULONG TxErrorRatio, Retry, Fail; | ||
2572 | RX_STA_CNT0_STRUC RxStaCnt0; | 2544 | RX_STA_CNT0_STRUC RxStaCnt0; |
2573 | RX_STA_CNT1_STRUC RxStaCnt1; | 2545 | RX_STA_CNT1_STRUC RxStaCnt1; |
2574 | RX_STA_CNT2_STRUC RxStaCnt2; | 2546 | RX_STA_CNT2_STRUC RxStaCnt2; |
@@ -2615,7 +2587,6 @@ VOID NICUpdateRawCounters( | |||
2615 | // Update RX Overflow counter | 2587 | // Update RX Overflow counter |
2616 | pAd->Counters8023.RxNoBuffer += (RxStaCnt2.field.RxFifoOverflowCount); | 2588 | pAd->Counters8023.RxNoBuffer += (RxStaCnt2.field.RxFifoOverflowCount); |
2617 | 2589 | ||
2618 | //pAd->RalinkCounters.RxCount = 0; | ||
2619 | #ifdef RT2870 | 2590 | #ifdef RT2870 |
2620 | if (pAd->RalinkCounters.RxCount != pAd->watchDogRxCnt) | 2591 | if (pAd->RalinkCounters.RxCount != pAd->watchDogRxCnt) |
2621 | { | 2592 | { |
@@ -2632,8 +2603,6 @@ VOID NICUpdateRawCounters( | |||
2632 | #endif // RT2870 // | 2603 | #endif // RT2870 // |
2633 | 2604 | ||
2634 | 2605 | ||
2635 | //if (!OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED) || | ||
2636 | // (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED) && (pAd->MacTab.Size != 1))) | ||
2637 | if (!pAd->bUpdateBcnCntDone) | 2606 | if (!pAd->bUpdateBcnCntDone) |
2638 | { | 2607 | { |
2639 | // Update BEACON sent count | 2608 | // Update BEACON sent count |
@@ -2649,7 +2618,6 @@ VOID NICUpdateRawCounters( | |||
2649 | pAd->WlanCounters.FailedCount.u.LowPart += TxStaCnt0.field.TxFailCount; | 2618 | pAd->WlanCounters.FailedCount.u.LowPart += TxStaCnt0.field.TxFailCount; |
2650 | } | 2619 | } |
2651 | 2620 | ||
2652 | //if (pAd->bStaFifoTest == TRUE) | ||
2653 | { | 2621 | { |
2654 | RTMP_IO_READ32(pAd, TX_AGG_CNT, &TxAggCnt.word); | 2622 | RTMP_IO_READ32(pAd, TX_AGG_CNT, &TxAggCnt.word); |
2655 | RTMP_IO_READ32(pAd, TX_AGG_CNT0, &TxAggCnt0.word); | 2623 | RTMP_IO_READ32(pAd, TX_AGG_CNT0, &TxAggCnt0.word); |
@@ -2763,7 +2731,6 @@ VOID NICUpdateRawCounters( | |||
2763 | pDiag->TxFailCnt[ArrayCurIdx] = 0; | 2731 | pDiag->TxFailCnt[ArrayCurIdx] = 0; |
2764 | pDiag->RxDataCnt[ArrayCurIdx] = 0; | 2732 | pDiag->RxDataCnt[ArrayCurIdx] = 0; |
2765 | pDiag->RxCrcErrCnt[ArrayCurIdx] = 0; | 2733 | pDiag->RxCrcErrCnt[ArrayCurIdx] = 0; |
2766 | // for (i = 9; i < 16; i++) | ||
2767 | for (i = 9; i < 24; i++) // 3*3 | 2734 | for (i = 9; i < 24; i++) // 3*3 |
2768 | { | 2735 | { |
2769 | pDiag->TxDescCnt[ArrayCurIdx][i] = 0; | 2736 | pDiag->TxDescCnt[ArrayCurIdx][i] = 0; |
@@ -3158,7 +3125,6 @@ VOID RTMPMoveMemory( | |||
3158 | VOID UserCfgInit( | 3125 | VOID UserCfgInit( |
3159 | IN PRTMP_ADAPTER pAd) | 3126 | IN PRTMP_ADAPTER pAd) |
3160 | { | 3127 | { |
3161 | // EDCA_PARM DefaultEdcaParm; | ||
3162 | UINT key_index, bss_index; | 3128 | UINT key_index, bss_index; |
3163 | 3129 | ||
3164 | DBGPRINT(RT_DEBUG_TRACE, ("--> UserCfgInit\n")); | 3130 | DBGPRINT(RT_DEBUG_TRACE, ("--> UserCfgInit\n")); |
@@ -3404,17 +3370,11 @@ VOID UserCfgInit( | |||
3404 | pAd->Bbp94 = BBPR94_DEFAULT; | 3370 | pAd->Bbp94 = BBPR94_DEFAULT; |
3405 | pAd->BbpForCCK = FALSE; | 3371 | pAd->BbpForCCK = FALSE; |
3406 | 3372 | ||
3407 | // Default is FALSE for test bit 1 | ||
3408 | //pAd->bTest1 = FALSE; | ||
3409 | |||
3410 | // initialize MAC table and allocate spin lock | 3373 | // initialize MAC table and allocate spin lock |
3411 | NdisZeroMemory(&pAd->MacTab, sizeof(MAC_TABLE)); | 3374 | NdisZeroMemory(&pAd->MacTab, sizeof(MAC_TABLE)); |
3412 | InitializeQueueHeader(&pAd->MacTab.McastPsQueue); | 3375 | InitializeQueueHeader(&pAd->MacTab.McastPsQueue); |
3413 | NdisAllocateSpinLock(&pAd->MacTabLock); | 3376 | NdisAllocateSpinLock(&pAd->MacTabLock); |
3414 | 3377 | ||
3415 | //RTMPInitTimer(pAd, &pAd->RECBATimer, RECBATimerTimeout, pAd, TRUE); | ||
3416 | //RTMPSetTimer(&pAd->RECBATimer, REORDER_EXEC_INTV); | ||
3417 | |||
3418 | pAd->CommonCfg.bWiFiTest = FALSE; | 3378 | pAd->CommonCfg.bWiFiTest = FALSE; |
3419 | 3379 | ||
3420 | 3380 | ||
@@ -3830,9 +3790,6 @@ VOID RTMPSetSignalLED( | |||
3830 | VOID RTMPEnableRxTx( | 3790 | VOID RTMPEnableRxTx( |
3831 | IN PRTMP_ADAPTER pAd) | 3791 | IN PRTMP_ADAPTER pAd) |
3832 | { | 3792 | { |
3833 | // WPDMA_GLO_CFG_STRUC GloCfg; | ||
3834 | // ULONG i = 0; | ||
3835 | |||
3836 | DBGPRINT(RT_DEBUG_TRACE, ("==> RTMPEnableRxTx\n")); | 3793 | DBGPRINT(RT_DEBUG_TRACE, ("==> RTMPEnableRxTx\n")); |
3837 | 3794 | ||
3838 | // Enable Rx DMA. | 3795 | // Enable Rx DMA. |
diff --git a/drivers/staging/rt3070/common/rtmp_tkip.c b/drivers/staging/rt3070/common/rtmp_tkip.c index da301aef0891..13e1982de407 100644 --- a/drivers/staging/rt3070/common/rtmp_tkip.c +++ b/drivers/staging/rt3070/common/rtmp_tkip.c | |||
@@ -464,7 +464,6 @@ VOID RTMPInitTkipEngine( | |||
464 | tkipIv.IV16.field.rc2 = *pTSC; | 464 | tkipIv.IV16.field.rc2 = *pTSC; |
465 | tkipIv.IV16.field.CONTROL.field.ExtIV = 1; // 0: non-extended IV, 1: an extended IV | 465 | tkipIv.IV16.field.CONTROL.field.ExtIV = 1; // 0: non-extended IV, 1: an extended IV |
466 | tkipIv.IV16.field.CONTROL.field.KeyID = KeyId; | 466 | tkipIv.IV16.field.CONTROL.field.KeyID = KeyId; |
467 | // tkipIv.IV32 = *(PULONG)(pTSC + 2); | ||
468 | NdisMoveMemory(&tkipIv.IV32, (pTSC + 2), 4); // Copy IV | 467 | NdisMoveMemory(&tkipIv.IV32, (pTSC + 2), 4); // Copy IV |
469 | 468 | ||
470 | *pIV16 = tkipIv.IV16.word; | 469 | *pIV16 = tkipIv.IV16.word; |
@@ -1211,11 +1210,9 @@ BOOLEAN RTMPSoftDecryptTKIP( | |||
1211 | if (!NdisEqualMemory(MIC, TrailMIC, 8)) | 1210 | if (!NdisEqualMemory(MIC, TrailMIC, 8)) |
1212 | { | 1211 | { |
1213 | DBGPRINT(RT_DEBUG_ERROR, ("RTMPSoftDecryptTKIP, WEP Data MIC Error !\n")); //MIC error. | 1212 | DBGPRINT(RT_DEBUG_ERROR, ("RTMPSoftDecryptTKIP, WEP Data MIC Error !\n")); //MIC error. |
1214 | //RTMPReportMicError(pAd, &pWpaKey[KeyID]); // marked by AlbertY @ 20060630 | ||
1215 | return (FALSE); | 1213 | return (FALSE); |
1216 | } | 1214 | } |
1217 | 1215 | ||
1218 | //DBGPRINT(RT_DEBUG_TRACE, "RTMPSoftDecryptTKIP Decript done!!\n"); | ||
1219 | return TRUE; | 1216 | return TRUE; |
1220 | } | 1217 | } |
1221 | 1218 | ||
diff --git a/drivers/staging/rt3070/common/rtmp_wep.c b/drivers/staging/rt3070/common/rtmp_wep.c index 28dedda8be97..1dec4e131bf3 100644 --- a/drivers/staging/rt3070/common/rtmp_wep.c +++ b/drivers/staging/rt3070/common/rtmp_wep.c | |||
@@ -106,15 +106,6 @@ UINT FCSTAB_32[256] = | |||
106 | }; | 106 | }; |
107 | 107 | ||
108 | /* | 108 | /* |
109 | UCHAR WEPKEY[] = { | ||
110 | //IV | ||
111 | 0x00, 0x11, 0x22, | ||
112 | //WEP KEY | ||
113 | 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC | ||
114 | }; | ||
115 | */ | ||
116 | |||
117 | /* | ||
118 | ======================================================================== | 109 | ======================================================================== |
119 | 110 | ||
120 | Routine Description: | 111 | Routine Description: |
diff --git a/drivers/staging/rt3070/mlme.h b/drivers/staging/rt3070/mlme.h index f6db8cb74660..3d1a8284fbd4 100644 --- a/drivers/staging/rt3070/mlme.h +++ b/drivers/staging/rt3070/mlme.h | |||
@@ -39,8 +39,6 @@ | |||
39 | #ifndef __MLME_H__ | 39 | #ifndef __MLME_H__ |
40 | #define __MLME_H__ | 40 | #define __MLME_H__ |
41 | 41 | ||
42 | //extern UCHAR BROADCAST_ADDR[]; | ||
43 | |||
44 | // maximum supported capability information - | 42 | // maximum supported capability information - |
45 | // ESS, IBSS, Privacy, Short Preamble, Spectrum mgmt, Short Slot | 43 | // ESS, IBSS, Privacy, Short Preamble, Spectrum mgmt, Short Slot |
46 | #define SUPPORTED_CAPABILITY_INFO 0x0533 | 44 | #define SUPPORTED_CAPABILITY_INFO 0x0533 |
@@ -51,7 +49,6 @@ | |||
51 | #define LEAD_TIME 5 | 49 | #define LEAD_TIME 5 |
52 | #define MLME_TASK_EXEC_MULTIPLE 10 /*5*/ // MLME_TASK_EXEC_MULTIPLE * MLME_TASK_EXEC_INTV = 1 sec | 50 | #define MLME_TASK_EXEC_MULTIPLE 10 /*5*/ // MLME_TASK_EXEC_MULTIPLE * MLME_TASK_EXEC_INTV = 1 sec |
53 | #define REORDER_EXEC_INTV 100 // 0.1 sec | 51 | #define REORDER_EXEC_INTV 100 // 0.1 sec |
54 | //#define TBTT_PRELOAD_TIME 384 // usec. LomgPreamble + 24-byte at 1Mbps | ||
55 | 52 | ||
56 | // The definition of Radar detection duration region | 53 | // The definition of Radar detection duration region |
57 | #define CE 0 | 54 | #define CE 0 |
@@ -106,13 +103,6 @@ | |||
106 | #define TX_WEIGHTING 30 | 103 | #define TX_WEIGHTING 30 |
107 | #define RX_WEIGHTING 20 | 104 | #define RX_WEIGHTING 20 |
108 | 105 | ||
109 | //#define PEER_KEY_NOT_USED 0 | ||
110 | //#define PEER_KEY_64_BIT 64 | ||
111 | //#define PEER_KEY_128_BIT 128 | ||
112 | |||
113 | //#define PEER_KEY_64BIT_LEN 8 | ||
114 | //#define PEER_KEY_128BIT_LEN 16 | ||
115 | |||
116 | #define BSS_NOT_FOUND 0xFFFFFFFF | 106 | #define BSS_NOT_FOUND 0xFFFFFFFF |
117 | 107 | ||
118 | #define MAX_LEN_OF_MLME_QUEUE 40 //10 | 108 | #define MAX_LEN_OF_MLME_QUEUE 40 //10 |
@@ -125,7 +115,6 @@ | |||
125 | #define SCAN_CISCO_CHANNEL_LOAD 23 // Single channel passive scan for channel load collection | 115 | #define SCAN_CISCO_CHANNEL_LOAD 23 // Single channel passive scan for channel load collection |
126 | #define FAST_SCAN_ACTIVE 24 // scan with probe request, and wait beacon and probe response | 116 | #define FAST_SCAN_ACTIVE 24 // scan with probe request, and wait beacon and probe response |
127 | 117 | ||
128 | //#define BSS_TABLE_EMPTY(x) ((x).BssNr == 0) | ||
129 | #define MAC_ADDR_IS_GROUP(Addr) (((Addr[0]) & 0x01)) | 118 | #define MAC_ADDR_IS_GROUP(Addr) (((Addr[0]) & 0x01)) |
130 | #define MAC_ADDR_HASH(Addr) (Addr[0] ^ Addr[1] ^ Addr[2] ^ Addr[3] ^ Addr[4] ^ Addr[5]) | 119 | #define MAC_ADDR_HASH(Addr) (Addr[0] ^ Addr[1] ^ Addr[2] ^ Addr[3] ^ Addr[4] ^ Addr[5]) |
131 | #define MAC_ADDR_HASH_INDEX(Addr) (MAC_ADDR_HASH(Addr) % HASH_TABLE_SIZE) | 120 | #define MAC_ADDR_HASH_INDEX(Addr) (MAC_ADDR_HASH(Addr) % HASH_TABLE_SIZE) |
@@ -157,8 +146,6 @@ | |||
157 | 146 | ||
158 | #define CAP_GENERATE(ess,ibss,priv,s_pre,s_slot,spectrum) (((ess) ? 0x0001 : 0x0000) | ((ibss) ? 0x0002 : 0x0000) | ((priv) ? 0x0010 : 0x0000) | ((s_pre) ? 0x0020 : 0x0000) | ((s_slot) ? 0x0400 : 0x0000) | ((spectrum) ? 0x0100 : 0x0000)) | 147 | #define CAP_GENERATE(ess,ibss,priv,s_pre,s_slot,spectrum) (((ess) ? 0x0001 : 0x0000) | ((ibss) ? 0x0002 : 0x0000) | ((priv) ? 0x0010 : 0x0000) | ((s_pre) ? 0x0020 : 0x0000) | ((s_slot) ? 0x0400 : 0x0000) | ((spectrum) ? 0x0100 : 0x0000)) |
159 | 148 | ||
160 | //#define STA_QOS_CAPABILITY 0 // 1-byte. see 802.11e d9.0 for bit definition | ||
161 | |||
162 | #define ERP_IS_NON_ERP_PRESENT(x) (((x) & 0x01) != 0) // 802.11g | 149 | #define ERP_IS_NON_ERP_PRESENT(x) (((x) & 0x01) != 0) // 802.11g |
163 | #define ERP_IS_USE_PROTECTION(x) (((x) & 0x02) != 0) // 802.11g | 150 | #define ERP_IS_USE_PROTECTION(x) (((x) & 0x02) != 0) // 802.11g |
164 | #define ERP_IS_USE_BARKER_PREAMBLE(x) (((x) & 0x04) != 0) // 802.11g | 151 | #define ERP_IS_USE_BARKER_PREAMBLE(x) (((x) & 0x04) != 0) // 802.11g |
@@ -1093,11 +1080,6 @@ typedef struct PACKED _RTMP_TX_RATE_SWITCH | |||
1093 | #define TBTT_PRELOAD_TIME 384 // usec. LomgPreamble + 24-byte at 1Mbps | 1080 | #define TBTT_PRELOAD_TIME 384 // usec. LomgPreamble + 24-byte at 1Mbps |
1094 | #define DEFAULT_DTIM_PERIOD 1 | 1081 | #define DEFAULT_DTIM_PERIOD 1 |
1095 | 1082 | ||
1096 | // weighting factor to calculate Channel quality, total should be 100% | ||
1097 | //#define RSSI_WEIGHTING 0 | ||
1098 | //#define TX_WEIGHTING 40 | ||
1099 | //#define RX_WEIGHTING 60 | ||
1100 | |||
1101 | #define MAC_TABLE_AGEOUT_TIME 300 // unit: sec | 1083 | #define MAC_TABLE_AGEOUT_TIME 300 // unit: sec |
1102 | #define MAC_TABLE_ASSOC_TIMEOUT 5 // unit: sec | 1084 | #define MAC_TABLE_ASSOC_TIMEOUT 5 // unit: sec |
1103 | #define MAC_TABLE_FULL(Tab) ((Tab).size == MAX_LEN_OF_MAC_TABLE) | 1085 | #define MAC_TABLE_FULL(Tab) ((Tab).size == MAX_LEN_OF_MAC_TABLE) |
diff --git a/drivers/staging/rt3070/oid.h b/drivers/staging/rt3070/oid.h index b4f3eabf056d..329b91bcba47 100644 --- a/drivers/staging/rt3070/oid.h +++ b/drivers/staging/rt3070/oid.h | |||
@@ -37,9 +37,6 @@ | |||
37 | #ifndef _OID_H_ | 37 | #ifndef _OID_H_ |
38 | #define _OID_H_ | 38 | #define _OID_H_ |
39 | 39 | ||
40 | //#include <linux/wireless.h> | ||
41 | |||
42 | |||
43 | #define TRUE 1 | 40 | #define TRUE 1 |
44 | #define FALSE 0 | 41 | #define FALSE 0 |
45 | // | 42 | // |
@@ -588,19 +585,6 @@ typedef struct _NDIS_802_11_AUTHENTICATION_EVENT | |||
588 | NDIS_802_11_AUTHENTICATION_REQUEST Request[1]; | 585 | NDIS_802_11_AUTHENTICATION_REQUEST Request[1]; |
589 | } NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT; | 586 | } NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT; |
590 | 587 | ||
591 | /* | ||
592 | typedef struct _NDIS_802_11_TEST | ||
593 | { | ||
594 | ULONG Length; | ||
595 | ULONG Type; | ||
596 | union | ||
597 | { | ||
598 | NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent; | ||
599 | NDIS_802_11_RSSI RssiTrigger; | ||
600 | }; | ||
601 | } NDIS_802_11_TEST, *PNDIS_802_11_TEST; | ||
602 | */ | ||
603 | |||
604 | // 802.11 Media stream constraints, associated with OID_802_11_MEDIA_STREAM_MODE | 588 | // 802.11 Media stream constraints, associated with OID_802_11_MEDIA_STREAM_MODE |
605 | typedef enum _NDIS_802_11_MEDIA_STREAM_MODE | 589 | typedef enum _NDIS_802_11_MEDIA_STREAM_MODE |
606 | { | 590 | { |
@@ -683,8 +667,6 @@ enum { | |||
683 | #define OID_802_11_GET_COUNTRY_CODE 0x0716 | 667 | #define OID_802_11_GET_COUNTRY_CODE 0x0716 |
684 | #define OID_802_11_GET_CHANNEL_GEOGRAPHY 0x0717 | 668 | #define OID_802_11_GET_CHANNEL_GEOGRAPHY 0x0717 |
685 | 669 | ||
686 | //#define RT_OID_802_11_STATISTICS (OID_GET_SET_TOGGLE | OID_802_11_STATISTICS) | ||
687 | |||
688 | #define RT_OID_WSC_SET_PASSPHRASE 0x0740 // passphrase for wpa(2)-psk | 670 | #define RT_OID_WSC_SET_PASSPHRASE 0x0740 // passphrase for wpa(2)-psk |
689 | #define RT_OID_WSC_DRIVER_AUTO_CONNECT 0x0741 | 671 | #define RT_OID_WSC_DRIVER_AUTO_CONNECT 0x0741 |
690 | #define RT_OID_WSC_QUERY_DEFAULT_PROFILE 0x0742 | 672 | #define RT_OID_WSC_QUERY_DEFAULT_PROFILE 0x0742 |
@@ -714,10 +696,6 @@ enum { | |||
714 | #define RT_OID_GET_PHY_MODE 0x761 | 696 | #define RT_OID_GET_PHY_MODE 0x761 |
715 | #endif // LLTD_SUPPORT // | 697 | #endif // LLTD_SUPPORT // |
716 | 698 | ||
717 | //Add Paul Chen for Accton | ||
718 | //#define RT_OID_TX_POWER_LEVEL 0xFF020010 | ||
719 | //#define RT_OID_SET_TX_POWER_LEVEL (OID_GET_SET_TOGGLE | RT_OID_TX_POWER_LEVEL) | ||
720 | |||
721 | // New for MeetingHouse Api support | 699 | // New for MeetingHouse Api support |
722 | #define OID_MH_802_1X_SUPPORTED 0xFFEDC100 | 700 | #define OID_MH_802_1X_SUPPORTED 0xFFEDC100 |
723 | 701 | ||
@@ -728,7 +706,6 @@ typedef union _HTTRANSMIT_SETTING { | |||
728 | USHORT BW:1; //channel bandwidth 20MHz or 40 MHz | 706 | USHORT BW:1; //channel bandwidth 20MHz or 40 MHz |
729 | USHORT ShortGI:1; | 707 | USHORT ShortGI:1; |
730 | USHORT STBC:2; //SPACE | 708 | USHORT STBC:2; //SPACE |
731 | // USHORT rsv:3; | ||
732 | USHORT rsv:2; | 709 | USHORT rsv:2; |
733 | USHORT TxBF:1; | 710 | USHORT TxBF:1; |
734 | USHORT MODE:2; // Use definition MODE_xxx. | 711 | USHORT MODE:2; // Use definition MODE_xxx. |
@@ -743,7 +720,6 @@ typedef enum _RT_802_11_PREAMBLE { | |||
743 | } RT_802_11_PREAMBLE, *PRT_802_11_PREAMBLE; | 720 | } RT_802_11_PREAMBLE, *PRT_802_11_PREAMBLE; |
744 | 721 | ||
745 | // Only for STA, need to sync with AP | 722 | // Only for STA, need to sync with AP |
746 | // 2005-03-08 match current RaConfig. | ||
747 | typedef enum _RT_802_11_PHY_MODE { | 723 | typedef enum _RT_802_11_PHY_MODE { |
748 | PHY_11BG_MIXED = 0, | 724 | PHY_11BG_MIXED = 0, |
749 | PHY_11B, | 725 | PHY_11B, |
@@ -817,15 +793,6 @@ typedef struct _RT_802_11_HARDWARE_REGISTER { | |||
817 | ULONG Data; // R/W data buffer | 793 | ULONG Data; // R/W data buffer |
818 | } RT_802_11_HARDWARE_REGISTER, *PRT_802_11_HARDWARE_REGISTER; | 794 | } RT_802_11_HARDWARE_REGISTER, *PRT_802_11_HARDWARE_REGISTER; |
819 | 795 | ||
820 | // structure to tune BBP R17 "RX AGC VGC init" | ||
821 | //typedef struct _RT_802_11_RX_AGC_VGC_TUNING { | ||
822 | // UCHAR FalseCcaLowerThreshold; // 0-255, def 10 | ||
823 | // UCHAR FalseCcaUpperThreshold; // 0-255, def 100 | ||
824 | // UCHAR VgcDelta; // R17 +-= VgcDelta whenever flase CCA over UpprThreshold | ||
825 | // // or lower than LowerThresholdupper threshold | ||
826 | // UCHAR VgcUpperBound; // max value of R17 | ||
827 | //} RT_802_11_RX_AGC_VGC_TUNING, *PRT_802_11_RX_AGC_VGC_TUNING; | ||
828 | |||
829 | typedef struct _RT_802_11_AP_CONFIG { | 796 | typedef struct _RT_802_11_AP_CONFIG { |
830 | ULONG EnableTxBurst; // 0-disable, 1-enable | 797 | ULONG EnableTxBurst; // 0-disable, 1-enable |
831 | ULONG EnableTurboRate; // 0-disable, 1-enable 72/100mbps turbo rate | 798 | ULONG EnableTurboRate; // 0-disable, 1-enable 72/100mbps turbo rate |
diff --git a/drivers/staging/rt3070/rt28xx.h b/drivers/staging/rt3070/rt28xx.h index d150ab56e448..c935efb40113 100644 --- a/drivers/staging/rt3070/rt28xx.h +++ b/drivers/staging/rt3070/rt28xx.h | |||
@@ -1049,11 +1049,6 @@ typedef struct _HW_WCID_ENTRY { // 8-byte per entry | |||
1049 | #define MAX_FIRMWARE_IMAGE_SIZE 0x1000 // 4kbyte | 1049 | #define MAX_FIRMWARE_IMAGE_SIZE 0x1000 // 4kbyte |
1050 | #endif // RT2870 // | 1050 | #endif // RT2870 // |
1051 | 1051 | ||
1052 | // TODO: ????? old RT2560 registers. to keep them or remove them? | ||
1053 | //#define MCAST0 0x0178 // multicast filter register 0 | ||
1054 | //#define MCAST1 0x017c // multicast filter register 1 | ||
1055 | |||
1056 | |||
1057 | // ================================================================ | 1052 | // ================================================================ |
1058 | // Tx / Rx / Mgmt ring descriptor definition | 1053 | // Tx / Rx / Mgmt ring descriptor definition |
1059 | // ================================================================ | 1054 | // ================================================================ |
@@ -1181,11 +1176,6 @@ typedef struct _HW_WCID_ENTRY { // 8-byte per entry | |||
1181 | 1176 | ||
1182 | #define BBPR94_DEFAULT 0x06 // Add 1 value will gain 1db | 1177 | #define BBPR94_DEFAULT 0x06 // Add 1 value will gain 1db |
1183 | 1178 | ||
1184 | //#define PHY_TR_SWITCH_TIME 5 // usec | ||
1185 | |||
1186 | //#define BBP_R17_LOW_SENSIBILITY 0x50 | ||
1187 | //#define BBP_R17_MID_SENSIBILITY 0x41 | ||
1188 | //#define BBP_R17_DYNAMIC_UP_BOUND 0x40 | ||
1189 | #define RSSI_FOR_VERY_LOW_SENSIBILITY -35 | 1179 | #define RSSI_FOR_VERY_LOW_SENSIBILITY -35 |
1190 | #define RSSI_FOR_LOW_SENSIBILITY -58 | 1180 | #define RSSI_FOR_LOW_SENSIBILITY -58 |
1191 | #define RSSI_FOR_MID_LOW_SENSIBILITY -80 | 1181 | #define RSSI_FOR_MID_LOW_SENSIBILITY -80 |
@@ -1225,12 +1215,6 @@ typedef struct _HW_WCID_ENTRY { // 8-byte per entry | |||
1225 | #define EEPROM_TXPOWER_BYRATE_40MHZ_5G 0x10a // 40MHZ 5G tx power. | 1215 | #define EEPROM_TXPOWER_BYRATE_40MHZ_5G 0x10a // 40MHZ 5G tx power. |
1226 | #define EEPROM_A_TX_PWR_OFFSET 0x78 | 1216 | #define EEPROM_A_TX_PWR_OFFSET 0x78 |
1227 | #define EEPROM_A_TX2_PWR_OFFSET 0xa6 | 1217 | #define EEPROM_A_TX2_PWR_OFFSET 0xa6 |
1228 | //#define EEPROM_Japan_TX_PWR_OFFSET 0x90 // 802.11j | ||
1229 | //#define EEPROM_Japan_TX2_PWR_OFFSET 0xbe | ||
1230 | //#define EEPROM_TSSI_REF_OFFSET 0x54 | ||
1231 | //#define EEPROM_TSSI_DELTA_OFFSET 0x24 | ||
1232 | //#define EEPROM_CCK_TX_PWR_OFFSET 0x62 | ||
1233 | //#define EEPROM_CALIBRATE_OFFSET 0x7c | ||
1234 | #define EEPROM_VERSION_OFFSET 0x02 | 1218 | #define EEPROM_VERSION_OFFSET 0x02 |
1235 | #define EEPROM_FREQ_OFFSET 0x3a | 1219 | #define EEPROM_FREQ_OFFSET 0x3a |
1236 | #define EEPROM_TXPOWER_BYRATE 0xde // 20MHZ power. | 1220 | #define EEPROM_TXPOWER_BYRATE 0xde // 20MHZ power. |
@@ -1334,7 +1318,6 @@ typedef struct PACKED _TXWI_STRUC { | |||
1334 | UINT32 ShortGI:1; | 1318 | UINT32 ShortGI:1; |
1335 | UINT32 STBC:2; // 1: STBC support MCS =0-7, 2,3 : RESERVE | 1319 | UINT32 STBC:2; // 1: STBC support MCS =0-7, 2,3 : RESERVE |
1336 | UINT32 Ifs:1; // | 1320 | UINT32 Ifs:1; // |
1337 | // UINT32 rsv2:2; //channel bandwidth 20MHz or 40 MHz | ||
1338 | UINT32 rsv2:1; | 1321 | UINT32 rsv2:1; |
1339 | UINT32 TxBF:1; // 3*3 | 1322 | UINT32 TxBF:1; // 3*3 |
1340 | UINT32 PHYMODE:2; | 1323 | UINT32 PHYMODE:2; |
diff --git a/drivers/staging/rt3070/rt_linux.c b/drivers/staging/rt3070/rt_linux.c index e0f10e20c756..4d8b6f38a240 100644 --- a/drivers/staging/rt3070/rt_linux.c +++ b/drivers/staging/rt3070/rt_linux.c | |||
@@ -30,7 +30,6 @@ | |||
30 | ULONG RTDebugLevel = RT_DEBUG_ERROR; | 30 | ULONG RTDebugLevel = RT_DEBUG_ERROR; |
31 | 31 | ||
32 | BUILD_TIMER_FUNCTION(MlmePeriodicExec); | 32 | BUILD_TIMER_FUNCTION(MlmePeriodicExec); |
33 | //BUILD_TIMER_FUNCTION(MlmeRssiReportExec); | ||
34 | BUILD_TIMER_FUNCTION(AsicRxAntEvalTimeout); | 33 | BUILD_TIMER_FUNCTION(AsicRxAntEvalTimeout); |
35 | BUILD_TIMER_FUNCTION(APSDPeriodicExec); | 34 | BUILD_TIMER_FUNCTION(APSDPeriodicExec); |
36 | BUILD_TIMER_FUNCTION(AsicRfTuningExec); | 35 | BUILD_TIMER_FUNCTION(AsicRfTuningExec); |
@@ -668,9 +667,6 @@ void announce_802_3_packet( | |||
668 | #else | 667 | #else |
669 | pRxPkt->protocol = eth_type_trans(pRxPkt, pRxPkt->dev); | 668 | pRxPkt->protocol = eth_type_trans(pRxPkt, pRxPkt->dev); |
670 | 669 | ||
671 | //#ifdef CONFIG_5VT_ENHANCE | ||
672 | // *(int*)(pRxPkt->cb) = BRIDGE_TAG; | ||
673 | //#endif | ||
674 | netif_rx(pRxPkt); | 670 | netif_rx(pRxPkt); |
675 | #endif // IKANOS_VX_1X0 // | 671 | #endif // IKANOS_VX_1X0 // |
676 | } | 672 | } |
diff --git a/drivers/staging/rt3070/rt_linux.h b/drivers/staging/rt3070/rt_linux.h index d9d16cf8fb22..87bffefa704e 100644 --- a/drivers/staging/rt3070/rt_linux.h +++ b/drivers/staging/rt3070/rt_linux.h | |||
@@ -193,9 +193,6 @@ typedef char NDIS_PACKET; | |||
193 | typedef PNDIS_PACKET * PPNDIS_PACKET; | 193 | typedef PNDIS_PACKET * PPNDIS_PACKET; |
194 | typedef dma_addr_t NDIS_PHYSICAL_ADDRESS; | 194 | typedef dma_addr_t NDIS_PHYSICAL_ADDRESS; |
195 | typedef dma_addr_t * PNDIS_PHYSICAL_ADDRESS; | 195 | typedef dma_addr_t * PNDIS_PHYSICAL_ADDRESS; |
196 | //typedef struct timer_list RALINK_TIMER_STRUCT; | ||
197 | //typedef struct timer_list * PRALINK_TIMER_STRUCT; | ||
198 | //typedef struct os_lock NDIS_SPIN_LOCK; | ||
199 | typedef spinlock_t NDIS_SPIN_LOCK; | 196 | typedef spinlock_t NDIS_SPIN_LOCK; |
200 | typedef struct timer_list NDIS_MINIPORT_TIMER; | 197 | typedef struct timer_list NDIS_MINIPORT_TIMER; |
201 | typedef void * NDIS_HANDLE; | 198 | typedef void * NDIS_HANDLE; |
@@ -293,8 +290,6 @@ typedef struct _RT2870_TIMER_ENTRY_ | |||
293 | typedef struct _RT2870_TIMER_QUEUE_ | 290 | typedef struct _RT2870_TIMER_QUEUE_ |
294 | { | 291 | { |
295 | unsigned int status; | 292 | unsigned int status; |
296 | //wait_queue_head_t timerWaitQ; | ||
297 | //atomic_t count; | ||
298 | UCHAR *pTimerQPoll; | 293 | UCHAR *pTimerQPoll; |
299 | RT2870_TIMER_ENTRY *pQPollFreeList; | 294 | RT2870_TIMER_ENTRY *pQPollFreeList; |
300 | RT2870_TIMER_ENTRY *pQHead; | 295 | RT2870_TIMER_ENTRY *pQHead; |
@@ -456,7 +451,6 @@ do { \ | |||
456 | wait_event_interruptible_timeout(_wait, 0, ONE_TICK); } | 451 | wait_event_interruptible_timeout(_wait, 0, ONE_TICK); } |
457 | 452 | ||
458 | 453 | ||
459 | /* Modified by Wu Xi-Kun 4/21/2006 */ | ||
460 | typedef void (*TIMER_FUNCTION)(unsigned long); | 454 | typedef void (*TIMER_FUNCTION)(unsigned long); |
461 | 455 | ||
462 | #define COPY_MAC_ADDR(Addr1, Addr2) memcpy((Addr1), (Addr2), MAC_ADDR_LEN) | 456 | #define COPY_MAC_ADDR(Addr1, Addr2) memcpy((Addr1), (Addr2), MAC_ADDR_LEN) |
@@ -574,7 +568,6 @@ void RTMP_GetCurrentSystemTime(LARGE_INTEGER *time); | |||
574 | // check DDK NDIS_PACKET data structure and find out only MiniportReservedEx[0..7] can be used by our driver without | 568 | // check DDK NDIS_PACKET data structure and find out only MiniportReservedEx[0..7] can be used by our driver without |
575 | // ambiguity. Fields after pPacket->MiniportReservedEx[8] may be used by other wrapper layer thus crashes the driver | 569 | // ambiguity. Fields after pPacket->MiniportReservedEx[8] may be used by other wrapper layer thus crashes the driver |
576 | // | 570 | // |
577 | //#define RTMP_GET_PACKET_MR(_p) (RTPKT_TO_OSPKT(_p)) | ||
578 | 571 | ||
579 | // User Priority | 572 | // User Priority |
580 | #define RTMP_SET_PACKET_UP(_p, _prio) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+0] = _prio) | 573 | #define RTMP_SET_PACKET_UP(_p, _prio) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+0] = _prio) |
@@ -616,8 +609,6 @@ void RTMP_GetCurrentSystemTime(LARGE_INTEGER *time); | |||
616 | #define RTMP_SET_PACKET_MOREDATA(_p, _morebit) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+7] = _morebit) | 609 | #define RTMP_SET_PACKET_MOREDATA(_p, _morebit) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+7] = _morebit) |
617 | #define RTMP_GET_PACKET_MOREDATA(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+7]) | 610 | #define RTMP_GET_PACKET_MOREDATA(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+7]) |
618 | 611 | ||
619 | //#define RTMP_SET_PACKET_NET_DEVICE_MBSSID(_p, _bss) (RTPKT_TO_OSPKT(_p)->cb[8] = _bss) | ||
620 | //#define RTMP_GET_PACKET_NET_DEVICE_MBSSID(_p) (RTPKT_TO_OSPKT(_p)->cb[8]) | ||
621 | 612 | ||
622 | // | 613 | // |
623 | // Sepcific Pakcet Type definition | 614 | // Sepcific Pakcet Type definition |
diff --git a/drivers/staging/rt3070/rt_main_dev.c b/drivers/staging/rt3070/rt_main_dev.c index bce9708b713f..33e3c5b72ef1 100644 --- a/drivers/staging/rt3070/rt_main_dev.c +++ b/drivers/staging/rt3070/rt_main_dev.c | |||
@@ -46,7 +46,7 @@ | |||
46 | //static RALINK_TIMER_STRUCT PeriodicTimer; | 46 | //static RALINK_TIMER_STRUCT PeriodicTimer; |
47 | 47 | ||
48 | char *mac = ""; // default 00:00:00:00:00:00 | 48 | char *mac = ""; // default 00:00:00:00:00:00 |
49 | char *hostname = ""; // default CMPC | 49 | char *hostname = ""; |
50 | module_param (mac, charp, 0); | 50 | module_param (mac, charp, 0); |
51 | MODULE_PARM_DESC (mac, "rt28xx: wireless mac addr"); | 51 | MODULE_PARM_DESC (mac, "rt28xx: wireless mac addr"); |
52 | 52 | ||
@@ -68,7 +68,6 @@ static int rt28xx_init(IN struct net_device *net_dev); | |||
68 | INT rt28xx_send_packets(IN struct sk_buff *skb_p, IN struct net_device *net_dev); | 68 | INT rt28xx_send_packets(IN struct sk_buff *skb_p, IN struct net_device *net_dev); |
69 | 69 | ||
70 | static void CfgInitHook(PRTMP_ADAPTER pAd); | 70 | static void CfgInitHook(PRTMP_ADAPTER pAd); |
71 | //static BOOLEAN RT28XXAvailRANameAssign(IN CHAR *name_p); | ||
72 | 71 | ||
73 | extern const struct iw_handler_def rt28xx_iw_handler_def; | 72 | extern const struct iw_handler_def rt28xx_iw_handler_def; |
74 | 73 | ||
@@ -288,9 +287,6 @@ int rt28xx_close(IN PNET_DEV dev) | |||
288 | remove_wait_queue (&unlink_wakeup, &wait); | 287 | remove_wait_queue (&unlink_wakeup, &wait); |
289 | #endif // RT2870 // | 288 | #endif // RT2870 // |
290 | 289 | ||
291 | //RTUSBCleanUpMLMEWaitQueue(pAd); /*not used in RT28xx*/ | ||
292 | |||
293 | |||
294 | #ifdef RT2870 | 290 | #ifdef RT2870 |
295 | // We need clear timerQ related structure before exits of the timer thread. | 291 | // We need clear timerQ related structure before exits of the timer thread. |
296 | RT2870_TimerQ_Exit(pAd); | 292 | RT2870_TimerQ_Exit(pAd); |
@@ -331,10 +327,7 @@ static int rt28xx_init(IN struct net_device *net_dev) | |||
331 | PRTMP_ADAPTER pAd = net_dev->ml_priv; | 327 | PRTMP_ADAPTER pAd = net_dev->ml_priv; |
332 | UINT index; | 328 | UINT index; |
333 | UCHAR TmpPhy; | 329 | UCHAR TmpPhy; |
334 | // ULONG Value=0; | ||
335 | NDIS_STATUS Status; | 330 | NDIS_STATUS Status; |
336 | // OID_SET_HT_PHYMODE SetHT; | ||
337 | // WPDMA_GLO_CFG_STRUC GloCfg; | ||
338 | UINT32 MacCsr0 = 0; | 331 | UINT32 MacCsr0 = 0; |
339 | 332 | ||
340 | // Allocate BA Reordering memory | 333 | // Allocate BA Reordering memory |
@@ -405,9 +398,6 @@ static int rt28xx_init(IN struct net_device *net_dev) | |||
405 | if (Status != NDIS_STATUS_SUCCESS) | 398 | if (Status != NDIS_STATUS_SUCCESS) |
406 | goto err1; | 399 | goto err1; |
407 | 400 | ||
408 | // COPY_MAC_ADDR(pAd->ApCfg.MBSSID[apidx].Bssid, netif->hwaddr); | ||
409 | // pAd->bForcePrintTX = TRUE; | ||
410 | |||
411 | CfgInitHook(pAd); | 401 | CfgInitHook(pAd); |
412 | 402 | ||
413 | NdisAllocateSpinLock(&pAd->MacTabLock); | 403 | NdisAllocateSpinLock(&pAd->MacTabLock); |
@@ -457,13 +447,6 @@ static int rt28xx_init(IN struct net_device *net_dev) | |||
457 | pAd->CommonCfg.HtCapability.HtCapInfo.AMsduSize = (USHORT)pAd->CommonCfg.BACapability.field.AmsduSize; | 447 | pAd->CommonCfg.HtCapability.HtCapInfo.AMsduSize = (USHORT)pAd->CommonCfg.BACapability.field.AmsduSize; |
458 | pAd->CommonCfg.HtCapability.HtCapParm.MpduDensity = (UCHAR)pAd->CommonCfg.BACapability.field.MpduDensity; | 448 | pAd->CommonCfg.HtCapability.HtCapParm.MpduDensity = (UCHAR)pAd->CommonCfg.BACapability.field.MpduDensity; |
459 | 449 | ||
460 | // after reading Registry, we now know if in AP mode or STA mode | ||
461 | |||
462 | // Load 8051 firmware; crash when FW image not existent | ||
463 | // Status = NICLoadFirmware(pAd); | ||
464 | // if (Status != NDIS_STATUS_SUCCESS) | ||
465 | // break; | ||
466 | |||
467 | printk("2. Phy Mode = %d\n", pAd->CommonCfg.PhyMode); | 450 | printk("2. Phy Mode = %d\n", pAd->CommonCfg.PhyMode); |
468 | 451 | ||
469 | // We should read EEPROM for all cases. rt2860b | 452 | // We should read EEPROM for all cases. rt2860b |
@@ -495,8 +478,6 @@ static int rt28xx_init(IN struct net_device *net_dev) | |||
495 | NICInitRT30xxRFRegisters(pAd); | 478 | NICInitRT30xxRFRegisters(pAd); |
496 | #endif // RT30xx // | 479 | #endif // RT30xx // |
497 | 480 | ||
498 | // APInitialize(pAd); | ||
499 | |||
500 | #ifdef IKANOS_VX_1X0 | 481 | #ifdef IKANOS_VX_1X0 |
501 | VR_IKANOS_FP_Init(pAd->ApCfg.BssidNum, pAd->PermanentAddress); | 482 | VR_IKANOS_FP_Init(pAd->ApCfg.BssidNum, pAd->PermanentAddress); |
502 | #endif // IKANOS_VX_1X0 // | 483 | #endif // IKANOS_VX_1X0 // |
@@ -514,16 +495,13 @@ static int rt28xx_init(IN struct net_device *net_dev) | |||
514 | // | 495 | // |
515 | if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE)) | 496 | if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE)) |
516 | { | 497 | { |
517 | // NdisMDeregisterInterrupt(&pAd->Interrupt); | ||
518 | RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE); | 498 | RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE); |
519 | } | 499 | } |
520 | // RTMPFreeAdapter(pAd); // we will free it in disconnect() | ||
521 | } | 500 | } |
522 | else if (pAd) | 501 | else if (pAd) |
523 | { | 502 | { |
524 | // Microsoft HCT require driver send a disconnect event after driver initialization. | 503 | // Microsoft HCT require driver send a disconnect event after driver initialization. |
525 | OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED); | 504 | OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED); |
526 | // pAd->IndicateMediaState = NdisMediaStateDisconnected; | ||
527 | RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_MEDIA_STATE_CHANGE); | 505 | RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_MEDIA_STATE_CHANGE); |
528 | 506 | ||
529 | DBGPRINT(RT_DEBUG_TRACE, ("NDIS_STATUS_MEDIA_DISCONNECT Event B!\n")); | 507 | DBGPRINT(RT_DEBUG_TRACE, ("NDIS_STATUS_MEDIA_DISCONNECT Event B!\n")); |
@@ -556,7 +534,6 @@ err3: | |||
556 | MlmeHalt(pAd); | 534 | MlmeHalt(pAd); |
557 | err2: | 535 | err2: |
558 | RTMPFreeTxRxRingMemory(pAd); | 536 | RTMPFreeTxRxRingMemory(pAd); |
559 | // RTMPFreeAdapter(pAd); | ||
560 | err1: | 537 | err1: |
561 | os_free_mem(pAd, pAd->mpdu_blk_pool.mem); // free BA pool | 538 | os_free_mem(pAd, pAd->mpdu_blk_pool.mem); // free BA pool |
562 | RT28XX_IRQ_RELEASE(net_dev); | 539 | RT28XX_IRQ_RELEASE(net_dev); |
@@ -644,19 +621,6 @@ int rt28xx_open(IN PNET_DEV dev) | |||
644 | printk("0x1300 = %08x\n", reg); | 621 | printk("0x1300 = %08x\n", reg); |
645 | } | 622 | } |
646 | 623 | ||
647 | { | ||
648 | // u32 reg; | ||
649 | // u8 byte; | ||
650 | // u16 tmp; | ||
651 | |||
652 | // RTMP_IO_READ32(pAd, XIFS_TIME_CFG, ®); | ||
653 | |||
654 | // tmp = 0x0805; | ||
655 | // reg = (reg & 0xffff0000) | tmp; | ||
656 | // RTMP_IO_WRITE32(pAd, XIFS_TIME_CFG, reg); | ||
657 | |||
658 | } | ||
659 | |||
660 | return (retval); | 624 | return (retval); |
661 | 625 | ||
662 | err: | 626 | err: |
@@ -686,10 +650,6 @@ static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER p | |||
686 | CHAR slot_name[IFNAMSIZ]; | 650 | CHAR slot_name[IFNAMSIZ]; |
687 | struct net_device *device; | 651 | struct net_device *device; |
688 | 652 | ||
689 | |||
690 | //ether_setup(dev); | ||
691 | // dev->set_multicast_list = ieee80211_set_multicast_list; | ||
692 | // dev->change_mtu = ieee80211_change_mtu; | ||
693 | #if WIRELESS_EXT >= 12 | 653 | #if WIRELESS_EXT >= 12 |
694 | if (pAd->OpMode == OPMODE_STA) | 654 | if (pAd->OpMode == OPMODE_STA) |
695 | { | 655 | { |
@@ -700,8 +660,6 @@ static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER p | |||
700 | #if WIRELESS_EXT < 21 | 660 | #if WIRELESS_EXT < 21 |
701 | dev->get_wireless_stats = rt28xx_get_wireless_stats; | 661 | dev->get_wireless_stats = rt28xx_get_wireless_stats; |
702 | #endif | 662 | #endif |
703 | // dev->uninit = ieee80211_if_reinit; | ||
704 | // dev->destructor = ieee80211_if_free; | ||
705 | dev->priv_flags = INT_MAIN; | 663 | dev->priv_flags = INT_MAIN; |
706 | dev->netdev_ops = &rt3070_netdev_ops; | 664 | dev->netdev_ops = &rt3070_netdev_ops; |
707 | // find available device name | 665 | // find available device name |
@@ -768,10 +726,6 @@ INT __devinit rt28xx_probe( | |||
768 | 726 | ||
769 | DBGPRINT(RT_DEBUG_TRACE, ("STA Driver version-%s\n", STA_DRIVER_VERSION)); | 727 | DBGPRINT(RT_DEBUG_TRACE, ("STA Driver version-%s\n", STA_DRIVER_VERSION)); |
770 | 728 | ||
771 | // Check chipset vendor/product ID | ||
772 | // if (RT28XXChipsetCheck(_dev_p) == FALSE) | ||
773 | // goto err_out; | ||
774 | |||
775 | net_dev = alloc_etherdev(sizeof(PRTMP_ADAPTER)); | 729 | net_dev = alloc_etherdev(sizeof(PRTMP_ADAPTER)); |
776 | if (net_dev == NULL) | 730 | if (net_dev == NULL) |
777 | { | 731 | { |
@@ -780,10 +734,6 @@ INT __devinit rt28xx_probe( | |||
780 | goto err_out; | 734 | goto err_out; |
781 | } | 735 | } |
782 | 736 | ||
783 | // sample | ||
784 | // if (rt_ieee80211_if_setup(net_dev) != NDIS_STATUS_SUCCESS) | ||
785 | // goto err_out; | ||
786 | |||
787 | netif_stop_queue(net_dev); | 737 | netif_stop_queue(net_dev); |
788 | 738 | ||
789 | /* for supporting Network Manager */ | 739 | /* for supporting Network Manager */ |
@@ -807,9 +757,6 @@ INT __devinit rt28xx_probe( | |||
807 | 757 | ||
808 | pAd->StaCfg.OriDevType = net_dev->type; | 758 | pAd->StaCfg.OriDevType = net_dev->type; |
809 | 759 | ||
810 | // Find and assign a free interface name, raxx | ||
811 | // RT28XXAvailRANameAssign(net_dev->name); | ||
812 | |||
813 | // Post config | 760 | // Post config |
814 | if (RT28XXProbePostConfig(_dev_p, pAd, 0) == FALSE) | 761 | if (RT28XXProbePostConfig(_dev_p, pAd, 0) == FALSE) |
815 | goto err_out_unmap; | 762 | goto err_out_unmap; |
@@ -892,7 +839,6 @@ int rt28xx_packet_xmit(struct sk_buff *skb) | |||
892 | } | 839 | } |
893 | 840 | ||
894 | RTMP_SET_PACKET_5VT(pPacket, 0); | 841 | RTMP_SET_PACKET_5VT(pPacket, 0); |
895 | // MiniportMMRequest(pAd, pkt->data, pkt->len); | ||
896 | #ifdef CONFIG_5VT_ENHANCE | 842 | #ifdef CONFIG_5VT_ENHANCE |
897 | if (*(int*)(skb->cb) == BRIDGE_TAG) { | 843 | if (*(int*)(skb->cb) == BRIDGE_TAG) { |
898 | RTMP_SET_PACKET_5VT(pPacket, 1); | 844 | RTMP_SET_PACKET_5VT(pPacket, 1); |
diff --git a/drivers/staging/rt3070/rt_profile.c b/drivers/staging/rt3070/rt_profile.c index 0ee8eb84d6c6..47ad183b77da 100644 --- a/drivers/staging/rt3070/rt_profile.c +++ b/drivers/staging/rt3070/rt_profile.c | |||
@@ -886,11 +886,6 @@ NDIS_STATUS RTMPReadParametersHook( | |||
886 | 886 | ||
887 | // Save uid and gid used for filesystem access. | 887 | // Save uid and gid used for filesystem access. |
888 | // Set user and group to 0 (root) | 888 | // Set user and group to 0 (root) |
889 | #if 0 | ||
890 | orgfsuid = current->fsuid; | ||
891 | orgfsgid = current->fsgid; | ||
892 | current->fsuid=current->fsgid = 0; | ||
893 | #endif | ||
894 | orgfs = get_fs(); | 889 | orgfs = get_fs(); |
895 | set_fs(KERNEL_DS); | 890 | set_fs(KERNEL_DS); |
896 | 891 | ||
@@ -1121,14 +1116,10 @@ NDIS_STATUS RTMPReadParametersHook( | |||
1121 | //TxBurst | 1116 | //TxBurst |
1122 | if(RTMPGetKeyParameter("TxBurst", tmpbuf, 10, buffer)) | 1117 | if(RTMPGetKeyParameter("TxBurst", tmpbuf, 10, buffer)) |
1123 | { | 1118 | { |
1124 | //#ifdef WIFI_TEST | ||
1125 | // pAd->CommonCfg.bEnableTxBurst = FALSE; | ||
1126 | //#else | ||
1127 | if(simple_strtol(tmpbuf, 0, 10) != 0) //Enable | 1119 | if(simple_strtol(tmpbuf, 0, 10) != 0) //Enable |
1128 | pAd->CommonCfg.bEnableTxBurst = TRUE; | 1120 | pAd->CommonCfg.bEnableTxBurst = TRUE; |
1129 | else //Disable | 1121 | else //Disable |
1130 | pAd->CommonCfg.bEnableTxBurst = FALSE; | 1122 | pAd->CommonCfg.bEnableTxBurst = FALSE; |
1131 | //#endif | ||
1132 | DBGPRINT(RT_DEBUG_TRACE, ("TxBurst=%d\n", pAd->CommonCfg.bEnableTxBurst)); | 1123 | DBGPRINT(RT_DEBUG_TRACE, ("TxBurst=%d\n", pAd->CommonCfg.bEnableTxBurst)); |
1133 | } | 1124 | } |
1134 | 1125 | ||
@@ -1296,7 +1287,6 @@ NDIS_STATUS RTMPReadParametersHook( | |||
1296 | pAd->StaCfg.OrigWepStatus = pAd->StaCfg.WepStatus; | 1287 | pAd->StaCfg.OrigWepStatus = pAd->StaCfg.WepStatus; |
1297 | pAd->StaCfg.bMixCipher = FALSE; | 1288 | pAd->StaCfg.bMixCipher = FALSE; |
1298 | 1289 | ||
1299 | //RTMPMakeRSNIE(pAd, pAd->StaCfg.AuthMode, pAd->StaCfg.WepStatus, 0); | ||
1300 | DBGPRINT(RT_DEBUG_TRACE, ("%s::(EncrypType=%d)\n", __func__, pAd->StaCfg.WepStatus)); | 1290 | DBGPRINT(RT_DEBUG_TRACE, ("%s::(EncrypType=%d)\n", __func__, pAd->StaCfg.WepStatus)); |
1301 | } | 1291 | } |
1302 | } | 1292 | } |
@@ -1342,21 +1332,6 @@ NDIS_STATUS RTMPReadParametersHook( | |||
1342 | } | 1332 | } |
1343 | else if (pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPANone) | 1333 | else if (pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPANone) |
1344 | { | 1334 | { |
1345 | /* | ||
1346 | NdisZeroMemory(&pAd->SharedKey[BSS0][0], sizeof(CIPHER_KEY)); | ||
1347 | pAd->SharedKey[BSS0][0].KeyLen = LEN_TKIP_EK; | ||
1348 | NdisMoveMemory(pAd->SharedKey[BSS0][0].Key, pAd->StaCfg.PMK, LEN_TKIP_EK); | ||
1349 | NdisMoveMemory(pAd->SharedKey[BSS0][0].RxMic, &pAd->StaCfg.PMK[16], LEN_TKIP_RXMICK); | ||
1350 | NdisMoveMemory(pAd->SharedKey[BSS0][0].TxMic, &pAd->StaCfg.PMK[16], LEN_TKIP_TXMICK); | ||
1351 | |||
1352 | // Decide its ChiperAlg | ||
1353 | if (pAd->StaCfg.PairCipher == Ndis802_11Encryption2Enabled) | ||
1354 | pAd->SharedKey[BSS0][0].CipherAlg = CIPHER_TKIP; | ||
1355 | else if (pAd->StaCfg.PairCipher == Ndis802_11Encryption3Enabled) | ||
1356 | pAd->SharedKey[BSS0][0].CipherAlg = CIPHER_AES; | ||
1357 | else | ||
1358 | pAd->SharedKey[BSS0][0].CipherAlg = CIPHER_NONE; | ||
1359 | */ | ||
1360 | pAd->StaCfg.WpaState = SS_NOTUSE; | 1335 | pAd->StaCfg.WpaState = SS_NOTUSE; |
1361 | } | 1336 | } |
1362 | 1337 | ||
@@ -1368,23 +1343,6 @@ NDIS_STATUS RTMPReadParametersHook( | |||
1368 | //DefaultKeyID, KeyType, KeyStr | 1343 | //DefaultKeyID, KeyType, KeyStr |
1369 | rtmp_read_key_parms_from_file(pAd, tmpbuf, buffer); | 1344 | rtmp_read_key_parms_from_file(pAd, tmpbuf, buffer); |
1370 | 1345 | ||
1371 | |||
1372 | //HSCounter | ||
1373 | /*if(RTMPGetKeyParameter("HSCounter", tmpbuf, 10, buffer)) | ||
1374 | { | ||
1375 | switch (simple_strtol(tmpbuf, 0, 10)) | ||
1376 | { | ||
1377 | case 1: //Enable | ||
1378 | pAd->CommonCfg.bEnableHSCounter = TRUE; | ||
1379 | break; | ||
1380 | case 0: //Disable | ||
1381 | default: | ||
1382 | pAd->CommonCfg.bEnableHSCounter = FALSE; | ||
1383 | break; | ||
1384 | } | ||
1385 | DBGPRINT(RT_DEBUG_TRACE, "HSCounter=%d\n", pAd->CommonCfg.bEnableHSCounter); | ||
1386 | }*/ | ||
1387 | |||
1388 | HTParametersHook(pAd, tmpbuf, buffer); | 1346 | HTParametersHook(pAd, tmpbuf, buffer); |
1389 | 1347 | ||
1390 | { | 1348 | { |
@@ -1506,10 +1464,6 @@ NDIS_STATUS RTMPReadParametersHook( | |||
1506 | } | 1464 | } |
1507 | 1465 | ||
1508 | set_fs(orgfs); | 1466 | set_fs(orgfs); |
1509 | #if 0 | ||
1510 | current->fsuid = orgfsuid; | ||
1511 | current->fsgid = orgfsgid; | ||
1512 | #endif | ||
1513 | 1467 | ||
1514 | kfree(buffer); | 1468 | kfree(buffer); |
1515 | kfree(tmpbuf); | 1469 | kfree(tmpbuf); |
@@ -1836,7 +1790,6 @@ static void HTParametersHook( | |||
1836 | { | 1790 | { |
1837 | Value = simple_strtol(pValueStr, 0, 10); | 1791 | Value = simple_strtol(pValueStr, 0, 10); |
1838 | 1792 | ||
1839 | // if ((Value >= 0 && Value <= 15) || (Value == 32)) | ||
1840 | if ((Value >= 0 && Value <= 23) || (Value == 32)) // 3*3 | 1793 | if ((Value >= 0 && Value <= 23) || (Value == 32)) // 3*3 |
1841 | { | 1794 | { |
1842 | pAd->StaCfg.DesiredTransmitSetting.field.MCS = Value; | 1795 | pAd->StaCfg.DesiredTransmitSetting.field.MCS = Value; |
diff --git a/drivers/staging/rt3070/rtmp.h b/drivers/staging/rt3070/rtmp.h index 808d0c8123bc..a21db456a13f 100644 --- a/drivers/staging/rt3070/rtmp.h +++ b/drivers/staging/rt3070/rtmp.h | |||
@@ -142,7 +142,6 @@ typedef struct _RX_CONTEXT | |||
142 | PURB pUrb; | 142 | PURB pUrb; |
143 | //These 2 Boolean shouldn't both be 1 at the same time. | 143 | //These 2 Boolean shouldn't both be 1 at the same time. |
144 | ULONG BulkInOffset; // number of packets waiting for reordering . | 144 | ULONG BulkInOffset; // number of packets waiting for reordering . |
145 | // BOOLEAN ReorderInUse; // At least one packet in this buffer are in reordering buffer and wait for receive indication | ||
146 | BOOLEAN bRxHandling; // Notify this packet is being process now. | 145 | BOOLEAN bRxHandling; // Notify this packet is being process now. |
147 | BOOLEAN InUse; // USB Hardware Occupied. Wait for USB HW to put packet. | 146 | BOOLEAN InUse; // USB Hardware Occupied. Wait for USB HW to put packet. |
148 | BOOLEAN Readable; // Receive Complete back. OK for driver to indicate receiving packet. | 147 | BOOLEAN Readable; // Receive Complete back. OK for driver to indicate receiving packet. |
@@ -458,20 +457,6 @@ typedef struct _QUEUE_HEADER { | |||
458 | } | 457 | } |
459 | 458 | ||
460 | // | 459 | // |
461 | // MACRO for 32-bit PCI register read / write | ||
462 | // | ||
463 | // Usage : RTMP_IO_READ32( | ||
464 | // PRTMP_ADAPTER pAd, | ||
465 | // ULONG Register_Offset, | ||
466 | // PULONG pValue) | ||
467 | // | ||
468 | // RTMP_IO_WRITE32( | ||
469 | // PRTMP_ADAPTER pAd, | ||
470 | // ULONG Register_Offset, | ||
471 | // ULONG Value) | ||
472 | // | ||
473 | |||
474 | // | ||
475 | // BBP & RF are using indirect access. Before write any value into it. | 460 | // BBP & RF are using indirect access. Before write any value into it. |
476 | // We have to make sure there is no outstanding command pending via checking busy bit. | 461 | // We have to make sure there is no outstanding command pending via checking busy bit. |
477 | // | 462 | // |
@@ -607,8 +592,6 @@ typedef struct _QUEUE_HEADER { | |||
607 | // | 592 | // |
608 | // Common fragment list structure - Identical to the scatter gather frag list structure | 593 | // Common fragment list structure - Identical to the scatter gather frag list structure |
609 | // | 594 | // |
610 | //#define RTMP_SCATTER_GATHER_ELEMENT SCATTER_GATHER_ELEMENT | ||
611 | //#define PRTMP_SCATTER_GATHER_ELEMENT PSCATTER_GATHER_ELEMENT | ||
612 | #define NIC_MAX_PHYS_BUF_COUNT 8 | 595 | #define NIC_MAX_PHYS_BUF_COUNT 8 |
613 | 596 | ||
614 | typedef struct _RTMP_SCATTER_GATHER_ELEMENT { | 597 | typedef struct _RTMP_SCATTER_GATHER_ELEMENT { |
@@ -1303,7 +1286,6 @@ typedef struct _MLME_STRUCT { | |||
1303 | 1286 | ||
1304 | // structure for radar detection and channel switch | 1287 | // structure for radar detection and channel switch |
1305 | typedef struct _RADAR_DETECT_STRUCT { | 1288 | typedef struct _RADAR_DETECT_STRUCT { |
1306 | //BOOLEAN IEEE80211H; // 0: disable, 1: enable IEEE802.11h | ||
1307 | UCHAR CSCount; //Channel switch counter | 1289 | UCHAR CSCount; //Channel switch counter |
1308 | UCHAR CSPeriod; //Channel switch period (beacon count) | 1290 | UCHAR CSPeriod; //Channel switch period (beacon count) |
1309 | UCHAR RDCount; //Radar detection counter | 1291 | UCHAR RDCount; //Radar detection counter |
@@ -1355,21 +1337,14 @@ typedef struct _BA_REC_ENTRY { | |||
1355 | UCHAR Wcid; | 1337 | UCHAR Wcid; |
1356 | UCHAR TID; | 1338 | UCHAR TID; |
1357 | UCHAR BAWinSize; // 7.3.1.14. each buffer is capable of holding a max AMSDU or MSDU. | 1339 | UCHAR BAWinSize; // 7.3.1.14. each buffer is capable of holding a max AMSDU or MSDU. |
1358 | //UCHAR NumOfRxPkt; | ||
1359 | //UCHAR Curindidx; // the head in the RX reordering buffer | ||
1360 | USHORT LastIndSeq; | 1340 | USHORT LastIndSeq; |
1361 | // USHORT LastIndSeqAtTimer; | ||
1362 | USHORT TimeOutValue; | 1341 | USHORT TimeOutValue; |
1363 | RALINK_TIMER_STRUCT RECBATimer; | 1342 | RALINK_TIMER_STRUCT RECBATimer; |
1364 | ULONG LastIndSeqAtTimer; | 1343 | ULONG LastIndSeqAtTimer; |
1365 | ULONG nDropPacket; | 1344 | ULONG nDropPacket; |
1366 | ULONG rcvSeq; | 1345 | ULONG rcvSeq; |
1367 | REC_BLOCKACK_STATUS REC_BA_Status; | 1346 | REC_BLOCKACK_STATUS REC_BA_Status; |
1368 | // UCHAR RxBufIdxUsed; | ||
1369 | // corresponding virtual address for RX reordering packet storage. | ||
1370 | //RTMP_REORDERDMABUF MAP_RXBuf[MAX_RX_REORDERBUF]; | ||
1371 | NDIS_SPIN_LOCK RxReRingLock; // Rx Ring spinlock | 1347 | NDIS_SPIN_LOCK RxReRingLock; // Rx Ring spinlock |
1372 | // struct _BA_REC_ENTRY *pNext; | ||
1373 | PVOID pAdapter; | 1348 | PVOID pAdapter; |
1374 | struct reordering_list list; | 1349 | struct reordering_list list; |
1375 | } BA_REC_ENTRY, *PBA_REC_ENTRY; | 1350 | } BA_REC_ENTRY, *PBA_REC_ENTRY; |
@@ -1447,8 +1422,6 @@ typedef struct _IOT_STRUC { | |||
1447 | // This is the registry setting for 802.11n transmit setting. Used in advanced page. | 1422 | // This is the registry setting for 802.11n transmit setting. Used in advanced page. |
1448 | typedef union _REG_TRANSMIT_SETTING { | 1423 | typedef union _REG_TRANSMIT_SETTING { |
1449 | struct { | 1424 | struct { |
1450 | //UINT32 PhyMode:4; | ||
1451 | //UINT32 MCS:7; // MCS | ||
1452 | UINT32 rsv0:10; | 1425 | UINT32 rsv0:10; |
1453 | UINT32 TxBF:1; | 1426 | UINT32 TxBF:1; |
1454 | UINT32 BW:1; //channel bandwidth 20MHz or 40 MHz | 1427 | UINT32 BW:1; //channel bandwidth 20MHz or 40 MHz |
@@ -1546,7 +1519,6 @@ typedef struct _MULTISSID_STRUCT { | |||
1546 | DESIRED_TRANSMIT_SETTING DesiredTransmitSetting; // Desired transmit setting. this is for reading registry setting only. not useful. | 1519 | DESIRED_TRANSMIT_SETTING DesiredTransmitSetting; // Desired transmit setting. this is for reading registry setting only. not useful. |
1547 | BOOLEAN bAutoTxRateSwitch; | 1520 | BOOLEAN bAutoTxRateSwitch; |
1548 | 1521 | ||
1549 | //CIPHER_KEY SharedKey[SHARE_KEY_NUM]; // ref pAd->SharedKey[BSS][4] | ||
1550 | UCHAR DefaultKeyId; | 1522 | UCHAR DefaultKeyId; |
1551 | 1523 | ||
1552 | UCHAR TxRate; // RATE_1, RATE_2, RATE_5_5, RATE_11, ... | 1524 | UCHAR TxRate; // RATE_1, RATE_2, RATE_5_5, RATE_11, ... |
@@ -1554,8 +1526,6 @@ typedef struct _MULTISSID_STRUCT { | |||
1554 | UCHAR DesiredRatesIndex; | 1526 | UCHAR DesiredRatesIndex; |
1555 | UCHAR MaxTxRate; // RATE_1, RATE_2, RATE_5_5, RATE_11 | 1527 | UCHAR MaxTxRate; // RATE_1, RATE_2, RATE_5_5, RATE_11 |
1556 | 1528 | ||
1557 | // ULONG TimBitmap; // bit0 for broadcast, 1 for AID1, 2 for AID2, ...so on | ||
1558 | // ULONG TimBitmap2; // b0 for AID32, b1 for AID33, ... and so on | ||
1559 | UCHAR TimBitmaps[WLAN_MAX_NUM_OF_TIM]; | 1529 | UCHAR TimBitmaps[WLAN_MAX_NUM_OF_TIM]; |
1560 | 1530 | ||
1561 | // WPA | 1531 | // WPA |
@@ -1673,15 +1643,11 @@ typedef struct _COMMON_CONFIG { | |||
1673 | ULONG TriggerTimerCount; | 1643 | ULONG TriggerTimerCount; |
1674 | UCHAR MaxSPLength; | 1644 | UCHAR MaxSPLength; |
1675 | UCHAR BBPCurrentBW; // BW_10, BW_20, BW_40 | 1645 | UCHAR BBPCurrentBW; // BW_10, BW_20, BW_40 |
1676 | // move to MULTISSID_STRUCT for MBSS | ||
1677 | //HTTRANSMIT_SETTING HTPhyMode, MaxHTPhyMode, MinHTPhyMode;// For transmit phy setting in TXWI. | ||
1678 | REG_TRANSMIT_SETTING RegTransmitSetting; //registry transmit setting. this is for reading registry setting only. not useful. | 1646 | REG_TRANSMIT_SETTING RegTransmitSetting; //registry transmit setting. this is for reading registry setting only. not useful. |
1679 | //UCHAR FixedTxMode; // Fixed Tx Mode (CCK, OFDM), for HT fixed tx mode (GF, MIX) , refer to RegTransmitSetting.field.HTMode | ||
1680 | UCHAR TxRate; // Same value to fill in TXD. TxRate is 6-bit | 1647 | UCHAR TxRate; // Same value to fill in TXD. TxRate is 6-bit |
1681 | UCHAR MaxTxRate; // RATE_1, RATE_2, RATE_5_5, RATE_11 | 1648 | UCHAR MaxTxRate; // RATE_1, RATE_2, RATE_5_5, RATE_11 |
1682 | UCHAR TxRateIndex; // Tx rate index in RateSwitchTable | 1649 | UCHAR TxRateIndex; // Tx rate index in RateSwitchTable |
1683 | UCHAR TxRateTableSize; // Valid Tx rate table size in RateSwitchTable | 1650 | UCHAR TxRateTableSize; // Valid Tx rate table size in RateSwitchTable |
1684 | //BOOLEAN bAutoTxRateSwitch; | ||
1685 | UCHAR MinTxRate; // RATE_1, RATE_2, RATE_5_5, RATE_11 | 1651 | UCHAR MinTxRate; // RATE_1, RATE_2, RATE_5_5, RATE_11 |
1686 | UCHAR RtsRate; // RATE_xxx | 1652 | UCHAR RtsRate; // RATE_xxx |
1687 | HTTRANSMIT_SETTING MlmeTransmit; // MGMT frame PHY rate setting when operatin at Ht rate. | 1653 | HTTRANSMIT_SETTING MlmeTransmit; // MGMT frame PHY rate setting when operatin at Ht rate. |
@@ -1883,9 +1849,6 @@ typedef struct _STA_ADMIN_CONFIG { | |||
1883 | BOOLEAN bHardwareRadio; // Hardware controlled Radio enabled | 1849 | BOOLEAN bHardwareRadio; // Hardware controlled Radio enabled |
1884 | BOOLEAN bShowHiddenSSID; // Show all known SSID in SSID list get operation | 1850 | BOOLEAN bShowHiddenSSID; // Show all known SSID in SSID list get operation |
1885 | 1851 | ||
1886 | //BOOLEAN AdhocBOnlyJoined; // Indicate Adhoc B Join. | ||
1887 | //BOOLEAN AdhocBGJoined; // Indicate Adhoc B/G Join. | ||
1888 | //BOOLEAN Adhoc20NJoined; // Indicate Adhoc 20MHz N Join. | ||
1889 | 1852 | ||
1890 | // New for WPA, windows want us to to keep association information and | 1853 | // New for WPA, windows want us to to keep association information and |
1891 | // Fixed IEs from last association response | 1854 | // Fixed IEs from last association response |
@@ -2117,7 +2080,6 @@ typedef struct _MAC_TABLE_ENTRY { | |||
2117 | UCHAR CurrTxRateIndex; | 2080 | UCHAR CurrTxRateIndex; |
2118 | // to record the each TX rate's quality. 0 is best, the bigger the worse. | 2081 | // to record the each TX rate's quality. 0 is best, the bigger the worse. |
2119 | USHORT TxQuality[MAX_STEP_OF_TX_RATE_SWITCH]; | 2082 | USHORT TxQuality[MAX_STEP_OF_TX_RATE_SWITCH]; |
2120 | // USHORT OneSecTxOkCount; | ||
2121 | UINT32 OneSecTxNoRetryOkCount; | 2083 | UINT32 OneSecTxNoRetryOkCount; |
2122 | UINT32 OneSecTxRetryOkCount; | 2084 | UINT32 OneSecTxRetryOkCount; |
2123 | UINT32 OneSecTxFailCount; | 2085 | UINT32 OneSecTxFailCount; |
@@ -2286,29 +2248,20 @@ typedef struct _APCLI_STRUCT { | |||
2286 | UCHAR PSK[100]; // reserve PSK key material | 2248 | UCHAR PSK[100]; // reserve PSK key material |
2287 | UCHAR PSKLen; | 2249 | UCHAR PSKLen; |
2288 | UCHAR PMK[32]; // WPA PSK mode PMK | 2250 | UCHAR PMK[32]; // WPA PSK mode PMK |
2289 | //UCHAR PTK[64]; // WPA PSK mode PTK | ||
2290 | UCHAR GTK[32]; // GTK from authenticator | 2251 | UCHAR GTK[32]; // GTK from authenticator |
2291 | 2252 | ||
2292 | //CIPHER_KEY PairwiseKey; | ||
2293 | CIPHER_KEY SharedKey[SHARE_KEY_NUM]; | 2253 | CIPHER_KEY SharedKey[SHARE_KEY_NUM]; |
2294 | UCHAR DefaultKeyId; | 2254 | UCHAR DefaultKeyId; |
2295 | 2255 | ||
2296 | // WPA 802.1x port control, WPA_802_1X_PORT_SECURED, WPA_802_1X_PORT_NOT_SECURED | ||
2297 | //UCHAR PortSecured; | ||
2298 | |||
2299 | // store RSN_IE built by driver | 2256 | // store RSN_IE built by driver |
2300 | UCHAR RSN_IE[MAX_LEN_OF_RSNIE]; // The content saved here should be convert to little-endian format. | 2257 | UCHAR RSN_IE[MAX_LEN_OF_RSNIE]; // The content saved here should be convert to little-endian format. |
2301 | UCHAR RSNIE_Len; | 2258 | UCHAR RSNIE_Len; |
2302 | 2259 | ||
2303 | // For WPA countermeasures | 2260 | // For WPA countermeasures |
2304 | ULONG LastMicErrorTime; // record last MIC error time | 2261 | ULONG LastMicErrorTime; // record last MIC error time |
2305 | //ULONG MicErrCnt; // Should be 0, 1, 2, then reset to zero (after disassoiciation). | ||
2306 | BOOLEAN bBlockAssoc; // Block associate attempt for 60 seconds after counter measure occurred. | 2262 | BOOLEAN bBlockAssoc; // Block associate attempt for 60 seconds after counter measure occurred. |
2307 | 2263 | ||
2308 | // For WPA-PSK supplicant state | 2264 | // For WPA-PSK supplicant state |
2309 | //WPA_STATE WpaState; // Default is SS_NOTUSE | ||
2310 | //UCHAR ReplayCounter[8]; | ||
2311 | //UCHAR ANonce[32]; // ANonce for WPA-PSK from authenticator | ||
2312 | UCHAR SNonce[32]; // SNonce for WPA-PSK | 2265 | UCHAR SNonce[32]; // SNonce for WPA-PSK |
2313 | UCHAR GNonce[32]; // GNonce for WPA-PSK from authenticator | 2266 | UCHAR GNonce[32]; // GNonce for WPA-PSK from authenticator |
2314 | 2267 | ||
@@ -2362,15 +2315,12 @@ typedef struct _RtmpDiagStrcut_ | |||
2362 | // Tx Related Count | 2315 | // Tx Related Count |
2363 | USHORT TxDataCnt[DIAGNOSE_TIME]; | 2316 | USHORT TxDataCnt[DIAGNOSE_TIME]; |
2364 | USHORT TxFailCnt[DIAGNOSE_TIME]; | 2317 | USHORT TxFailCnt[DIAGNOSE_TIME]; |
2365 | // USHORT TxDescCnt[DIAGNOSE_TIME][16]; // TxDesc queue length in scale of 0~14, >=15 | ||
2366 | USHORT TxDescCnt[DIAGNOSE_TIME][24]; // 3*3 // TxDesc queue length in scale of 0~14, >=15 | 2318 | USHORT TxDescCnt[DIAGNOSE_TIME][24]; // 3*3 // TxDesc queue length in scale of 0~14, >=15 |
2367 | // USHORT TxMcsCnt[DIAGNOSE_TIME][16]; // TxDate MCS Count in range from 0 to 15, step in 1. | ||
2368 | USHORT TxMcsCnt[DIAGNOSE_TIME][24]; // 3*3 | 2319 | USHORT TxMcsCnt[DIAGNOSE_TIME][24]; // 3*3 |
2369 | USHORT TxSWQueCnt[DIAGNOSE_TIME][9]; // TxSwQueue length in scale of 0, 1, 2, 3, 4, 5, 6, 7, >=8 | 2320 | USHORT TxSWQueCnt[DIAGNOSE_TIME][9]; // TxSwQueue length in scale of 0, 1, 2, 3, 4, 5, 6, 7, >=8 |
2370 | 2321 | ||
2371 | USHORT TxAggCnt[DIAGNOSE_TIME]; | 2322 | USHORT TxAggCnt[DIAGNOSE_TIME]; |
2372 | USHORT TxNonAggCnt[DIAGNOSE_TIME]; | 2323 | USHORT TxNonAggCnt[DIAGNOSE_TIME]; |
2373 | // USHORT TxAMPDUCnt[DIAGNOSE_TIME][16]; // 10 sec, TxDMA APMDU Aggregation count in range from 0 to 15, in setp of 1. | ||
2374 | USHORT TxAMPDUCnt[DIAGNOSE_TIME][24]; // 3*3 // 10 sec, TxDMA APMDU Aggregation count in range from 0 to 15, in setp of 1. | 2324 | USHORT TxAMPDUCnt[DIAGNOSE_TIME][24]; // 3*3 // 10 sec, TxDMA APMDU Aggregation count in range from 0 to 15, in setp of 1. |
2375 | USHORT TxRalinkCnt[DIAGNOSE_TIME]; // TxRalink Aggregation Count in 1 sec scale. | 2325 | USHORT TxRalinkCnt[DIAGNOSE_TIME]; // TxRalink Aggregation Count in 1 sec scale. |
2376 | USHORT TxAMSDUCnt[DIAGNOSE_TIME]; // TxAMSUD Aggregation Count in 1 sec scale. | 2326 | USHORT TxAMSDUCnt[DIAGNOSE_TIME]; // TxAMSUD Aggregation Count in 1 sec scale. |
@@ -2378,7 +2328,6 @@ typedef struct _RtmpDiagStrcut_ | |||
2378 | // Rx Related Count | 2328 | // Rx Related Count |
2379 | USHORT RxDataCnt[DIAGNOSE_TIME]; // Rx Total Data count. | 2329 | USHORT RxDataCnt[DIAGNOSE_TIME]; // Rx Total Data count. |
2380 | USHORT RxCrcErrCnt[DIAGNOSE_TIME]; | 2330 | USHORT RxCrcErrCnt[DIAGNOSE_TIME]; |
2381 | // USHORT RxMcsCnt[DIAGNOSE_TIME][16]; // Rx MCS Count in range from 0 to 15, step in 1. | ||
2382 | USHORT RxMcsCnt[DIAGNOSE_TIME][24]; // 3*3 | 2331 | USHORT RxMcsCnt[DIAGNOSE_TIME][24]; // 3*3 |
2383 | }RtmpDiagStruct; | 2332 | }RtmpDiagStruct; |
2384 | #endif // DBG_DIAGNOSE // | 2333 | #endif // DBG_DIAGNOSE // |
@@ -2630,8 +2579,6 @@ typedef struct _RTMP_ADAPTER | |||
2630 | NDIS_MEDIA_STATE IndicateMediaState; // Base on Indication state, default is NdisMediaStateDisConnected | 2579 | NDIS_MEDIA_STATE IndicateMediaState; // Base on Indication state, default is NdisMediaStateDisConnected |
2631 | 2580 | ||
2632 | 2581 | ||
2633 | // MAT related parameters | ||
2634 | |||
2635 | // configuration: read from Registry & E2PROM | 2582 | // configuration: read from Registry & E2PROM |
2636 | BOOLEAN bLocalAdminMAC; // Use user changed MAC | 2583 | BOOLEAN bLocalAdminMAC; // Use user changed MAC |
2637 | UCHAR PermanentAddress[MAC_ADDR_LEN]; // Factory default MAC address | 2584 | UCHAR PermanentAddress[MAC_ADDR_LEN]; // Factory default MAC address |
@@ -2717,7 +2664,6 @@ typedef struct _RTMP_ADAPTER | |||
2717 | // ---------------------------- | 2664 | // ---------------------------- |
2718 | // DEBUG paramerts | 2665 | // DEBUG paramerts |
2719 | // ---------------------------- | 2666 | // ---------------------------- |
2720 | //ULONG DebugSetting[4]; | ||
2721 | BOOLEAN bBanAllBaSetup; | 2667 | BOOLEAN bBanAllBaSetup; |
2722 | BOOLEAN bPromiscuous; | 2668 | BOOLEAN bPromiscuous; |
2723 | 2669 | ||
@@ -2833,7 +2779,6 @@ typedef struct _CISCO_IAPP_CONTENT_ | |||
2833 | 2779 | ||
2834 | typedef struct _RX_BLK_ | 2780 | typedef struct _RX_BLK_ |
2835 | { | 2781 | { |
2836 | // RXD_STRUC RxD; // sample | ||
2837 | RT28XX_RXD_STRUC RxD; | 2782 | RT28XX_RXD_STRUC RxD; |
2838 | PRXWI_STRUC pRxWI; | 2783 | PRXWI_STRUC pRxWI; |
2839 | PHEADER_802_11 pHeader; | 2784 | PHEADER_802_11 pHeader; |
@@ -2921,7 +2866,6 @@ typedef struct _TX_BLK_ | |||
2921 | #define fTX_bAckRequired 0x0002 // the packet need ack response | 2866 | #define fTX_bAckRequired 0x0002 // the packet need ack response |
2922 | #define fTX_bPiggyBack 0x0004 // Legacy device use Piggback or not | 2867 | #define fTX_bPiggyBack 0x0004 // Legacy device use Piggback or not |
2923 | #define fTX_bHTRate 0x0008 // allow to use HT rate | 2868 | #define fTX_bHTRate 0x0008 // allow to use HT rate |
2924 | //#define fTX_bForceLowRate 0x0010 // force to use Low Rate | ||
2925 | #define fTX_bForceNonQoS 0x0010 // force to transmit frame without WMM-QoS in HT mode | 2869 | #define fTX_bForceNonQoS 0x0010 // force to transmit frame without WMM-QoS in HT mode |
2926 | #define fTX_bAllowFrag 0x0020 // allow to fragment the packet, A-MPDU, A-MSDU, A-Ralink is not allowed to fragment | 2870 | #define fTX_bAllowFrag 0x0020 // allow to fragment the packet, A-MPDU, A-MSDU, A-Ralink is not allowed to fragment |
2927 | #define fTX_bMoreData 0x0040 // there are more data packets in PowerSave Queue | 2871 | #define fTX_bMoreData 0x0040 // there are more data packets in PowerSave Queue |
@@ -5331,10 +5275,6 @@ VOID RTMPFilterCalibration( | |||
5331 | IN PRTMP_ADAPTER pAd); | 5275 | IN PRTMP_ADAPTER pAd); |
5332 | #endif // RT30xx // | 5276 | #endif // RT30xx // |
5333 | 5277 | ||
5334 | |||
5335 | //typedef void (*TIMER_FUNCTION)(unsigned long); | ||
5336 | |||
5337 | |||
5338 | /* timeout -- ms */ | 5278 | /* timeout -- ms */ |
5339 | VOID RTMP_SetPeriodicTimer( | 5279 | VOID RTMP_SetPeriodicTimer( |
5340 | IN NDIS_MINIPORT_TIMER *pTimer, | 5280 | IN NDIS_MINIPORT_TIMER *pTimer, |
diff --git a/drivers/staging/rt3070/rtmp_def.h b/drivers/staging/rt3070/rtmp_def.h index e0eef3c2eea4..99df45c11929 100644 --- a/drivers/staging/rt3070/rtmp_def.h +++ b/drivers/staging/rt3070/rtmp_def.h | |||
@@ -54,8 +54,6 @@ | |||
54 | #define NIC_TAG ((ULONG)'0682') | 54 | #define NIC_TAG ((ULONG)'0682') |
55 | #define NIC_DBG_STRING ("**RT28xx**") | 55 | #define NIC_DBG_STRING ("**RT28xx**") |
56 | 56 | ||
57 | //#define PACKED | ||
58 | |||
59 | #define RALINK_2883_VERSION ((UINT32)0x28830300) | 57 | #define RALINK_2883_VERSION ((UINT32)0x28830300) |
60 | #define RALINK_2880E_VERSION ((UINT32)0x28720200) | 58 | #define RALINK_2880E_VERSION ((UINT32)0x28720200) |
61 | #define RALINK_3070_VERSION ((UINT32)0x30700200) | 59 | #define RALINK_3070_VERSION ((UINT32)0x30700200) |
@@ -182,16 +180,6 @@ | |||
182 | #define fRTMP_ADAPTER_MEDIA_STATE_CHANGE 0x20000000 | 180 | #define fRTMP_ADAPTER_MEDIA_STATE_CHANGE 0x20000000 |
183 | #define fRTMP_ADAPTER_IDLE_RADIO_OFF 0x40000000 | 181 | #define fRTMP_ADAPTER_IDLE_RADIO_OFF 0x40000000 |
184 | 182 | ||
185 | // Lock bit for accessing different ring buffers | ||
186 | //#define fRTMP_ADAPTER_TX_RING_BUSY 0x80000000 | ||
187 | //#define fRTMP_ADAPTER_MGMT_RING_BUSY 0x40000000 | ||
188 | //#define fRTMP_ADAPTER_ATIM_RING_BUSY 0x20000000 | ||
189 | //#define fRTMP_ADAPTER_RX_RING_BUSY 0x10000000 | ||
190 | |||
191 | // Lock bit for accessing different queue | ||
192 | //#define fRTMP_ADAPTER_TX_QUEUE_BUSY 0x08000000 | ||
193 | //#define fRTMP_ADAPTER_MGMT_QUEUE_BUSY 0x04000000 | ||
194 | |||
195 | // | 183 | // |
196 | // STA operation status flags | 184 | // STA operation status flags |
197 | // | 185 | // |
@@ -201,7 +189,6 @@ | |||
201 | #define fOP_STATUS_SHORT_SLOT_INUSED 0x00000008 | 189 | #define fOP_STATUS_SHORT_SLOT_INUSED 0x00000008 |
202 | #define fOP_STATUS_SHORT_PREAMBLE_INUSED 0x00000010 | 190 | #define fOP_STATUS_SHORT_PREAMBLE_INUSED 0x00000010 |
203 | #define fOP_STATUS_RECEIVE_DTIM 0x00000020 | 191 | #define fOP_STATUS_RECEIVE_DTIM 0x00000020 |
204 | //#define fOP_STATUS_TX_RATE_SWITCH_ENABLED 0x00000040 | ||
205 | #define fOP_STATUS_MEDIA_STATE_CONNECTED 0x00000080 | 192 | #define fOP_STATUS_MEDIA_STATE_CONNECTED 0x00000080 |
206 | #define fOP_STATUS_WMM_INUSED 0x00000100 | 193 | #define fOP_STATUS_WMM_INUSED 0x00000100 |
207 | #define fOP_STATUS_AGGREGATION_INUSED 0x00000200 | 194 | #define fOP_STATUS_AGGREGATION_INUSED 0x00000200 |
@@ -241,7 +228,6 @@ | |||
241 | // | 228 | // |
242 | // STA configuration flags | 229 | // STA configuration flags |
243 | // | 230 | // |
244 | //#define fSTA_CFG_ENABLE_TX_BURST 0x00000001 | ||
245 | 231 | ||
246 | // 802.11n Operating Mode Definition. 0-3 also used in ASICUPdateProtect switch case | 232 | // 802.11n Operating Mode Definition. 0-3 also used in ASICUPdateProtect switch case |
247 | #define HT_NO_PROTECT 0 | 233 | #define HT_NO_PROTECT 0 |
@@ -440,14 +426,10 @@ | |||
440 | #define PWR_ACTIVE 0 | 426 | #define PWR_ACTIVE 0 |
441 | #define PWR_SAVE 1 | 427 | #define PWR_SAVE 1 |
442 | #define PWR_MMPS 2 //MIMO power save | 428 | #define PWR_MMPS 2 //MIMO power save |
443 | //#define PWR_UNKNOWN 2 | ||
444 | 429 | ||
445 | // Auth and Assoc mode related definitions | 430 | // Auth and Assoc mode related definitions |
446 | #define AUTH_MODE_OPEN 0x00 | 431 | #define AUTH_MODE_OPEN 0x00 |
447 | #define AUTH_MODE_KEY 0x01 | 432 | #define AUTH_MODE_KEY 0x01 |
448 | //#define AUTH_MODE_AUTO_SWITCH 0x03 | ||
449 | //#define AUTH_MODE_DEAUTH 0x04 | ||
450 | //#define AUTH_MODE_UPLAYER 0x05 // reserved for 802.11i use | ||
451 | 433 | ||
452 | // BSS Type definitions | 434 | // BSS Type definitions |
453 | #define BSS_ADHOC 0 // = Ndis802_11IBSS | 435 | #define BSS_ADHOC 0 // = Ndis802_11IBSS |
@@ -855,10 +837,6 @@ | |||
855 | #define AIRONET_FUNC_SIZE (MAX_AIRONET_STATE * MAX_AIRONET_MSG) | 837 | #define AIRONET_FUNC_SIZE (MAX_AIRONET_STATE * MAX_AIRONET_MSG) |
856 | 838 | ||
857 | // | 839 | // |
858 | // WSC State machine: states, events, total function # | ||
859 | // | ||
860 | |||
861 | // | ||
862 | // AP's CONTROL/CONNECT state machine: states, events, total function # | 840 | // AP's CONTROL/CONNECT state machine: states, events, total function # |
863 | // | 841 | // |
864 | #define AP_CNTL_FUNC_SIZE 1 | 842 | #define AP_CNTL_FUNC_SIZE 1 |
diff --git a/drivers/staging/rt3070/sta/connect.c b/drivers/staging/rt3070/sta/connect.c index b03cdb795ef3..7d5a30917a05 100644 --- a/drivers/staging/rt3070/sta/connect.c +++ b/drivers/staging/rt3070/sta/connect.c | |||
@@ -535,13 +535,6 @@ VOID CntlOidRTBssidProc( | |||
535 | pAd->MlmeAux.SsidBssTab.BssNr = 1; | 535 | pAd->MlmeAux.SsidBssTab.BssNr = 1; |
536 | NdisMoveMemory(&pAd->MlmeAux.SsidBssTab.BssEntry[0], &pAd->ScanTab.BssEntry[BssIdx], sizeof(BSS_ENTRY)); | 536 | NdisMoveMemory(&pAd->MlmeAux.SsidBssTab.BssEntry[0], &pAd->ScanTab.BssEntry[BssIdx], sizeof(BSS_ENTRY)); |
537 | 537 | ||
538 | //pAd->MlmeAux.AutoReconnectSsidLen = pAd->ScanTab.BssEntry[BssIdx].SsidLen; | ||
539 | //NdisMoveMemory(pAd->MlmeAux.AutoReconnectSsid, pAd->ScanTab.BssEntry[BssIdx].Ssid, pAd->ScanTab.BssEntry[BssIdx].SsidLen); | ||
540 | |||
541 | // Add SSID into MlmeAux for site surey joining hidden SSID | ||
542 | //pAd->MlmeAux.SsidLen = pAd->ScanTab.BssEntry[BssIdx].SsidLen; | ||
543 | //NdisMoveMemory(pAd->MlmeAux.Ssid, pAd->ScanTab.BssEntry[BssIdx].Ssid, pAd->MlmeAux.SsidLen); | ||
544 | |||
545 | // 2002-11-26 skip the following checking. i.e. if user wants to re-connect to same AP | 538 | // 2002-11-26 skip the following checking. i.e. if user wants to re-connect to same AP |
546 | // we just follow normal procedure. The reason of user doing this may because he/she changed | 539 | // we just follow normal procedure. The reason of user doing this may because he/she changed |
547 | // AP to another channel, but we still received BEACON from it thus don't claim Link Down. | 540 | // AP to another channel, but we still received BEACON from it thus don't claim Link Down. |
@@ -1659,7 +1652,6 @@ VOID LinkUp( | |||
1659 | // Txop can only be modified when RDG is off, WMM is disable and TxBurst is enable | 1652 | // Txop can only be modified when RDG is off, WMM is disable and TxBurst is enable |
1660 | // | 1653 | // |
1661 | // if 1. Legacy AP WMM on, or 2. 11n AP, AMPDU disable. Force turn off burst no matter what bEnableTxBurst is. | 1654 | // if 1. Legacy AP WMM on, or 2. 11n AP, AMPDU disable. Force turn off burst no matter what bEnableTxBurst is. |
1662 | // if ((!IS_RT30xx(pAd)) && | ||
1663 | if (!((pAd->CommonCfg.RxStream == 1)&&(pAd->CommonCfg.TxStream == 1)) && | 1655 | if (!((pAd->CommonCfg.RxStream == 1)&&(pAd->CommonCfg.TxStream == 1)) && |
1664 | (((pAd->StaActive.SupportedPhyInfo.bHtEnable == FALSE) && OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED)) | 1656 | (((pAd->StaActive.SupportedPhyInfo.bHtEnable == FALSE) && OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED)) |
1665 | || ((pAd->StaActive.SupportedPhyInfo.bHtEnable == TRUE) && (pAd->CommonCfg.BACapability.field.Policy == BA_NOTUSE)))) | 1657 | || ((pAd->StaActive.SupportedPhyInfo.bHtEnable == TRUE) && (pAd->CommonCfg.BACapability.field.Policy == BA_NOTUSE)))) |
@@ -1934,9 +1926,6 @@ VOID LinkDown( | |||
1934 | // Update extra information to link is up | 1926 | // Update extra information to link is up |
1935 | pAd->ExtraInfo = GENERAL_LINK_DOWN; | 1927 | pAd->ExtraInfo = GENERAL_LINK_DOWN; |
1936 | 1928 | ||
1937 | //pAd->StaCfg.AdhocBOnlyJoined = FALSE; | ||
1938 | //pAd->StaCfg.AdhocBGJoined = FALSE; | ||
1939 | //pAd->StaCfg.Adhoc20NJoined = FALSE; | ||
1940 | pAd->StaActive.SupportedPhyInfo.bHtEnable = FALSE; | 1929 | pAd->StaActive.SupportedPhyInfo.bHtEnable = FALSE; |
1941 | 1930 | ||
1942 | // Reset the Current AP's IP address | 1931 | // Reset the Current AP's IP address |
diff --git a/drivers/staging/rt3070/sta/rtmp_data.c b/drivers/staging/rt3070/sta/rtmp_data.c index 17b2e203a605..bfdda4be6ae2 100644 --- a/drivers/staging/rt3070/sta/rtmp_data.c +++ b/drivers/staging/rt3070/sta/rtmp_data.c | |||
@@ -65,7 +65,6 @@ VOID STARxEAPOLFrameIndicate( | |||
65 | int idx = 0; | 65 | int idx = 0; |
66 | 66 | ||
67 | DBGPRINT_RAW(RT_DEBUG_TRACE, ("Receive EAP-SUCCESS Packet\n")); | 67 | DBGPRINT_RAW(RT_DEBUG_TRACE, ("Receive EAP-SUCCESS Packet\n")); |
68 | //pAd->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; | ||
69 | STA_PORT_SECURED(pAd); | 68 | STA_PORT_SECURED(pAd); |
70 | 69 | ||
71 | if (pAd->StaCfg.IEEE8021x_required_keys == FALSE) | 70 | if (pAd->StaCfg.IEEE8021x_required_keys == FALSE) |
@@ -881,7 +880,6 @@ NDIS_STATUS STASendPacket( | |||
881 | UINT SrcBufLen; | 880 | UINT SrcBufLen; |
882 | UINT AllowFragSize; | 881 | UINT AllowFragSize; |
883 | UCHAR NumberOfFrag; | 882 | UCHAR NumberOfFrag; |
884 | // UCHAR RTSRequired; | ||
885 | UCHAR QueIdx, UserPriority; | 883 | UCHAR QueIdx, UserPriority; |
886 | MAC_TABLE_ENTRY *pEntry = NULL; | 884 | MAC_TABLE_ENTRY *pEntry = NULL; |
887 | unsigned int IrqFlags; | 885 | unsigned int IrqFlags; |
@@ -1095,7 +1093,6 @@ NDIS_STATUS STASendPacket( | |||
1095 | if ((pAd->CommonCfg.BACapability.field.AutoBA == TRUE)&& | 1093 | if ((pAd->CommonCfg.BACapability.field.AutoBA == TRUE)&& |
1096 | IS_HT_STA(pEntry)) | 1094 | IS_HT_STA(pEntry)) |
1097 | { | 1095 | { |
1098 | //PMAC_TABLE_ENTRY pMacEntry = &pAd->MacTab.Content[BSSID_WCID]; | ||
1099 | if (((pEntry->TXBAbitmap & (1<<UserPriority)) == 0) && | 1096 | if (((pEntry->TXBAbitmap & (1<<UserPriority)) == 0) && |
1100 | ((pEntry->BADeclineBitmap & (1<<UserPriority)) == 0) && | 1097 | ((pEntry->BADeclineBitmap & (1<<UserPriority)) == 0) && |
1101 | (pEntry->PortSecured == WPA_802_1X_PORT_SECURED) | 1098 | (pEntry->PortSecured == WPA_802_1X_PORT_SECURED) |
@@ -1150,7 +1147,6 @@ NDIS_STATUS RTMPFreeTXDRequest( | |||
1150 | IN UCHAR NumberRequired, | 1147 | IN UCHAR NumberRequired, |
1151 | IN PUCHAR FreeNumberIs) | 1148 | IN PUCHAR FreeNumberIs) |
1152 | { | 1149 | { |
1153 | //ULONG FreeNumber = 0; | ||
1154 | NDIS_STATUS Status = NDIS_STATUS_FAILURE; | 1150 | NDIS_STATUS Status = NDIS_STATUS_FAILURE; |
1155 | unsigned long IrqFlags; | 1151 | unsigned long IrqFlags; |
1156 | HT_TX_CONTEXT *pHTTXContext; | 1152 | HT_TX_CONTEXT *pHTTXContext; |
diff --git a/drivers/staging/rt3070/sta/sync.c b/drivers/staging/rt3070/sta/sync.c index c14d3b2e552d..5a011fe8dfcb 100644 --- a/drivers/staging/rt3070/sta/sync.c +++ b/drivers/staging/rt3070/sta/sync.c | |||
@@ -545,8 +545,6 @@ VOID PeerBeaconAtScanAction( | |||
545 | UCHAR AddHtInfoLen; | 545 | UCHAR AddHtInfoLen; |
546 | UCHAR NewExtChannelOffset = 0xff; | 546 | UCHAR NewExtChannelOffset = 0xff; |
547 | 547 | ||
548 | |||
549 | // NdisFillMemory(Ssid, MAX_LEN_OF_SSID, 0x00); | ||
550 | pFrame = (PFRAME_802_11) Elem->Msg; | 548 | pFrame = (PFRAME_802_11) Elem->Msg; |
551 | // Init Variable IE structure | 549 | // Init Variable IE structure |
552 | pVIE = (PNDIS_802_11_VARIABLE_IEs) VarIE; | 550 | pVIE = (PNDIS_802_11_VARIABLE_IEs) VarIE; |
diff --git a/drivers/staging/rt3070/sta/wpa.c b/drivers/staging/rt3070/sta/wpa.c index b0066891ced8..babb215bec4d 100644 --- a/drivers/staging/rt3070/sta/wpa.c +++ b/drivers/staging/rt3070/sta/wpa.c | |||
@@ -1214,7 +1214,6 @@ VOID Wpa2PairMsg3Action( | |||
1214 | RTMPToWirelessSta(pAd, Header802_3, LENGTH_802_3, (PUCHAR)&Packet, Packet.Body_Len[1] + 4, TRUE); | 1214 | RTMPToWirelessSta(pAd, Header802_3, LENGTH_802_3, (PUCHAR)&Packet, Packet.Body_Len[1] + 4, TRUE); |
1215 | 1215 | ||
1216 | // set 802.1x port control | 1216 | // set 802.1x port control |
1217 | //pAd->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; | ||
1218 | STA_PORT_SECURED(pAd); | 1217 | STA_PORT_SECURED(pAd); |
1219 | 1218 | ||
1220 | // Indicate Connected for GUI | 1219 | // Indicate Connected for GUI |
@@ -1406,7 +1405,6 @@ VOID WpaGroupMsg1Action( | |||
1406 | NULL); | 1405 | NULL); |
1407 | 1406 | ||
1408 | // set 802.1x port control | 1407 | // set 802.1x port control |
1409 | //pAd->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; | ||
1410 | STA_PORT_SECURED(pAd); | 1408 | STA_PORT_SECURED(pAd); |
1411 | 1409 | ||
1412 | // Indicate Connected for GUI | 1410 | // Indicate Connected for GUI |
@@ -1889,17 +1887,6 @@ VOID RTMPReportMicError( | |||
1889 | pAd->StaCfg.LastMicErrorTime = Now; | 1887 | pAd->StaCfg.LastMicErrorTime = Now; |
1890 | // Violate MIC error counts, MIC countermeasures kicks in | 1888 | // Violate MIC error counts, MIC countermeasures kicks in |
1891 | pAd->StaCfg.MicErrCnt++; | 1889 | pAd->StaCfg.MicErrCnt++; |
1892 | // We shall block all reception | ||
1893 | // We shall clean all Tx ring and disassoicate from AP after next EAPOL frame | ||
1894 | // | ||
1895 | // No necessary to clean all Tx ring, on RTMPHardTransmit will stop sending non-802.1X EAPOL packets | ||
1896 | // if pAd->StaCfg.MicErrCnt greater than 2. | ||
1897 | // | ||
1898 | // RTMPRingCleanUp(pAd, QID_AC_BK); | ||
1899 | // RTMPRingCleanUp(pAd, QID_AC_BE); | ||
1900 | // RTMPRingCleanUp(pAd, QID_AC_VI); | ||
1901 | // RTMPRingCleanUp(pAd, QID_AC_VO); | ||
1902 | // RTMPRingCleanUp(pAd, QID_HCCA); | ||
1903 | } | 1890 | } |
1904 | } | 1891 | } |
1905 | else | 1892 | else |
diff --git a/drivers/staging/rt3070/sta_ioctl.c b/drivers/staging/rt3070/sta_ioctl.c index e2d1cff1ce6b..40405ea7c5f0 100644 --- a/drivers/staging/rt3070/sta_ioctl.c +++ b/drivers/staging/rt3070/sta_ioctl.c | |||
@@ -346,7 +346,6 @@ VOID RTMPAddKey( | |||
346 | if (pAd->StaCfg.AuthMode >= Ndis802_11AuthModeWPA2) | 346 | if (pAd->StaCfg.AuthMode >= Ndis802_11AuthModeWPA2) |
347 | { | 347 | { |
348 | // set 802.1x port control | 348 | // set 802.1x port control |
349 | //pAd->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; | ||
350 | STA_PORT_SECURED(pAd); | 349 | STA_PORT_SECURED(pAd); |
351 | 350 | ||
352 | // Indicate Connected for GUI | 351 | // Indicate Connected for GUI |
@@ -396,7 +395,6 @@ VOID RTMPAddKey( | |||
396 | NULL); | 395 | NULL); |
397 | 396 | ||
398 | // set 802.1x port control | 397 | // set 802.1x port control |
399 | //pAd->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; | ||
400 | STA_PORT_SECURED(pAd); | 398 | STA_PORT_SECURED(pAd); |
401 | 399 | ||
402 | // Indicate Connected for GUI | 400 | // Indicate Connected for GUI |
@@ -1563,7 +1561,6 @@ int rt_ioctl_siwencode(struct net_device *dev, | |||
1563 | } | 1561 | } |
1564 | else if (erq->flags & IW_ENCODE_RESTRICTED || erq->flags & IW_ENCODE_OPEN) | 1562 | else if (erq->flags & IW_ENCODE_RESTRICTED || erq->flags & IW_ENCODE_OPEN) |
1565 | { | 1563 | { |
1566 | //pAdapter->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; | ||
1567 | STA_PORT_SECURED(pAdapter); | 1564 | STA_PORT_SECURED(pAdapter); |
1568 | pAdapter->StaCfg.PairCipher = Ndis802_11WEPEnabled; | 1565 | pAdapter->StaCfg.PairCipher = Ndis802_11WEPEnabled; |
1569 | pAdapter->StaCfg.GroupCipher = Ndis802_11WEPEnabled; | 1566 | pAdapter->StaCfg.GroupCipher = Ndis802_11WEPEnabled; |
@@ -2171,7 +2168,6 @@ int rt_ioctl_siwauth(struct net_device *dev, | |||
2171 | } | 2168 | } |
2172 | else if (param->value == 0) | 2169 | else if (param->value == 0) |
2173 | { | 2170 | { |
2174 | //pAdapter->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; | ||
2175 | STA_PORT_SECURED(pAdapter); | 2171 | STA_PORT_SECURED(pAdapter); |
2176 | } | 2172 | } |
2177 | DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_KEY_MGMT - param->value = %d!\n", __func__, param->value)); | 2173 | DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_KEY_MGMT - param->value = %d!\n", __func__, param->value)); |
@@ -2179,14 +2175,6 @@ int rt_ioctl_siwauth(struct net_device *dev, | |||
2179 | case IW_AUTH_RX_UNENCRYPTED_EAPOL: | 2175 | case IW_AUTH_RX_UNENCRYPTED_EAPOL: |
2180 | break; | 2176 | break; |
2181 | case IW_AUTH_PRIVACY_INVOKED: | 2177 | case IW_AUTH_PRIVACY_INVOKED: |
2182 | /*if (param->value == 0) | ||
2183 | { | ||
2184 | pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeOpen; | ||
2185 | pAdapter->StaCfg.WepStatus = Ndis802_11WEPDisabled; | ||
2186 | pAdapter->StaCfg.OrigWepStatus = pAdapter->StaCfg.WepStatus; | ||
2187 | pAdapter->StaCfg.PairCipher = Ndis802_11WEPDisabled; | ||
2188 | pAdapter->StaCfg.GroupCipher = Ndis802_11WEPDisabled; | ||
2189 | }*/ | ||
2190 | DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_PRIVACY_INVOKED - param->value = %d!\n", __func__, param->value)); | 2178 | DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_PRIVACY_INVOKED - param->value = %d!\n", __func__, param->value)); |
2191 | break; | 2179 | break; |
2192 | case IW_AUTH_DROP_UNENCRYPTED: | 2180 | case IW_AUTH_DROP_UNENCRYPTED: |
@@ -2194,7 +2182,6 @@ int rt_ioctl_siwauth(struct net_device *dev, | |||
2194 | pAdapter->StaCfg.PortSecured = WPA_802_1X_PORT_NOT_SECURED; | 2182 | pAdapter->StaCfg.PortSecured = WPA_802_1X_PORT_NOT_SECURED; |
2195 | else | 2183 | else |
2196 | { | 2184 | { |
2197 | //pAdapter->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; | ||
2198 | STA_PORT_SECURED(pAdapter); | 2185 | STA_PORT_SECURED(pAdapter); |
2199 | } | 2186 | } |
2200 | DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_WPA_VERSION - param->value = %d!\n", __func__, param->value)); | 2187 | DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_WPA_VERSION - param->value = %d!\n", __func__, param->value)); |
@@ -2367,7 +2354,6 @@ int rt_ioctl_siwencodeext(struct net_device *dev, | |||
2367 | fnSetCipherKey(pAdapter, keyIdx, CIPHER_TKIP, FALSE, ext); | 2354 | fnSetCipherKey(pAdapter, keyIdx, CIPHER_TKIP, FALSE, ext); |
2368 | if (pAdapter->StaCfg.AuthMode >= Ndis802_11AuthModeWPA2) | 2355 | if (pAdapter->StaCfg.AuthMode >= Ndis802_11AuthModeWPA2) |
2369 | { | 2356 | { |
2370 | //pAdapter->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; | ||
2371 | STA_PORT_SECURED(pAdapter); | 2357 | STA_PORT_SECURED(pAdapter); |
2372 | } | 2358 | } |
2373 | } | 2359 | } |
@@ -2376,7 +2362,6 @@ int rt_ioctl_siwencodeext(struct net_device *dev, | |||
2376 | fnSetCipherKey(pAdapter, keyIdx, CIPHER_TKIP, TRUE, ext); | 2362 | fnSetCipherKey(pAdapter, keyIdx, CIPHER_TKIP, TRUE, ext); |
2377 | 2363 | ||
2378 | // set 802.1x port control | 2364 | // set 802.1x port control |
2379 | //pAdapter->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; | ||
2380 | STA_PORT_SECURED(pAdapter); | 2365 | STA_PORT_SECURED(pAdapter); |
2381 | } | 2366 | } |
2382 | } | 2367 | } |
@@ -2388,7 +2373,6 @@ int rt_ioctl_siwencodeext(struct net_device *dev, | |||
2388 | { | 2373 | { |
2389 | fnSetCipherKey(pAdapter, keyIdx, CIPHER_AES, FALSE, ext); | 2374 | fnSetCipherKey(pAdapter, keyIdx, CIPHER_AES, FALSE, ext); |
2390 | if (pAdapter->StaCfg.AuthMode >= Ndis802_11AuthModeWPA2) | 2375 | if (pAdapter->StaCfg.AuthMode >= Ndis802_11AuthModeWPA2) |
2391 | //pAdapter->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; | ||
2392 | STA_PORT_SECURED(pAdapter); | 2376 | STA_PORT_SECURED(pAdapter); |
2393 | } | 2377 | } |
2394 | else if (ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) | 2378 | else if (ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) |
@@ -2396,7 +2380,6 @@ int rt_ioctl_siwencodeext(struct net_device *dev, | |||
2396 | fnSetCipherKey(pAdapter, keyIdx, CIPHER_AES, TRUE, ext); | 2380 | fnSetCipherKey(pAdapter, keyIdx, CIPHER_AES, TRUE, ext); |
2397 | 2381 | ||
2398 | // set 802.1x port control | 2382 | // set 802.1x port control |
2399 | //pAdapter->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; | ||
2400 | STA_PORT_SECURED(pAdapter); | 2383 | STA_PORT_SECURED(pAdapter); |
2401 | } | 2384 | } |
2402 | break; | 2385 | break; |
@@ -2645,7 +2628,6 @@ rt_private_ioctl_bbp(struct net_device *dev, struct iw_request_info *info, | |||
2645 | CHAR *this_char; | 2628 | CHAR *this_char; |
2646 | CHAR *value = NULL; | 2629 | CHAR *value = NULL; |
2647 | UCHAR regBBP = 0; | 2630 | UCHAR regBBP = 0; |
2648 | // CHAR arg[255]={0}; | ||
2649 | UINT32 bbpId; | 2631 | UINT32 bbpId; |
2650 | UINT32 bbpValue; | 2632 | UINT32 bbpValue; |
2651 | BOOLEAN bIsPrintAllBBP = FALSE; | 2633 | BOOLEAN bIsPrintAllBBP = FALSE; |
@@ -2858,7 +2840,6 @@ int rt_ioctl_giwrate(struct net_device *dev, | |||
2858 | 2840 | ||
2859 | if (ht_setting.field.MODE >= MODE_HTMIX) | 2841 | if (ht_setting.field.MODE >= MODE_HTMIX) |
2860 | { | 2842 | { |
2861 | // rate_index = 12 + ((UCHAR)ht_setting.field.BW *16) + ((UCHAR)ht_setting.field.ShortGI *32) + ((UCHAR)ht_setting.field.MCS); | ||
2862 | rate_index = 12 + ((UCHAR)ht_setting.field.BW *24) + ((UCHAR)ht_setting.field.ShortGI *48) + ((UCHAR)ht_setting.field.MCS); | 2843 | rate_index = 12 + ((UCHAR)ht_setting.field.BW *24) + ((UCHAR)ht_setting.field.ShortGI *48) + ((UCHAR)ht_setting.field.MCS); |
2863 | } | 2844 | } |
2864 | else | 2845 | else |