Lines 2379-2385
Link Here
|
2379 |
uint32_t flags; |
2379 |
uint32_t flags; |
2380 |
uint16_t qos; |
2380 |
uint16_t qos; |
2381 |
uint8_t tid, type; |
2381 |
uint8_t tid, type; |
2382 |
int ac, error, rate, ismcast, totlen; |
2382 |
int ac, error, swcrypt, rate, ismcast, totlen; |
2383 |
|
2383 |
|
2384 |
wh = mtod(m, struct ieee80211_frame *); |
2384 |
wh = mtod(m, struct ieee80211_frame *); |
2385 |
type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; |
2385 |
type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; |
Lines 2422-2427
Link Here
|
2422 |
error = ENOBUFS; |
2422 |
error = ENOBUFS; |
2423 |
goto fail; |
2423 |
goto fail; |
2424 |
} |
2424 |
} |
|
|
2425 |
swcrypt = k->wk_flags & IEEE80211_KEY_SWCRYPT; |
2426 |
|
2425 |
/* 802.11 header may have moved. */ |
2427 |
/* 802.11 header may have moved. */ |
2426 |
wh = mtod(m, struct ieee80211_frame *); |
2428 |
wh = mtod(m, struct ieee80211_frame *); |
2427 |
} |
2429 |
} |
Lines 2508-2513
Link Here
|
2508 |
if (type != IEEE80211_FC0_TYPE_MGT) |
2510 |
if (type != IEEE80211_FC0_TYPE_MGT) |
2509 |
tx.data_ntries = tp->maxretry; |
2511 |
tx.data_ntries = tp->maxretry; |
2510 |
|
2512 |
|
|
|
2513 |
if (k != NULL && !swcrypt) { |
2514 |
switch (k->wk_cipher->ic_cipher) { |
2515 |
case IEEE80211_CIPHER_AES_CCM: |
2516 |
tx.security = WPI_CIPHER_CCMP; |
2517 |
break; |
2518 |
|
2519 |
default: |
2520 |
break; |
2521 |
} |
2522 |
|
2523 |
memcpy(tx.key, k->wk_key, k->wk_keylen); |
2524 |
} |
2525 |
|
2511 |
tx.len = htole16(totlen); |
2526 |
tx.len = htole16(totlen); |
2512 |
tx.flags = htole32(flags); |
2527 |
tx.flags = htole32(flags); |
2513 |
tx.plcp = rate2plcp(rate); |
2528 |
tx.plcp = rate2plcp(rate); |
Lines 2517-2529
Link Here
|
2517 |
tx.cck_mask = 0x0f; |
2532 |
tx.cck_mask = 0x0f; |
2518 |
tx.rts_ntries = 7; |
2533 |
tx.rts_ntries = 7; |
2519 |
|
2534 |
|
2520 |
if (k != NULL && k->wk_cipher->ic_cipher == IEEE80211_CIPHER_AES_CCM) { |
|
|
2521 |
if (!(k->wk_flags & IEEE80211_KEY_SWCRYPT)) { |
2522 |
tx.security = WPI_CIPHER_CCMP; |
2523 |
memcpy(tx.key, k->wk_key, k->wk_keylen); |
2524 |
} |
2525 |
} |
2526 |
|
2527 |
tx_data.data = &tx; |
2535 |
tx_data.data = &tx; |
2528 |
tx_data.ni = ni; |
2536 |
tx_data.ni = ni; |
2529 |
tx_data.m = m; |
2537 |
tx_data.m = m; |