From: Felix Fietkau Date: Wed, 8 Feb 2012 18:17:11 +0000 (+0100) Subject: mac80211: do not call rate control .tx_status before .rate_init X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2cfc6fc584a65db87935ca4e4d5e1ad89d5192ee;p=openwrt%2Fstaging%2Fblogic.git mac80211: do not call rate control .tx_status before .rate_init 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 Tested-by: Arend van Spriel Signed-off-by: John W. Linville --- diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h index 5fc3135a6b45..fbb1efdc4d04 100644 --- a/net/mac80211/rate.h +++ b/net/mac80211/rate.h @@ -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);