aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-09-17 01:29:24 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:57 -0400
commit0ec3ca445931ff0e7ad6ac61d6c5d2aaafe7a9f5 (patch)
treea9e5fab14a3f928df6536a913ca8aba5e0ab2632 /net/mac80211/ieee80211_iface.c
parent4150c57212ad134765dd78c654a4b9906252b66d (diff)
[PATCH] mac80211: validate VLAN interfaces better
This patch changes mac80211 to verify that VLAN interfaces are valid and not bother drivers about them any more. VLAN interfaces are now only valid when an AP interface is up with the same MAC address, and are automatically turned off when the AP interface is set down. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Jouni Malinen <j@w1.fi> Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_iface.c')
-rw-r--r--net/mac80211/ieee80211_iface.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_iface.c b/net/mac80211/ieee80211_iface.c
index f9c74bb09d31..4590205fdf4b 100644
--- a/net/mac80211/ieee80211_iface.c
+++ b/net/mac80211/ieee80211_iface.c
@@ -164,6 +164,7 @@ void ieee80211_if_set_type(struct net_device *dev, int type)
164 sdata->bss = NULL; 164 sdata->bss = NULL;
165 break; 165 break;
166 case IEEE80211_IF_TYPE_VLAN: 166 case IEEE80211_IF_TYPE_VLAN:
167 sdata->u.vlan.ap = NULL;
167 break; 168 break;
168 case IEEE80211_IF_TYPE_AP: 169 case IEEE80211_IF_TYPE_AP:
169 sdata->u.ap.dtim_period = 2; 170 sdata->u.ap.dtim_period = 2;
@@ -171,6 +172,7 @@ void ieee80211_if_set_type(struct net_device *dev, int type)
171 sdata->u.ap.max_ratectrl_rateidx = -1; 172 sdata->u.ap.max_ratectrl_rateidx = -1;
172 skb_queue_head_init(&sdata->u.ap.ps_bc_buf); 173 skb_queue_head_init(&sdata->u.ap.ps_bc_buf);
173 sdata->bss = &sdata->u.ap; 174 sdata->bss = &sdata->u.ap;
175 INIT_LIST_HEAD(&sdata->u.ap.vlans);
174 break; 176 break;
175 case IEEE80211_IF_TYPE_STA: 177 case IEEE80211_IF_TYPE_STA:
176 case IEEE80211_IF_TYPE_IBSS: { 178 case IEEE80211_IF_TYPE_IBSS: {
@@ -284,6 +286,9 @@ void ieee80211_if_reinit(struct net_device *dev)
284 case IEEE80211_IF_TYPE_MNTR: 286 case IEEE80211_IF_TYPE_MNTR:
285 dev->type = ARPHRD_ETHER; 287 dev->type = ARPHRD_ETHER;
286 break; 288 break;
289 case IEEE80211_IF_TYPE_VLAN:
290 sdata->u.vlan.ap = NULL;
291 break;
287 } 292 }
288 293
289 /* remove all STAs that are bound to this virtual interface */ 294 /* remove all STAs that are bound to this virtual interface */