5 u8 MCS_FILTER_ALL[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
7 u8 MCS_FILTER_1SS[16] = {0xff, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
10 { { {13, 26, 39, 52, 78, 104, 117, 130, 26, 52, 78 ,104, 156, 208, 234, 260,
11 39, 78, 117, 234, 312, 351, 390, 52, 104, 156, 208, 312, 416, 468, 520,
12 0, 78, 104, 130, 117, 156, 195, 104, 130, 130, 156, 182, 182, 208, 156, 195,
13 195, 234, 273, 273, 312, 130, 156, 181, 156, 181, 208, 234, 208, 234, 260, 260,
14 286, 195, 234, 273, 234, 273, 312, 351, 312, 351, 390, 390, 429},
15 {14, 29, 43, 58, 87, 116, 130, 144, 29, 58, 87, 116, 173, 231, 260, 289,
16 43, 87, 130, 173, 260, 347, 390, 433, 58, 116, 173, 231, 347, 462, 520, 578,
17 0, 87, 116, 144, 130, 173, 217, 116, 144, 144, 173, 202, 202, 231, 173, 217,
18 217, 260, 303, 303, 347, 144, 173, 202, 173, 202, 231, 260, 231, 260, 289, 289,
19 318, 217, 260, 303, 260, 303, 347, 390, 347, 390, 433, 433, 477} },
20 { {27, 54, 81, 108, 162, 216, 243, 270, 54, 108, 162, 216, 324, 432, 486, 540,
21 81, 162, 243, 324, 486, 648, 729, 810, 108, 216, 324, 432, 648, 864, 972, 1080,
22 12, 162, 216, 270, 243, 324, 405, 216, 270, 270, 324, 378, 378, 432, 324, 405,
23 405, 486, 567, 567, 648, 270, 324, 378, 324, 378, 432, 486, 432, 486, 540, 540,
24 594, 405, 486, 567, 486, 567, 648, 729, 648, 729, 810, 810, 891},
25 {30, 60, 90, 120, 180, 240, 270, 300, 60, 120, 180, 240, 360, 480, 540, 600,
26 90, 180, 270, 360, 540, 720, 810, 900, 120, 240, 360, 480, 720, 960, 1080, 1200,
27 13, 180, 240, 300, 270, 360, 450, 240, 300, 300, 360, 420, 420, 480, 360, 450,
28 450, 540, 630, 630, 720, 300, 360, 420, 360, 420, 480, 540, 480, 540, 600, 600,
29 660, 450, 540, 630, 540, 630, 720, 810, 720, 810, 900, 900, 990} }
32 static u8 UNKNOWN_BORADCOM[3] = {0x00, 0x14, 0xbf};
33 static u8 LINKSYSWRT330_LINKSYSWRT300_BROADCOM[3] = {0x00, 0x1a, 0x70};
34 static u8 LINKSYSWRT350_LINKSYSWRT150_BROADCOM[3] = {0x00, 0x1d, 0x7e};
35 static u8 NETGEAR834Bv2_BROADCOM[3] = {0x00, 0x1b, 0x2f};
36 static u8 BELKINF5D8233V1_RALINK[3] = {0x00, 0x17, 0x3f};
37 static u8 BELKINF5D82334V3_RALINK[3] = {0x00, 0x1c, 0xdf};
38 static u8 PCI_RALINK[3] = {0x00, 0x90, 0xcc};
39 static u8 EDIMAX_RALINK[3] = {0x00, 0x0e, 0x2e};
40 static u8 AIRLINK_RALINK[3] = {0x00, 0x18, 0x02};
42 static u8 CISCO_BROADCOM[3] = {0x00, 0x17, 0x94};
93 pMgntInfo->bTxEnableFwCalcDur = (
BOOLEAN)pNdisCommon->bRegTxEnableFwCalcDur;
104 #ifdef USB_TX_DRIVER_AGGREGATION_ENABLE
105 pHTInfo->UsbTxAggrNum = 4;
107 #ifdef USB_RX_AGGREGATION_SUPPORT
108 pHTInfo->UsbRxFwAggrEn = 1;
109 pHTInfo->UsbRxFwAggrPageNum = 24;
110 pHTInfo->UsbRxFwAggrPacketNum = 8;
111 pHTInfo->UsbRxFwAggrTimeout = 16;
127 static u8 EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
130 if(!
memcmp(CapIE, EWC11NHTCap,
sizeof(EWC11NHTCap)))
149 pCapELE->MCS[1], pCapELE->MCS[2], pCapELE->MCS[3], pCapELE->MCS[4]);
164 static u8 EWC11NHTInfo[] = {0x00, 0x90, 0x4c, 0x34};
167 if(!
memcmp(InfoIE, EWC11NHTInfo,
sizeof(EWC11NHTInfo)))
180 switch(pHTInfoEle->ExtChlOffset)
198 switch(pHTInfoEle->OptMode)
215 pHTInfoEle->BasicMSC[1], pHTInfoEle->BasicMSC[2], pHTInfoEle->BasicMSC[3], pHTInfoEle->BasicMSC[4]);
224 bool retValue =
false;
243 bool retValue =
false;
303 u16 CCKOFDMRate[12] = {0x02 , 0x04 , 0x0b , 0x16 , 0x0c , 0x12 , 0x18 , 0x24 , 0x30 , 0x48 , 0x60 , 0x6c};
309 return CCKOFDMRate[nDataRate];
313 if (nDataRate >= 0x10 && nDataRate <= 0x1f)
320 else if(nDataRate >=0x20 && nDataRate <= 0x2f )
327 else if(nDataRate >= 0x30 && nDataRate <= 0x3f )
334 else if(nDataRate >= 0x40 && nDataRate <= 0x4f )
349 bool retValue =
false;
351 if((
memcmp(net->
bssid, BELKINF5D8233V1_RALINK, 3)==0) ||
352 (
memcmp(net->
bssid, BELKINF5D82334V3_RALINK, 3)==0) ||
358 else if((
memcmp(net->
bssid, UNKNOWN_BORADCOM, 3)==0) ||
359 (
memcmp(net->
bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3)==0)||
360 (
memcmp(net->
bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3)==0)||
361 (
memcmp(net->
bssid, NETGEAR834Bv2_BROADCOM, 3)==0) ||
387 else if((
memcmp(net->
bssid, UNKNOWN_BORADCOM, 3)==0) ||
388 (
memcmp(net->
bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3)==0)||
389 (
memcmp(net->
bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3)==0)||
390 (
memcmp(net->
bssid, NETGEAR834Bv2_BROADCOM, 3)==0) )
392 else if((
memcmp(net->
bssid, BELKINF5D8233V1_RALINK, 3)==0) ||
393 (
memcmp(net->
bssid, BELKINF5D82334V3_RALINK, 3)==0) ||
437 bool retValue =
false;
441 #if (HAL_CODE_BASE==RTL8192)
443 #if (DEV_BUS_TYPE == USB_INTERFACE)
446 #elif (DEV_BUS_TYPE == PCI_INTERFACE)
474 bool retValue =
false;
521 if( (
memcmp(PeerMacAddr, UNKNOWN_BORADCOM, 3)==0) ||
522 (
memcmp(PeerMacAddr, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3)==0) ||
523 (
memcmp(PeerMacAddr, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) ==0))
556 if ((posHTCap ==
NULL) || (pHT ==
NULL))
561 memset(posHTCap, 0, *len);
564 u8 EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
565 memcpy(posHTCap, EWC11NHTCap,
sizeof(EWC11NHTCap));
574 pCapELE->AdvCoding = 0;
577 pCapELE->ChlWidth = 0;
586 pCapELE->GreenField = 0;
587 pCapELE->ShortGI20Mhz = 1;
588 pCapELE->ShortGI40Mhz = 1;
593 pCapELE->DelayBA = 0;
597 pCapELE->LSigTxopProtect = 0;
602 IEEE80211_DEBUG(
IEEE80211_DL_HT,
"TX HT cap/info ele BW=%d MaxAMSDUSize:%d DssCCk:%d\n", pCapELE->ChlWidth, pCapELE->MaxAMSDUSize, pCapELE->DssCCk);
606 pCapELE->MPDUDensity = 7;
607 pCapELE->MaxRxAMPDUFactor = 2;
611 pCapELE->MaxRxAMPDUFactor = 3;
612 pCapELE->MPDUDensity = 0;
618 pCapELE->MCS[1] &= 0x7f;
621 pCapELE->MCS[1] &= 0xbf;
624 pCapELE->MCS[1] &= 0x00;
631 for(i = 1; i< 16; i++)
636 memset(&pCapELE->ExtHTCapInfo, 0, 2);
640 memset(pCapELE->TxBFCap, 0, 4);
673 if ((posHTInfo ==
NULL) || (pHTInfoEle ==
NULL))
679 memset(posHTInfo, 0, *len);
687 pHTInfoEle->RIFS = 0;
688 pHTInfoEle->PSMPAccessOnly = 0;
689 pHTInfoEle->SrvIntGranularity = 0;
691 pHTInfoEle->NonGFDevPresent = 0;
692 pHTInfoEle->DualBeacon = 0;
693 pHTInfoEle->SecondaryBeacon = 0;
694 pHTInfoEle->LSigTxopProtectFull = 0;
695 pHTInfoEle->PcoActive = 0;
696 pHTInfoEle->PcoPhase = 0;
698 memset(pHTInfoEle->BasicMSC, 0, 16);
743 if (posRT2RTAgg ==
NULL) {
747 memset(posRT2RTAgg, 0, *len);
748 *posRT2RTAgg++ = 0x00;
749 *posRT2RTAgg++ = 0xe0;
750 *posRT2RTAgg++ = 0x4c;
751 *posRT2RTAgg++ = 0x02;
752 *posRT2RTAgg++ = 0x01;
756 *posRT2RTAgg |= 0x08;
762 #if (HAL_CODE_BASE == RTL8192 && DEV_BUS_TYPE == USB_INTERFACE)
779 posRT2RTAgg->Length = 6;
798 if (pOperateMCS ==
NULL)
863 u8 availableMcsRate[16];
864 if (pMCSRateSet ==
NULL || pMCSFilter ==
NULL)
870 availableMcsRate[i] = pMCSRateSet[i] & pMCSFilter[i];
872 for(i = 0; i < 16; i++)
874 if(availableMcsRate[i] != 0)
880 for(i = 0; i < 16; i++)
882 if(availableMcsRate[i] != 0)
884 bitMap = availableMcsRate[
i];
885 for(j = 0; j < 8; j++)
896 return (mcsRate|0x80);
946 u16 nMaxAMSDUSize = 0;
949 static u8 EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
950 static u8 EWC11NHTInfo[] = {0x00, 0x90, 0x4c, 0x34};
985 pHTInfo->
bCurTxBW40MHz = ((pPeerHTInfo->RecommemdedTxWidth == 1)?
true:
false);
992 ((pHTInfo->
bRegShortGI20MHz)?((pPeerHTCap->ShortGI20Mhz==1)?
true:
false):
false);
994 ((pHTInfo->
bRegShortGI40MHz)?((pPeerHTCap->ShortGI40Mhz==1)?
true:
false):
false);
1006 ((pHTInfo->
bRegSuppCCK)?((pPeerHTCap->DssCCk==1)?
true:
false):
false);
1014 nMaxAMSDUSize = (pPeerHTCap->MaxAMSDUSize==0)?3839:7935;
1033 if(pHTInfo->
AMPDU_Factor > pPeerHTCap->MaxRxAMPDUFactor)
1091 if(pPeerHTCap->MCS[0] == 0)
1092 pPeerHTCap->MCS[0] = 0xff;
1099 pHTInfo->
PeerMimoPs = pPeerHTCap->MimoPwrSave;
1183 RegHTSuppRateSets[0] = 0xFF;
1184 RegHTSuppRateSets[1] = 0xFF;
1185 RegHTSuppRateSets[4] = 0x01;
1353 Adapter->HalFunc.InitHalRATRTableHandler(
Adapter, &pMgntInfo->dot11OperationalRateSet, pMgntInfo->dot11HTOperationalRateSet);