From 41a7be4858b886f83522e62d409263fcdb82653b Mon Sep 17 00:00:00 2001 From: Reinette Chatre Date: Thu, 3 Apr 2008 16:08:49 -0700 Subject: mac80211: notify upper layers after lower When drivers receive change notification they may do work that will enable the changes to take effect. For example, if new association the device needs to be programmed with this information. Give the driver chance to make the changes before notifying the upper layer - thus preventing race condition where upper layer attempts to utilize state that may not be configured yet. Signed-off-by: Reinette Chatre Acked-by: Johannes Berg Signed-off-by: John W. Linville --- net/mac80211/ieee80211_sta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net') diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 0f2fc9c4703a..9e30333aa81e 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c @@ -542,13 +542,13 @@ static void ieee80211_set_associated(struct net_device *dev, memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); } - wrqu.ap_addr.sa_family = ARPHRD_ETHER; - wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); ifsta->last_probe = jiffies; ieee80211_led_assoc(local, assoc); sdata->bss_conf.assoc = assoc; ieee80211_bss_info_change_notify(sdata, changed); + wrqu.ap_addr.sa_family = ARPHRD_ETHER; + wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); } static void ieee80211_set_disassoc(struct net_device *dev, -- cgit v1.2.3