diff options
author | Bob Copeland <me@bobcopeland.com> | 2015-09-09 19:47:35 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2015-09-17 13:48:41 +0300 |
commit | bc76c28719d4333248a516fd4d469ab741b44b63 (patch) | |
tree | 7658432c51fd028242f39260f87c256eacdeff85 /drivers/net/wireless/ath/ath10k/htt_tx.c | |
parent | 0d031c8995bcc065f9c5778069f2131f7d92d4d5 (diff) | |
download | linux-bc76c28719d4333248a516fd4d469ab741b44b63.tar.xz |
ath10k: check for encryption before adding MIC_LEN
In the case of raw mode without nohwcrypt parameter, we
should still make sure the frame is protected before
adding MIC_LEN to avoid skb_under_panic errors.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/htt_tx.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/htt_tx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c index ea53c2151122..eb5ba9bb8b4d 100644 --- a/drivers/net/wireless/ath/ath10k/htt_tx.c +++ b/drivers/net/wireless/ath/ath10k/htt_tx.c @@ -564,7 +564,8 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu) ieee80211_has_protected(hdr->frame_control)) { skb_put(msdu, IEEE80211_CCMP_MIC_LEN); } else if (!skb_cb->htt.nohwcrypt && - skb_cb->txmode == ATH10K_HW_TXRX_RAW) { + skb_cb->txmode == ATH10K_HW_TXRX_RAW && + ieee80211_has_protected(hdr->frame_control)) { skb_put(msdu, IEEE80211_CCMP_MIC_LEN); } |