diff options
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index fa0cc7a1e6b4..d631dc96c323 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -171,19 +171,13 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed) | |||
171 | conf.changed = changed; | 171 | conf.changed = changed; |
172 | 172 | ||
173 | if (sdata->vif.type == NL80211_IFTYPE_STATION || | 173 | if (sdata->vif.type == NL80211_IFTYPE_STATION || |
174 | sdata->vif.type == NL80211_IFTYPE_ADHOC) { | 174 | sdata->vif.type == NL80211_IFTYPE_ADHOC) |
175 | conf.bssid = sdata->u.sta.bssid; | 175 | conf.bssid = sdata->u.sta.bssid; |
176 | conf.ssid = sdata->u.sta.ssid; | 176 | else if (sdata->vif.type == NL80211_IFTYPE_AP) |
177 | conf.ssid_len = sdata->u.sta.ssid_len; | ||
178 | } else if (sdata->vif.type == NL80211_IFTYPE_AP) { | ||
179 | conf.bssid = sdata->dev->dev_addr; | 177 | conf.bssid = sdata->dev->dev_addr; |
180 | conf.ssid = sdata->u.ap.ssid; | 178 | else if (ieee80211_vif_is_mesh(&sdata->vif)) { |
181 | conf.ssid_len = sdata->u.ap.ssid_len; | ||
182 | } else if (ieee80211_vif_is_mesh(&sdata->vif)) { | ||
183 | u8 zero[ETH_ALEN] = { 0 }; | 179 | u8 zero[ETH_ALEN] = { 0 }; |
184 | conf.bssid = zero; | 180 | conf.bssid = zero; |
185 | conf.ssid = zero; | ||
186 | conf.ssid_len = 0; | ||
187 | } else { | 181 | } else { |
188 | WARN_ON(1); | 182 | WARN_ON(1); |
189 | return -EINVAL; | 183 | return -EINVAL; |
@@ -192,9 +186,6 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed) | |||
192 | if (WARN_ON(!conf.bssid && (changed & IEEE80211_IFCC_BSSID))) | 186 | if (WARN_ON(!conf.bssid && (changed & IEEE80211_IFCC_BSSID))) |
193 | return -EINVAL; | 187 | return -EINVAL; |
194 | 188 | ||
195 | if (WARN_ON(!conf.ssid && (changed & IEEE80211_IFCC_SSID))) | ||
196 | return -EINVAL; | ||
197 | |||
198 | return local->ops->config_interface(local_to_hw(local), | 189 | return local->ops->config_interface(local_to_hw(local), |
199 | &sdata->vif, &conf); | 190 | &sdata->vif, &conf); |
200 | } | 191 | } |