Fwd: FW: [PATCH 1/2] wifi: ath11k: fix null ptr dereference when tx offload is enabled

Pradeep Kumar Chitrapu quic_pradeepc at quicinc.com
Wed Mar 15 09:20:32 PDT 2023


>    static void
> @@ -610,7 +627,10 @@ static void ath11k_dp_tx_complete_msdu(struct
> ath11k *ar,
>
>        spin_unlock_bh(&ab->base_lock);
>
> -     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);
>    }
>
>    static inline void ath11k_dp_tx_status_parse(struct ath11k_base *ab,

I think using ieee80211_tx_status_8023 is a bad idea. It is simply a 
wrapper around ieee80211_tx_status_ext which looks up the sta based on 
the MSDU DA. This means it is incompatible with 4-address mode.
If you can have a sta pointer available, it is much better to just use 
ieee80211_tx_status_ext unconditionally.

In fact, I think we should simply remove ieee80211_tx_status_8023.

- Felix

Thanks Felix,
Looks like the band error may not be present with the following commit.
e5c0ee01fedf ("wifi: mac80211: status: look up band only where needed")

I will check further and amend in next revision.



More information about the ath11k mailing list