|
@@ -3200,14 +3200,22 @@ ath10k_tx_h_get_txmode(struct ath10k *ar, struct ieee80211_vif *vif,
|
|
|
}
|
|
|
|
|
|
static bool ath10k_tx_h_use_hwcrypto(struct ieee80211_vif *vif,
|
|
|
- struct sk_buff *skb) {
|
|
|
- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
|
|
+ struct sk_buff *skb)
|
|
|
+{
|
|
|
+ const struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
|
|
+ const struct ieee80211_hdr *hdr = (void *)skb->data;
|
|
|
const u32 mask = IEEE80211_TX_INTFL_DONT_ENCRYPT |
|
|
|
IEEE80211_TX_CTL_INJECTED;
|
|
|
+
|
|
|
+ if (!ieee80211_has_protected(hdr->frame_control))
|
|
|
+ return false;
|
|
|
+
|
|
|
if ((info->flags & mask) == mask)
|
|
|
return false;
|
|
|
+
|
|
|
if (vif)
|
|
|
return !ath10k_vif_to_arvif(vif)->nohwcrypt;
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -3646,7 +3654,6 @@ static void ath10k_tx(struct ieee80211_hw *hw,
|
|
|
struct ieee80211_vif *vif = info->control.vif;
|
|
|
struct ieee80211_sta *sta = control->sta;
|
|
|
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
|
|
- __le16 fc = hdr->frame_control;
|
|
|
|
|
|
/* We should disable CCK RATE due to P2P */
|
|
|
if (info->flags & IEEE80211_TX_CTL_NO_CCK_RATE)
|
|
@@ -3658,7 +3665,6 @@ static void ath10k_tx(struct ieee80211_hw *hw,
|
|
|
ATH10K_SKB_CB(skb)->htt.nohwcrypt = !ath10k_tx_h_use_hwcrypto(vif, skb);
|
|
|
ATH10K_SKB_CB(skb)->vdev_id = ath10k_tx_h_get_vdev_id(ar, vif);
|
|
|
ATH10K_SKB_CB(skb)->txmode = ath10k_tx_h_get_txmode(ar, vif, sta, skb);
|
|
|
- ATH10K_SKB_CB(skb)->is_protected = ieee80211_has_protected(fc);
|
|
|
|
|
|
switch (ATH10K_SKB_CB(skb)->txmode) {
|
|
|
case ATH10K_HW_TXRX_MGMT:
|