aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_sta.c
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2008-04-03 19:08:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-08 16:44:43 -0400
commit41a7be4858b886f83522e62d409263fcdb82653b (patch)
treee02d6c5cb242d7bd31e32068c24b3fc572f50b11 /net/mac80211/ieee80211_sta.c
parent03d29c684917860f90f897565b297c4aba713e0b (diff)
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 <reinette.chatre@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_sta.c')
-rw-r--r--net/mac80211/ieee80211_sta.c4
1 files changed, 2 insertions, 2 deletions
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,
542 542
543 memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); 543 memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
544 } 544 }
545 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
546 wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
547 ifsta->last_probe = jiffies; 545 ifsta->last_probe = jiffies;
548 ieee80211_led_assoc(local, assoc); 546 ieee80211_led_assoc(local, assoc);
549 547
550 sdata->bss_conf.assoc = assoc; 548 sdata->bss_conf.assoc = assoc;
551 ieee80211_bss_info_change_notify(sdata, changed); 549 ieee80211_bss_info_change_notify(sdata, changed);
550 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
551 wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
552} 552}
553 553
554static void ieee80211_set_disassoc(struct net_device *dev, 554static void ieee80211_set_disassoc(struct net_device *dev,