Lines Matching defs:pTransmitKey
123 PSKeyItem pTransmitKey,
177 PSKeyItem pTransmitKey, unsigned int uNodeIndex, unsigned int *puMACfragNum);
207 PSKeyItem pTransmitKey,
223 if (pTransmitKey == NULL)
228 byKeyIndex = pTransmitKey->dwKeyIndex & 0xf;
230 if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
231 if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN ){
233 memcpy(pDevice->abyPRNG+3, pTransmitKey->abyKey, pTransmitKey->uKeyLength);
236 memcpy(pbyBuf+3, pTransmitKey->abyKey, pTransmitKey->uKeyLength);
237 if(pTransmitKey->uKeyLength == WLAN_WEP40_KEYLEN) {
239 memcpy(pbyBuf+11, pTransmitKey->abyKey, pTransmitKey->uKeyLength);
251 } else if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
252 pTransmitKey->wTSC15_0++;
253 if (pTransmitKey->wTSC15_0 == 0) {
254 pTransmitKey->dwTSC47_16++;
256 TKIPvMixKey(pTransmitKey->abyKey, pDevice->abyCurrentNetAddr,
257 pTransmitKey->wTSC15_0, pTransmitKey->dwTSC47_16, pDevice->abyPRNG);
264 *pdwExtIV = cpu_to_le32(pTransmitKey->dwTSC47_16);
267 } else if (pTransmitKey->byCipherSuite == KEY_CTL_CCMP) {
268 pTransmitKey->wTSC15_0++;
269 if (pTransmitKey->wTSC15_0 == 0) {
270 pTransmitKey->dwTSC47_16++;
272 memcpy(pbyBuf, pTransmitKey->abyKey, 16);
277 *pdwIV |= cpu_to_le16((unsigned short)(pTransmitKey->wTSC15_0));
279 *pdwExtIV = cpu_to_le32(pTransmitKey->dwTSC47_16);
285 *((unsigned char *)(pMICHDR+8)) = HIBYTE(HIWORD(pTransmitKey->dwTSC47_16));
286 *((unsigned char *)(pMICHDR+9)) = LOBYTE(HIWORD(pTransmitKey->dwTSC47_16));
287 *((unsigned char *)(pMICHDR+10)) = HIBYTE(LOWORD(pTransmitKey->dwTSC47_16));
288 *((unsigned char *)(pMICHDR+11)) = LOBYTE(LOWORD(pTransmitKey->dwTSC47_16));
289 *((unsigned char *)(pMICHDR+12)) = HIBYTE(pTransmitKey->wTSC15_0);
290 *((unsigned char *)(pMICHDR+13)) = LOBYTE(pTransmitKey->wTSC15_0);
323 PSKeyItem pTransmitKey,
332 if (pTransmitKey == NULL)
335 if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
343 rc4_init(&pDevice->SBox, pDevice->abyPRNG, pTransmitKey->uKeyLength + 3);
346 } else if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
1311 PSKeyItem pTransmitKey, unsigned int uNodeIndex, unsigned int *puMACfragNum)
1393 if ((bNeedEncrypt == true) && (pTransmitKey != NULL)) {
1394 if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
1397 if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN) {
1401 if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
1406 if (pTransmitKey->byCipherSuite == KEY_CTL_CCMP) {
1525 if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
1527 dwMICKey0 = *(unsigned long *)(&pTransmitKey->abyKey[16]);
1528 dwMICKey1 = *(unsigned long *)(&pTransmitKey->abyKey[20]);
1530 else if ((pTransmitKey->dwKeyIndex & AUTHENTICATOR_KEY) != 0) {
1531 dwMICKey0 = *(unsigned long *)(&pTransmitKey->abyKey[16]);
1532 dwMICKey1 = *(unsigned long *)(&pTransmitKey->abyKey[20]);
1535 dwMICKey0 = *(unsigned long *)(&pTransmitKey->abyKey[24]);
1536 dwMICKey1 = *(unsigned long *)(&pTransmitKey->abyKey[28]);
1589 s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
1593 pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16;
1594 pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0 = pTransmitKey->wTSC15_0;
1639 if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
1650 s_vSWencryption(pDevice, pTransmitKey, (pbyBuffer + uLength - cb802_1_H_len), (unsigned short)cbFragPayloadSize);
1694 s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
1698 pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16;
1699 pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0 = pTransmitKey->wTSC15_0;
1731 if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
1776 s_vSWencryption(pDevice, pTransmitKey, (pbyBuffer + uLength), (unsigned short)cbLastFragPayloadSize);
1825 s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
1829 pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16;
1830 pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0 = pTransmitKey->wTSC15_0;
1864 if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
1904 s_vSWencryption(pDevice, pTransmitKey, (pbyBuffer + uLength), (unsigned short)cbFragPayloadSize);
1954 s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
1958 pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16;
1959 pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0 = pTransmitKey->wTSC15_0;
2001 if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)){
2041 s_vSWencryption(pDevice, pTransmitKey, (pbyBuffer + uLength - cb802_1_H_len),
2075 PSKeyItem pTransmitKey, unsigned int uNodeIndex, unsigned int *puMACfragNum,
2166 if ((bNeedEncrypt) && (pTransmitKey != NULL)) { //WEP enabled
2167 if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
2170 else if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) { //WEP40 or WEP104
2171 if (pTransmitKey->uKeyLength != WLAN_WEP232_KEYLEN)
2174 else if (pTransmitKey->byCipherSuite == KEY_CTL_CCMP) { //CCMP
2204 pTransmitKey, uNodeIndex, puMACfragNum);
2440 //TKIPvMixKey(pTransmitKey->abyKey, pDevice->abyCurrentNetAddr,
2441 // pTransmitKey->wTSC15_0, pTransmitKey->dwTSC47_16, pDevice->abyPRNG);
2507 PSKeyItem pTransmitKey = NULL;
2530 if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == false) {
2532 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == true) {
2543 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == false) {
2544 pTransmitKey = NULL;
2551 s_vFillTxKey(pDevice, (unsigned char *)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey,
2704 PSKeyItem pTransmitKey,
2743 if (pTransmitKey == NULL) {
2756 } else if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
2759 } else if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
2763 } else if (pTransmitKey->byCipherSuite == KEY_CTL_CCMP) {
2827 PSKeyItem pTransmitKey = NULL;
2977 //TKIPvMixKey(pTransmitKey->abyKey, pDevice->abyCurrentNetAddr,
2978 // pTransmitKey->wTSC15_0, pTransmitKey->dwTSC47_16, pDevice->abyPRNG);
3074 pTransmitKey = &STempKey;
3075 pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite;
3076 pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex;
3077 pTransmitKey->uKeyLength = pMgmt->sNodeDBTable[uNodeIndex].uWepKeyLength;
3078 pTransmitKey->dwTSC47_16 = pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16;
3079 pTransmitKey->wTSC15_0 = pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0;
3080 memcpy(pTransmitKey->abyKey,
3082 pTransmitKey->uKeyLength
3086 if ((pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
3088 dwMICKey0 = *(unsigned long *)(&pTransmitKey->abyKey[16]);
3089 dwMICKey1 = *(unsigned long *)(&pTransmitKey->abyKey[20]);
3121 s_vFillTxKey(pDevice, (unsigned char *)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey,
3125 pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16;
3126 pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0 = pTransmitKey->wTSC15_0;
3130 s_vSWencryption(pDevice, pTransmitKey, pbyPayloadHead, (unsigned short)(cbFrameBodySize + cbMIClen));