Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: notify upper layers after lower
@ 2008-04-03 23:08 Reinette Chatre
  2008-04-03 23:08 ` [PATCH] mac80211: notify mac from low level driver (iwlwifi) Reinette Chatre
  2008-04-04 14:44 ` [PATCH] mac80211: notify upper layers after lower Johannes Berg
  0 siblings, 2 replies; 9+ messages in thread
From: Reinette Chatre @ 2008-04-03 23:08 UTC (permalink / raw)
  To: linville, johannes; +Cc: linux-wireless, ipw3945-devel, Reinette Chatre

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>
---
 net/mac80211/ieee80211_sta.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index be2ce24..f3c8a21 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -545,13 +545,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,
-- 
1.5.3.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-04-04 23:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-03 23:08 [PATCH] mac80211: notify upper layers after lower Reinette Chatre
2008-04-03 23:08 ` [PATCH] mac80211: notify mac from low level driver (iwlwifi) Reinette Chatre
2008-04-04 14:46   ` Johannes Berg
2008-04-04 21:35     ` mohamed salim abbas
2008-04-04 21:39       ` Johannes Berg
2008-04-04 23:34         ` mohamed salim abbas
2008-04-04 23:47           ` Johannes Berg
2008-04-04 23:55             ` mohamed salim abbas
2008-04-04 14:44 ` [PATCH] mac80211: notify upper layers after lower Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox