[PATCH 001/001] - Cause SoftMac to emit an association event when setting ESSID.

Tim Gardner "rtg at timg" at tpi.com
Fri Apr 20 21:05:57 UTC 2007


>From c7a6bbdf4493b2951f02c924bd4a85d01b46c839 Mon Sep 17 00:00:00 2001
From: Tim Gardner <timg at tpi.com>
Date: Fri, 20 Apr 2007 14:38:34 -0600
Subject: [PATCH] UBUNTU: Cause SoftMac to emit an association event when setting ESSID.
Bug: https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/103768

Signed-off-by: Tim Gardner <tim.gardner at canonical.com>

wpa_supplicant assumes that it will get an association event whenever it sets ESSID.
This patch causes SoftMac to emit an association event even if its already associated
and setting ESSID will cause no change in association state.

modified:   net/ieee80211/softmac/ieee80211softmac_wx.c

diff --git a/net/ieee80211/softmac/ieee80211softmac_wx.c b/net/ieee80211/softmac/ieee80211softmac_wx.c
index fa2f7da..cc2e8ba 100644
--- a/net/ieee80211/softmac/ieee80211softmac_wx.c
+++ b/net/ieee80211/softmac/ieee80211softmac_wx.c
@@ -88,6 +88,13 @@ ieee80211softmac_wx_set_essid(struct net_device *net_dev,
 		   !memcmp(n->essid.data, extra, n->essid.len)) {
 			dprintk(KERN_INFO PFX "Already associating or associated to "MAC_FMT"\n",
 				MAC_ARG(sm->associnfo.bssid));
+			/* wpa_supplicant expects an association event, regardless of prior
+			 * association state. If associating, then the associnfo.work task
+			 * will send the appropriate event.
+			 */
+			if (sm->associnfo.associated)
+				ieee80211softmac_call_events_locked(sm,
+					IEEE80211SOFTMAC_EVENT_ASSOCIATED, n);
 			goto out;
 		} else {
 			dprintk(KERN_INFO PFX "Canceling existing associate request!\n");
-- 
1.4.4.2





More information about the kernel-team mailing list