• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/staging/otus/80211core/

Lines Matching refs:wd

101     if (wd->wlanMode == ZM_MODE_INFRASTRUCTURE)
107 if ( zfPowerSavingMgrIsSleeping(dev) || wd->sta.psMgr.tempWakeUp == 1 )
113 header[6] = wd->sta.bssid[0];
114 header[7] = wd->sta.bssid[1];
115 header[8] = wd->sta.bssid[2];
121 else if (wd->wlanMode == ZM_MODE_PSEUDO)
133 if (wd->enableWDS)
146 else if (wd->wlanMode == ZM_MODE_IBSS)
153 header[12] = wd->sta.bssid[0];
154 header[13] = wd->sta.bssid[1];
155 header[14] = wd->sta.bssid[2];
167 else if (wd->wlanMode == ZM_MODE_AP)
199 header[6] = wd->ap.wds.macAddr[wdsPortId][0];
200 header[7] = wd->ap.wds.macAddr[wdsPortId][1];
201 header[8] = wd->ap.wds.macAddr[wdsPortId][2];
213 } /* else if (wd->wlanMode == ZM_MODE_AP) */
216 header[9] = wd->macAddr[0];
217 header[10] = wd->macAddr[1];
219 header[11] = wd->macAddr[2]; //Multiple SSID
221 header[11] = wd->macAddr[2] + (vap<<8); //VAP
224 if ( (wd->wlanMode == ZM_MODE_IBSS) && (wd->XLinkMode) )
235 if (wd->wlanMode == ZM_MODE_AP)
255 if (wd->wlanMode == ZM_MODE_AP) {
265 if (wd->txMCS != 0xff)
268 phyCtrl = ((u32_t)wd->txMCS<<16) + wd->txMT;
269 mcs = wd->txMCS;
270 mt = wd->txMT;
273 if (wd->enableAggregation)
276 if (wd->enableAggregation==2 && !(header[6]&0x1))
285 /* if wd->enableAggregation=1 => force disable */
286 /* if wd->enableAggregation=0 => auto */
297 if (wd->wlanMode == ZM_MODE_AP) {
299 if (wd->enableAggregation==0 && !(header[6]&0x1))
333 if (wd->wlanMode == ZM_MODE_AP)
343 if (wd->ap.encryMode[vap] == ZM_TKIP)
345 wd->ap.iv16[vap]++;
347 if(wd->ap.iv16[vap] == 0)
349 wd->ap.iv32[vap]++;
352 b1 = (u8_t) (wd->ap.iv16[vap] >> 8);
355 b1 = (u8_t) wd->ap.iv16[vap];
356 b2 = 0x20 | (wd->ap.bcKeyIndex[vap] << 6);
358 header[hlen+2] = (u16_t) wd->ap.iv32[vap];
359 header[hlen+3] = (u16_t) (wd->ap.iv32[vap] >> 16);
376 else if (wd->ap.encryMode[vap] == ZM_AES)
378 wd->ap.iv16[vap]++;
380 if(wd->ap.iv16[vap] == 0)
382 wd->ap.iv32[vap]++;
385 b1 = (u8_t) wd->ap.iv16[vap];
386 b2 = (u8_t) (wd->ap.iv16[vap] >> 8);
388 header[hlen+1] = 0x2000 | (wd->ap.bcKeyIndex[vap] << 14);
389 header[hlen+2] = (u16_t) (wd->ap.iv32[vap]);
390 header[hlen+3] = (u16_t) (wd->ap.iv32[vap] >> 16);
399 else if (wd->ap.encryMode[vap] == ZM_CENC)
403 wd->ap.txiv[vap][0]++;
405 if (wd->ap.txiv[vap][0] == 0)
407 wd->ap.txiv[vap][1]++;
410 if (wd->ap.txiv[vap][1] == 0)
412 wd->ap.txiv[vap][2]++;
415 if (wd->ap.txiv[vap][2] == 0)
417 wd->ap.txiv[vap][3]++;
420 if (wd->ap.txiv[vap][3] == 0)
422 wd->ap.txiv[vap][0] = 0;
423 wd->ap.txiv[vap][1] = 0;
424 wd->ap.txiv[vap][2] = 0;
427 header[hlen] = (wd->ap.bcKeyIndex[vap] & 0x0001); /* For Key Id and reserved field */
428 header[hlen+1] = (u16_t)wd->ap.txiv[vap][0];
429 header[hlen+2] = (u16_t)(wd->ap.txiv[vap][0] >> 16);
430 header[hlen+3] = (u16_t)wd->ap.txiv[vap][1];
431 header[hlen+4] = (u16_t)(wd->ap.txiv[vap][1] >> 16);
432 header[hlen+5] = (u16_t)wd->ap.txiv[vap][2];
433 header[hlen+6] = (u16_t)(wd->ap.txiv[vap][2] >> 16);
434 header[hlen+7] = (u16_t)wd->ap.txiv[vap][3];
435 header[hlen+8] = (u16_t)(wd->ap.txiv[vap][3] >> 16);
571 if (wd->ap.protectionMode == 1)
583 if ((wd->ap.encryMode[vap] == ZM_WEP64) ||
584 (wd->ap.encryMode[vap] == ZM_WEP128) ||
585 (wd->ap.encryMode[vap] == ZM_WEP256))
589 header[hlen+1] = wd->ap.bcKeyIndex[vap] << 14; //IV with Keyid--CWYang(m)
610 switch (wd->ap.wds.encryMode[wdsPort])
617 header[hlen+1] = wd->ap.bcKeyIndex[vap] << 14; //IV with Keyid
624 wd->sta.iv16++;
626 if ( wd->sta.iv16 == 0 )
628 wd->sta.iv32++;
631 b1 = (u8_t) (wd->sta.iv16 >> 8);
634 b1 = (u8_t) wd->sta.iv16;
637 header[hlen+2] = (u16_t) wd->sta.iv32;
638 header[hlen+3] = (u16_t) (wd->sta.iv32 >> 16);
657 wd->sta.iv16++;
658 if ( wd->sta.iv16 == 0 )
660 wd->sta.iv32++;
663 b1 = (u8_t) wd->sta.iv16;
664 b2 = (u8_t) (wd->sta.iv16 >> 8);
667 header[hlen+2] = (u16_t) (wd->sta.iv32);
668 header[hlen+3] = (u16_t) (wd->sta.iv32 >> 16);
679 else /* wd->wlanMode != ZM_MODE_AP */
683 if ( wd->wlanMode == ZM_MODE_INFRASTRUCTURE )
686 if (wd->sta.wmeConnected != 0)
698 if ( wd->sta.authMode < ZM_AUTH_MODE_WPA )
700 if ( wd->sta.wepStatus == ZM_ENCRYPTION_WEP_ENABLED )
702 if ( (wd->sta.encryMode == ZM_WEP64)||
703 (wd->sta.encryMode == ZM_WEP128)||
704 (wd->sta.encryMode == ZM_WEP256) )
709 header[hlen+1] |= (((u16_t) wd->sta.keyId) << 14);
714 if ((wd->sta.SWEncryptEnable & ZM_SW_WEP_ENCRY_EN) != 0)
723 if (wd->sta.SWEncryMode[wd->sta.keyId] == ZM_WEP64)
727 else if (wd->sta.SWEncryMode[wd->sta.keyId] == ZM_WEP128)
731 else if (wd->sta.SWEncryMode[wd->sta.keyId] == ZM_WEP256)
737 wd->sta.wepKey[wd->sta.keyId], iv);
748 if ( wd->sta.wpaState >= ZM_STA_WPA_STATE_PK_OK )
750 wd->sta.iv16++;
751 if ( wd->sta.iv16 == 0 )
753 wd->sta.iv32++;
757 if ( wd->sta.encryMode == ZM_TKIP )
759 b1 = (u8_t) (wd->sta.iv16 >> 8);
762 b1 = (u8_t) wd->sta.iv16;
765 // header[hlen+1] = (((u16_t) wd->sta.keyId) << 14) | (((u16_t)b2 << 8) + b1);
768 header[hlen+2] = (u16_t) wd->sta.iv32;
769 header[hlen+3] = (u16_t) (wd->sta.iv32 >> 16);
772 if ((wd->sta.SWEncryptEnable & ZM_SW_TKIP_ENCRY_EN) == 0)
809 zfTkipPhase1KeyMix(wd->sta.iv32, &wd->sta.txSeed);
810 zfTkipPhase2KeyMix(wd->sta.iv16, &wd->sta.txSeed);
811 zfTkipGetseeds(wd->sta.iv16, RC4Key, &wd->sta.txSeed);
823 else if ( wd->sta.encryMode == ZM_AES )
825 b1 = (u8_t) wd->sta.iv16;
826 b2 = (u8_t) (wd->sta.iv16 >> 8);
828 // header[hlen+1] = (((u16_t) wd->sta.keyId) << 14) | (0x2000);
831 header[hlen+2] = (u16_t) (wd->sta.iv32);
832 header[hlen+3] = (u16_t) (wd->sta.iv32 >> 16);
841 else if ( wd->sta.encryMode == ZM_CENC )
844 wd->sta.txiv[0] += 2;
846 if (wd->sta.txiv[0] == 0 || wd->sta.txiv[0] == 1)
848 wd->sta.txiv[1]++;
851 if (wd->sta.txiv[1] == 0)
853 wd->sta.txiv[2]++;
856 if (wd->sta.txiv[2] == 0)
858 wd->sta.txiv[3]++;
861 if (wd->sta.txiv[3] == 0)
863 wd->sta.txiv[0] = 0;
864 wd->sta.txiv[1] = 0;
865 wd->sta.txiv[2] = 0;
868 header[hlen] = (wd->sta.cencKeyId & 0x0001); /* For Key Id and reserved field */
869 header[hlen+1] = (u16_t) wd->sta.txiv[0];
870 header[hlen+2] = (u16_t) (wd->sta.txiv[0] >> 16);
871 header[hlen+3] = (u16_t) wd->sta.txiv[1];
872 header[hlen+4] = (u16_t) (wd->sta.txiv[1] >> 16);
873 header[hlen+5] = (u16_t) wd->sta.txiv[2];
874 header[hlen+6] = (u16_t) (wd->sta.txiv[2] >> 16);
875 header[hlen+7] = (u16_t) wd->sta.txiv[3];
876 header[hlen+8] = (u16_t) (wd->sta.txiv[3] >> 16);
888 } /* if ( wd->wlanMode != ZM_MODE_INFRASTRUCTURE ) */
890 if ( wd->wlanMode == ZM_MODE_IBSS )
895 if( wd->sta.oppositeInfo[userIdx].wpaState >= ZM_STA_WPA_STATE_PK_OK || wd->sta.wpaState >= ZM_STA_WPA_STATE_PK_OK)
904 if( wd->sta.ibssWpa2Psk == 1 )
908 iv16 = &wd->sta.oppositeInfo[userIdx].iv16;
909 iv32 = &wd->sta.oppositeInfo[userIdx].iv32;
913 iv16 = &wd->sta.iv16;
914 iv32 = &wd->sta.iv32;
919 iv16 = &wd->sta.iv16;
920 iv32 = &wd->sta.iv32;
929 if ( wd->sta.oppositeInfo[userIdx].encryMode == ZM_AES || wd->sta.encryMode == ZM_AES)
942 header[hlen+1] = 0x2000 | (((u16_t) wd->sta.keyId) << 14);
954 else if ( wd->sta.wepStatus == ZM_ENCRYPTION_WEP_ENABLED)
956 if ( (wd->sta.encryMode == ZM_WEP64)||
957 (wd->sta.encryMode == ZM_WEP128)||
958 (wd->sta.encryMode == ZM_WEP256) )
963 header[hlen+1] |= (((u16_t) wd->sta.keyId) << 14);
971 if( wd->sta.wpaState >= ZM_STA_WPA_STATE_PK_OK )
980 wd->sta.iv16++;
981 if ( wd->sta.iv16 == 0 )
983 wd->sta.iv32++;
986 if ( wd->sta.encryMode == ZM_AES )
989 b1 = (u8_t) wd->sta.iv16;
990 b2 = (u8_t) (wd->sta.iv16 >> 8);
999 header[hlen+1] = 0x2000 | (((u16_t) wd->sta.keyId) << 14);
1002 header[hlen+2] = (u16_t) (wd->sta.iv32);
1003 header[hlen+3] = (u16_t) (wd->sta.iv32 >> 16);
1011 else if ( wd->sta.wepStatus == ZM_ENCRYPTION_WEP_ENABLED)
1013 if ( (wd->sta.encryMode == ZM_WEP64)||
1014 (wd->sta.encryMode == ZM_WEP128)||
1015 (wd->sta.encryMode == ZM_WEP256) )
1020 header[hlen+1] |= (((u16_t) wd->sta.keyId) << 14);
1028 } // End if ( wd->wlanMode == ZM_MODE_IBSS )
1029 else if ( wd->wlanMode == ZM_MODE_PSEUDO )
1031 switch (wd->sta.encryMode)
1046 wd->sta.iv16++;
1047 if ( wd->sta.iv16 == 0 )
1049 wd->sta.iv32++;
1052 b1 = (u8_t) (wd->sta.iv16 >> 8);
1055 b1 = (u8_t) wd->sta.iv16;
1058 header[hlen+2] = (u16_t) wd->sta.iv32;
1059 header[hlen+3] = (u16_t) (wd->sta.iv32 >> 16);
1080 wd->sta.iv16++;
1081 if ( wd->sta.iv16 == 0 )
1083 wd->sta.iv32++;
1086 b1 = (u8_t) wd->sta.iv16;
1087 b2 = (u8_t) (wd->sta.iv16 >> 8);
1090 header[hlen+2] = (u16_t) (wd->sta.iv32);
1091 header[hlen+3] = (u16_t) (wd->sta.iv32 >> 16);
1102 wd->sta.txiv[0] += 2;
1104 if (wd->sta.txiv[0] == 0 || wd->sta.txiv[0] == 1)
1106 wd->sta.txiv[1]++;
1109 if (wd->sta.txiv[1] == 0)
1111 wd->sta.txiv[2]++;
1114 if (wd->sta.txiv[2] == 0)
1116 wd->sta.txiv[3]++;
1119 if (wd->sta.txiv[3] == 0)
1121 wd->sta.txiv[0] = 0;
1122 wd->sta.txiv[1] = 0;
1123 wd->sta.txiv[2] = 0;
1127 header[hlen+1] = (u16_t) wd->sta.txiv[0];
1128 header[hlen+2] = (u16_t) (wd->sta.txiv[0] >> 16);
1129 header[hlen+3] = (u16_t) wd->sta.txiv[1];
1130 header[hlen+4] = (u16_t) (wd->sta.txiv[1] >> 16);
1131 header[hlen+5] = (u16_t) wd->sta.txiv[2];
1132 header[hlen+6] = (u16_t) (wd->sta.txiv[2] >> 16);
1133 header[hlen+7] = (u16_t) wd->sta.txiv[3];
1134 header[hlen+8] = (u16_t) (wd->sta.txiv[3] >> 16);
1149 if (wd->enableProtectionMode)
1151 if (wd->enableProtectionMode==2)
1157 /* if wd->enableProtectionMode=1 => force disable */
1158 /* if wd->enableProtectionMode=0 => auto */
1164 if (wd->sta.bProtectionMode == TRUE)
1174 if (wd->txMCS != 0xff)
1177 phyCtrl = ((u32_t)wd->txMCS<<16) + wd->txMT;
1178 mcs = wd->txMCS;
1179 mt = wd->txMT;
1185 if (wd->sta.htCtrlBandwidth == ZM_BANDWIDTH_40MHZ)
1190 if(wd->sta.htCtrlSG)
1196 if ( ((mcs >=0x8) && (mcs<=0xf)) || (wd->sta.htCtrlSTBC) )
1207 if (wd->preambleTypeInUsed == ZM_PREAMBLE_TYPE_SHORT)
1214 if (wd->sta.defaultTA)
1228 wd->CurrentTxRateKbps = zcIndextoRateBG[mcs];
1235 if (wd->sta.htCtrlBandwidth == ZM_BANDWIDTH_40MHZ)
1240 wd->CurrentTxRateKbps = zcIndextoRateN40S[mcs];
1245 wd->CurrentTxRateKbps = zcIndextoRateN40L[mcs];
1253 wd->CurrentTxRateKbps = zcIndextoRateN20S[mcs];
1258 wd->CurrentTxRateKbps = zcIndextoRateN20L[mcs];
1276 if (header[0] >= wd->rtsThreshold)
1283 if ( wd->sta.encryMode == ZM_TKIP )
1286 if( wd->sta.EnableHT != 1 )
1288 if ( header[0] > ( wd->fragThreshold + tkipFrameOffset ) )
1294 //if ( wd->sta.encryMode == ZM_TKIP )
1310 if (wd->enableAggregation)
1313 if (wd->enableAggregation==2 && !(header[6]&0x1))
1321 /* if wd->enableAggregation=1 => force disable */
1322 /* if wd->enableAggregation=0 => auto */
1326 if (wd->addbaComplete) {
1328 if (!(header[6]&0x1) && !rateProbingFlag && (wd->enableAggregation != 1))
1334 if ((wd->sta.SWEncryptEnable & ZM_SW_TKIP_ENCRY_EN) == 0 &&
1335 (wd->sta.SWEncryptEnable & ZM_SW_WEP_ENCRY_EN) == 0)
1340 //if (wd->sta.currentFrequency < 3000)
1344 if ( (wd->sta.athOwlAp == 1) || (wd->sta.RTSInAGGMode == TRUE) )
1361 if (wd->enableAggregation==0 && !(header[6]&0x1))
1376 zm_debug_msg1("no aggr, wd->enableAggregation = ", wd->enableAggregation);
1392 //if (wd->sta.currentFrequency < 3000)
1430 if (wd->wlanMode == ZM_MODE_AP)
1432 if (wd->frequency < 3000)
1447 if (wd->sta.currentFrequency < 3000)
1466 if (wd->wlanMode == ZM_MODE_INFRASTRUCTURE)
1479 header[4+8] = wd->sta.bssid[0];
1480 header[4+9] = wd->sta.bssid[1];
1481 header[4+10] = wd->sta.bssid[2];
1484 else if (wd->wlanMode == ZM_MODE_PSEUDO)
1491 else if (wd->wlanMode == ZM_MODE_IBSS)
1493 header[4+8] = wd->sta.bssid[0];
1494 header[4+9] = wd->sta.bssid[1];
1495 header[4+10] = wd->sta.bssid[2];
1504 else if (wd->wlanMode == ZM_MODE_AP)
1507 header[4+8] = wd->macAddr[0];
1508 header[4+9] = wd->macAddr[1];
1510 header[4+10] = wd->macAddr[2]; //Multiple SSID
1512 header[4+10] = wd->macAddr[2] + (vap<<8); //VAP
1515 //if ((wd->heartBeatNotification & ZM_BSSID_LIST_SCAN)
1532 header[4+5] = wd->macAddr[0];
1533 header[4+6] = wd->macAddr[1];
1534 if (wd->wlanMode == ZM_MODE_AP)
1537 header[4+7] = wd->macAddr[2]; //Multiple SSID
1539 header[4+7] = wd->macAddr[2] + (vap<<8); //VAP
1544 header[4+7] = wd->macAddr[2];
1549 header[4+11] = ((wd->mmseq++)<<4);
1562 if ( wd->sta.wepStatus == ZM_ENCRYPTION_WEP_ENABLED )
1564 if ( (wd->sta.encryMode == ZM_WEP64)||
1565 (wd->sta.encryMode == ZM_WEP128)||
1566 (wd->sta.encryMode == ZM_WEP256) )
1571 header[17] |= (((u16_t) wd->sta.keyId) << 14);
1595 zfHpEnableBeacon(dev, ZM_MODE_AP, (wd->beaconInterval/wd->ap.vapNumber), 1, 0);
1602 if (wd->ap.vapNumber >= 2)
1606 if (((wd->ap.apBitmap >> i) & 0x1) != 0)
1609 mac[0] = wd->macAddr[0];
1610 mac[1] = wd->macAddr[1];
1612 mac[2] = wd->macAddr[2]; //Multiple SSID
1614 mac[2] = wd->macAddr[2] + (i<<8); //VAP
1623 zfHpSetBasicRateSet(dev, wd->bRateBasic, wd->gRateBasic);
1644 for( i=0; i<wd->regulationTable.allowChannelCnt; i++ )
1646 if ( wd->regulationTable.allowChannel[i].channel == frequency )
1648 if ( i == (wd->regulationTable.allowChannelCnt-1) )
1657 if ( wd->regulationTable.allowChannel[i].channelFlags
1667 return wd->regulationTable.allowChannel[i].channel;
1686 if ( wd->regulationTable.allowChannel[0].channelFlags & ZM_REG_FLAG_CHANNEL_PASSIVE )
1695 return wd->regulationTable.allowChannel[0].channel;
1704 for( i=0; i<wd->regulationTable.allowChannelCnt; i++ )
1706 if ( wd->regulationTable.allowChannel[i].channel < 3000 )
1709 return wd->regulationTable.allowChannel[i].channel;
1723 for( i=0; i<wd->regulationTable.allowChannelCnt; i++ )
1725 if ( wd->regulationTable.allowChannel[i].channel > 3000 )
1728 return wd->regulationTable.allowChannel[i].channel;
1743 ChannelIndex = wd->regulationTable.allowChannelCnt-1;
1751 if ( wd->regulationTable.allowChannel[ChannelIndex].channelFlags
1761 return wd->regulationTable.allowChannel[ChannelIndex].channel;
1772 for( i=0; i<wd->regulationTable.allowChannelCnt; i++ )
1774 if ( wd->regulationTable.allowChannel[i].channel > 3000 )
1776 last5Ghzfrequency = wd->regulationTable.allowChannel[i].channel;