diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-12-18 20:03:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:09:38 -0500 |
commit | 5dfdaf58d61f06a458529430c24b1191ea4d1a27 (patch) | |
tree | bd3fac57f66e80bf2a31d253af19093f4020ba79 /net/mac80211/ieee80211.c | |
parent | 51fb61e76d952e6bc2fbdd9f0d38425fbab1cf31 (diff) |
mac80211: add beacon configuration via cfg80211
This patch implements the cfg80211 hooks for configuring beaconing
on an access point interface in mac80211. While doing so, it fixes
a number of races that could badly crash the machine when the
beacon is changed while being requested by the driver.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211.c')
-rw-r--r-- | net/mac80211/ieee80211.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index c9981701ef68..859682eee547 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -321,10 +321,17 @@ static int ieee80211_stop(struct net_device *dev) | |||
321 | 321 | ||
322 | dev_mc_unsync(local->mdev, dev); | 322 | dev_mc_unsync(local->mdev, dev); |
323 | 323 | ||
324 | /* down all dependent devices, that is VLANs */ | 324 | /* APs need special treatment */ |
325 | if (sdata->vif.type == IEEE80211_IF_TYPE_AP) { | 325 | if (sdata->vif.type == IEEE80211_IF_TYPE_AP) { |
326 | struct ieee80211_sub_if_data *vlan, *tmp; | 326 | struct ieee80211_sub_if_data *vlan, *tmp; |
327 | struct beacon_data *old_beacon = sdata->u.ap.beacon; | ||
327 | 328 | ||
329 | /* remove beacon */ | ||
330 | rcu_assign_pointer(sdata->u.ap.beacon, NULL); | ||
331 | synchronize_rcu(); | ||
332 | kfree(old_beacon); | ||
333 | |||
334 | /* down all dependent devices, that is VLANs */ | ||
328 | list_for_each_entry_safe(vlan, tmp, &sdata->u.ap.vlans, | 335 | list_for_each_entry_safe(vlan, tmp, &sdata->u.ap.vlans, |
329 | u.vlan.list) | 336 | u.vlan.list) |
330 | dev_close(vlan->dev); | 337 | dev_close(vlan->dev); |