aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 6aa49ad172aa..ea0301025c15 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -84,22 +84,22 @@ static int ieee80211_change_iface(struct wiphy *wiphy, int ifindex,
84 struct net_device *dev; 84 struct net_device *dev;
85 enum ieee80211_if_types itype; 85 enum ieee80211_if_types itype;
86 struct ieee80211_sub_if_data *sdata; 86 struct ieee80211_sub_if_data *sdata;
87 int ret;
87 88
88 /* we're under RTNL */ 89 /* we're under RTNL */
89 dev = __dev_get_by_index(&init_net, ifindex); 90 dev = __dev_get_by_index(&init_net, ifindex);
90 if (!dev) 91 if (!dev)
91 return -ENODEV; 92 return -ENODEV;
92 93
93 if (netif_running(dev))
94 return -EBUSY;
95
96 itype = nl80211_type_to_mac80211_type(type); 94 itype = nl80211_type_to_mac80211_type(type);
97 if (itype == IEEE80211_IF_TYPE_INVALID) 95 if (itype == IEEE80211_IF_TYPE_INVALID)
98 return -EINVAL; 96 return -EINVAL;
99 97
100 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 98 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
101 99
102 ieee80211_if_change_type(sdata, itype); 100 ret = ieee80211_if_change_type(sdata, itype);
101 if (ret)
102 return ret;
103 103
104 if (ieee80211_vif_is_mesh(&sdata->vif) && params->mesh_id_len) 104 if (ieee80211_vif_is_mesh(&sdata->vif) && params->mesh_id_len)
105 ieee80211_if_sta_set_mesh_id(&sdata->u.sta, 105 ieee80211_if_sta_set_mesh_id(&sdata->u.sta,