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>
This commit is contained in:
Johannes Berg
2011-11-03 14:41:13 +01:00
committed by John W. Linville
parent 6e3e939f3b
commit 7b7eab6fc1
5 changed files with 69 additions and 11 deletions

View File

@@ -1006,7 +1006,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
sdata->vif.type != NL80211_IFTYPE_MONITOR &&
ieee80211_sdata_running(sdata))
res = drv_add_interface(local, &sdata->vif);
res = drv_add_interface(local, sdata);
}
/* add STAs back */