|
@@ -1703,6 +1703,15 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local)
|
|
|
|
|
|
ASSERT_RTNL();
|
|
ASSERT_RTNL();
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Close all AP_VLAN interfaces first, as otherwise they
|
|
|
|
+ * might be closed while the AP interface they belong to
|
|
|
|
+ * is closed, causing unregister_netdevice_many() to crash.
|
|
|
|
+ */
|
|
|
|
+ list_for_each_entry(sdata, &local->interfaces, list)
|
|
|
|
+ if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
|
|
|
|
+ dev_close(sdata->dev);
|
|
|
|
+
|
|
mutex_lock(&local->iflist_mtx);
|
|
mutex_lock(&local->iflist_mtx);
|
|
list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) {
|
|
list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) {
|
|
list_del(&sdata->list);
|
|
list_del(&sdata->list);
|