aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-09-10 18:02:00 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-15 16:48:23 -0400
commit7a725f73403e874ec52c58741e9b98cd604dbd03 (patch)
treec3f31b92ce014f30559a0d6a579a38f2ed15e678 /net/mac80211/main.c
parent0d143fe1e2efc084fa730d2dfa22d0d1ca2ee5f1 (diff)
mac80211: warn on some invalid vlan operations
These should never happen, but better warn about them than crashing a driver, the fact that they never happen is rather subtle throughout mac80211. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index c532043c1a1c..dd838b725afb 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -156,6 +156,9 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed)
156 if (WARN_ON(!netif_running(sdata->dev))) 156 if (WARN_ON(!netif_running(sdata->dev)))
157 return 0; 157 return 0;
158 158
159 if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_AP_VLAN))
160 return -EINVAL;
161
159 if (!local->ops->config_interface) 162 if (!local->ops->config_interface)
160 return 0; 163 return 0;
161 164
@@ -321,6 +324,9 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
321{ 324{
322 struct ieee80211_local *local = sdata->local; 325 struct ieee80211_local *local = sdata->local;
323 326
327 if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_AP_VLAN))
328 return;
329
324 if (!changed) 330 if (!changed)
325 return; 331 return;
326 332