Commit b7600aae authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: fix TXQ error path and cleanup

We currently call ieee80211_txq_teardown_flows() as part
of ieee80211_remove_interfaces(), but that's not really
right in case of HW registration failures, specifically
rate control. Call it separately to fix that issue.
Reported-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 2ae5c924
...@@ -2255,8 +2255,6 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local) ...@@ -2255,8 +2255,6 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local)
WARN(local->open_count, "%s: open count remains %d\n", WARN(local->open_count, "%s: open count remains %d\n",
wiphy_name(local->hw.wiphy), local->open_count); wiphy_name(local->hw.wiphy), local->open_count);
ieee80211_txq_teardown_flows(local);
mutex_lock(&local->iflist_mtx); mutex_lock(&local->iflist_mtx);
list_splice_init(&local->interfaces, &unreg_list); list_splice_init(&local->interfaces, &unreg_list);
mutex_unlock(&local->iflist_mtx); mutex_unlock(&local->iflist_mtx);
......
...@@ -1457,6 +1457,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -1457,6 +1457,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
ieee80211_remove_interfaces(local); ieee80211_remove_interfaces(local);
rtnl_unlock(); rtnl_unlock();
fail_rate: fail_rate:
ieee80211_txq_teardown_flows(local);
fail_flows: fail_flows:
ieee80211_led_exit(local); ieee80211_led_exit(local);
destroy_workqueue(local->workqueue); destroy_workqueue(local->workqueue);
...@@ -1493,6 +1494,8 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw) ...@@ -1493,6 +1494,8 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
*/ */
ieee80211_remove_interfaces(local); ieee80211_remove_interfaces(local);
ieee80211_txq_teardown_flows(local);
wiphy_lock(local->hw.wiphy); wiphy_lock(local->hw.wiphy);
wiphy_delayed_work_cancel(local->hw.wiphy, &local->roc_work); wiphy_delayed_work_cancel(local->hw.wiphy, &local->roc_work);
wiphy_work_cancel(local->hw.wiphy, &local->reconfig_filter); wiphy_work_cancel(local->hw.wiphy, &local->reconfig_filter);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment