Re: Wireless silently disconnects?
- From: Dan Williams <dcbw redhat com>
- To: Robert Love <rml novell com>
- Cc: networkmanager-list gnome org
- Subject: Re: Wireless silently disconnects?
- Date: Thu, 02 Mar 2006 10:24:05 -0500
On Thu, 2006-03-02 at 10:15 -0500, Dan Williams wrote:
> On Thu, 2006-03-02 at 10:03 -0500, Robert Love wrote:
> > On Thu, 2006-03-02 at 09:49 -0500, Dan Williams wrote:
> >
> > > So which hunk of this patch seems to fix the problem? The first part
> > > for the set_mode, or the second part passing the ndiswrapper driver to
> > > wpa_supplicant?
> >
> > The first hunk. I just checked a variant into CVS.
>
> The reason this hunk exists is really for just adhoc. Same for the
> frequency set to 0, I think. If you want to move both of them into
> if (orig_mode == IW_MODE_ADHOC)
>
> block just above, that would be fine. I initially observed with prism54
> cards that adhoc mode pretty much didn't work at all unless the mode was
> infrastructure and the bitrate was unlocked. Unfortunately, the bitrate
> had to be locked during normal adhoc operation, otherwise you never got
> any traffic. Now that our custom adhoc setup code is gone, I think we
> can remove that bitrate unlock line.
>
> Note that NM only supports two modes right now, INFRA and ADHOC. The
> other mode is MASTER, and of course we don't do that yet.
On second look, your commit is fine. I forgot that if wpa_supplicant
sets up the stuff, we need to switch it back anyway.
However, there's another problem... The code for set_mode already
checks to see what the mode was, and if you request to set the mode that
the card is in already, it just returns without doing anything:
if (nm_device_802_11_wireless_get_mode (self) == mode)
return TRUE;
So I'm not sure what your commit fixes? It's more likely that the
driver here dislikes the frequency set, and that we should only unlock
the frequency when the card is in ad-hoc mode.
Candidate patch attached, does this fix the issue?
Dan
? freq.patch
? po/stamp-it
? vpn-daemons/openvpn/po/stamp-it
? vpn-daemons/pptp/po/stamp-it
? vpn-daemons/vpnc/po/stamp-it
Index: src/nm-device-802-11-wireless.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/nm-device-802-11-wireless.c,v
retrieving revision 1.56
diff -u -p -r1.56 nm-device-802-11-wireless.c
--- src/nm-device-802-11-wireless.c 2 Mar 2006 15:06:27 -0000 1.56
+++ src/nm-device-802-11-wireless.c 2 Mar 2006 15:26:01 -0000
@@ -1825,13 +1825,14 @@ nm_device_802_11_wireless_scan (gpointer
/* 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 :(
- *
- * We only set the mode if it needs setting, in case it is a costly operation
- * for the driver.
*/
- if (orig_mode != IW_MODE_INFRA)
- nm_device_802_11_wireless_set_mode (self, IW_MODE_INFRA);
- nm_device_802_11_wireless_set_frequency (self, 0);
+ nm_device_802_11_wireless_set_mode (self, IW_MODE_INFRA);
+
+ /* We only unlock the frequency if the card is in adhoc mode, in case it is
+ * a costly operation for the driver.
+ */
+ if (orig_mode == IW_MODE_ADHOC)
+ nm_device_802_11_wireless_set_frequency (self, 0);
wrq.u.data.pointer = NULL;
wrq.u.data.flags = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]