diff options
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 9afbee0d53c0..e3d8ff533ee6 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -529,6 +529,8 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx) | |||
529 | tx->key = NULL; | 529 | tx->key = NULL; |
530 | 530 | ||
531 | if (tx->key) { | 531 | if (tx->key) { |
532 | bool skip_hw = false; | ||
533 | |||
532 | tx->key->tx_rx_count++; | 534 | tx->key->tx_rx_count++; |
533 | /* TODO: add threshold stuff again */ | 535 | /* TODO: add threshold stuff again */ |
534 | 536 | ||
@@ -545,12 +547,19 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx) | |||
545 | !ieee80211_use_mfp(hdr->frame_control, tx->sta, | 547 | !ieee80211_use_mfp(hdr->frame_control, tx->sta, |
546 | tx->skb)) | 548 | tx->skb)) |
547 | tx->key = NULL; | 549 | tx->key = NULL; |
550 | skip_hw = (tx->key->conf.flags & | ||
551 | IEEE80211_KEY_FLAG_SW_MGMT) && | ||
552 | ieee80211_is_mgmt(hdr->frame_control); | ||
548 | break; | 553 | break; |
549 | case ALG_AES_CMAC: | 554 | case ALG_AES_CMAC: |
550 | if (!ieee80211_is_mgmt(hdr->frame_control)) | 555 | if (!ieee80211_is_mgmt(hdr->frame_control)) |
551 | tx->key = NULL; | 556 | tx->key = NULL; |
552 | break; | 557 | break; |
553 | } | 558 | } |
559 | |||
560 | if (!skip_hw && | ||
561 | tx->key->conf.flags & KEY_FLAG_UPLOADED_TO_HARDWARE) | ||
562 | info->control.hw_key = &tx->key->conf; | ||
554 | } | 563 | } |
555 | 564 | ||
556 | return TX_CONTINUE; | 565 | return TX_CONTINUE; |