Merge remote-tracking branch 'wireless-next/master' into mac80211-next
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user