Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <nbd@openwrt.org>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Felix Fietkau and committed by
John W. Linville
216c57b2 4b5a433a

+1 -1
+1 -1
net/mac80211/rate.h
··· 41 41 struct ieee80211_sta *ista = &sta->sta; 42 42 void *priv_sta = sta->rate_ctrl_priv; 43 43 44 - if (!ref) 44 + if (!ref || !test_sta_flag(sta, WLAN_STA_RATE_CONTROL)) 45 45 return; 46 46 47 47 ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb);