|
@@ -72,6 +72,9 @@ static int ieee80211_change_iface(struct wiphy *wiphy,
|
|
|
struct ieee80211_sub_if_data *sdata;
|
|
|
int ret;
|
|
|
|
|
|
+ if (netif_running(dev))
|
|
|
+ return -EBUSY;
|
|
|
+
|
|
|
if (!nl80211_type_check(type))
|
|
|
return -EINVAL;
|
|
|
|
|
@@ -81,9 +84,6 @@ static int ieee80211_change_iface(struct wiphy *wiphy,
|
|
|
if (ret)
|
|
|
return ret;
|
|
|
|
|
|
- if (netif_running(sdata->dev))
|
|
|
- return -EBUSY;
|
|
|
-
|
|
|
if (ieee80211_vif_is_mesh(&sdata->vif) && params->mesh_id_len)
|
|
|
ieee80211_sdata_set_mesh_id(sdata,
|
|
|
params->mesh_id_len,
|