Skip to content

Commit

Permalink
mac80211: do not call rate control .tx_status before .rate_init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Feb 15, 2012
1 parent 4b5a433 commit 216c57b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/rate.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,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);
Expand Down

0 comments on commit 216c57b

Please sign in to comment.