summaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-11-03 14:41:13 +0100
committerJohn W. Linville <linville@tuxdriver.com>2011-11-09 16:01:02 -0500
commit7b7eab6fc1bc8852d9649541b59283cd89cc526f (patch)
tree7b071ee01187bc3ee843c86b88189cc4eab73cf1 /net/mac80211/iface.c
parent6e3e939f3b1bf8534b32ad09ff199d88800835a0 (diff)
downloadop-kernel-dev-7b7eab6fc1bc8852d9649541b59283cd89cc526f.zip
op-kernel-dev-7b7eab6fc1bc8852d9649541b59283cd89cc526f.tar.gz
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 33a9746..4ee624c 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)
break;
default:
if (coming_up) {
- res = drv_add_interface(local, &sdata->vif);
+ res = drv_add_interface(local, sdata);
if (res)
goto err_stop;
}
@@ -345,7 +345,7 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)
return 0;
err_del_interface:
- drv_remove_interface(local, &sdata->vif);
+ drv_remove_interface(local, sdata);
err_stop:
if (!local->open_count)
drv_stop(local);
@@ -520,7 +520,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
ieee80211_free_keys(sdata);
if (going_down)
- drv_remove_interface(local, &sdata->vif);
+ drv_remove_interface(local, sdata);
}
sdata->bss = NULL;
OpenPOWER on IntegriCloud