diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-03-13 11:19:45 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-27 20:12:52 -0400 |
commit | b5bde374f0f61f5d97114d400ade8fc96bf6f10d (patch) | |
tree | ff38550fa535c78fbc0e1fd15077453ba83ab366 | |
parent | cee075a24eec64f1f5b2b3b14753b2d4b8ecce55 (diff) |
mac80211: fix warnings in ieee80211_if_config
The last warning can never trigger, and the explicit AP_VLAN
check is pointless if we move the config_interface check down,
in practice config_interface is required anyway.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/mac80211/main.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index f38db4d37e5..dac68d476bf 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -161,12 +161,6 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed) if (WARN_ON(!netif_running(sdata->dev))) return 0; - if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) - return -EINVAL; - - if (!local->ops->config_interface) - return 0; - memset(&conf, 0, sizeof(conf)); if (sdata->vif.type == NL80211_IFTYPE_STATION) @@ -183,6 +177,9 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed) return -EINVAL; } + if (!local->ops->config_interface) + return 0; + switch (sdata->vif.type) { case NL80211_IFTYPE_AP: case NL80211_IFTYPE_ADHOC: @@ -224,9 +221,6 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed) } } - if (WARN_ON(!conf.bssid && (changed & IEEE80211_IFCC_BSSID))) - return -EINVAL; - conf.changed = changed; return local->ops->config_interface(local_to_hw(local), |