summaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-02-20 11:55:12 +0100
committerJohannes Berg <johannes.berg@intel.com>2014-02-20 11:55:12 +0100
commitbf5f48339a019c9b4b42284c3f45d58942cbda27 (patch)
tree79976135166ffbdaf4ccb91bcadb17ddb551f060 /net/mac80211/iface.c
parentd85dad75566674ca8012715ac00a84ced3697972 (diff)
parent35582ad9d342025653aaf28ed321bf5352488d7f (diff)
downloadop-kernel-dev-bf5f48339a019c9b4b42284c3f45d58942cbda27.zip
op-kernel-dev-bf5f48339a019c9b4b42284c3f45d58942cbda27.tar.gz
Merge remote-tracking branch 'wireless-next/master' into mac80211-next
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 9db71cf..be198f4 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -413,20 +413,24 @@ int ieee80211_add_virtual_monitor(struct ieee80211_local *local)
return ret;
}
+ mutex_lock(&local->iflist_mtx);
+ rcu_assign_pointer(local->monitor_sdata, sdata);
+ mutex_unlock(&local->iflist_mtx);
+
mutex_lock(&local->mtx);
ret = ieee80211_vif_use_channel(sdata, &local->monitor_chandef,
IEEE80211_CHANCTX_EXCLUSIVE);
mutex_unlock(&local->mtx);
if (ret) {
+ mutex_lock(&local->iflist_mtx);
+ rcu_assign_pointer(local->monitor_sdata, NULL);
+ mutex_unlock(&local->iflist_mtx);
+ synchronize_net();
drv_remove_interface(local, sdata);
kfree(sdata);
return ret;
}
- mutex_lock(&local->iflist_mtx);
- rcu_assign_pointer(local->monitor_sdata, sdata);
- mutex_unlock(&local->iflist_mtx);
-
return 0;
}
@@ -765,12 +769,19 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
ieee80211_roc_purge(local, sdata);
- if (sdata->vif.type == NL80211_IFTYPE_STATION)
+ switch (sdata->vif.type) {
+ case NL80211_IFTYPE_STATION:
ieee80211_mgd_stop(sdata);
-
- if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
+ break;
+ case NL80211_IFTYPE_ADHOC:
ieee80211_ibss_stop(sdata);
-
+ break;
+ case NL80211_IFTYPE_AP:
+ cancel_work_sync(&sdata->u.ap.request_smps_work);
+ break;
+ default:
+ break;
+ }
/*
* Remove all stations associated with this interface.
OpenPOWER on IntegriCloud