301-mac80211-do-not-call-driver-wake_tx_queue-op-during-.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. From: Felix Fietkau <[email protected]>
  2. Date: Fri, 1 Mar 2019 14:42:56 +0100
  3. Subject: [PATCH] mac80211: do not call driver wake_tx_queue op during reconfig
  4. There are several scenarios in which mac80211 can call drv_wake_tx_queue
  5. after ieee80211_restart_hw has been called and has not yet completed.
  6. Driver private structs are considered uninitialized until mac80211 has
  7. uploaded the vifs, stations and keys again, so using private tx queue
  8. data during that time is not safe.
  9. The driver can also not rely on drv_reconfig_complete to figure out when
  10. it is safe to accept drv_wake_tx_queue calls again, because it is only
  11. called after all tx queues are woken again.
  12. To fix this, bail out early in drv_wake_tx_queue if local->in_reconfig
  13. is set.
  14. Cc: [email protected]
  15. Signed-off-by: Felix Fietkau <[email protected]>
  16. ---
  17. --- a/net/mac80211/driver-ops.h
  18. +++ b/net/mac80211/driver-ops.h
  19. @@ -1166,6 +1166,9 @@ static inline void drv_wake_tx_queue(str
  20. {
  21. struct ieee80211_sub_if_data *sdata = vif_to_sdata(txq->txq.vif);
  22. + if (local->in_reconfig)
  23. + return;
  24. +
  25. if (!check_sdata_in_driver(sdata))
  26. return;