Lines Matching defs:pTransmitKey
182 PSKeyItem pTransmitKey,
192 PSKeyItem pTransmitKey,
324 PSKeyItem pTransmitKey,
339 if (pTransmitKey == NULL)
344 pDevice->byKeyIndex = pTransmitKey->dwKeyIndex & 0xf;
346 if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
347 if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN ){
349 memcpy(pDevice->abyPRNG+3, pTransmitKey->abyKey, pTransmitKey->uKeyLength);
352 memcpy(pbyBuf+3, pTransmitKey->abyKey, pTransmitKey->uKeyLength);
353 if(pTransmitKey->uKeyLength == WLAN_WEP40_KEYLEN) {
355 memcpy(pbyBuf+11, pTransmitKey->abyKey, pTransmitKey->uKeyLength);
367 } else if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
368 pTransmitKey->wTSC15_0++;
369 if (pTransmitKey->wTSC15_0 == 0) {
370 pTransmitKey->dwTSC47_16++;
372 TKIPvMixKey(pTransmitKey->abyKey, pDevice->abyCurrentNetAddr,
373 pTransmitKey->wTSC15_0, pTransmitKey->dwTSC47_16, pDevice->abyPRNG);
380 *pdwExtIV = cpu_to_le32(pTransmitKey->dwTSC47_16);
383 } else if (pTransmitKey->byCipherSuite == KEY_CTL_CCMP) {
384 pTransmitKey->wTSC15_0++;
385 if (pTransmitKey->wTSC15_0 == 0) {
386 pTransmitKey->dwTSC47_16++;
388 memcpy(pbyBuf, pTransmitKey->abyKey, 16);
393 *pdwIV |= cpu_to_le16((WORD)(pTransmitKey->wTSC15_0));
395 *pdwExtIV = cpu_to_le32(pTransmitKey->dwTSC47_16);
401 *((PBYTE)(pMICHDR+8)) = HIBYTE(HIWORD(pTransmitKey->dwTSC47_16));
402 *((PBYTE)(pMICHDR+9)) = LOBYTE(HIWORD(pTransmitKey->dwTSC47_16));
403 *((PBYTE)(pMICHDR+10)) = HIBYTE(LOWORD(pTransmitKey->dwTSC47_16));
404 *((PBYTE)(pMICHDR+11)) = LOBYTE(LOWORD(pTransmitKey->dwTSC47_16));
405 *((PBYTE)(pMICHDR+12)) = HIBYTE(pTransmitKey->wTSC15_0);
406 *((PBYTE)(pMICHDR+13)) = LOBYTE(pTransmitKey->wTSC15_0);
439 PSKeyItem pTransmitKey,
448 if (pTransmitKey == NULL)
451 if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
459 rc4_init(&pDevice->SBox, pDevice->abyPRNG, pTransmitKey->uKeyLength + 3);
462 } else if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
1423 PSKeyItem pTransmitKey,
1458 if ((bNeedEncryption) && (pTransmitKey != NULL)) {
1459 if (((PSKeyTable) (pTransmitKey->pvKeyTable))->bSoftWEP == TRUE) {
1541 if ((bNeedEncryption) && (pTransmitKey != NULL)) { //WEP enabled
1542 if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) { //WEP40 or WEP104
1545 if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
1549 else if (pTransmitKey->byCipherSuite == KEY_CTL_CCMP) { //CCMP
1556 if ((bNeedEncryption) && (pTransmitKey != NULL)) {
1557 if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
1561 else if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
1566 if (pTransmitKey->byCipherSuite == KEY_CTL_CCMP) {
1693 s_vFillTxKey(pDevice, (PBYTE)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey,
1697 pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16;
1698 pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0 = pTransmitKey->wTSC15_0;
1735 if ((bNeedEncryption == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
1740 dwMICKey0 = *(PDWORD)(&pTransmitKey->abyKey[16]);
1741 dwMICKey1 = *(PDWORD)(&pTransmitKey->abyKey[20]);
1743 else if ((pTransmitKey->dwKeyIndex & AUTHENTICATOR_KEY) != 0) {
1744 dwMICKey0 = *(PDWORD)(&pTransmitKey->abyKey[16]);
1745 dwMICKey1 = *(PDWORD)(&pTransmitKey->abyKey[20]);
1748 dwMICKey0 = *(PDWORD)(&pTransmitKey->abyKey[24]);
1749 dwMICKey1 = *(PDWORD)(&pTransmitKey->abyKey[28]);
1787 s_vSWencryption(pDevice, pTransmitKey, (pbyPayloadHead), (WORD)(cbFrameBodySize + cbMIClen));
2082 //TKIPvMixKey(pTransmitKey->abyKey, pDevice->abyCurrentNetAddr,
2083 // pTransmitKey->wTSC15_0, pTransmitKey->dwTSC47_16, pDevice->abyPRNG);
2154 PSKeyItem pTransmitKey = NULL;
2163 if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == FALSE) {
2165 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == TRUE) {
2176 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == FALSE) {
2177 pTransmitKey = NULL;
2184 s_vFillTxKey(pDevice, (PBYTE)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey,
2368 PSKeyItem pTransmitKey = NULL;
2516 //TKIPvMixKey(pTransmitKey->abyKey, pDevice->abyCurrentNetAddr,
2517 // pTransmitKey->wTSC15_0, pTransmitKey->dwTSC47_16, pDevice->abyPRNG);
2616 pTransmitKey = &STempKey;
2617 pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite;
2618 pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex;
2619 pTransmitKey->uKeyLength = pMgmt->sNodeDBTable[uNodeIndex].uWepKeyLength;
2620 pTransmitKey->dwTSC47_16 = pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16;
2621 pTransmitKey->wTSC15_0 = pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0;
2622 memcpy(pTransmitKey->abyKey,
2624 pTransmitKey->uKeyLength
2628 if ((pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
2630 dwMICKey0 = *(PDWORD)(&pTransmitKey->abyKey[16]);
2631 dwMICKey1 = *(PDWORD)(&pTransmitKey->abyKey[20]);
2662 s_vFillTxKey(pDevice, (PBYTE)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey,
2666 pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16;
2667 pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0 = pTransmitKey->wTSC15_0;
2671 s_vSWencryption(pDevice, pTransmitKey, pbyPayloadHead, (WORD)(cbFrameBodySize + cbMIClen));
2741 PSKeyItem pTransmitKey = NULL;
2877 if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == FALSE) {
2879 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == TRUE) {
2897 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == TRUE)
2902 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == FALSE) {
2903 pTransmitKey = NULL;
2919 pTransmitKey = &STempKey;
2920 pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite;
2921 pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex;
2922 pTransmitKey->uKeyLength = pMgmt->sNodeDBTable[uNodeIndex].uWepKeyLength;
2923 pTransmitKey->dwTSC47_16 = pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16;
2924 pTransmitKey->wTSC15_0 = pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0;
2925 memcpy(pTransmitKey->abyKey,
2927 pTransmitKey->uKeyLength
3023 if (pTransmitKey == NULL) {
3031 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex);
3045 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex);
3052 if (pTransmitKey == NULL) {
3064 (PBYTE)skb->data, pTransmitKey, uNodeIndex,
3143 PSKeyItem pTransmitKey = NULL;
3166 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == FALSE) {
3167 pTransmitKey = NULL;
3176 pTransmitKey = &STempKey;
3177 pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite;
3178 pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex;
3179 pTransmitKey->uKeyLength = pMgmt->sNodeDBTable[uNodeIndex].uWepKeyLength;
3180 pTransmitKey->dwTSC47_16 = pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16;
3181 pTransmitKey->wTSC15_0 = pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0;
3182 memcpy(pTransmitKey->abyKey,
3184 pTransmitKey->uKeyLength
3189 if ( bNeedEncryption && (pTransmitKey == NULL) ) {
3234 pbySkbData, pTransmitKey, uNodeIndex,