wlan-ap-Telecominfraproject/feeds/wifi-ax/mac80211/patches/qca/105-ath11k-fix-monitor-crash-if-tx-offload-is-enabled.patch
John Crispin 528a778e38 open-converged-wireless: Import 21.02 based uCentral tree
Signed-off-by: John Crispin <john@phrozen.org>
2021-03-25 12:19:47 +01:00

68 lines
2.0 KiB
Diff

drivers/net/wireless/ath/ath11k/dp_tx.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -315,6 +315,8 @@ ath11k_dp_tx_htt_tx_complete_buf(struct
struct ieee80211_tx_info *info;
struct ath11k_skb_cb *skb_cb;
struct ath11k *ar;
+ struct ieee80211_vif *vif;
+ u8 flags = 0;
spin_lock_bh(&tx_ring->tx_idr_lock);
msdu = idr_find(&tx_ring->txbuf_idr, ts->msdu_id);
@@ -336,6 +338,8 @@ ath11k_dp_tx_htt_tx_complete_buf(struct
if (atomic_dec_and_test(&ar->dp.num_tx_pending))
wake_up(&ar->dp.tx_empty_waitq);
+ flags = skb_cb->flags;
+ vif = skb_cb->vif;
dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE);
memset(&info->status, 0, sizeof(info->status));
@@ -350,8 +354,10 @@ ath11k_dp_tx_htt_tx_complete_buf(struct
info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED;
}
}
-
- ieee80211_tx_status(ar->hw, msdu);
+ if (flags & ATH11K_SKB_HW_80211_ENCAP)
+ ieee80211_tx_status_8023(ar->hw, vif, msdu);
+ else
+ ieee80211_tx_status(ar->hw, msdu);
}
static void
@@ -419,6 +425,8 @@ static void ath11k_dp_tx_complete_msdu(s
struct ath11k_skb_cb *skb_cb;
struct ath11k_peer *peer;
struct ath11k_sta *arsta;
+ struct ieee80211_vif *vif;
+ u8 flags = 0;
if (WARN_ON_ONCE(ts->buf_rel_source != HAL_WBM_REL_SRC_MODULE_TQM)) {
/* Must not happen */
@@ -441,6 +449,9 @@ static void ath11k_dp_tx_complete_msdu(s
goto exit;
}
+ flags = skb_cb->flags;
+ vif = skb_cb->vif;
+
info = IEEE80211_SKB_CB(msdu);
memset(&info->status, 0, sizeof(info->status));
@@ -502,7 +513,10 @@ static void ath11k_dp_tx_complete_msdu(s
status.info = info;
status.rate = &arsta->last_txrate;
rcu_read_unlock();
- ieee80211_tx_status_ext(ar->hw, &status);
+ if (flags & ATH11K_SKB_HW_80211_ENCAP)
+ ieee80211_tx_status_8023(ar->hw, vif, msdu);
+ else
+ ieee80211_tx_status_ext(ar->hw, &status);
spin_unlock_bh(&ab->base_lock);
return;
exit: