Re: NM does not work with iwl4965 device

2007-08-07 Thread Thomas M Steenholdt
Thomas M Steenholdt wrote:
 
 I've been experimenting a bit tonight and this is what I've found.
 
 AP_SCAN 2 : ESSID is set on the wireless device, but it never 
 associates. Presumably because it cannot find the AP.
 
 AP_SCAN 1: ESSID does NOT get set on the wireless device, so does not 
 work alone - during the device setup phase, if you issue an iwconfig 
 wlan0 essid whatever, the device will associate fine.
 
 So I made a patch to incorporate the two and to prove a point. :)
 
 Please note, that this patch is intended to prove that the association 
 to hidden IS possible, even with ipw4965 devices. The patch changes the 
 AP_SCAN value for hidden networks and I have no clue as to what that 
 will do for other wireless devices. Also, since I've not gotten 
 acquainted to very much of the NetworkManager code, there might be 
 better places to put some of these things. So it should at the very 
 least be reviewed by someone more familiar with the code than myself. 
 (there - the disclaimer is double the size of the patch itself ;-p)
 
 Try it out and let me know how it works for you.
 
 My testing was performed on Fedora 7 - 0.6.5 version of NetworkManager. 
 Obviously 0.6.5 is also the version that this patch is most likely to 
 apply to.
 
 Good luck. Patch below!
 
 /Thomas
 

Peter opened a bug on this problem - Gnome BUG #464215

/Thomas

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH] Some fixes for trunk

2007-08-07 Thread Helmut Schaa
Hi,

while porting KNetworkManager to NM 0.7 I found a few issues which need fixing 
in NM. Attached are three patches which apply cleanly against trunk.

1) allow_linking_with_cpp.patch:
As the filename indicates this patch adds support for using libnm_util and 
libnm_glib from within C++.

2) fix_segfault.patch:
This patch fixes a segfault caused by some ssid being NULL. I don't know if it 
is desired to have ssid's being NULL but in current trunk using my ipw2200 
I've got a lot of these.

3) fix_memory_corruption.patch
The most important one (it took hours to find the cause). Call to g_object_get 
writes a gint (4 byte) into the gint8 output buffer (1 byte) and thus 
overwrites some other data (in my case the last_seen property).

Please have a look at the patches and commit to trunk.

Thanks,
Helmut
Index: libnm-util/nm-connection.h
===
--- libnm-util/nm-connection.h	(Revision 2656)
+++ libnm-util/nm-connection.h	(Arbeitskopie)
@@ -8,6 +8,10 @@
 	GHashTable *settings;
 } NMConnection;
 
+#ifdef __cplusplus
+extern C {
+#endif
+
 NMConnection *nm_connection_new   (void);
 NMConnection *nm_connection_new_from_hash (GHashTable *hash);
 void  nm_connection_add_setting   (NMConnection *connection,
@@ -29,4 +33,8 @@
 
 void nm_setting_parser_unregister (const char *name);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NM_CONNECTION_H */
Index: libnm-util/nm-setting.h
===
--- libnm-util/nm-setting.h	(Revision 2656)
+++ libnm-util/nm-setting.h	(Arbeitskopie)
@@ -21,6 +21,10 @@
 	NMSettingDestroyFn destroy_fn;
 };
 
+#ifdef __cplusplus
+extern C {
+#endif
+
 gbooleannm_settings_verify (GHashTable *all_settings);
 GHashTable *nm_setting_to_hash (NMSetting *setting);
 voidnm_setting_destroy (NMSetting *setting);
@@ -134,5 +138,8 @@
 NMSetting *nm_setting_wireless_security_new (void);
 NMSetting *nm_setting_wireless_security_new_from_hash (GHashTable *settings);
 
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* NM_SETTING_H */
Index: libnm-glib/nm-device-802-3-ethernet.h
===
--- libnm-glib/nm-device-802-3-ethernet.h	(Revision 2656)
+++ libnm-glib/nm-device-802-3-ethernet.h	(Arbeitskopie)
@@ -18,6 +18,10 @@
 	NMDeviceClass parent;
 } NMDevice8023EthernetClass;
 
+#ifdef __cplusplus
+extern C {
+#endif
+
 GType nm_device_802_3_ethernet_get_type (void);
 
 NMDevice8023Ethernet *nm_device_802_3_ethernet_new (DBusGConnection *connection,
@@ -25,4 +29,8 @@
 int   nm_device_802_3_ethernet_get_speed   (NMDevice8023Ethernet *device);
 char *nm_device_802_3_ethernet_get_hw_address (NMDevice8023Ethernet *device);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NM_DEVICE_802_3_ETHERNET_H */
Index: libnm-glib/nm-access-point.h
===
--- libnm-glib/nm-access-point.h	(Revision 2656)
+++ libnm-glib/nm-access-point.h	(Arbeitskopie)
@@ -23,6 +23,10 @@
 	void (*strength_changed) (NMAccessPoint *ap, gint8 strength);
 } NMAccessPointClass;
 
+#ifdef __cplusplus
+extern C {
+#endif
+
 GType nm_access_point_get_type (void);
 
 NMAccessPoint *nm_access_point_new (DBusGConnection *connection, const char *path);
@@ -36,4 +40,8 @@
 guint32  nm_access_point_get_rate (NMAccessPoint *ap);
 int  nm_access_point_get_strength (NMAccessPoint *ap);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NM_ACCESS_POINT_H */
Index: libnm-glib/nm-device.h
===
--- libnm-glib/nm-device.h	(Revision 2656)
+++ libnm-glib/nm-device.h	(Arbeitskopie)
@@ -27,6 +27,10 @@
 	void (*state_changed) (NMDevice *device, NMDeviceState state);
 } NMDeviceClass;
 
+#ifdef __cplusplus
+extern C {
+#endif
+
 GType nm_device_get_type (void);
 
 NMDevice*nm_device_new   (DBusGConnection *connection,
@@ -49,4 +53,8 @@
 NMDeviceType  nm_device_type_for_path(DBusGConnection *connection,
 		  const char *path);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* NM_DEVICE_H */
Index: libnm-glib/nm-ip4-config.h
===
--- libnm-glib/nm-ip4-config.h	(Revision 2656)
+++ libnm-glib/nm-ip4-config.h	(Arbeitskopie)
@@ -21,6 +21,10 @@
 	NMObjectClass parent;
 } NMIP4ConfigClass;
 
+#ifdef __cplusplus
+extern C {
+#endif
+
 GType nm_ip4_config_get_type (void);
 
 NMIP4Config *nm_ip4_config_new (DBusGConnection *connection,
@@ -36,5 +40,8 @@
 char*nm_ip4_config_get_nis_domain  (NMIP4Config *config);
 GArray  *nm_ip4_config_get_nis_servers (NMIP4Config *config);
 
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* NM_IP4_CONFIG_H */
Index: libnm-glib/nm-client.h
===
--- libnm-glib/nm-client.h	(Revision 2656)
+++ libnm-glib/nm-client.h	(Arbeitskopie)
@@ -36,6 

knetworkmanager autostart issue

2007-08-07 Thread Dawid Wróbel
Hi,
After updating to 0.2 I somehow cannot force knetworkmanager to
start automatically after logging in to my kde session. Note, that
I have the start knetworkmanager auotmatically on login box checked in
configuration. I also have a saving and restoring the kde session
option set up in kde configuration (not sure if that's the correct name
for this option, I am using localized KDE). Any idea? 

-- 
Regards,
  Dawid Wróbel  
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: NM does not work with iwl4965 device

2007-08-07 Thread John W. Linville
On Tue, Aug 07, 2007 at 12:28:02AM -0200, Thomas M Steenholdt wrote:

 @@ -2877,6 +2883,14 @@
*/
   if (!nm_ap_get_broadcast (ap)  !is_adhoc)
   {
 + /*
 +  * since using AP_SCAN 1 for hidden networks, wpa_supplicant
 +  * does not seem to bring the essid to the device anymore...
 +  * perhaps this is a wpa_supplicant/wext/driver issue or 
 perhaps this
 +  * is simply how it is. We set the ESSID here for now.
 +  */
 + nm_device_802_11_wireless_set_essid(self, essid);
 +
   if (!nm_utils_supplicant_request_with_check (ctrl, OK, 
 __func__, NULL,
   SET_NETWORK %i scan_ssid 1, nwid))
   goto out;

Late to the party, pardon...

FWIW, there _is_ a problem w/ mac80211's pre-authentication scanning.
It doesn't probe for SSID, so it can't see hidden networks.

I have been testing the patch below with some success using the
wireless-tools package.  However, NM still seems unable to get an
association, at least not on the first try.  Sometimes/often the 2nd
or 3rd try works, whereas w/o the patch it basically never succeeds
without some sort of command-line intervention.

Anyway, perhaps you can test w/ the kernel patch below applied?
It is also available in the Fedora rawhide kernels here:

http://koji.fedoraproject.org/koji/buildinfo?buildID=13001

Thoughts?

John
---

From: John W. Linville [EMAIL PROTECTED]

[PATCH] mac80211: probe for hidden SSIDs

Signed-off-by: John W. Linville [EMAIL PROTECTED]
---

 net/mac80211/ieee80211_sta.c |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 007dd08..9f467cc 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -3217,7 +3217,10 @@ static int ieee80211_sta_config_auth(struct net_device 
*dev,
return 0;
} else {
if (ifsta-state != IEEE80211_AUTHENTICATE) {
-   ieee80211_sta_start_scan(dev, NULL, 0);
+   ieee80211_sta_start_scan(dev, ifsta-auto_ssid_sel ?
+   NULL : ifsta-ssid,
+ifsta-auto_ssid_sel ?
+   0 : ifsta-ssid_len);
ifsta-state = IEEE80211_AUTHENTICATE;
set_bit(IEEE80211_STA_REQ_AUTH, ifsta-request);
} else
-- 
John W. Linville
[EMAIL PROTECTED]
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: NM does not work with iwl4965 device

2007-08-07 Thread Thomas M Steenholdt
John W. Linville wrote:
 On Tue, Aug 07, 2007 at 12:28:02AM -0200, Thomas M Steenholdt wrote:
 
 @@ -2877,6 +2883,14 @@
   */
  if (!nm_ap_get_broadcast (ap)  !is_adhoc)
  {
 +/*
 + * since using AP_SCAN 1 for hidden networks, wpa_supplicant
 + * does not seem to bring the essid to the device anymore...
 + * perhaps this is a wpa_supplicant/wext/driver issue or 
 perhaps this
 + * is simply how it is. We set the ESSID here for now.
 + */
 +nm_device_802_11_wireless_set_essid(self, essid);
 +
  if (!nm_utils_supplicant_request_with_check (ctrl, OK, 
 __func__, NULL,
  SET_NETWORK %i scan_ssid 1, nwid))
  goto out;
 
 Late to the party, pardon...
 
 FWIW, there _is_ a problem w/ mac80211's pre-authentication scanning.
 It doesn't probe for SSID, so it can't see hidden networks.
 
 I have been testing the patch below with some success using the
 wireless-tools package.  However, NM still seems unable to get an
 association, at least not on the first try.  Sometimes/often the 2nd
 or 3rd try works, whereas w/o the patch it basically never succeeds
 without some sort of command-line intervention.
 
 Anyway, perhaps you can test w/ the kernel patch below applied?
 It is also available in the Fedora rawhide kernels here:
 
   http://koji.fedoraproject.org/koji/buildinfo?buildID=13001
 
 Thoughts?
 

If there's indeed a problem with the kernel, it would clearly be better 
to fix the problem than trying to work around it. That said - the NM 
patch works around the problem for me. :)

I'll try with a plain, updated NetworkManager and the latest rawhide 
kernel later tonight. I'll report on my success.

Thanks for your input.

/Thomas

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: NM does not work with iwl4965 device

2007-08-07 Thread Thomas M Steenholdt
John W. Linville wrote:
 
 FWIW, there _is_ a problem w/ mac80211's pre-authentication scanning.
 It doesn't probe for SSID, so it can't see hidden networks.
 
 I have been testing the patch below with some success using the
 wireless-tools package.  However, NM still seems unable to get an
 association, at least not on the first try.  Sometimes/often the 2nd
 or 3rd try works, whereas w/o the patch it basically never succeeds
 without some sort of command-line intervention.
 
 Anyway, perhaps you can test w/ the kernel patch below applied?
 It is also available in the Fedora rawhide kernels here:
 
   http://koji.fedoraproject.org/koji/buildinfo?buildID=13001
 
 Thoughts?
 

I installed 2.6.23-0.73.rc2.fc8 from koji, but it really made no 
difference. Using a plain (from updates repo) NetworkManager, I'm simply 
unable to get a network connection going. No matter what I seem to do.

Using the patched NM, I can Connect to other wireless network and it 
works. But I noticed a different problem. After a warm reboot, NM will 
notice the network and connect when I log in. After a cold boot, I'll 
have to Connect to other wireless network again. Probably due to the 
fact that the device still has problems finding hidden networks on it's 
own and perhaps something is stored withing the device that makes it 
work after a reboot.

Anything else to try?

/Thomas

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list