[patch] _always_ need AP_SCAN 1 for madwifi



I need the attached patch -- unequivically using "AP_SCAN 1" -- for
non-broadcast networks to work with madwifi.

What was the rationale behind using "AP_SCAN 2" for non-broadcast?  Are
there some devices with problems?

Always something ...

	Robert Love

Index: src/nm-device-802-11-wireless.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/nm-device-802-11-wireless.c,v
retrieving revision 1.46
diff -u -r1.46 nm-device-802-11-wireless.c
--- src/nm-device-802-11-wireless.c	6 Feb 2006 18:26:41 -0000	1.46
+++ src/nm-device-802-11-wireless.c	7 Feb 2006 21:23:58 -0000
@@ -2281,13 +2281,17 @@
 	const char *		iface = nm_device_get_iface (NM_DEVICE (self));
 	gboolean			success = FALSE;
 	int				tries = 0;
+	char *			driver = "wext";
 
 	if (!(ctrl = wpa_ctrl_open (WPA_SUPPLICANT_GLOBAL_SOCKET, NM_RUN_DIR)))
 		goto exit;
 
+	if (!strcmp (nm_device_get_driver (NM_DEVICE (self)), "ath_pci"))
+		driver = "madwifi";
+
 	/* wpa_cli -g/var/run/wpa_supplicant-global interface_add eth1 "" wext /var/run/wpa_supplicant */
 	if (!nm_utils_supplicant_request_with_check (ctrl, "OK", __func__, NULL,
-			"INTERFACE_ADD %s\t\twext\t" WPA_SUPPLICANT_CONTROL_SOCKET "\t", iface))
+			"INTERFACE_ADD %s\t\t%s\t" WPA_SUPPLICANT_CONTROL_SOCKET "\t", iface, driver))
 		goto exit;
 	wpa_ctrl_close (ctrl);
 
@@ -2323,7 +2327,6 @@
 	struct wpa_ctrl *	ctrl;
 	gboolean			user_created;
 	char *			hex_essid;
-	char *			ap_scan = "AP_SCAN 1";
 
 	g_return_val_if_fail (self != NULL, FALSE);
 	g_return_val_if_fail (req != NULL, FALSE);
@@ -2334,14 +2337,11 @@
 	ctrl = self->priv->sup_ctrl;
 	g_assert (ctrl);
 
-	/* Ad-Hoc and non-broadcasting networks need AP_SCAN 2 */
 	user_created = nm_ap_get_user_created (ap);
-	if (!nm_ap_get_broadcast (ap) || user_created)
-		ap_scan = "AP_SCAN 2";
 
 	/* Tell wpa_supplicant that we'll do the scanning */
 	if (!nm_utils_supplicant_request_with_check (ctrl, "OK", __func__, NULL,
-			ap_scan))
+			"AP_SCAN 1"))
 		goto out;
 
 	/* Standard network setup info */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]