Staging: rt3070: remove dead CONFIG_AP_SUPPORT code
Then remove no longer needed IF_DEV_CONFIG_OPMODE_ON_[AP,STA]() macros. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Родитель
303ee97d3c
Коммит
993709edbf
|
@ -612,7 +612,6 @@ VOID RT2870_WatchDog(IN RTMP_ADAPTER *pAd)
|
||||||
}
|
}
|
||||||
|
|
||||||
//PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
|
//PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
idx = 0;
|
idx = 0;
|
||||||
if ((MACValue & 0xff00) !=0 )
|
if ((MACValue & 0xff00) !=0 )
|
||||||
|
@ -1312,10 +1311,7 @@ VOID RT2870_BssBeaconStop(
|
||||||
{
|
{
|
||||||
INT NumOfBcn;
|
INT NumOfBcn;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
NumOfBcn = MAX_MESH_NUM;
|
||||||
{
|
|
||||||
NumOfBcn = MAX_MESH_NUM;
|
|
||||||
}
|
|
||||||
|
|
||||||
RTMPCancelTimer(&pAd->CommonCfg.BeaconUpdateTimer, &Cancelled);
|
RTMPCancelTimer(&pAd->CommonCfg.BeaconUpdateTimer, &Cancelled);
|
||||||
|
|
||||||
|
@ -1348,10 +1344,7 @@ VOID RT2870_BssBeaconStart(
|
||||||
{
|
{
|
||||||
INT NumOfBcn;
|
INT NumOfBcn;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
NumOfBcn = MAX_MESH_NUM;
|
||||||
{
|
|
||||||
NumOfBcn = MAX_MESH_NUM;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(apidx=0; apidx<NumOfBcn; apidx++)
|
for(apidx=0; apidx<NumOfBcn; apidx++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -234,7 +234,6 @@ NDIS_STATUS NICInitTransmit(
|
||||||
//
|
//
|
||||||
// TX_RING_SIZE, 4 ACs
|
// TX_RING_SIZE, 4 ACs
|
||||||
//
|
//
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
for(acidx=0; acidx<4; acidx++)
|
for(acidx=0; acidx<4; acidx++)
|
||||||
{
|
{
|
||||||
PHT_TX_CONTEXT pHTTXContext = &(pAd->TxContext[acidx]);
|
PHT_TX_CONTEXT pHTTXContext = &(pAd->TxContext[acidx]);
|
||||||
|
@ -432,7 +431,6 @@ out2:
|
||||||
}
|
}
|
||||||
|
|
||||||
out1:
|
out1:
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
for(acidx=0; acidx<4; acidx++)
|
for(acidx=0; acidx<4; acidx++)
|
||||||
{
|
{
|
||||||
PHT_TX_CONTEXT pTxContext = &(pAd->TxContext[acidx]);
|
PHT_TX_CONTEXT pTxContext = &(pAd->TxContext[acidx]);
|
||||||
|
@ -640,13 +638,12 @@ VOID RTMPFreeTxRxRingMemory(
|
||||||
|
|
||||||
|
|
||||||
// Free Tx frame resource
|
// Free Tx frame resource
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
for(acidx=0; acidx<4; acidx++)
|
||||||
for(acidx=0; acidx<4; acidx++)
|
{
|
||||||
{
|
|
||||||
PHT_TX_CONTEXT pHTTXContext = &(pAd->TxContext[acidx]);
|
PHT_TX_CONTEXT pHTTXContext = &(pAd->TxContext[acidx]);
|
||||||
if (pHTTXContext)
|
if (pHTTXContext)
|
||||||
LM_URB_FREE(pObj, pHTTXContext, sizeof(HTTX_BUFFER));
|
LM_URB_FREE(pObj, pHTTXContext, sizeof(HTTX_BUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pAd->FragFrame.pFragPacket)
|
if (pAd->FragFrame.pFragPacket)
|
||||||
RELEASE_NDIS_PACKET(pAd, pAd->FragFrame.pFragPacket, NDIS_STATUS_SUCCESS);
|
RELEASE_NDIS_PACKET(pAd, pAd->FragFrame.pFragPacket, NDIS_STATUS_SUCCESS);
|
||||||
|
|
|
@ -125,7 +125,6 @@ VOID MlmeADDBAAction(
|
||||||
pBAEntry =&pAd->BATable.BAOriEntry[Idx];
|
pBAEntry =&pAd->BATable.BAOriEntry[Idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (ADHOC_ON(pAd))
|
if (ADHOC_ON(pAd))
|
||||||
ActHeaderInit(pAd, &Frame.Hdr, pInfo->pAddr, pAd->CurrentAddress, pAd->CommonCfg.Bssid);
|
ActHeaderInit(pAd, &Frame.Hdr, pInfo->pAddr, pAd->CurrentAddress, pAd->CommonCfg.Bssid);
|
||||||
|
@ -209,8 +208,7 @@ VOID MlmeDELBAAction(
|
||||||
// SEND BAR (Send BAR to refresh peer reordering buffer.)
|
// SEND BAR (Send BAR to refresh peer reordering buffer.)
|
||||||
Idx = pAd->MacTab.Content[pInfo->Wcid].BAOriWcidArray[pInfo->TID];
|
Idx = pAd->MacTab.Content[pInfo->Wcid].BAOriWcidArray[pInfo->TID];
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
BarHeaderInit(pAd, &FrameBar, pAd->MacTab.Content[pInfo->Wcid].Addr, pAd->CurrentAddress);
|
||||||
BarHeaderInit(pAd, &FrameBar, pAd->MacTab.Content[pInfo->Wcid].Addr, pAd->CurrentAddress);
|
|
||||||
|
|
||||||
FrameBar.StartingSeq.field.FragNum = 0; // make sure sequence not clear in DEL funciton.
|
FrameBar.StartingSeq.field.FragNum = 0; // make sure sequence not clear in DEL funciton.
|
||||||
FrameBar.StartingSeq.field.StartSeq = pAd->MacTab.Content[pInfo->Wcid].TxSeq[pInfo->TID]; // make sure sequence not clear in DEL funciton.
|
FrameBar.StartingSeq.field.StartSeq = pAd->MacTab.Content[pInfo->Wcid].TxSeq[pInfo->TID]; // make sure sequence not clear in DEL funciton.
|
||||||
|
@ -229,7 +227,6 @@ VOID MlmeDELBAAction(
|
||||||
// SEND DELBA FRAME
|
// SEND DELBA FRAME
|
||||||
FrameLen = 0;
|
FrameLen = 0;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (ADHOC_ON(pAd))
|
if (ADHOC_ON(pAd))
|
||||||
ActHeaderInit(pAd, &Frame.Hdr, pAd->MacTab.Content[pInfo->Wcid].Addr, pAd->CurrentAddress, pAd->CommonCfg.Bssid);
|
ActHeaderInit(pAd, &Frame.Hdr, pAd->MacTab.Content[pInfo->Wcid].Addr, pAd->CurrentAddress, pAd->CommonCfg.Bssid);
|
||||||
|
@ -359,7 +356,6 @@ static VOID respond_ht_information_exchange_action(
|
||||||
|
|
||||||
NdisZeroMemory(&HTINFOframe, sizeof(FRAME_HT_INFO));
|
NdisZeroMemory(&HTINFOframe, sizeof(FRAME_HT_INFO));
|
||||||
// 2-1. Prepare ADDBA Response frame.
|
// 2-1. Prepare ADDBA Response frame.
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (ADHOC_ON(pAd))
|
if (ADHOC_ON(pAd))
|
||||||
ActHeaderInit(pAd, &HTINFOframe.Hdr, pAddr, pAd->CurrentAddress, pAd->CommonCfg.Bssid);
|
ActHeaderInit(pAd, &HTINFOframe.Hdr, pAddr, pAd->CurrentAddress, pAd->CommonCfg.Bssid);
|
||||||
|
@ -532,8 +528,7 @@ VOID SendRefreshBAR(
|
||||||
|
|
||||||
Sequence = pEntry->TxSeq[TID];
|
Sequence = pEntry->TxSeq[TID];
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
BarHeaderInit(pAd, &FrameBar, pEntry->Addr, pAd->CurrentAddress);
|
||||||
BarHeaderInit(pAd, &FrameBar, pEntry->Addr, pAd->CurrentAddress);
|
|
||||||
|
|
||||||
FrameBar.StartingSeq.field.FragNum = 0; // make sure sequence not clear in DEL function.
|
FrameBar.StartingSeq.field.FragNum = 0; // make sure sequence not clear in DEL function.
|
||||||
FrameBar.StartingSeq.field.StartSeq = Sequence; // make sure sequence not clear in DEL funciton.
|
FrameBar.StartingSeq.field.StartSeq = Sequence; // make sure sequence not clear in DEL funciton.
|
||||||
|
|
|
@ -131,8 +131,7 @@ void Announce_Reordering_Packet(IN PRTMP_ADAPTER pAd,
|
||||||
// pass this 802.3 packet to upper layer or forward this packet to WM directly
|
// pass this 802.3 packet to upper layer or forward this packet to WM directly
|
||||||
//
|
//
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pPacket, RTMP_GET_PACKET_IF(pPacket));
|
||||||
ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pPacket, RTMP_GET_PACKET_IF(pPacket));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -599,8 +598,7 @@ VOID BAOriSessionAdd(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
BarHeaderInit(pAd, &FrameBar, pAd->MacTab.Content[pBAEntry->Wcid].Addr, pAd->CurrentAddress);
|
||||||
BarHeaderInit(pAd, &FrameBar, pAd->MacTab.Content[pBAEntry->Wcid].Addr, pAd->CurrentAddress);
|
|
||||||
|
|
||||||
FrameBar.StartingSeq.field.FragNum = 0; // make sure sequence not clear in DEL function.
|
FrameBar.StartingSeq.field.FragNum = 0; // make sure sequence not clear in DEL function.
|
||||||
FrameBar.StartingSeq.field.StartSeq = pBAEntry->Sequence; // make sure sequence not clear in DEL funciton.
|
FrameBar.StartingSeq.field.StartSeq = pBAEntry->Sequence; // make sure sequence not clear in DEL funciton.
|
||||||
|
@ -1065,12 +1063,9 @@ VOID BAOriSessionSetupTimeout(
|
||||||
|
|
||||||
pAd = pBAEntry->pAdapter;
|
pAd = pBAEntry->pAdapter;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
// Do nothing if monitor mode is on
|
||||||
{
|
if (MONITOR_ON(pAd))
|
||||||
// Do nothing if monitor mode is on
|
return;
|
||||||
if (MONITOR_ON(pAd))
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
pEntry = &pAd->MacTab.Content[pBAEntry->Wcid];
|
pEntry = &pAd->MacTab.Content[pBAEntry->Wcid];
|
||||||
|
|
||||||
|
@ -1211,7 +1206,6 @@ VOID PeerAddBAReqAction(
|
||||||
NdisZeroMemory(&ADDframe, sizeof(FRAME_ADDBA_RSP));
|
NdisZeroMemory(&ADDframe, sizeof(FRAME_ADDBA_RSP));
|
||||||
|
|
||||||
// 2-1. Prepare ADDBA Response frame.
|
// 2-1. Prepare ADDBA Response frame.
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (ADHOC_ON(pAd))
|
if (ADHOC_ON(pAd))
|
||||||
ActHeaderInit(pAd, &ADDframe.Hdr, pAddr, pAd->CurrentAddress, pAd->CommonCfg.Bssid);
|
ActHeaderInit(pAd, &ADDframe.Hdr, pAddr, pAd->CurrentAddress, pAd->CommonCfg.Bssid);
|
||||||
|
@ -1411,8 +1405,7 @@ VOID SendPSMPAction(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
ActHeaderInit(pAd, &Frame.Hdr, pAd->CommonCfg.Bssid, pAd->CurrentAddress, pAd->MacTab.Content[Wcid].Addr);
|
||||||
ActHeaderInit(pAd, &Frame.Hdr, pAd->CommonCfg.Bssid, pAd->CurrentAddress, pAd->MacTab.Content[Wcid].Addr);
|
|
||||||
|
|
||||||
Frame.Category = CATEGORY_HT;
|
Frame.Category = CATEGORY_HT;
|
||||||
Frame.Action = SMPS_ACTION;
|
Frame.Action = SMPS_ACTION;
|
||||||
|
@ -1519,8 +1512,7 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet(
|
||||||
// a. pointer pRxBlk->pData to payload
|
// a. pointer pRxBlk->pData to payload
|
||||||
// b. modify pRxBlk->DataSize
|
// b. modify pRxBlk->DataSize
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
RTMP_802_11_REMOVE_LLC_AND_CONVERT_TO_802_3(pRxBlk, Header802_3);
|
||||||
RTMP_802_11_REMOVE_LLC_AND_CONVERT_TO_802_3(pRxBlk, Header802_3);
|
|
||||||
|
|
||||||
ASSERT(pRxBlk->pRxPacket);
|
ASSERT(pRxBlk->pRxPacket);
|
||||||
pRxPkt = RTPKT_TO_OSPKT(pRxBlk->pRxPacket);
|
pRxPkt = RTPKT_TO_OSPKT(pRxBlk->pRxPacket);
|
||||||
|
@ -1535,12 +1527,9 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet(
|
||||||
//
|
//
|
||||||
if (!RX_BLK_TEST_FLAG(pRxBlk, fRX_AMSDU))
|
if (!RX_BLK_TEST_FLAG(pRxBlk, fRX_AMSDU))
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
|
||||||
#ifdef LINUX
|
#ifdef LINUX
|
||||||
NdisMoveMemory(skb_push(pRxPkt, LENGTH_802_3), Header802_3, LENGTH_802_3);
|
NdisMoveMemory(skb_push(pRxPkt, LENGTH_802_3), Header802_3, LENGTH_802_3);
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -377,12 +377,9 @@ NDIS_STATUS MlmeHardTransmitMgmtRing(
|
||||||
return NDIS_STATUS_FAILURE;
|
return NDIS_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
// outgoing frame always wakeup PHY to prevent frame lost
|
||||||
{
|
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE))
|
||||||
// outgoing frame always wakeup PHY to prevent frame lost
|
AsicForceWakeup(pAd, TRUE);
|
||||||
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE))
|
|
||||||
AsicForceWakeup(pAd, TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
pFirstTxWI = (PTXWI_STRUC)(pSrcBufVA + TXINFO_SIZE);
|
pFirstTxWI = (PTXWI_STRUC)(pSrcBufVA + TXINFO_SIZE);
|
||||||
pHeader_802_11 = (PHEADER_802_11) (pSrcBufVA + TXINFO_SIZE + TXWI_SIZE); //TXWI_SIZE);
|
pHeader_802_11 = (PHEADER_802_11) (pSrcBufVA + TXINFO_SIZE + TXWI_SIZE); //TXWI_SIZE);
|
||||||
|
@ -406,7 +403,6 @@ NDIS_STATUS MlmeHardTransmitMgmtRing(
|
||||||
pMacEntry = MacTableLookup(pAd, pHeader_802_11->Addr1);
|
pMacEntry = MacTableLookup(pAd, pHeader_802_11->Addr1);
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// Fixed W52 with Activity scan issue in ABG_MIXED and ABGN_MIXED mode.
|
// Fixed W52 with Activity scan issue in ABG_MIXED and ABGN_MIXED mode.
|
||||||
if (pAd->CommonCfg.PhyMode == PHY_11ABG_MIXED
|
if (pAd->CommonCfg.PhyMode == PHY_11ABG_MIXED
|
||||||
|
@ -712,17 +708,13 @@ BOOLEAN RTMP_FillTxBlkInfo(
|
||||||
TX_BLK_SET_FLAG(pTxBlk, fTX_bAckRequired);
|
TX_BLK_SET_FLAG(pTxBlk, fTX_bAckRequired);
|
||||||
|
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
// If support WMM, enable it.
|
||||||
{
|
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED) &&
|
||||||
|
CLIENT_STATUS_TEST_FLAG(pMacEntry, fCLIENT_STATUS_WMM_CAPABLE))
|
||||||
|
TX_BLK_SET_FLAG(pTxBlk, fTX_bWMM);
|
||||||
|
|
||||||
// If support WMM, enable it.
|
// if (pAd->StaCfg.bAutoTxRateSwitch)
|
||||||
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED) &&
|
// TX_BLK_SET_FLAG(pTxBlk, fTX_AutoRateSwitch);
|
||||||
CLIENT_STATUS_TEST_FLAG(pMacEntry, fCLIENT_STATUS_WMM_CAPABLE))
|
|
||||||
TX_BLK_SET_FLAG(pTxBlk, fTX_bWMM);
|
|
||||||
|
|
||||||
// if (pAd->StaCfg.bAutoTxRateSwitch)
|
|
||||||
// TX_BLK_SET_FLAG(pTxBlk, fTX_AutoRateSwitch);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pTxBlk->TxFrameType == TX_LEGACY_FRAME)
|
if (pTxBlk->TxFrameType == TX_LEGACY_FRAME)
|
||||||
|
@ -859,7 +851,6 @@ VOID RTMPDeQueuePacket(
|
||||||
{
|
{
|
||||||
sQIdx = 0;
|
sQIdx = 0;
|
||||||
//PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
|
//PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
eQIdx = 3; // 4 ACs, start from 0.
|
eQIdx = 3; // 4 ACs, start from 0.
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -979,9 +970,8 @@ VOID RTMPDeQueuePacket(
|
||||||
|
|
||||||
Count += pTxBlk->TxPacketList.Number;
|
Count += pTxBlk->TxPacketList.Number;
|
||||||
|
|
||||||
// Do HardTransmit now.
|
// Do HardTransmit now.
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
Status = STAHardTransmit(pAd, pTxBlk, QueIdx);
|
||||||
Status = STAHardTransmit(pAd, pTxBlk, QueIdx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RT28XX_STOP_DEQUEUE(pAd, QueIdx, IrqFlags);
|
RT28XX_STOP_DEQUEUE(pAd, QueIdx, IrqFlags);
|
||||||
|
@ -1662,7 +1652,6 @@ UINT deaggregate_AMSDU_announce(
|
||||||
kfree(Elem);
|
kfree(Elem);
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (pRemovedLLCSNAP)
|
if (pRemovedLLCSNAP)
|
||||||
{
|
{
|
||||||
|
@ -1675,8 +1664,7 @@ UINT deaggregate_AMSDU_announce(
|
||||||
pClonePacket = ClonePacket(pAd, pPacket, pPayload, PayloadSize);
|
pClonePacket = ClonePacket(pAd, pPacket, pPayload, PayloadSize);
|
||||||
if (pClonePacket)
|
if (pClonePacket)
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pClonePacket, RTMP_GET_PACKET_IF(pPacket));
|
||||||
ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pClonePacket, RTMP_GET_PACKET_IF(pPacket));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1775,8 +1763,6 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(
|
||||||
|
|
||||||
FirstWcid = 1;
|
FirstWcid = 1;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
|
|
||||||
if (pAd->StaCfg.BssType == BSS_INFRA)
|
if (pAd->StaCfg.BssType == BSS_INFRA)
|
||||||
FirstWcid = 2;
|
FirstWcid = 2;
|
||||||
|
|
||||||
|
@ -1801,7 +1787,6 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(
|
||||||
pEntry->PairwiseKey.CipherAlg = CIPHER_NONE;
|
pEntry->PairwiseKey.CipherAlg = CIPHER_NONE;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
pEntry->ValidAsCLI = TRUE;
|
pEntry->ValidAsCLI = TRUE;
|
||||||
pEntry->ValidAsWDS = FALSE;
|
pEntry->ValidAsWDS = FALSE;
|
||||||
|
@ -1829,7 +1814,6 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(
|
||||||
pEntry->apidx = apidx;
|
pEntry->apidx = apidx;
|
||||||
|
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
pEntry->AuthMode = pAd->StaCfg.AuthMode;
|
pEntry->AuthMode = pAd->StaCfg.AuthMode;
|
||||||
pEntry->WepStatus = pAd->StaCfg.WepStatus;
|
pEntry->WepStatus = pAd->StaCfg.WepStatus;
|
||||||
|
@ -2315,8 +2299,7 @@ VOID Indicate_Legacy_Packet(
|
||||||
// 2. remove LLC
|
// 2. remove LLC
|
||||||
// a. pointer pRxBlk->pData to payload
|
// a. pointer pRxBlk->pData to payload
|
||||||
// b. modify pRxBlk->DataSize
|
// b. modify pRxBlk->DataSize
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
RTMP_802_11_REMOVE_LLC_AND_CONVERT_TO_802_3(pRxBlk, Header802_3);
|
||||||
RTMP_802_11_REMOVE_LLC_AND_CONVERT_TO_802_3(pRxBlk, Header802_3);
|
|
||||||
|
|
||||||
if (pRxBlk->DataSize > MAX_RX_PKT_LEN)
|
if (pRxBlk->DataSize > MAX_RX_PKT_LEN)
|
||||||
{
|
{
|
||||||
|
@ -2365,8 +2348,7 @@ VOID Indicate_Legacy_Packet(
|
||||||
//
|
//
|
||||||
// pass this 802.3 packet to upper layer or forward this packet to WM directly
|
// pass this 802.3 packet to upper layer or forward this packet to WM directly
|
||||||
//
|
//
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pRxPacket, FromWhichBSSID);
|
||||||
ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pRxPacket, FromWhichBSSID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2425,8 +2407,7 @@ VOID CmmRxRalinkFrameIndicate(
|
||||||
}
|
}
|
||||||
|
|
||||||
// get 802.3 Header and remove LLC
|
// get 802.3 Header and remove LLC
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
RTMP_802_11_REMOVE_LLC_AND_CONVERT_TO_802_3(pRxBlk, Header802_3);
|
||||||
RTMP_802_11_REMOVE_LLC_AND_CONVERT_TO_802_3(pRxBlk, Header802_3);
|
|
||||||
|
|
||||||
ASSERT(pRxBlk->pRxPacket);
|
ASSERT(pRxBlk->pRxPacket);
|
||||||
|
|
||||||
|
@ -2437,8 +2418,7 @@ VOID CmmRxRalinkFrameIndicate(
|
||||||
|
|
||||||
pData2 = pRxBlk->pData + Payload1Size + LENGTH_802_3;
|
pData2 = pRxBlk->pData + Payload1Size + LENGTH_802_3;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
pPacket2 = duplicate_pkt(pAd, (pData2-LENGTH_802_3), LENGTH_802_3, pData2, Payload2Size, FromWhichBSSID);
|
||||||
pPacket2 = duplicate_pkt(pAd, (pData2-LENGTH_802_3), LENGTH_802_3, pData2, Payload2Size, FromWhichBSSID);
|
|
||||||
|
|
||||||
if (!pPacket2)
|
if (!pPacket2)
|
||||||
{
|
{
|
||||||
|
@ -2451,13 +2431,11 @@ VOID CmmRxRalinkFrameIndicate(
|
||||||
pRxBlk->DataSize = Payload1Size;
|
pRxBlk->DataSize = Payload1Size;
|
||||||
wlan_802_11_to_802_3_packet(pAd, pRxBlk, Header802_3, FromWhichBSSID);
|
wlan_802_11_to_802_3_packet(pAd, pRxBlk, Header802_3, FromWhichBSSID);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pRxBlk->pRxPacket, FromWhichBSSID);
|
||||||
ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pRxBlk->pRxPacket, FromWhichBSSID);
|
|
||||||
|
|
||||||
if (pPacket2)
|
if (pPacket2)
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pPacket2, FromWhichBSSID);
|
||||||
ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pPacket2, FromWhichBSSID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2600,7 +2578,6 @@ VOID Indicate_EAPOL_Packet(
|
||||||
{
|
{
|
||||||
MAC_TABLE_ENTRY *pEntry = NULL;
|
MAC_TABLE_ENTRY *pEntry = NULL;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
pEntry = &pAd->MacTab.Content[BSSID_WCID];
|
pEntry = &pAd->MacTab.Content[BSSID_WCID];
|
||||||
STARxEAPOLFrameIndicate(pAd, pEntry, pRxBlk, FromWhichBSSID);
|
STARxEAPOLFrameIndicate(pAd, pEntry, pRxBlk, FromWhichBSSID);
|
||||||
|
|
|
@ -293,7 +293,6 @@ USHORT RtmpUSB_WriteSingleTxResource(
|
||||||
|
|
||||||
// For TxInfo, the length of USBDMApktLen = TXWI_SIZE + 802.11 header + payload
|
// For TxInfo, the length of USBDMApktLen = TXWI_SIZE + 802.11 header + payload
|
||||||
//PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
|
//PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
RTMPWriteTxInfo(pAd, pTxInfo, (USHORT)(USBDMApktLen), FALSE, FIFO_EDCA, FALSE /*NextValid*/, FALSE);
|
RTMPWriteTxInfo(pAd, pTxInfo, (USHORT)(USBDMApktLen), FALSE, FIFO_EDCA, FALSE /*NextValid*/, FALSE);
|
||||||
|
|
||||||
if ((pHTTXContext->CurWritePosition + 3906 + pTxBlk->Priv) > MAX_TXBULK_LIMIT)
|
if ((pHTTXContext->CurWritePosition + 3906 + pTxBlk->Priv) > MAX_TXBULK_LIMIT)
|
||||||
|
@ -848,11 +847,8 @@ VOID RT28xxUsbMlmeRadioOn(
|
||||||
if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF))
|
if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
|
||||||
AsicSendCommandToMcu(pAd, 0x31, 0xff, 0x00, 0x02);
|
AsicSendCommandToMcu(pAd, 0x31, 0xff, 0x00, 0x02);
|
||||||
RTMPusecDelay(10000);
|
RTMPusecDelay(10000);
|
||||||
}
|
|
||||||
|
|
||||||
NICResetFromError(pAd);
|
NICResetFromError(pAd);
|
||||||
|
|
||||||
|
@ -869,8 +865,7 @@ VOID RT28xxUsbMlmeRadioOn(
|
||||||
// Clear Radio off flag
|
// Clear Radio off flag
|
||||||
RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF);
|
RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
RTUSBBulkReceive(pAd);
|
||||||
RTUSBBulkReceive(pAd);
|
|
||||||
|
|
||||||
// Set LED
|
// Set LED
|
||||||
RTMPSetLED(pAd, LED_RADIO_ON);
|
RTMPSetLED(pAd, LED_RADIO_ON);
|
||||||
|
@ -892,7 +887,6 @@ VOID RT28xxUsbMlmeRadioOFF(
|
||||||
// Set Radio off flag
|
// Set Radio off flag
|
||||||
RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF);
|
RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// Link down first if any association exists
|
// Link down first if any association exists
|
||||||
if (INFRA_ON(pAd) || ADHOC_ON(pAd))
|
if (INFRA_ON(pAd) || ADHOC_ON(pAd))
|
||||||
|
@ -946,7 +940,6 @@ VOID RT28xxUsbMlmeRadioOFF(
|
||||||
// TX_PIN_CFG => value = 0x0 => 20mA
|
// TX_PIN_CFG => value = 0x0 => 20mA
|
||||||
//RTMP_IO_WRITE32(pAd, TX_PIN_CFG, 0);
|
//RTMP_IO_WRITE32(pAd, TX_PIN_CFG, 0);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
AsicSendCommandToMcu(pAd, 0x30, 0xff, 0xff, 0x02);
|
||||||
AsicSendCommandToMcu(pAd, 0x30, 0xff, 0xff, 0x02);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -225,8 +225,7 @@ INT Set_DriverVersion_Proc(
|
||||||
IN PRTMP_ADAPTER pAd,
|
IN PRTMP_ADAPTER pAd,
|
||||||
IN PUCHAR arg)
|
IN PUCHAR arg)
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
DBGPRINT(RT_DEBUG_TRACE, ("Driver version-%s\n", STA_DRIVER_VERSION));
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("Driver version-%s\n", STA_DRIVER_VERSION));
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -336,7 +335,6 @@ INT Set_WirelessMode_Proc(
|
||||||
|
|
||||||
WirelessMode = simple_strtol(arg, 0, 10);
|
WirelessMode = simple_strtol(arg, 0, 10);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
INT MaxPhyMode = PHY_11G;
|
INT MaxPhyMode = PHY_11G;
|
||||||
|
|
||||||
|
@ -405,7 +403,6 @@ INT Set_Channel_Proc(
|
||||||
// check if this channel is valid
|
// check if this channel is valid
|
||||||
if (ChannelSanity(pAd, Channel) == TRUE)
|
if (ChannelSanity(pAd, Channel) == TRUE)
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
pAd->CommonCfg.Channel = Channel;
|
pAd->CommonCfg.Channel = Channel;
|
||||||
|
|
||||||
|
@ -433,8 +430,7 @@ INT Set_Channel_Proc(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
success = FALSE;
|
||||||
success = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -490,7 +486,6 @@ INT Set_TxPower_Proc(
|
||||||
TxPower = (ULONG) simple_strtol(arg, 0, 10);
|
TxPower = (ULONG) simple_strtol(arg, 0, 10);
|
||||||
if (TxPower <= 100)
|
if (TxPower <= 100)
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
pAd->CommonCfg.TxPowerDefault = TxPower;
|
pAd->CommonCfg.TxPowerDefault = TxPower;
|
||||||
pAd->CommonCfg.TxPowerPercentage = pAd->CommonCfg.TxPowerDefault;
|
pAd->CommonCfg.TxPowerPercentage = pAd->CommonCfg.TxPowerDefault;
|
||||||
|
@ -560,8 +555,7 @@ INT Set_TxPreamble_Proc(
|
||||||
case Rt802_11PreambleShort:
|
case Rt802_11PreambleShort:
|
||||||
pAd->CommonCfg.TxPreamble = Preamble;
|
pAd->CommonCfg.TxPreamble = Preamble;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
MlmeSetTxPreamble(pAd, Rt802_11PreambleShort);
|
||||||
MlmeSetTxPreamble(pAd, Rt802_11PreambleShort);
|
|
||||||
break;
|
break;
|
||||||
case Rt802_11PreambleLong:
|
case Rt802_11PreambleLong:
|
||||||
case Rt802_11PreambleAuto:
|
case Rt802_11PreambleAuto:
|
||||||
|
@ -569,8 +563,7 @@ INT Set_TxPreamble_Proc(
|
||||||
// capability upon association.
|
// capability upon association.
|
||||||
pAd->CommonCfg.TxPreamble = Preamble;
|
pAd->CommonCfg.TxPreamble = Preamble;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
MlmeSetTxPreamble(pAd, Rt802_11PreambleLong);
|
||||||
MlmeSetTxPreamble(pAd, Rt802_11PreambleLong);
|
|
||||||
break;
|
break;
|
||||||
default: //Invalid argument
|
default: //Invalid argument
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -641,7 +634,6 @@ INT Set_FragThreshold_Proc(
|
||||||
pAd->CommonCfg.FragmentThreshold = (USHORT)FragThresh;
|
pAd->CommonCfg.FragmentThreshold = (USHORT)FragThresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (pAd->CommonCfg.FragmentThreshold == MAX_FRAG_THRESHOLD)
|
if (pAd->CommonCfg.FragmentThreshold == MAX_FRAG_THRESHOLD)
|
||||||
pAd->CommonCfg.bUseZeroToDisableFragment = TRUE;
|
pAd->CommonCfg.bUseZeroToDisableFragment = TRUE;
|
||||||
|
@ -1141,8 +1133,7 @@ VOID RTMPSetPhyMode(
|
||||||
|
|
||||||
if (i == pAd->ChannelListNum)
|
if (i == pAd->ChannelListNum)
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
pAd->CommonCfg.Channel = FirstChannel(pAd);
|
||||||
pAd->CommonCfg.Channel = FirstChannel(pAd);
|
|
||||||
DBGPRINT(RT_DEBUG_ERROR, ("RTMPSetPhyMode: channel is out of range, use first channel=%d \n", pAd->CommonCfg.Channel));
|
DBGPRINT(RT_DEBUG_ERROR, ("RTMPSetPhyMode: channel is out of range, use first channel=%d \n", pAd->CommonCfg.Channel));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1446,10 +1437,7 @@ VOID RTMPSetHT(
|
||||||
}
|
}
|
||||||
AsicSetEdcaParm(pAd, &pAd->CommonCfg.APEdcaParm);
|
AsicSetEdcaParm(pAd, &pAd->CommonCfg.APEdcaParm);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
RTMPSetIndividualHT(pAd, 0);
|
||||||
{
|
|
||||||
RTMPSetIndividualHT(pAd, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1474,7 +1462,6 @@ VOID RTMPSetIndividualHT(
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
pDesired_ht_phy = &pAd->StaCfg.DesiredHtPhyInfo;
|
pDesired_ht_phy = &pAd->StaCfg.DesiredHtPhyInfo;
|
||||||
DesiredMcs = pAd->StaCfg.DesiredTransmitSetting.field.MCS;
|
DesiredMcs = pAd->StaCfg.DesiredTransmitSetting.field.MCS;
|
||||||
|
@ -1631,7 +1618,6 @@ VOID RTMPAddWcidAttributeEntry(
|
||||||
USHORT Wcid = 0;
|
USHORT Wcid = 0;
|
||||||
|
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (BssIdx > BSS0)
|
if (BssIdx > BSS0)
|
||||||
{
|
{
|
||||||
|
@ -1656,7 +1642,6 @@ VOID RTMPAddWcidAttributeEntry(
|
||||||
// Update WCID attribute table
|
// Update WCID attribute table
|
||||||
offset = MAC_WCID_ATTRIBUTE_BASE + (Wcid * HW_WCID_ATTRI_SIZE);
|
offset = MAC_WCID_ATTRIBUTE_BASE + (Wcid * HW_WCID_ATTRI_SIZE);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (pEntry && pEntry->ValidAsMesh)
|
if (pEntry && pEntry->ValidAsMesh)
|
||||||
WCIDAttri = (CipherAlg<<1) | PAIRWISEKEYTABLE;
|
WCIDAttri = (CipherAlg<<1) | PAIRWISEKEYTABLE;
|
||||||
|
@ -2169,7 +2154,6 @@ INT Set_HtMcs_Proc(
|
||||||
else
|
else
|
||||||
HtMcs = MCS_AUTO;
|
HtMcs = MCS_AUTO;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
pAd->StaCfg.DesiredTransmitSetting.field.MCS = HtMcs;
|
pAd->StaCfg.DesiredTransmitSetting.field.MCS = HtMcs;
|
||||||
pAd->StaCfg.bAutoTxRateSwitch = (HtMcs == MCS_AUTO) ? TRUE:FALSE;
|
pAd->StaCfg.bAutoTxRateSwitch = (HtMcs == MCS_AUTO) ? TRUE:FALSE;
|
||||||
|
@ -2680,8 +2664,7 @@ INT Set_FixedTxMode_Proc(
|
||||||
fix_tx_mode = FIXED_TXMODE_CCK;
|
fix_tx_mode = FIXED_TXMODE_CCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
pAd->StaCfg.DesiredTransmitSetting.field.FixedTxMode = fix_tx_mode;
|
||||||
pAd->StaCfg.DesiredTransmitSetting.field.FixedTxMode = fix_tx_mode;
|
|
||||||
|
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("Set_FixedTxMode_Proc::(FixedTxMode=%d)\n", fix_tx_mode));
|
DBGPRINT(RT_DEBUG_TRACE, ("Set_FixedTxMode_Proc::(FixedTxMode=%d)\n", fix_tx_mode));
|
||||||
|
|
||||||
|
@ -2764,8 +2747,7 @@ INT Show_SSID_Proc(
|
||||||
IN PRTMP_ADAPTER pAd,
|
IN PRTMP_ADAPTER pAd,
|
||||||
OUT PUCHAR pBuf)
|
OUT PUCHAR pBuf)
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
sprintf(pBuf, "\t%s", pAd->CommonCfg.Ssid);
|
||||||
sprintf(pBuf, "\t%s", pAd->CommonCfg.Ssid);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2923,8 +2905,7 @@ INT Show_HtMcs_Proc(
|
||||||
IN PRTMP_ADAPTER pAd,
|
IN PRTMP_ADAPTER pAd,
|
||||||
OUT PUCHAR pBuf)
|
OUT PUCHAR pBuf)
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
sprintf(pBuf, "\t%u", pAd->StaCfg.DesiredTransmitSetting.field.MCS);
|
||||||
sprintf(pBuf, "\t%u", pAd->StaCfg.DesiredTransmitSetting.field.MCS);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3065,8 +3046,7 @@ INT Show_WmmCapable_Proc(
|
||||||
IN PRTMP_ADAPTER pAd,
|
IN PRTMP_ADAPTER pAd,
|
||||||
OUT PUCHAR pBuf)
|
OUT PUCHAR pBuf)
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
sprintf(pBuf, "\t%s", pAd->CommonCfg.bWmmCapable ? "TRUE":"FALSE");
|
||||||
sprintf(pBuf, "\t%s", pAd->CommonCfg.bWmmCapable ? "TRUE":"FALSE");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -3111,8 +3091,7 @@ INT Show_AuthMode_Proc(
|
||||||
{
|
{
|
||||||
NDIS_802_11_AUTHENTICATION_MODE AuthMode = Ndis802_11AuthModeOpen;
|
NDIS_802_11_AUTHENTICATION_MODE AuthMode = Ndis802_11AuthModeOpen;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
AuthMode = pAd->StaCfg.AuthMode;
|
||||||
AuthMode = pAd->StaCfg.AuthMode;
|
|
||||||
|
|
||||||
if ((AuthMode >= Ndis802_11AuthModeOpen) &&
|
if ((AuthMode >= Ndis802_11AuthModeOpen) &&
|
||||||
(AuthMode <= Ndis802_11AuthModeWPA1PSKWPA2PSK))
|
(AuthMode <= Ndis802_11AuthModeWPA1PSKWPA2PSK))
|
||||||
|
@ -3129,8 +3108,7 @@ INT Show_EncrypType_Proc(
|
||||||
{
|
{
|
||||||
NDIS_802_11_WEP_STATUS WepStatus = Ndis802_11WEPDisabled;
|
NDIS_802_11_WEP_STATUS WepStatus = Ndis802_11WEPDisabled;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
WepStatus = pAd->StaCfg.WepStatus;
|
||||||
WepStatus = pAd->StaCfg.WepStatus;
|
|
||||||
|
|
||||||
if ((WepStatus >= Ndis802_11WEPEnabled) &&
|
if ((WepStatus >= Ndis802_11WEPEnabled) &&
|
||||||
(WepStatus <= Ndis802_11Encryption4KeyAbsent))
|
(WepStatus <= Ndis802_11Encryption4KeyAbsent))
|
||||||
|
@ -3147,8 +3125,7 @@ INT Show_DefaultKeyID_Proc(
|
||||||
{
|
{
|
||||||
UCHAR DefaultKeyId = 0;
|
UCHAR DefaultKeyId = 0;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
DefaultKeyId = pAd->StaCfg.DefaultKeyId;
|
||||||
DefaultKeyId = pAd->StaCfg.DefaultKeyId;
|
|
||||||
|
|
||||||
sprintf(pBuf, "\t%d", DefaultKeyId);
|
sprintf(pBuf, "\t%d", DefaultKeyId);
|
||||||
|
|
||||||
|
@ -3218,8 +3195,7 @@ INT Show_WPAPSK_Proc(
|
||||||
INT idx;
|
INT idx;
|
||||||
UCHAR PMK[32] = {0};
|
UCHAR PMK[32] = {0};
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
NdisMoveMemory(PMK, pAd->StaCfg.PMK, 32);
|
||||||
NdisMoveMemory(PMK, pAd->StaCfg.PMK, 32);
|
|
||||||
|
|
||||||
sprintf(pBuf, "\tPMK = ");
|
sprintf(pBuf, "\tPMK = ");
|
||||||
for (idx = 0; idx < 32; idx++)
|
for (idx = 0; idx < 32; idx++)
|
||||||
|
|
|
@ -433,7 +433,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
|
||||||
*(USHORT *)(&pHtCapability->HtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->HtCapInfo));
|
*(USHORT *)(&pHtCapability->HtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->HtCapInfo));
|
||||||
*(USHORT *)(&pHtCapability->ExtHtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->ExtHtCapInfo));
|
*(USHORT *)(&pHtCapability->ExtHtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->ExtHtCapInfo));
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
*pPreNHtCapabilityLen = 0; // Nnow we only support 26 bytes.
|
*pPreNHtCapabilityLen = 0; // Nnow we only support 26 bytes.
|
||||||
|
|
||||||
|
@ -461,7 +460,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
|
||||||
*(USHORT *)(&AddHtInfo->AddHtInfo2) = cpu2le16(*(USHORT *)(&AddHtInfo->AddHtInfo2));
|
*(USHORT *)(&AddHtInfo->AddHtInfo2) = cpu2le16(*(USHORT *)(&AddHtInfo->AddHtInfo2));
|
||||||
*(USHORT *)(&AddHtInfo->AddHtInfo3) = cpu2le16(*(USHORT *)(&AddHtInfo->AddHtInfo3));
|
*(USHORT *)(&AddHtInfo->AddHtInfo3) = cpu2le16(*(USHORT *)(&AddHtInfo->AddHtInfo3));
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
Ptr = (PUCHAR) pVIE;
|
Ptr = (PUCHAR) pVIE;
|
||||||
NdisMoveMemory(Ptr + *LengthVIE, &pEid->Eid, pEid->Len + 2);
|
NdisMoveMemory(Ptr + *LengthVIE, &pEid->Eid, pEid->Len + 2);
|
||||||
|
@ -494,7 +492,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
|
||||||
{
|
{
|
||||||
*pChannel = *pEid->Octet;
|
*pChannel = *pEid->Octet;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (ChannelSanity(pAd, *pChannel) == 0)
|
if (ChannelSanity(pAd, *pChannel) == 0)
|
||||||
{
|
{
|
||||||
|
@ -742,7 +739,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
|
||||||
}
|
}
|
||||||
|
|
||||||
// For some 11a AP. it did not have the channel EID, patch here
|
// For some 11a AP. it did not have the channel EID, patch here
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
UCHAR LatchRfChannel = MsgChannel;
|
UCHAR LatchRfChannel = MsgChannel;
|
||||||
if ((pAd->LatchRfRegs.Channel > 14) && ((Sanity & 0x4) == 0))
|
if ((pAd->LatchRfRegs.Channel > 14) && ((Sanity & 0x4) == 0))
|
||||||
|
|
|
@ -383,11 +383,8 @@ VOID ScanNextChannel(
|
||||||
PHEADER_802_11 pHdr80211;
|
PHEADER_802_11 pHdr80211;
|
||||||
UINT ScanTimeIn5gChannel = SHORT_CHANNEL_TIME;
|
UINT ScanTimeIn5gChannel = SHORT_CHANNEL_TIME;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
if (MONITOR_ON(pAd))
|
||||||
{
|
return;
|
||||||
if (MONITOR_ON(pAd))
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pAd->MlmeAux.Channel == 0)
|
if (pAd->MlmeAux.Channel == 0)
|
||||||
{
|
{
|
||||||
|
@ -411,7 +408,6 @@ VOID ScanNextChannel(
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("SYNC - End of SCAN, restore to channel %d, Total BSS[%02d]\n",pAd->CommonCfg.Channel, pAd->ScanTab.BssNr));
|
DBGPRINT(RT_DEBUG_TRACE, ("SYNC - End of SCAN, restore to channel %d, Total BSS[%02d]\n",pAd->CommonCfg.Channel, pAd->ScanTab.BssNr));
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// To prevent data lost.
|
// To prevent data lost.
|
||||||
|
@ -453,7 +449,6 @@ VOID ScanNextChannel(
|
||||||
#endif // RT2870 //
|
#endif // RT2870 //
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// BBP and RF are not accessible in PS mode, we has to wake them up first
|
// BBP and RF are not accessible in PS mode, we has to wake them up first
|
||||||
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE))
|
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE))
|
||||||
|
@ -467,7 +462,6 @@ VOID ScanNextChannel(
|
||||||
AsicSwitchChannel(pAd, pAd->MlmeAux.Channel, TRUE);
|
AsicSwitchChannel(pAd, pAd->MlmeAux.Channel, TRUE);
|
||||||
AsicLockChannel(pAd, pAd->MlmeAux.Channel);
|
AsicLockChannel(pAd, pAd->MlmeAux.Channel);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (pAd->MlmeAux.Channel > 14)
|
if (pAd->MlmeAux.Channel > 14)
|
||||||
{
|
{
|
||||||
|
@ -522,7 +516,6 @@ VOID ScanNextChannel(
|
||||||
{
|
{
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("SYNC - ScanNextChannel() allocate memory fail\n"));
|
DBGPRINT(RT_DEBUG_TRACE, ("SYNC - ScanNextChannel() allocate memory fail\n"));
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE;
|
pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE;
|
||||||
Status = MLME_FAIL_NO_RESOURCE;
|
Status = MLME_FAIL_NO_RESOURCE;
|
||||||
|
@ -597,8 +590,7 @@ VOID ScanNextChannel(
|
||||||
|
|
||||||
// For SCAN_CISCO_PASSIVE, do nothing and silently wait for beacon or other probe reponse
|
// For SCAN_CISCO_PASSIVE, do nothing and silently wait for beacon or other probe reponse
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
pAd->Mlme.SyncMachine.CurrState = SCAN_LISTEN;
|
||||||
pAd->Mlme.SyncMachine.CurrState = SCAN_LISTEN;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -589,7 +589,6 @@ VOID RTMPMakeRSNIE(
|
||||||
rsnielen_ex_cur_p = NULL;
|
rsnielen_ex_cur_p = NULL;
|
||||||
|
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (pAd->StaCfg.WpaSupplicantUP != WPA_SUPPLICANT_DISABLE)
|
if (pAd->StaCfg.WpaSupplicantUP != WPA_SUPPLICANT_DISABLE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -487,7 +487,6 @@ NDIS_STATUS MlmeInit(
|
||||||
pAd->Mlme.bRunning = FALSE;
|
pAd->Mlme.bRunning = FALSE;
|
||||||
NdisAllocateSpinLock(&pAd->Mlme.TaskLock);
|
NdisAllocateSpinLock(&pAd->Mlme.TaskLock);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
BssTableInit(&pAd->ScanTab);
|
BssTableInit(&pAd->ScanTab);
|
||||||
|
|
||||||
|
@ -660,7 +659,6 @@ VOID MlmeHalt(
|
||||||
AsicDisableSync(pAd);
|
AsicDisableSync(pAd);
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// Cancel pending timers
|
// Cancel pending timers
|
||||||
RTMPCancelTimer(&pAd->MlmeAux.AssocTimer, &Cancelled);
|
RTMPCancelTimer(&pAd->MlmeAux.AssocTimer, &Cancelled);
|
||||||
|
@ -782,7 +780,6 @@ VOID MlmePeriodicExec(
|
||||||
|
|
||||||
RT28XX_MLME_PRE_SANITY_CHECK(pAd);
|
RT28XX_MLME_PRE_SANITY_CHECK(pAd);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// Do nothing if monitor mode is on
|
// Do nothing if monitor mode is on
|
||||||
if (MONITOR_ON(pAd))
|
if (MONITOR_ON(pAd))
|
||||||
|
@ -821,7 +818,6 @@ VOID MlmePeriodicExec(
|
||||||
if ((pAd->Mlme.PeriodicRound % 5 == 0) && RTMPAutoRateSwitchCheck(pAd)/*(OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED))*/)
|
if ((pAd->Mlme.PeriodicRound % 5 == 0) && RTMPAutoRateSwitchCheck(pAd)/*(OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED))*/)
|
||||||
{
|
{
|
||||||
// perform dynamic tx rate switching based on past TX history
|
// perform dynamic tx rate switching based on past TX history
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if ((OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)
|
if ((OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)
|
||||||
)
|
)
|
||||||
|
@ -901,12 +897,10 @@ VOID MlmePeriodicExec(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
STAMlmePeriodicExec(pAd);
|
||||||
STAMlmePeriodicExec(pAd);
|
|
||||||
|
|
||||||
MlmeResetRalinkCounters(pAd);
|
MlmeResetRalinkCounters(pAd);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
// When Adhoc beacon is enabled and RTS/CTS is enabled, there is a chance that hardware MAC FSM will run into a deadlock
|
// When Adhoc beacon is enabled and RTS/CTS is enabled, there is a chance that hardware MAC FSM will run into a deadlock
|
||||||
|
@ -1413,7 +1407,6 @@ VOID MlmeSelectTxRateTable(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
//else if ((pAd->StaActive.SupportedPhyInfo.MCSSet[0] == 0) && (pAd->StaActive.SupportedPhyInfo.MCSSet[1] == 0))
|
//else if ((pAd->StaActive.SupportedPhyInfo.MCSSet[0] == 0) && (pAd->StaActive.SupportedPhyInfo.MCSSet[1] == 0))
|
||||||
if ((pEntry->HTCapability.MCSSet[0] == 0) && (pEntry->HTCapability.MCSSet[1] == 0))
|
if ((pEntry->HTCapability.MCSSet[0] == 0) && (pEntry->HTCapability.MCSSet[1] == 0))
|
||||||
|
@ -2735,7 +2728,6 @@ VOID MlmeUpdateTxRates(
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
pHtPhy = &pAd->StaCfg.HTPhyMode;
|
pHtPhy = &pAd->StaCfg.HTPhyMode;
|
||||||
pMaxHtPhy = &pAd->StaCfg.MaxHTPhyMode;
|
pMaxHtPhy = &pAd->StaCfg.MaxHTPhyMode;
|
||||||
|
@ -2880,8 +2872,7 @@ VOID MlmeUpdateTxRates(
|
||||||
{
|
{
|
||||||
short dbm = 0;
|
short dbm = 0;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
dbm = pAd->StaCfg.RssiSample.AvgRssi0 - pAd->BbpRssiToDbmDelta;
|
||||||
dbm = pAd->StaCfg.RssiSample.AvgRssi0 - pAd->BbpRssiToDbmDelta;
|
|
||||||
|
|
||||||
if (bLinkUp == TRUE)
|
if (bLinkUp == TRUE)
|
||||||
pAd->CommonCfg.TxRate = RATE_24;
|
pAd->CommonCfg.TxRate = RATE_24;
|
||||||
|
@ -3039,7 +3030,6 @@ VOID MlmeUpdateHtTxRates(
|
||||||
|
|
||||||
auto_rate_cur_p = NULL;
|
auto_rate_cur_p = NULL;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
pDesireHtPhy = &pAd->StaCfg.DesiredHtPhyInfo;
|
pDesireHtPhy = &pAd->StaCfg.DesiredHtPhyInfo;
|
||||||
pActiveHtPhy = &pAd->StaCfg.DesiredHtPhyInfo;
|
pActiveHtPhy = &pAd->StaCfg.DesiredHtPhyInfo;
|
||||||
|
@ -3513,7 +3503,6 @@ VOID BssEntrySet(
|
||||||
else
|
else
|
||||||
pBss->QbssLoad.bValid = FALSE;
|
pBss->QbssLoad.bValid = FALSE;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
PEID_STRUCT pEid;
|
PEID_STRUCT pEid;
|
||||||
USHORT Length = 0;
|
USHORT Length = 0;
|
||||||
|
@ -4305,8 +4294,7 @@ VOID MgtMacHeaderInit(
|
||||||
pHdr80211->FC.ToDs = ToDs;
|
pHdr80211->FC.ToDs = ToDs;
|
||||||
COPY_MAC_ADDR(pHdr80211->Addr1, pDA);
|
COPY_MAC_ADDR(pHdr80211->Addr1, pDA);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
COPY_MAC_ADDR(pHdr80211->Addr2, pAd->CurrentAddress);
|
||||||
COPY_MAC_ADDR(pHdr80211->Addr2, pAd->CurrentAddress);
|
|
||||||
|
|
||||||
COPY_MAC_ADDR(pHdr80211->Addr3, pBssid);
|
COPY_MAC_ADDR(pHdr80211->Addr3, pBssid);
|
||||||
}
|
}
|
||||||
|
@ -4514,7 +4502,6 @@ BOOLEAN MlmeEnqueueForRecv(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (!MsgTypeSubst(pAd, pFrame, &Machine, &MsgType))
|
if (!MsgTypeSubst(pAd, pFrame, &Machine, &MsgType))
|
||||||
{
|
{
|
||||||
|
@ -4593,7 +4580,6 @@ VOID MlmeRestartStateMachine(
|
||||||
|
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("MlmeRestartStateMachine \n"));
|
DBGPRINT(RT_DEBUG_TRACE, ("MlmeRestartStateMachine \n"));
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// Cancel all timer events
|
// Cancel all timer events
|
||||||
// Be careful to cancel new added timer
|
// Be careful to cancel new added timer
|
||||||
|
@ -4612,7 +4598,6 @@ VOID MlmeRestartStateMachine(
|
||||||
// Resume MSDU which is turned off durning scan
|
// Resume MSDU which is turned off durning scan
|
||||||
RTMPResumeMsduTransmission(pAd);
|
RTMPResumeMsduTransmission(pAd);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// Set all state machines back IDLE
|
// Set all state machines back IDLE
|
||||||
pAd->Mlme.CntlMachine.CurrState = CNTL_IDLE;
|
pAd->Mlme.CntlMachine.CurrState = CNTL_IDLE;
|
||||||
|
@ -6557,7 +6542,6 @@ VOID AsicEnableBssSync(
|
||||||
RTMP_IO_READ32(pAd, BCN_TIME_CFG, &csr.word);
|
RTMP_IO_READ32(pAd, BCN_TIME_CFG, &csr.word);
|
||||||
// RTMP_IO_WRITE32(pAd, BCN_TIME_CFG, 0x00000000);
|
// RTMP_IO_WRITE32(pAd, BCN_TIME_CFG, 0x00000000);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
csr.field.BeaconInterval = pAd->CommonCfg.BeaconPeriod << 4; // ASIC register in units of 1/16 TU
|
csr.field.BeaconInterval = pAd->CommonCfg.BeaconPeriod << 4; // ASIC register in units of 1/16 TU
|
||||||
csr.field.bTsfTicking = 1;
|
csr.field.bTsfTicking = 1;
|
||||||
|
@ -6776,7 +6760,6 @@ VOID AsicSetEdcaParm(
|
||||||
Ac2Cfg.field.Cwmax = pEdcaParm->Cwmax[QID_AC_VI];
|
Ac2Cfg.field.Cwmax = pEdcaParm->Cwmax[QID_AC_VI];
|
||||||
Ac2Cfg.field.Aifsn = pEdcaParm->Aifsn[QID_AC_VI];
|
Ac2Cfg.field.Aifsn = pEdcaParm->Aifsn[QID_AC_VI];
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// Tuning for Wi-Fi WMM S06
|
// Tuning for Wi-Fi WMM S06
|
||||||
if (pAd->CommonCfg.bWiFiTest &&
|
if (pAd->CommonCfg.bWiFiTest &&
|
||||||
|
@ -6842,8 +6825,7 @@ VOID AsicSetEdcaParm(
|
||||||
CwminCsr.field.Cwmin1 = pEdcaParm->Cwmin[QID_AC_BK];
|
CwminCsr.field.Cwmin1 = pEdcaParm->Cwmin[QID_AC_BK];
|
||||||
CwminCsr.field.Cwmin2 = pEdcaParm->Cwmin[QID_AC_VI];
|
CwminCsr.field.Cwmin2 = pEdcaParm->Cwmin[QID_AC_VI];
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
CwminCsr.field.Cwmin3 = pEdcaParm->Cwmin[QID_AC_VO] - 1; //for TGn wifi test
|
||||||
CwminCsr.field.Cwmin3 = pEdcaParm->Cwmin[QID_AC_VO] - 1; //for TGn wifi test
|
|
||||||
|
|
||||||
RTMP_IO_WRITE32(pAd, WMM_CWMIN_CFG, CwminCsr.word);
|
RTMP_IO_WRITE32(pAd, WMM_CWMIN_CFG, CwminCsr.word);
|
||||||
|
|
||||||
|
@ -6859,7 +6841,6 @@ VOID AsicSetEdcaParm(
|
||||||
AifsnCsr.field.Aifsn1 = Ac1Cfg.field.Aifsn; //pEdcaParm->Aifsn[QID_AC_BK];
|
AifsnCsr.field.Aifsn1 = Ac1Cfg.field.Aifsn; //pEdcaParm->Aifsn[QID_AC_BK];
|
||||||
AifsnCsr.field.Aifsn2 = Ac2Cfg.field.Aifsn; //pEdcaParm->Aifsn[QID_AC_VI];
|
AifsnCsr.field.Aifsn2 = Ac2Cfg.field.Aifsn; //pEdcaParm->Aifsn[QID_AC_VI];
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// Tuning for Wi-Fi WMM S06
|
// Tuning for Wi-Fi WMM S06
|
||||||
if (pAd->CommonCfg.bWiFiTest &&
|
if (pAd->CommonCfg.bWiFiTest &&
|
||||||
|
@ -6879,14 +6860,10 @@ VOID AsicSetEdcaParm(
|
||||||
CLIENT_STATUS_SET_FLAG(&pAd->MacTab.Content[BSSID_WCID], fCLIENT_STATUS_WMM_CAPABLE);
|
CLIENT_STATUS_SET_FLAG(&pAd->MacTab.Content[BSSID_WCID], fCLIENT_STATUS_WMM_CAPABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
AifsnCsr.field.Aifsn3 = Ac3Cfg.field.Aifsn - 1; //pEdcaParm->Aifsn[QID_AC_VO]; //for TGn wifi test
|
||||||
AifsnCsr.field.Aifsn3 = Ac3Cfg.field.Aifsn - 1; //pEdcaParm->Aifsn[QID_AC_VO]; //for TGn wifi test
|
|
||||||
#ifdef RT30xx
|
#ifdef RT30xx
|
||||||
if (pAd->RfIcType == RFIC_3020 || pAd->RfIcType == RFIC_2020)
|
if (pAd->RfIcType == RFIC_3020 || pAd->RfIcType == RFIC_2020)
|
||||||
{
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
AifsnCsr.field.Aifsn2 = 0x2; //pEdcaParm->Aifsn[QID_AC_VI]; //for WiFi WMM S4-T04.
|
AifsnCsr.field.Aifsn2 = 0x2; //pEdcaParm->Aifsn[QID_AC_VI]; //for WiFi WMM S4-T04.
|
||||||
}
|
|
||||||
#endif // RT30xx //
|
#endif // RT30xx //
|
||||||
|
|
||||||
RTMP_IO_WRITE32(pAd, WMM_AIFSN_CFG, AifsnCsr.word);
|
RTMP_IO_WRITE32(pAd, WMM_AIFSN_CFG, AifsnCsr.word);
|
||||||
|
@ -6949,7 +6926,6 @@ VOID AsicSetSlotTime(
|
||||||
|
|
||||||
SlotTime = (bUseShortSlotTime)? 9 : 20;
|
SlotTime = (bUseShortSlotTime)? 9 : 20;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// force using short SLOT time for FAE to demo performance when TxBurst is ON
|
// force using short SLOT time for FAE to demo performance when TxBurst is ON
|
||||||
if (pAd->CommonCfg.bEnableTxBurst)
|
if (pAd->CommonCfg.bEnableTxBurst)
|
||||||
|
@ -6961,11 +6937,8 @@ VOID AsicSetSlotTime(
|
||||||
//
|
//
|
||||||
// ToDo: Should consider capability with 11B
|
// ToDo: Should consider capability with 11B
|
||||||
//
|
//
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
if (pAd->StaCfg.BssType == BSS_ADHOC)
|
||||||
{
|
SlotTime = 20;
|
||||||
if (pAd->StaCfg.BssType == BSS_ADHOC)
|
|
||||||
SlotTime = 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
RTMP_IO_READ32(pAd, BKOFF_SLOT_CFG, &RegValue);
|
RTMP_IO_READ32(pAd, BKOFF_SLOT_CFG, &RegValue);
|
||||||
RegValue = RegValue & 0xFFFFFF00;
|
RegValue = RegValue & 0xFFFFFF00;
|
||||||
|
@ -7875,7 +7848,6 @@ VOID AsicEvaluateRxAnt(
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
//if (pAd->StaCfg.Psm == PWR_SAVE)
|
//if (pAd->StaCfg.Psm == PWR_SAVE)
|
||||||
// return;
|
// return;
|
||||||
|
@ -7979,7 +7951,6 @@ VOID AsicRxAntEvalTimeout(
|
||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
//if (pAd->StaCfg.Psm == PWR_SAVE)
|
//if (pAd->StaCfg.Psm == PWR_SAVE)
|
||||||
// return;
|
// return;
|
||||||
|
@ -8145,7 +8116,6 @@ BOOLEAN RTMPCheckEntryEnableAutoRateSwitch(
|
||||||
{
|
{
|
||||||
BOOLEAN result = TRUE;
|
BOOLEAN result = TRUE;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// only associated STA counts
|
// only associated STA counts
|
||||||
if (pEntry && (pEntry->ValidAsCLI) && (pEntry->Sst == SST_ASSOC))
|
if (pEntry && (pEntry->ValidAsCLI) && (pEntry->Sst == SST_ASSOC))
|
||||||
|
@ -8163,11 +8133,8 @@ BOOLEAN RTMPCheckEntryEnableAutoRateSwitch(
|
||||||
BOOLEAN RTMPAutoRateSwitchCheck(
|
BOOLEAN RTMPAutoRateSwitchCheck(
|
||||||
IN PRTMP_ADAPTER pAd)
|
IN PRTMP_ADAPTER pAd)
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
if (pAd->StaCfg.bAutoTxRateSwitch)
|
||||||
{
|
return TRUE;
|
||||||
if (pAd->StaCfg.bAutoTxRateSwitch)
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -8194,7 +8161,6 @@ UCHAR RTMPStaFixedTxMode(
|
||||||
{
|
{
|
||||||
UCHAR tx_mode = FIXED_TXMODE_HT;
|
UCHAR tx_mode = FIXED_TXMODE_HT;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
tx_mode = (UCHAR)pAd->StaCfg.DesiredTransmitSetting.field.FixedTxMode;
|
tx_mode = (UCHAR)pAd->StaCfg.DesiredTransmitSetting.field.FixedTxMode;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1548,7 +1548,6 @@ VOID NICReadEEPROMParameters(
|
||||||
|
|
||||||
NicConfig2.word = pAd->EEPROMDefaultValue[1];
|
NicConfig2.word = pAd->EEPROMDefaultValue[1];
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if ((NicConfig2.word & 0x00ff) == 0xff)
|
if ((NicConfig2.word & 0x00ff) == 0xff)
|
||||||
{
|
{
|
||||||
|
@ -1810,7 +1809,6 @@ VOID NICInitAsicFromEEPROM(
|
||||||
|
|
||||||
NicConfig2.word = pAd->EEPROMDefaultValue[1];
|
NicConfig2.word = pAd->EEPROMDefaultValue[1];
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if ((NicConfig2.word & 0x00ff) == 0xff)
|
if ((NicConfig2.word & 0x00ff) == 0xff)
|
||||||
{
|
{
|
||||||
|
@ -1850,7 +1848,6 @@ VOID NICInitAsicFromEEPROM(
|
||||||
pAd->LedIndicatorStregth = 0xFF;
|
pAd->LedIndicatorStregth = 0xFF;
|
||||||
RTMPSetSignalLED(pAd, -100); // Force signal strength Led to be turned off, before link up
|
RTMPSetSignalLED(pAd, -100); // Force signal strength Led to be turned off, before link up
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// Read Hardware controlled Radio state enable bit
|
// Read Hardware controlled Radio state enable bit
|
||||||
if (NicConfig2.field.HardwareRadioControl == 1)
|
if (NicConfig2.field.HardwareRadioControl == 1)
|
||||||
|
@ -1912,7 +1909,6 @@ VOID NICInitAsicFromEEPROM(
|
||||||
}
|
}
|
||||||
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3);
|
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// Handle the difference when 1T
|
// Handle the difference when 1T
|
||||||
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R1, &BBPR1);
|
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R1, &BBPR1);
|
||||||
|
@ -2116,7 +2112,6 @@ NDIS_STATUS NICInitializeAsic(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
for (Index = 0; Index < NUM_STA_MAC_REG_PARMS; Index++)
|
for (Index = 0; Index < NUM_STA_MAC_REG_PARMS; Index++)
|
||||||
{
|
{
|
||||||
|
@ -2274,7 +2269,6 @@ NDIS_STATUS NICInitializeAsic(
|
||||||
#endif // RT2870 //
|
#endif // RT2870 //
|
||||||
|
|
||||||
// Add radio off control
|
// Add radio off control
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (pAd->StaCfg.bRadio == FALSE)
|
if (pAd->StaCfg.bRadio == FALSE)
|
||||||
{
|
{
|
||||||
|
@ -2353,7 +2347,6 @@ NDIS_STATUS NICInitializeAsic(
|
||||||
}
|
}
|
||||||
#endif // RT30xx //
|
#endif // RT30xx //
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// for rt2860E and after, init TXOP_CTRL_CFG with 0x583f. This is for extension channel overlapping IOT.
|
// for rt2860E and after, init TXOP_CTRL_CFG with 0x583f. This is for extension channel overlapping IOT.
|
||||||
if ((pAd->MACVersion&0xffff) != 0x0101)
|
if ((pAd->MACVersion&0xffff) != 0x0101)
|
||||||
|
@ -3295,7 +3288,6 @@ VOID UserCfgInit(
|
||||||
//
|
//
|
||||||
// part II. intialize STA specific configuration
|
// part II. intialize STA specific configuration
|
||||||
//
|
//
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
RX_FILTER_SET_FLAG(pAd, fRX_FILTER_ACCEPT_DIRECT);
|
RX_FILTER_SET_FLAG(pAd, fRX_FILTER_ACCEPT_DIRECT);
|
||||||
RX_FILTER_CLEAR_FLAG(pAd, fRX_FILTER_ACCEPT_MULTICAST);
|
RX_FILTER_CLEAR_FLAG(pAd, fRX_FILTER_ACCEPT_MULTICAST);
|
||||||
|
@ -3343,7 +3335,6 @@ VOID UserCfgInit(
|
||||||
pAd->CommonCfg.PhyMode = PHY_11BG_MIXED; // default PHY mode
|
pAd->CommonCfg.PhyMode = PHY_11BG_MIXED; // default PHY mode
|
||||||
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_SHORT_PREAMBLE_INUSED); // CCK use LONG preamble
|
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_SHORT_PREAMBLE_INUSED); // CCK use LONG preamble
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// user desired power mode
|
// user desired power mode
|
||||||
pAd->StaCfg.WindowsPowerMode = Ndis802_11PowerModeCAM;
|
pAd->StaCfg.WindowsPowerMode = Ndis802_11PowerModeCAM;
|
||||||
|
|
|
@ -319,7 +319,6 @@ VOID RTUSBBulkOutDataPacket(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
|
//PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if (pTxInfo->QSEL != FIFO_EDCA)
|
if (pTxInfo->QSEL != FIFO_EDCA)
|
||||||
{
|
{
|
||||||
|
@ -354,7 +353,6 @@ VOID RTUSBBulkOutDataPacket(
|
||||||
pLastTxInfo = pTxInfo;
|
pLastTxInfo = pTxInfo;
|
||||||
|
|
||||||
// Make sure we use EDCA QUEUE.
|
// Make sure we use EDCA QUEUE.
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
pTxInfo->QSEL = FIFO_EDCA; //PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
|
pTxInfo->QSEL = FIFO_EDCA; //PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
|
||||||
ThisBulkSize += (pTxInfo->USBDMATxPktLen+4);
|
ThisBulkSize += (pTxInfo->USBDMATxPktLen+4);
|
||||||
TmpBulkEndPos += (pTxInfo->USBDMATxPktLen+4);
|
TmpBulkEndPos += (pTxInfo->USBDMATxPktLen+4);
|
||||||
|
@ -842,8 +840,7 @@ VOID RTUSBBulkReceive(
|
||||||
RTMP_IRQ_UNLOCK(&pAd->BulkInLock, IrqFlags);
|
RTMP_IRQ_UNLOCK(&pAd->BulkInLock, IrqFlags);
|
||||||
|
|
||||||
// read RxContext, Since not
|
// read RxContext, Since not
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
STARxDoneInterruptHandle(pAd, TRUE);
|
||||||
STARxDoneInterruptHandle(pAd, TRUE);
|
|
||||||
|
|
||||||
// Finish to handle this bulkIn buffer.
|
// Finish to handle this bulkIn buffer.
|
||||||
RTMP_IRQ_LOCK(&pAd->BulkInLock, IrqFlags);
|
RTMP_IRQ_LOCK(&pAd->BulkInLock, IrqFlags);
|
||||||
|
|
|
@ -1197,7 +1197,6 @@ VOID CMDHandler(
|
||||||
{
|
{
|
||||||
UINT32 data;
|
UINT32 data;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// Read GPIO pin2 as Hardware controlled radio state
|
// Read GPIO pin2 as Hardware controlled radio state
|
||||||
|
|
||||||
|
@ -1659,7 +1658,6 @@ VOID CMDHandler(
|
||||||
MAC_TABLE_ENTRY *pEntry;
|
MAC_TABLE_ENTRY *pEntry;
|
||||||
pEntry = (MAC_TABLE_ENTRY *)pData;
|
pEntry = (MAC_TABLE_ENTRY *)pData;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
AsicRemovePairwiseKeyEntry(pAd, pEntry->apidx, (UCHAR)pEntry->Aid);
|
AsicRemovePairwiseKeyEntry(pAd, pEntry->apidx, (UCHAR)pEntry->Aid);
|
||||||
if ((pEntry->AuthMode <= Ndis802_11AuthModeAutoSwitch) && (pEntry->WepStatus == Ndis802_11Encryption1Enabled))
|
if ((pEntry->AuthMode <= Ndis802_11AuthModeAutoSwitch) && (pEntry->WepStatus == Ndis802_11Encryption1Enabled))
|
||||||
|
|
|
@ -76,10 +76,7 @@
|
||||||
#define MAX_CHANNEL_TIME 140 // unit: msec, for single band scan
|
#define MAX_CHANNEL_TIME 140 // unit: msec, for single band scan
|
||||||
#define FAST_ACTIVE_SCAN_TIME 30 // Active scan waiting for probe response time
|
#define FAST_ACTIVE_SCAN_TIME 30 // Active scan waiting for probe response time
|
||||||
#define CW_MIN_IN_BITS 4 // actual CwMin = 2^CW_MIN_IN_BITS - 1
|
#define CW_MIN_IN_BITS 4 // actual CwMin = 2^CW_MIN_IN_BITS - 1
|
||||||
|
|
||||||
#ifndef CONFIG_AP_SUPPORT
|
|
||||||
#define CW_MAX_IN_BITS 10 // actual CwMax = 2^CW_MAX_IN_BITS - 1
|
#define CW_MAX_IN_BITS 10 // actual CwMax = 2^CW_MAX_IN_BITS - 1
|
||||||
#endif
|
|
||||||
|
|
||||||
// Note: RSSI_TO_DBM_OFFSET has been changed to variable for new RF (2004-0720).
|
// Note: RSSI_TO_DBM_OFFSET has been changed to variable for new RF (2004-0720).
|
||||||
// SHould not refer to this constant anymore
|
// SHould not refer to this constant anymore
|
||||||
|
|
|
@ -492,10 +492,7 @@ PNET_DEV get_netdev_from_bssid(
|
||||||
{
|
{
|
||||||
PNET_DEV dev_p = NULL;
|
PNET_DEV dev_p = NULL;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
dev_p = pAd->net_dev;
|
||||||
{
|
|
||||||
dev_p = pAd->net_dev;
|
|
||||||
}
|
|
||||||
|
|
||||||
ASSERT(dev_p);
|
ASSERT(dev_p);
|
||||||
return dev_p; /* return one of MBSS */
|
return dev_p; /* return one of MBSS */
|
||||||
|
@ -651,11 +648,8 @@ void wlan_802_11_to_802_3_packet(
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
NdisMoveMemory(skb_push(pOSPkt, LENGTH_802_3), pHeader802_3, LENGTH_802_3);
|
||||||
NdisMoveMemory(skb_push(pOSPkt, LENGTH_802_3), pHeader802_3, LENGTH_802_3);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void announce_802_3_packet(
|
void announce_802_3_packet(
|
||||||
IN PRTMP_ADAPTER pAd,
|
IN PRTMP_ADAPTER pAd,
|
||||||
|
|
|
@ -202,7 +202,6 @@ int rt28xx_close(IN PNET_DEV dev)
|
||||||
if (pAd == NULL)
|
if (pAd == NULL)
|
||||||
return 0; // close ok
|
return 0; // close ok
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
// If dirver doesn't wake up firmware here,
|
// If dirver doesn't wake up firmware here,
|
||||||
|
@ -305,10 +304,7 @@ int rt28xx_close(IN PNET_DEV dev)
|
||||||
// Close kernel threads or tasklets
|
// Close kernel threads or tasklets
|
||||||
kill_thread_task(pAd);
|
kill_thread_task(pAd);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
MacTableReset(pAd);
|
||||||
{
|
|
||||||
MacTableReset(pAd);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
MeasureReqTabExit(pAd);
|
MeasureReqTabExit(pAd);
|
||||||
|
@ -414,8 +410,7 @@ static int rt28xx_init(IN struct net_device *net_dev)
|
||||||
|
|
||||||
CfgInitHook(pAd);
|
CfgInitHook(pAd);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
NdisAllocateSpinLock(&pAd->MacTabLock);
|
||||||
NdisAllocateSpinLock(&pAd->MacTabLock);
|
|
||||||
|
|
||||||
MeasureReqTabInit(pAd);
|
MeasureReqTabInit(pAd);
|
||||||
TpcReqTabInit(pAd);
|
TpcReqTabInit(pAd);
|
||||||
|
@ -623,11 +618,8 @@ int rt28xx_open(IN PNET_DEV dev)
|
||||||
if (rt28xx_init(net_dev) == FALSE)
|
if (rt28xx_init(net_dev) == FALSE)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
NdisZeroMemory(pAd->StaCfg.dev_name, 16);
|
||||||
{
|
NdisMoveMemory(pAd->StaCfg.dev_name, net_dev->name, strlen(net_dev->name));
|
||||||
NdisZeroMemory(pAd->StaCfg.dev_name, 16);
|
|
||||||
NdisMoveMemory(pAd->StaCfg.dev_name, net_dev->name, strlen(net_dev->name));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set up the Mac address
|
// Set up the Mac address
|
||||||
NdisMoveMemory(net_dev->dev_addr, (void *) pAd->CurrentAddress, 6);
|
NdisMoveMemory(net_dev->dev_addr, (void *) pAd->CurrentAddress, 6);
|
||||||
|
@ -639,10 +631,6 @@ int rt28xx_open(IN PNET_DEV dev)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// Enable Interrupt
|
// Enable Interrupt
|
||||||
RT28XX_IRQ_ENABLE(pAd);
|
RT28XX_IRQ_ENABLE(pAd);
|
||||||
|
|
||||||
|
@ -885,7 +873,6 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
|
||||||
int status = 0;
|
int status = 0;
|
||||||
PNDIS_PACKET pPacket = (PNDIS_PACKET) skb;
|
PNDIS_PACKET pPacket = (PNDIS_PACKET) skb;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
// Drop send request since we are in monitor mode
|
// Drop send request since we are in monitor mode
|
||||||
if (MONITOR_ON(pAd))
|
if (MONITOR_ON(pAd))
|
||||||
|
@ -912,11 +899,7 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
STASendPackets((NDIS_HANDLE)pAd, (PPNDIS_PACKET) &pPacket, 1);
|
||||||
{
|
|
||||||
|
|
||||||
STASendPackets((NDIS_HANDLE)pAd, (PPNDIS_PACKET) &pPacket, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
status = 0;
|
status = 0;
|
||||||
done:
|
done:
|
||||||
|
@ -1038,10 +1021,7 @@ INT rt28xx_ioctl(
|
||||||
return -ENETDOWN;
|
return -ENETDOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
ret = rt28xx_sta_ioctl(net_dev, rq, cmd);
|
||||||
{
|
|
||||||
ret = rt28xx_sta_ioctl(net_dev, rq, cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -754,7 +754,6 @@ static void rtmp_read_key_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbuf, c
|
||||||
//DefaultKeyID
|
//DefaultKeyID
|
||||||
if(RTMPGetKeyParameter("DefaultKeyID", tmpbuf, 25, buffer))
|
if(RTMPGetKeyParameter("DefaultKeyID", tmpbuf, 25, buffer))
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
KeyIdx = simple_strtol(tmpbuf, 0, 10);
|
KeyIdx = simple_strtol(tmpbuf, 0, 10);
|
||||||
if((KeyIdx >= 1 ) && (KeyIdx <= 4))
|
if((KeyIdx >= 1 ) && (KeyIdx <= 4))
|
||||||
|
@ -778,7 +777,6 @@ static void rtmp_read_key_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbuf, c
|
||||||
KeyType[i] = simple_strtol(macptr, 0, 10);
|
KeyType[i] = simple_strtol(macptr, 0, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
sprintf(tok_str, "Key%dStr", idx + 1);
|
sprintf(tok_str, "Key%dStr", idx + 1);
|
||||||
if (RTMPGetCriticalParameter(tok_str, tmpbuf, 128, buffer))
|
if (RTMPGetCriticalParameter(tok_str, tmpbuf, 128, buffer))
|
||||||
|
@ -884,8 +882,7 @@ NDIS_STATUS RTMPReadParametersHook(
|
||||||
return NDIS_STATUS_FAILURE;
|
return NDIS_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
src = STA_PROFILE_PATH;
|
||||||
src = STA_PROFILE_PATH;
|
|
||||||
|
|
||||||
// Save uid and gid used for filesystem access.
|
// Save uid and gid used for filesystem access.
|
||||||
// Set user and group to 0 (root)
|
// Set user and group to 0 (root)
|
||||||
|
@ -959,7 +956,6 @@ NDIS_STATUS RTMPReadParametersHook(
|
||||||
pAd->CommonCfg.CountryCode[2] = ' ';
|
pAd->CommonCfg.CountryCode[2] = ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
//SSID
|
//SSID
|
||||||
if (RTMPGetCriticalParameter("SSID", tmpbuf, 256, buffer))
|
if (RTMPGetCriticalParameter("SSID", tmpbuf, 256, buffer))
|
||||||
|
@ -980,7 +976,6 @@ NDIS_STATUS RTMPReadParametersHook(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
//NetworkType
|
//NetworkType
|
||||||
if (RTMPGetKeyParameter("NetworkType", tmpbuf, 25, buffer))
|
if (RTMPGetKeyParameter("NetworkType", tmpbuf, 25, buffer))
|
||||||
|
@ -1034,8 +1029,7 @@ NDIS_STATUS RTMPReadParametersHook(
|
||||||
{
|
{
|
||||||
pAd->CommonCfg.TxPowerPercentage = (ULONG) simple_strtol(tmpbuf, 0, 10);
|
pAd->CommonCfg.TxPowerPercentage = (ULONG) simple_strtol(tmpbuf, 0, 10);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
pAd->CommonCfg.TxPowerDefault = pAd->CommonCfg.TxPowerPercentage;
|
||||||
pAd->CommonCfg.TxPowerDefault = pAd->CommonCfg.TxPowerPercentage;
|
|
||||||
|
|
||||||
DBGPRINT(RT_DEBUG_TRACE, ("TxPower=%ld\n", pAd->CommonCfg.TxPowerPercentage));
|
DBGPRINT(RT_DEBUG_TRACE, ("TxPower=%ld\n", pAd->CommonCfg.TxPowerPercentage));
|
||||||
}
|
}
|
||||||
|
@ -1157,8 +1151,7 @@ NDIS_STATUS RTMPReadParametersHook(
|
||||||
#endif // AGGREGATION_SUPPORT //
|
#endif // AGGREGATION_SUPPORT //
|
||||||
|
|
||||||
// WmmCapable
|
// WmmCapable
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
rtmp_read_sta_wmm_parms_from_file(pAd, tmpbuf, buffer);
|
||||||
rtmp_read_sta_wmm_parms_from_file(pAd, tmpbuf, buffer);
|
|
||||||
|
|
||||||
//ShortSlot
|
//ShortSlot
|
||||||
if(RTMPGetKeyParameter("ShortSlot", tmpbuf, 10, buffer))
|
if(RTMPGetKeyParameter("ShortSlot", tmpbuf, 10, buffer))
|
||||||
|
@ -1261,7 +1254,6 @@ NDIS_STATUS RTMPReadParametersHook(
|
||||||
//AuthMode
|
//AuthMode
|
||||||
if(RTMPGetKeyParameter("AuthMode", tmpbuf, 128, buffer))
|
if(RTMPGetKeyParameter("AuthMode", tmpbuf, 128, buffer))
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if ((strcmp(tmpbuf, "WEPAUTO") == 0) || (strcmp(tmpbuf, "wepauto") == 0))
|
if ((strcmp(tmpbuf, "WEPAUTO") == 0) || (strcmp(tmpbuf, "wepauto") == 0))
|
||||||
pAd->StaCfg.AuthMode = Ndis802_11AuthModeAutoSwitch;
|
pAd->StaCfg.AuthMode = Ndis802_11AuthModeAutoSwitch;
|
||||||
|
@ -1288,7 +1280,6 @@ NDIS_STATUS RTMPReadParametersHook(
|
||||||
//EncrypType
|
//EncrypType
|
||||||
if(RTMPGetKeyParameter("EncrypType", tmpbuf, 128, buffer))
|
if(RTMPGetKeyParameter("EncrypType", tmpbuf, 128, buffer))
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if ((strcmp(tmpbuf, "WEP") == 0) || (strcmp(tmpbuf, "wep") == 0))
|
if ((strcmp(tmpbuf, "WEP") == 0) || (strcmp(tmpbuf, "wep") == 0))
|
||||||
pAd->StaCfg.WepStatus = Ndis802_11WEPEnabled;
|
pAd->StaCfg.WepStatus = Ndis802_11WEPEnabled;
|
||||||
|
@ -1310,7 +1301,6 @@ NDIS_STATUS RTMPReadParametersHook(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if(RTMPGetCriticalParameter("WPAPSK", tmpbuf, 512, buffer))
|
if(RTMPGetCriticalParameter("WPAPSK", tmpbuf, 512, buffer))
|
||||||
{
|
{
|
||||||
|
@ -1397,7 +1387,6 @@ NDIS_STATUS RTMPReadParametersHook(
|
||||||
|
|
||||||
HTParametersHook(pAd, tmpbuf, buffer);
|
HTParametersHook(pAd, tmpbuf, buffer);
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
//PSMode
|
//PSMode
|
||||||
if (RTMPGetKeyParameter("PSMode", tmpbuf, 10, buffer))
|
if (RTMPGetKeyParameter("PSMode", tmpbuf, 10, buffer))
|
||||||
|
@ -1485,7 +1474,6 @@ NDIS_STATUS RTMPReadParametersHook(
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RT30xx
|
#ifdef RT30xx
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
if(RTMPGetKeyParameter("AntDiversity", tmpbuf, 10, buffer))
|
if(RTMPGetKeyParameter("AntDiversity", tmpbuf, 10, buffer))
|
||||||
{
|
{
|
||||||
|
@ -1770,7 +1758,6 @@ static void HTParametersHook(
|
||||||
{
|
{
|
||||||
UCHAR fix_tx_mode;
|
UCHAR fix_tx_mode;
|
||||||
|
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
fix_tx_mode = FIXED_TXMODE_HT;
|
fix_tx_mode = FIXED_TXMODE_HT;
|
||||||
|
|
||||||
|
@ -1846,7 +1833,6 @@ static void HTParametersHook(
|
||||||
// MSC
|
// MSC
|
||||||
if (RTMPGetKeyParameter("HT_MCS", pValueStr, 50, pInput))
|
if (RTMPGetKeyParameter("HT_MCS", pValueStr, 50, pInput))
|
||||||
{
|
{
|
||||||
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
|
|
||||||
{
|
{
|
||||||
Value = simple_strtol(pValueStr, 0, 10);
|
Value = simple_strtol(pValueStr, 0, 10);
|
||||||
|
|
||||||
|
|
|
@ -49,14 +49,6 @@
|
||||||
|
|
||||||
//#define DBG_DIAGNOSE 1
|
//#define DBG_DIAGNOSE 1
|
||||||
|
|
||||||
#if defined(CONFIG_AP_SUPPORT)
|
|
||||||
#define IF_DEV_CONFIG_OPMODE_ON_AP(_pAd) if(_pAd->OpMode == OPMODE_AP)
|
|
||||||
#define IF_DEV_CONFIG_OPMODE_ON_STA(_pAd) if(_pAd->OpMode == OPMODE_STA)
|
|
||||||
#else
|
|
||||||
#define IF_DEV_CONFIG_OPMODE_ON_AP(_pAd)
|
|
||||||
#define IF_DEV_CONFIG_OPMODE_ON_STA(_pAd)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define VIRTUAL_IF_INC(__pAd) ((__pAd)->VirtualIfCnt++)
|
#define VIRTUAL_IF_INC(__pAd) ((__pAd)->VirtualIfCnt++)
|
||||||
#define VIRTUAL_IF_DEC(__pAd) ((__pAd)->VirtualIfCnt--)
|
#define VIRTUAL_IF_DEC(__pAd) ((__pAd)->VirtualIfCnt--)
|
||||||
#define VIRTUAL_IF_NUM(__pAd) ((__pAd)->VirtualIfCnt)
|
#define VIRTUAL_IF_NUM(__pAd) ((__pAd)->VirtualIfCnt)
|
||||||
|
|
|
@ -1393,9 +1393,7 @@
|
||||||
#define MAX_RX_REORDERBUF 64
|
#define MAX_RX_REORDERBUF 64
|
||||||
#define DEFAULT_TX_TIMEOUT 30
|
#define DEFAULT_TX_TIMEOUT 30
|
||||||
#define DEFAULT_RX_TIMEOUT 30
|
#define DEFAULT_RX_TIMEOUT 30
|
||||||
#ifndef CONFIG_AP_SUPPORT
|
|
||||||
#define MAX_BARECI_SESSION 8
|
#define MAX_BARECI_SESSION 8
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef IW_ESSID_MAX_SIZE
|
#ifndef IW_ESSID_MAX_SIZE
|
||||||
/* Maximum size of the ESSID and pAd->nickname strings */
|
/* Maximum size of the ESSID and pAd->nickname strings */
|
||||||
|
|
|
@ -2952,11 +2952,7 @@ static const iw_handler rt_handler[] =
|
||||||
static const iw_handler rt_priv_handlers[] = {
|
static const iw_handler rt_priv_handlers[] = {
|
||||||
(iw_handler) NULL, /* + 0x00 */
|
(iw_handler) NULL, /* + 0x00 */
|
||||||
(iw_handler) NULL, /* + 0x01 */
|
(iw_handler) NULL, /* + 0x01 */
|
||||||
#ifndef CONFIG_AP_SUPPORT
|
|
||||||
(iw_handler) rt_ioctl_setparam, /* + 0x02 */
|
(iw_handler) rt_ioctl_setparam, /* + 0x02 */
|
||||||
#else
|
|
||||||
(iw_handler) NULL, /* + 0x02 */
|
|
||||||
#endif // CONFIG_AP_SUPPORT //
|
|
||||||
#ifdef DBG
|
#ifdef DBG
|
||||||
(iw_handler) rt_private_ioctl_bbp, /* + 0x03 */
|
(iw_handler) rt_private_ioctl_bbp, /* + 0x03 */
|
||||||
#else
|
#else
|
||||||
|
|
Загрузка…
Ссылка в новой задаче