[PATCH 4.19 70/96] mac80211: do not call driver wake_tx_queue op during reconfig
From: Greg Kroah-Hartman
Date: Wed Apr 24 2019 - 13:32:08 EST
From: Felix Fietkau <nbd@xxxxxxxx>
commit 4856bfd230985e43e84c26473c91028ff0a533bd upstream.
There are several scenarios in which mac80211 can call drv_wake_tx_queue
after ieee80211_restart_hw has been called and has not yet completed.
Driver private structs are considered uninitialized until mac80211 has
uploaded the vifs, stations and keys again, so using private tx queue
data during that time is not safe.
The driver can also not rely on drv_reconfig_complete to figure out when
it is safe to accept drv_wake_tx_queue calls again, because it is only
called after all tx queues are woken again.
To fix this, bail out early in drv_wake_tx_queue if local->in_reconfig
Signed-off-by: Felix Fietkau <nbd@xxxxxxxx>
Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
net/mac80211/driver-ops.h | 3 +++
1 file changed, 3 insertions(+)
@@ -1166,6 +1166,9 @@ static inline void drv_wake_tx_queue(str
struct ieee80211_sub_if_data *sdata = vif_to_sdata(txq->txq.vif);
+ if (local->in_reconfig)