linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: do not call rate control .tx_status before .rate_init
@ 2012-02-08 18:17 Felix Fietkau
  2012-02-08 19:25 ` John W. Linville
  0 siblings, 1 reply; 10+ messages in thread
From: Felix Fietkau @ 2012-02-08 18:17 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, johannes, arend

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>
---
 net/mac80211/rate.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h
index 5fc3135..fbb1efd 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);
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-02-10 10:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-08 18:17 [PATCH] mac80211: do not call rate control .tx_status before .rate_init Felix Fietkau
2012-02-08 19:25 ` John W. Linville
2012-02-08 19:38   ` Felix Fietkau
2012-02-08 19:44     ` John W. Linville
2012-02-08 23:01       ` Pavel Roskin
2012-02-09  0:51         ` Felix Fietkau
2012-02-09 20:14           ` John W. Linville
2012-02-09 20:21             ` Arend van Spriel
2012-02-09 23:11           ` Pavel Roskin
2012-02-10 10:05             ` jpo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).