summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2015-11-17 10:24:40 +0200
committerJohannes Berg <johannes.berg@intel.com>2015-12-02 22:27:27 +0100
commit835112b28919d88d989a0a9313e323ad82e18b59 (patch)
treeb5861c804c5f89e8d630a21bd9d2bc747d106b4f /net
parentac0621971a26526cad8cf9db7626d5e50562a441 (diff)
downloadop-kernel-dev-835112b28919d88d989a0a9313e323ad82e18b59.zip
op-kernel-dev-835112b28919d88d989a0a9313e323ad82e18b59.tar.gz
mac80211: don't teardown sdata on sdata stop
Interfaces are being initialized (setup) on addition, and torn down on removal. However, p2p device is being torn down when stopped, resulting in the next p2p start operation being done on uninitialized interface. Solve it by calling ieee80211_teardown_sdata() only on interface removal (for the non-netdev case). Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> [squashed in fix to call teardown after unregister] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/iface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 53ee049..c9e325d 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1862,6 +1862,7 @@ void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata)
unregister_netdevice(sdata->dev);
} else {
cfg80211_unregister_wdev(&sdata->wdev);
+ ieee80211_teardown_sdata(sdata);
kfree(sdata);
}
}
@@ -1871,7 +1872,6 @@ void ieee80211_sdata_stop(struct ieee80211_sub_if_data *sdata)
if (WARN_ON_ONCE(!test_bit(SDATA_STATE_RUNNING, &sdata->state)))
return;
ieee80211_do_stop(sdata, true);
- ieee80211_teardown_sdata(sdata);
}
void ieee80211_remove_interfaces(struct ieee80211_local *local)
OpenPOWER on IntegriCloud