Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc76c287 authored by Bob Copeland's avatar Bob Copeland Committed by Kalle Valo
Browse files

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: default avatarBob Copeland <me@bobcopeland.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 0d031c89
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -564,7 +564,8 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
	     ieee80211_has_protected(hdr->frame_control)) {
	     ieee80211_has_protected(hdr->frame_control)) {
		skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
		skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
	} else if (!skb_cb->htt.nohwcrypt &&
	} 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);
		skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
	}
	}