]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
mac80211: do not call rate control .tx_status before .rate_init
authorFelix Fietkau <nbd@openwrt.org>
Wed, 8 Feb 2012 18:17:11 +0000 (19:17 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 8 Feb 2012 21:07:31 +0000 (16:07 -0500)
Most rate control implementations assume .get_rate and .tx_status are only
called once the per-station data has been fully initialized.
minstrel_ht crashes if this assumption is violated.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/rate.h

index 5fc3135a6b45a54e9e089b1c2ea65e1cf736d238..fbb1efdc4d04152237648c0faf48a887a4eab65d 100644 (file)
@@ -37,7 +37,7 @@ static inline void rate_control_tx_status(struct ieee80211_local *local,
        struct ieee80211_sta *ista = &sta->sta;
        void *priv_sta = sta->rate_ctrl_priv;
 
-       if (!ref)
+       if (!ref || !test_sta_flag(sta, WLAN_STA_RATE_CONTROL))
                return;
 
        ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb);