I have been experiencing the same behaviour for about 2 weeks now on
Lenny (IPW3945, of course). Compiling and loading ipw3945 module version
1.2.2 patched by Alexander Sack for Ubuntu (look at the site LeTic
pointed out) helps. I'm attaching a diff against vanilla 1.2.2 module
sources.
diff -Nru ipw3945-1.2.2/ipw3945.c ipw3945.asac/ipw3945.c
--- ipw3945-1.2.2/ipw3945.c	2007-09-13 21:27:41.000000000 +0200
+++ ipw3945.asac/ipw3945.c	2007-09-13 21:27:45.000000000 +0200
@@ -102,7 +102,7 @@
 #define VQ
 #endif
 
-#define IPW3945_VERSION "1.2.2" VD VM VP VR VQ
+#define IPW3945_VERSION "1.2.2" VD VM VP VR VQ ".ubuntu1"
 
 #define DRV_DESCRIPTION	"Intel(R) PRO/Wireless 3945 Network Connection driver for Linux"
 #define DRV_COPYRIGHT	"Copyright(c) 2003-2006 Intel Corporation"
@@ -12223,11 +12223,18 @@
 	if (length == 0) {
 		IPW_DEBUG_WX("Setting ESSID to ANY\n");
 		priv->config &= ~CFG_STATIC_ESSID;
-		priv->config |= CFG_ASSOCIATE;
-		if (!(priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING))) {
+		if((priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING))
+			&& !(priv->config & CFG_ASSOCIATE)) {
+			IPW_DEBUG_ASSOC
+			    ("Deassociating because OFF/ANY set with auto association"
+				" disabled.\n");
+			ipw_disassociate(priv);
+		}
+		if ((priv->config & CFG_ASSOCIATE) &&
+			!(priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING))) {
 			IPW_DEBUG_ASSOC
 			    ("Attempting to associate with new "
-			     "parameters.\n");
+			     "parameters because auto association is enabled.\n");
 			ipw_associate(priv);
 		}
 		mutex_unlock(&priv->mutex);
@@ -12239,6 +12246,7 @@
 	if (priv->essid_len == length && !memcmp(priv->essid, extra, length)
 	    && (priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING))) {
 		IPW_DEBUG_WX("ESSID set to current ESSID.\n");
+		queue_work(priv->workqueue, &priv->link_up);
 		mutex_unlock(&priv->mutex);
 		return 0;
 	}
@@ -12249,8 +12257,8 @@
 	memcpy(priv->essid, essid, priv->essid_len);
 	/* Network configuration changed -- force [re]association */
 	IPW_DEBUG_ASSOC("[re]association triggered due to ESSID change.\n");
-	if (!ipw_disassociate(priv))
-		ipw_associate(priv);
+	ipw_disassociate(priv);
+	ipw_associate(priv);
 
 	mutex_unlock(&priv->mutex);
 	return 0;

Reply via email to