Lines Matching refs:wd
51 addr[0] = (u8_t)(wd->macAddr[0] & 0xff);
52 addr[1] = (u8_t)(wd->macAddr[0] >> 8);
53 addr[2] = (u8_t)(wd->macAddr[1] & 0xff);
54 addr[3] = (u8_t)(wd->macAddr[1] >> 8);
55 addr[4] = (u8_t)(wd->macAddr[2] & 0xff);
57 addr[5] = (u8_t)(wd->macAddr[2] >> 8);
61 addr[5] = (u8_t)(wd->macAddr[2] >> 8); // Multiple SSID
63 addr[5] = vapId + 1 + (u8_t)(wd->macAddr[2] >> 8); //VAP
88 pBssInfo = wd->sta.bssList.head;
90 pBssList->bssCount = wd->sta.bssList.bssCount;
92 for( i=0; i<wd->sta.bssList.bssCount; i++ )
105 zm_assert(i==(wd->sta.bssList.bssCount-1));
127 bssListV1->bssCount = wd->sta.bssList.bssCount;
129 pBssInfo = wd->sta.bssList.head;
130 ZM_MAC_WORD_TO_BYTE(wd->sta.bssid, bssid);
132 for( i=0; i<wd->sta.bssList.bssCount; i++ )
136 && (wd->wlanMode == ZM_MODE_INFRASTRUCTURE ) )
147 &&((pBssInfo->ssid[1] == wd->sta.ssidLen) || (pBssInfo->ssid[1] == 0) )&& (pBssInfo->frequency == wd->frequency) )
150 pBssInfo->ssid[1] = wd->sta.ssidLen;
172 zfMemoryCopy(&(bssListV1->bssInfo[k].ssid[2]), wd->sta.ssid, wd->sta.ssidLen);
185 zm_assert(i==(wd->sta.bssList.bssCount-1));
198 zfMemoryCopy((u8_t *)pBssInfo, (u8_t *)&wd->sta.ibssBssDesc, sizeof(struct zsBssInfo));
205 return wd->sta.ibssBssIsCreator;
212 return wd->supportMode;
222 ret = wd->sta.connPowerInHalfDbm;
262 wd->ws.wlanMode = wlanMode;
273 wd->ws.authMode = authMode;
284 wd->ws.wepStatus = wepStatus;
300 wd->ws.ssidLen = ssidLength;
301 zfMemoryCopy(wd->ws.ssid, ssid, ssidLength);
305 wd->ws.ssid[ssidLength] = 0;
308 wd->ws.probingSsidList[0].ssidLen = ssidLength;
309 zfMemoryCopy(wd->ws.probingSsidList[0].ssid, ssid, ssidLength);
312 wd->ws.probingSsidList[i].ssidLen = 0;
329 wd->fragThreshold = 32767;
334 wd->fragThreshold = 256;
338 wd->fragThreshold = 2346;
342 wd->fragThreshold = fragThreshold & 0xfffe;
355 wd->rtsThreshold = rtsThreshold;
368 wd->frequency = (u16_t) (frequency/1000);
370 zfCoreSetFrequency(dev, wd->frequency);
377 wd->ws.autoSetFrequency = 0;
379 wd->ws.frequency = (u16_t) (frequency/1000);
394 wd->ws.desiredBssid[i] = bssid[i];
396 wd->ws.bDesiredBssid = TRUE;
412 wd->beaconInterval = beaconInterval;
420 wd->ws.beaconInterval = beaconInterval;
435 wd->ws.dtim = dtim;
450 wd->sta.atimWindow = atimWindow;
458 wd->ws.atimWindow = atimWindow;
471 if (wd->wlanMode == ZM_MODE_AP)
474 if ((wd->ws.encryMode != ZM_AES) && (wd->ws.encryMode != ZM_TKIP))
475 wd->ws.encryMode = encryMode;
478 wd->ws.encryMode = encryMode;
486 wd->sta.keyId = keyId;
504 isInstalled = wd->sta.oppositeInfo[peerIdx].pkInstalled;
532 if ( wd->sta.ibssWpa2Psk == 1 )
539 if ( wd->sta.oppositeInfo[userIdx].camIdx == 0xff )
540 wd->sta.oppositeInfo[userIdx].camIdx = userIdx;
561 wd->ap.staTable[id].iv16 = 0;
562 wd->ap.staTable[id].iv32 = 0;
569 //zfTkipInit(keyInfo.key, (u8_t*) wd->macAddr,
570 // &(wd->ap.staTable[id].txSeed), KeyRsc);
572 // &(wd->ap.staTable[id].rxSeed), KeyRsc);
578 wd->ap.staTable[id].encryMode = ZM_CENC;
581 wd->ap.staTable[id].txiv[0] = 0x5c365c37;
582 wd->ap.staTable[id].txiv[1] = 0x5c365c36;
583 wd->ap.staTable[id].txiv[2] = 0x5c365c36;
584 wd->ap.staTable[id].txiv[3] = 0x5c365c36;
586 wd->ap.staTable[id].rxiv[0] = 0x5c365c36;
587 wd->ap.staTable[id].rxiv[1] = 0x5c365c36;
588 wd->ap.staTable[id].rxiv[2] = 0x5c365c36;
589 wd->ap.staTable[id].rxiv[3] = 0x5c365c36;
592 wd->ap.staTable[id].cencKeyIdx = keyInfo.keyIndex;
600 wd->ap.staTable[id].encryMode = ZM_TKIP;
609 zfMemoryCopy((u8_t *)&(wd->ap.staTable[id].txMicKey), &(keyInfo.key[16]), 8);
610 zfMemoryCopy((u8_t *)&(wd->ap.staTable[id].rxMicKey), &(keyInfo.key[24]), 8);
616 wd->ap.staTable[id].encryMode = ZM_AES;
630 //zfCoreSetKey(dev, id+1, 0, wd->ap.staTable[id].encryMode,
633 wd->ap.staTable[id].encryMode, (u32_t*) keyInfo.key,
635 wd->ap.staTable[id].keyIdx = id + 1 + 4;
641 wd->ap.iv16[vapId] = 0;
642 wd->ap.iv32[vapId] = 0;
648 //zfTkipInit(keyInfo.key, (u8_t*) wd->macAddr,
649 // &(wd->ap.bcSeed), KeyRsc);
657 wd->ap.txiv[vapId][0] = 0x5c365c36;
658 wd->ap.txiv[vapId][1] = 0x5c365c36;
659 wd->ap.txiv[vapId][2] = 0x5c365c36;
660 wd->ap.txiv[vapId][3] = 0x5c365c36;
678 zfMicSetKey(&(keyInfo.key[16]), &(wd->ap.bcMicKey[0]));
694 wd->ap.capab[vapId] &= 0xffef;
718 //zfCoreSetKey(dev, 0, 0, encryMode, wd->macAddr, key);
720 zfHpSetApGroupKey(dev, wd->macAddr, encryMode,
724 wd->ws.encryMode = encryMode;
727 wd->ap.encryMode[vapId] = encryMode;
730 wd->ap.bcKeyIndex[vapId] = keyInfo.keyIndex;
731 wd->ap.bcHalKeyIdx[vapId] = vapId + 60;
734 wd->ap.capab[vapId] |= 0x10;
743 //zfTkipInit(keyInfo.key, (u8_t*) wd->macAddr,
744 // &wd->sta.txSeed, keyInfo.initIv);
745 //zfTkipInit(keyInfo.key, (u8_t*) wd->sta.bssid,
746 // &wd->sta.rxSeed[keyInfo.keyIndex], keyInfo.initIv);
749 if ( wd->sta.ibssWpa2Psk == 1 )
752 wd->sta.oppositeInfo[userIdx].iv16 = 0;
753 wd->sta.oppositeInfo[userIdx].iv32 = 0;
757 wd->sta.iv16 = 0;
758 wd->sta.iv32 = 0;
761 wd->sta.oppositeInfo[userIdx].pkInstalled = 1;
763 wd->sta.iv16 = 0;
764 wd->sta.iv32 = 0;
766 wd->sta.oppositeInfo[userIdx].pkInstalled = 1;
771 zfTkipInit(keyInfo.key, (u8_t*) wd->macAddr,
772 &wd->sta.txSeed, keyInfo.initIv);
773 zfTkipInit(keyInfo.key, (u8_t*) wd->sta.bssid,
774 &wd->sta.rxSeed[keyInfo.keyIndex], keyInfo.initIv);
781 wd->sta.encryMode = ZM_CENC;
784 wd->sta.txiv[0] = 0x5c365c36;
785 wd->sta.txiv[1] = 0x5c365c36;
786 wd->sta.txiv[2] = 0x5c365c36;
787 wd->sta.txiv[3] = 0x5c365c36;
789 wd->sta.rxiv[0] = 0x5c365c37;
790 wd->sta.rxiv[1] = 0x5c365c36;
791 wd->sta.rxiv[2] = 0x5c365c36;
792 wd->sta.rxiv[3] = 0x5c365c36;
795 wd->sta.cencKeyId = keyInfo.keyIndex;
803 wd->sta.encryMode = ZM_TKIP;
805 //zfCoreSetKey(dev, 0, 1, ZM_TKIP, wd->sta.bssid,
808 zfMicSetKey(&keyInfo.key[16], &wd->sta.txMicKey);
810 &wd->sta.rxMicKey[keyInfo.keyIndex]);
816 if ( wd->sta.ibssWpa2Psk == 1 )
818 wd->sta.oppositeInfo[userIdx].encryMode = ZM_AES;
819 encryType = wd->sta.oppositeInfo[userIdx].encryMode;
823 wd->sta.encryMode = ZM_AES;
824 encryType = wd->sta.encryMode;
827 wd->sta.encryMode = ZM_AES;
836 //zfCoreSetKey(dev, 0, 0, wd->sta.encryMode,
837 // wd->sta.bssid, (u32_t*) keyInfo.key);
838 //zfHpSetStaPairwiseKey(dev, wd->sta.bssid, wd->sta.encryMode,
842 if ( (keyInfo.keyLength==16) && (wd->sta.ibssWpa2Psk==1) )
849 // wd->sta.encryMode,
852 wd->sta.oppositeInfo[userIdx].wpaState = ZM_STA_WPA_STATE_PK_OK ;
858 addr[2 * i] = wd->sta.bssid[i] & 0xff;
859 addr[2 * i + 1] = wd->sta.bssid[i] >> 8;
864 addr,//(u8_t *)wd->sta.bssid,
865 wd->sta.encryMode,
868 wd->sta.keyId = 4;
874 addr[2 * i] = wd->sta.bssid[i] & 0xff;
875 addr[2 * i + 1] = wd->sta.bssid[i] >> 8;
880 addr,//(u8_t *)wd->sta.bssid,
881 wd->sta.encryMode,
884 wd->sta.keyId = 4;
887 wd->sta.wpaState = ZM_STA_WPA_STATE_PK_OK;
892 zfTkipInit(keyInfo.key, (u8_t*) wd->sta.bssid,
893 &wd->sta.rxSeed[keyInfo.keyIndex], keyInfo.initIv);
904 wd->sta.rxivGK[0] = 0x5c365c36;
905 wd->sta.rxivGK[1] = 0x5c365c36;
906 wd->sta.rxivGK[2] = 0x5c365c36;
907 wd->sta.rxivGK[3] = 0x5c365c36;
917 key = (u32_t*) wd->sta.rxSeed[keyInfo.keyIndex].tk;
921 wd->sta.rxSeed[keyInfo.keyIndex].iv16 = 0;
922 wd->sta.rxSeed[keyInfo.keyIndex].iv32 = 0;
930 &wd->sta.rxMicKey[keyInfo.keyIndex]);
936 //key = (u32_t*) wd->sta.rxSeed[keyInfo.keyIndex].tk;
962 if ( (keyInfo.keyLength==16) && (wd->sta.ibssWpa2Psk==1) )
981 wd->sta.wpaState = ZM_STA_WPA_STATE_GK_OK;
991 wd->sta.wpaState = ZM_STA_WPA_STATE_GK_OK;
1021 zfTkipInit(keyInfo.key, (u8_t*) wd->sta.bssid,
1022 &wd->sta.rxSeed[keyInfo.keyIndex], keyInfo.initIv);
1024 &wd->sta.rxMicKey[keyInfo.keyIndex]);
1037 //zfCoreSetKey(dev, 64, 1, wd->sta.encryMode,
1038 // wd->sta.bssid, (u32_t*) (&keyInfo.key[16]));
1059 wd->ap.bcHalKeyIdx[vapId] = keyInfo.keyIndex;
1060 wd->ap.bcKeyIndex[vapId] = keyInfo.keyIndex;
1061 wd->sta.keyId = keyInfo.keyIndex;
1066 if(wd->TKIP_Group_KeyChanging == 0x1)
1076 wd->TKIP_Group_KeyChanging = 0x1;
1086 // wd->sta.encryMode, wd->sta.bssid, (u32_t*) keyInfo.key);
1095 if ( (keyInfo.keyLength==16) && (wd->sta.ibssWpa2Psk==1) )
1097 wd->sta.wpaState = ZM_STA_WPA_STATE_PK_OK;
1101 if (wd->sta.wpaState == ZM_STA_WPA_STATE_PK_OK)
1102 wd->sta.wpaState = ZM_STA_WPA_STATE_GK_OK;
1105 wd->sta.wpaState = ZM_STA_WPA_STATE_PK_OK;
1106 wd->sta.encryMode = encryMode;
1107 wd->ws.encryMode = encryMode;
1111 if (wd->sta.wpaState == ZM_STA_WPA_STATE_PK_OK)
1112 wd->sta.wpaState = ZM_STA_WPA_STATE_GK_OK;
1113 else if ( wd->sta.wpaState == ZM_STA_WPA_STATE_INIT )
1115 wd->sta.wpaState = ZM_STA_WPA_STATE_PK_OK;
1116 wd->sta.encryMode = encryMode;
1117 wd->ws.encryMode = encryMode;
1127 zfMemoryCopy(wd->sta.wepKey[keyInfo.keyIndex], keyInfo.key,
1131 wd->sta.SWEncryMode[keyInfo.keyIndex] = encryMode;
1133 wd->sta.encryMode = encryMode;
1134 wd->ws.encryMode = encryMode;
1139 // wd->sta.flagKeyChanging = 1;
1155 wd->sta.encryMode = ZM_WEP64;
1161 wd->sta.encryMode = ZM_WEP128;
1167 wd->sta.encryMode = ZM_WEP256;
1174 wd->sta.encryMode = ZM_AES;
1187 wd->sta.encryMode = ZM_CENC;
1198 wd->sta.txiv[0] = 0x5c365c36;
1199 wd->sta.txiv[1] = 0x5c365c36;
1200 wd->sta.txiv[2] = 0x5c365c36;
1201 wd->sta.txiv[3] = 0x5c365c36;
1206 wd->sta.encryMode = ZM_TKIP;
1212 wd->sta.encryMode = ZM_NO_WEP;
1228 wd->macAddr[0] = mac[0];
1229 wd->macAddr[1] = mac[1];
1230 wd->macAddr[2] = mac[2];
1239 return wd->wlanMode;
1246 return wd->state;
1257 authMode = wd->ws.authMode;
1261 //authMode = wd->sta.authMode;
1262 authMode = wd->sta.currentAuthMode;
1276 wepStatus = wd->ws.wepStatus;
1280 wepStatus = wd->sta.wepStatus;
1291 if (wd->wlanMode == ZM_MODE_AP)
1297 *pSsidLength = wd->ap.ssidLen[0];
1298 zfMemoryCopy(ssid, wd->ap.ssid[0], wd->ap.ssidLen[0]);
1302 *pSsidLength = wd->ap.ssidLen[vapId + 1];
1303 zfMemoryCopy(ssid, wd->ap.ssid[vapId + 1], wd->ap.ssidLen[vapId + 1]);
1308 *pSsidLength = wd->sta.ssidLen;
1309 zfMemoryCopy(ssid, wd->sta.ssid, wd->sta.ssidLen);
1317 return wd->fragThreshold;
1324 return wd->rtsThreshold;
1331 return (wd->frequency*1000);
1354 if (wd->sta.currentFrequency > 3000)
1356 if (wd->supportMode & ZM_WIRELESS_MODE_5)
1358 frequency = wd->sta.currentFrequency;
1360 else if (wd->supportMode & ZM_WIRELESS_MODE_24)
1371 if (wd->supportMode & ZM_WIRELESS_MODE_24)
1373 frequency = wd->sta.currentFrequency;
1375 else if (wd->supportMode & ZM_WIRELESS_MODE_5)
1387 frequency = wd->sta.currentFrequency;
1405 for (i = 0; i < wd->regulationTable.allowChannelCnt; i++)
1407 if ( wd->regulationTable.allowChannel[i].channel == frequency )
1409 ret = wd->regulationTable.allowChannel[i].channelFlags;
1422 *bandWidth = wd->BandWidth40;
1423 *extOffset = wd->ExtOffset;
1430 return wd->cwm.cw_mode;
1437 return wd->cwm.cw_enable;
1446 ZM_MAC_WORD_TO_BYTE(wd->sta.bssid, addr);
1454 return wd->beaconInterval;
1460 wd->sta.rxBeaconTotal += wd->sta.rxBeaconCount;
1462 return wd->sta.rxBeaconTotal;
1471 atimWindow = wd->sta.atimWindow;
1480 if (wd->wlanMode == ZM_MODE_AP)
1481 return wd->ap.encryMode[0];
1483 return wd->sta.encryMode;
1492 capability = wd->sta.capability[0] +
1493 (((u16_t) wd->sta.capability[1]) << 8);
1503 return wd->sta.aid;
1514 if ( wd->bRate & (0x1 << i) )
1517 ((wd->bRateBasic & (0x1<<i))<<(7-i));
1533 if ( wd->gRate & (0x1 << i) )
1536 ((wd->gRateBasic & (0x1<<i))<<(7-i));
1550 len = wd->sta.rsnIe[1] + 2;
1551 zfMemoryCopy(ie, wd->sta.rsnIe, len);
1561 len = wd->sta.wpaIe[1] + 2;
1562 zfMemoryCopy(ie, wd->sta.wpaIe, len);
1571 switch( wd->sta.currentAuthMode )
1575 if ( wd->sta.rsnIe[7] == 2 )
1587 if ( wd->sta.rsnIe[11] == 2 )
1598 return wd->sta.encryMode;
1606 return wd->sta.EnableHT;
1613 return wd->BandWidth40;
1620 return wd->regulationTable.regionCode;
1627 if (wd->wlanMode == ZM_MODE_AP) // AP Mode
1639 wd->ap.wpaLen[vapId] = Length;
1640 zfMemoryCopy(wd->ap.wpaIe[vapId], ie, wd->ap.wpaLen[vapId]);
1646 wd->sta.wpaLen = Length;
1647 zfMemoryCopy(wd->sta.wpaIe, ie, wd->sta.wpaLen);
1650 if (wd->wlanMode == ZM_MODE_AP) // AP Mode
1652 wd->ap.wpaSupport[vapId] = 1;
1656 wd->sta.wpaSupport = 1;
1666 if (wd->wlanMode == ZM_MODE_AP) // AP Mode
1675 wd->ap.wpaSupport[vapId] = WpaSupport;
1679 wd->sta.wpaSupport = WpaSupport;
1688 wd->sta.bProtectionMode = mode;
1689 if (wd->sta.bProtectionMode == TRUE)
1698 zm_msg1_mm(ZM_LV_1, "wd->protectionMode=", wd->sta.bProtectionMode);
1706 wd->ws.bRateBasic = bRateSet;
1707 wd->ws.gRateBasic = gRateSet;
1708 wd->ws.nRateBasic = nRateSet;
1715 wd->ws.bgMode = mode;
1722 wd->ws.preambleType = type;
1729 return wd->ws.preambleType;
1736 return wd->sta.powerSaveMode;
1745 for(i=0; i<wd->sta.pmkidInfo.bssidCount; i++)
1747 if ( zfMemoryIsEqual((u8_t*) wd->sta.pmkidInfo.bssidInfo[i].bssid,
1755 if ( i < wd->sta.pmkidInfo.bssidCount )
1758 zfMemoryCopy(wd->sta.pmkidInfo.bssidInfo[i].pmkid, pmkid, 16);
1764 wd->sta.pmkidInfo.bssidInfo[i].bssid[0] = bssid[0];
1765 wd->sta.pmkidInfo.bssidInfo[i].bssid[1] = bssid[1];
1766 wd->sta.pmkidInfo.bssidInfo[i].bssid[2] = bssid[2];
1768 zfMemoryCopy(wd->sta.pmkidInfo.bssidInfo[i].pmkid, pmkid, 16);
1769 wd->sta.pmkidInfo.bssidCount++;
1784 wd->sta.pmkidInfo.bssidCount * sizeof(struct zsPmkidBssidInfo);
1788 return wd->sta.pmkidInfo.bssidCount;
1791 zfMemoryCopy(buf, (u8_t*) &wd->sta.pmkidInfo, (u16_t) size);
1805 wd->sta.multicastList.size = size;
1808 zfMemoryCopy(wd->sta.multicastList.macAddr[i].addr,
1812 if ( wd->sta.osRxFilter & ZM_PACKET_TYPE_ALL_MULTICAST )
1831 wd->sta.encryMode = ZM_NO_WEP;
1838 wd->sta.encryMode = ZM_NO_WEP;
1853 zfMemoryCopy((u8_t*) pEntry, (u8_t*) &wd->regulationTable,
1864 wd->sta.activescanTickPerChannel = time / ZM_MS_PER_TICK;
1871 wd->sta.bAutoReconnect = enable;
1872 //wd->sta.bAutoReconnectEnabled = enable;
1879 wd->ws.staWmeEnabled = enable & 0x3;
1882 wd->ws.staWmeQosInfo = uapsdInfo & 0x6f;
1886 wd->ws.staWmeQosInfo = 0;
1894 wd->ws.apWmeEnabled = enable;
1901 return wd->ws.staWmeEnabled;
1914 wd->ws.probingSsidList[entry].ssidLen = ssidLen;
1915 zfMemoryCopy(wd->ws.probingSsidList[entry].ssid, ssid, ssidLen);
1926 wd->sta.disableProbingWithSsid = mode;
1935 wd->ws.dropUnencryptedPkts = enable;
1942 wd->sta.pStaRxSecurityCheckCb = pStaRxSecurityCheckCb;
1949 wd->ws.ibssJoinOnly = joinOnly;
1988 wd->ap.wds.macAddr[wdsPortId][0] = wdsAddr[0];
1989 wd->ap.wds.macAddr[wdsPortId][1] = wdsAddr[1];
1990 wd->ap.wds.macAddr[wdsPortId][2] = wdsAddr[2];
1992 wd->ap.wds.wdsBitmap |= (1 << wdsPortId);
1993 wd->ap.wds.encryMode[wdsPortId] = (u8_t) encType;
2002 wd->ap.wds.wdsBitmap &= (~(1 << wdsPortId));
2012 //struct zsWlanDev* wd = (struct zsWlanDev*) zmw_wlan_dev(dev);
2017 txiv[3] = wd->ap.txiv[vapId][0];
2018 txiv[2] = wd->ap.txiv[vapId][1];
2019 txiv[1] = wd->ap.txiv[vapId][2];
2020 txiv[0] = wd->ap.txiv[vapId][3];
2032 buffer[0] = wd->SignalStrength;
2033 buffer[1] = wd->SignalQuality;
2109 wd->sta.keyId = (u8_t) value;
2114 wd->checksumTest = value;
2118 wd->enableProtectionMode = value;
2119 zm_msg1_mm(ZM_LV_1, "wd->enableProtectionMode=", wd->enableProtectionMode);
2126 wd->rxPacketDump = 1;
2130 wd->rxPacketDump = 0;
2160 macAddr[i] = wd->sta.bssid[i];
2166 //wd->sta.txiv[0] = txiv[0];
2167 //wd->sta.txiv[1] = txiv[1];
2168 //wd->sta.txiv[2] = txiv[2];
2169 //wd->sta.txiv[3] = txiv[3];
2171 //wd->sta.rxiv[0] = rxiv[0];
2172 //wd->sta.rxiv[1] = rxiv[1];
2173 //wd->sta.rxiv[2] = rxiv[2];
2174 //wd->sta.rxiv[3] = rxiv[3];
2199 keyInfo.vapAddr[i] = wd->macAddr[i];
2205 wd->sta.rxivGK[0] = ((rxiv[3] >> 24) & 0xFF)
2209 wd->sta.rxivGK[1] = ((rxiv[2] >> 24) & 0xFF)
2213 wd->sta.rxivGK[2] = ((rxiv[1] >> 24) & 0xFF)
2217 wd->sta.rxivGK[3] = ((rxiv[0] >> 24) & 0xFF)
2222 wd->sta.authMode = ZM_AUTH_MODE_CENC;
2223 wd->sta.currentAuthMode = ZM_AUTH_MODE_CENC;
2235 wd->sta.b802_11D = mode;
2238 wd->regulationTable.regionCode = NO_ENUMRD;
2239 for (i = 0; i < wd->regulationTable.allowChannelCnt; i++)
2240 wd->regulationTable.allowChannel[i].channelFlags |= ZM_REG_FLAG_CHANNEL_PASSIVE;
2244 for (i = 0; i < wd->regulationTable.allowChannelCnt; i++)
2245 wd->regulationTable.allowChannel[i].channelFlags &= ~ZM_REG_FLAG_CHANNEL_PASSIVE;
2270 wd->sta.DFSEnable = mode;
2272 wd->sta.capability[1] |= ZM_BIT_0;
2274 wd->sta.capability[1] &= (~ZM_BIT_0);
2297 wd->sta.TPCEnable = mode;
2299 wd->sta.capability[1] |= ZM_BIT_0;
2301 wd->sta.capability[1] &= (~ZM_BIT_0);
2310 wd->aniEnable = mode;
2322 zm_msg1_mm(ZM_LV_0, "Hw_UnderrunCnt = ", wd->commTally.Hw_UnderrunCnt);
2323 zm_msg1_mm(ZM_LV_0, "Hw_TotalRxFrm = ", wd->commTally.Hw_TotalRxFrm);
2324 zm_msg1_mm(ZM_LV_0, "Hw_CRC32Cnt = ", wd->commTally.Hw_CRC32Cnt);
2325 zm_msg1_mm(ZM_LV_0, "Hw_CRC16Cnt = ", wd->commTally.Hw_CRC16Cnt);
2326 zm_msg1_mm(ZM_LV_1, "Hw_DecrypErr_UNI = ", wd->commTally.Hw_DecrypErr_UNI);
2327 zm_msg1_mm(ZM_LV_0, "Hw_RxFIFOOverrun = ", wd->commTally.Hw_RxFIFOOverrun);
2328 zm_msg1_mm(ZM_LV_1, "Hw_DecrypErr_Mul = ", wd->commTally.Hw_DecrypErr_Mul);
2329 zm_msg1_mm(ZM_LV_1, "Hw_RetryCnt = ", wd->commTally.Hw_RetryCnt);
2330 zm_msg1_mm(ZM_LV_0, "Hw_TotalTxFrm = ", wd->commTally.Hw_TotalTxFrm);
2331 zm_msg1_mm(ZM_LV_0, "Hw_RxTimeOut = ", wd->commTally.Hw_RxTimeOut);
2332 zm_msg1_mm(ZM_LV_0, "Tx_MPDU = ", wd->commTally.Tx_MPDU);
2333 zm_msg1_mm(ZM_LV_0, "BA_Fail = ", wd->commTally.BA_Fail);
2334 zm_msg1_mm(ZM_LV_0, "Hw_Tx_AMPDU = ", wd->commTally.Hw_Tx_AMPDU);
2335 zm_msg1_mm(ZM_LV_0, "Hw_Tx_MPDU = ", wd->commTally.Hw_Tx_MPDU);
2337 zm_msg1_mm(ZM_LV_1, "Hw_RxMPDU = ", wd->commTally.Hw_RxMPDU);
2338 zm_msg1_mm(ZM_LV_1, "Hw_RxDropMPDU = ", wd->commTally.Hw_RxDropMPDU);
2339 zm_msg1_mm(ZM_LV_1, "Hw_RxDelMPDU = ", wd->commTally.Hw_RxDelMPDU);
2340 zm_msg1_mm(ZM_LV_1, "Hw_RxPhyMiscError = ", wd->commTally.Hw_RxPhyMiscError);
2341 zm_msg1_mm(ZM_LV_1, "Hw_RxPhyXRError = ", wd->commTally.Hw_RxPhyXRError);
2342 zm_msg1_mm(ZM_LV_1, "Hw_RxPhyOFDMError = ", wd->commTally.Hw_RxPhyOFDMError);
2343 zm_msg1_mm(ZM_LV_1, "Hw_RxPhyCCKError = ", wd->commTally.Hw_RxPhyCCKError);
2344 zm_msg1_mm(ZM_LV_1, "Hw_RxPhyHTError = ", wd->commTally.Hw_RxPhyHTError);
2345 zm_msg1_mm(ZM_LV_1, "Hw_RxPhyTotalCount = ", wd->commTally.Hw_RxPhyTotalCount);
2347 if (!((wd->commTally.Tx_MPDU == 0) && (wd->commTally.BA_Fail == 0)))
2349 zm_debug_msg_p("BA Fail Ratio(%) = ", wd->commTally.BA_Fail * 100,
2350 (wd->commTally.BA_Fail + wd->commTally.Tx_MPDU));
2353 if (!((wd->commTally.Hw_Tx_MPDU == 0) && (wd->commTally.Hw_Tx_AMPDU == 0)))
2356 wd->commTally.Hw_Tx_MPDU, wd->commTally.Hw_Tx_AMPDU);
2368 wd->maxTxPower2 = power2;
2369 wd->maxTxPower5 = power5;
2377 *power2 = wd->maxTxPower2;
2378 *power5 = wd->maxTxPower5;
2388 wd->connectMode = mode;
2399 wd->supportMode = mode;
2407 wd->ws.adhocMode = mode;
2418 adhocMode = wd->ws.adhocMode;
2422 adhocMode = wd->wfc.bIbssGMode;
2436 buf[2] = wd->ws.countryIsoName[0] = countryIsoName[2];
2437 buf[3] = wd->ws.countryIsoName[1] = countryIsoName[1];
2438 buf[4] = wd->ws.countryIsoName[2] = countryIsoName[0];
2442 buf[2] = wd->ws.countryIsoName[0] = countryIsoName[1];
2443 buf[3] = wd->ws.countryIsoName[1] = countryIsoName[0];
2444 buf[4] = wd->ws.countryIsoName[2] = '\0';
2459 return wd->ws.countryIsoName;
2483 wd->frequency = zfChGetFirstChannel(dev, NULL);
2485 zfCoreSetFrequency(dev, wd->frequency);
2520 wd->ledStruct.LEDCtrlType = type;
2521 wd->ledStruct.LEDCtrlFlagFromReg = flag;
2529 wd->sta.leapEnabled = leapEnabled;
2541 return wd->sta.ReceivedPktRatePerSecond;
2548 if (wd->sta.SWEncryptEnable != 0)
2559 for (ii = 0; ii < wd->regulationTable.allowChannelCnt; ii++)
2561 channels[ii] = wd->regulationTable.allowChannel[ii].channel;
2564 return wd->regulationTable.allowChannelCnt;
2571 wd->dynamicSIFSEnable = val;
2573 zm_debug_msg1("wd->dynamicSIFSEnable = ", wd->dynamicSIFSEnable)
2580 return wd->sta.multicastList.size;
2590 for ( i=0; i<wd->sta.multicastList.size; i++ )
2592 zfMemoryCopy(pMacList[i].addr, wd->sta.multicastList.macAddr[i].addr, 6);
2603 oldFilter = wd->sta.osRxFilter;
2605 wd->sta.osRxFilter = PacketFilter;
2608 (wd->sta.osRxFilter & ZM_PACKET_TYPE_ALL_MULTICAST))
2610 if ( wd->sta.osRxFilter & ZM_PACKET_TYPE_ALL_MULTICAST )
2612 zfHpSetMulticastList(dev, wd->sta.multicastList.size,
2613 (u8_t*)wd->sta.multicastList.macAddr, bAllMulticast);
2624 for ( i=0; i<wd->sta.multicastList.size; i++ )
2626 if ( zfwMemoryIsEqual((u8_t*)dstMacAddr, (u8_t*)wd->sta.multicastList.macAddr[i].addr, 6) )
2640 wd->sta.bSafeMode = safeMode;
2654 wd->sta.ibssAdditionalIESize = ibssAdditionalIESize;
2655 zfMemoryCopy(wd->sta.ibssAdditionalIE, ibssAdditionalIE, (u16_t)ibssAdditionalIESize);
2658 wd->sta.ibssAdditionalIESize = 0;