aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-11-03 09:41:13 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-11-09 16:01:02 -0500
commit7b7eab6fc1bc8852d9649541b59283cd89cc526f (patch)
tree7b071ee01187bc3ee843c86b88189cc4eab73cf1 /net/mac80211/iface.c
parent6e3e939f3b1bf8534b32ad09ff199d88800835a0 (diff)
mac80211: verify virtual interfaces in driver API
The driver is never informed about monitor or AP_VLAN interfaces, so whenever we pass those to it later this is a bug. Verify we don't as there are some cases where this could happen. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 33a974663f79..4ee624c543cb 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -265,7 +265,7 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)
265 break; 265 break;
266 default: 266 default:
267 if (coming_up) { 267 if (coming_up) {
268 res = drv_add_interface(local, &sdata->vif); 268 res = drv_add_interface(local, sdata);
269 if (res) 269 if (res)
270 goto err_stop; 270 goto err_stop;
271 } 271 }
@@ -345,7 +345,7 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)
345 345
346 return 0; 346 return 0;
347 err_del_interface: 347 err_del_interface:
348 drv_remove_interface(local, &sdata->vif); 348 drv_remove_interface(local, sdata);
349 err_stop: 349 err_stop:
350 if (!local->open_count) 350 if (!local->open_count)
351 drv_stop(local); 351 drv_stop(local);
@@ -520,7 +520,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
520 ieee80211_free_keys(sdata); 520 ieee80211_free_keys(sdata);
521 521
522 if (going_down) 522 if (going_down)
523 drv_remove_interface(local, &sdata->vif); 523 drv_remove_interface(local, sdata);
524 } 524 }
525 525
526 sdata->bss = NULL; 526 sdata->bss = NULL;