Re: Wireless silently disconnects?



* Brian Magnuson <magnuson rcn com> [2006-03-01 19:36]:
> * aj2r ya com  <aj2r ya com> [2006-03-01 18:29]:
> > 
> > This patch created by me solve the problem:
> >
> 
> After de-mangling this patch seems to work.  I haven't done much
> testing but this keeps me online for more than a couple of seconds.  I've
> undone the line-wrapping, fixed the indentation, and included it below.
> 
> The games with *driver probably need some work.  There are choices besides
> ndiswrapper and wext.  Probably just make that last line
> 
> +			"INTERFACE_ADD %s\t\t%s\t" WPA_SUPPLICANT_CONTROL_SOCKET "\t", iface, nm_device_get_driver(NM_DEVICE(self))
> 
> I'll reply with that patch if it works.
> 
> -Brian


Appears to be ok.  Comments?

Index: nm-device-802-11-wireless.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/nm-device-802-11-wireless.c,v
retrieving revision 1.55
diff -u -r1.55 nm-device-802-11-wireless.c
--- nm-device-802-11-wireless.c	28 Feb 2006 20:25:04 -0000	1.55
+++ nm-device-802-11-wireless.c	2 Mar 2006 00:35:46 -0000
@@ -1826,8 +1826,10 @@
 			/* Must be in infrastructure mode during scan, otherwise we don't get a full
 			 * list of scan results.  Scanning doesn't work well in Ad-Hoc mode :( 
 			 */
-			nm_device_802_11_wireless_set_mode (self, IW_MODE_INFRA);
-			nm_device_802_11_wireless_set_frequency (self, 0);
+			if (nm_device_802_11_wireless_get_mode (self) == IW_MODE_ADHOC) {
+				nm_device_802_11_wireless_set_mode (self, IW_MODE_INFRA);
+				nm_device_802_11_wireless_set_frequency (self, 0);
+			}
 
 			wrq.u.data.pointer = NULL;
 			wrq.u.data.flags = 0;
@@ -2407,7 +2409,8 @@
 
 	/* 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, nm_device_get_driver (NM_DEVICE (self))))
 		goto exit;
 	wpa_ctrl_close (ctrl);
 



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