NM 0.5.1 and ndiswrapper fails (with workaround)

Summary: NM 0.5.1 does not recognize some(all?) ndiswrapper drivers as "supported". Workaround is described

My wireless network interface is a Dell 1300 or 1400 PC Card (BCM4306). Since an appropriate native Linux driver is not available for this card, I am using ndiswrapper and the native Windows driver. Works like a charm. I highly recommend it.

NetworkManager 0.5.1 was just released on the updates for Fedora Core 4. After upgrading, NM not longer recognized my wireless network interface as being supported. However, the wireless card was clearly working. "iwlist wlan0 scan" found the expected ESSID's in the neighborhood and I was able to manually establish a network setting. "nm-tool" reports the presence of my wireless card, but marks it as "Supported: no".

The problem is a result of the fact that ndiswrapper or the Windows driver (I don't know which) does not register all of the information that NM expects with HAL. Here is the HAL entry for my wireless card,

udi = '/org/freedesktop/Hal/devices/net_00_90_4b_24_f2_73'
  info.udi = '/org/freedesktop/Hal/devices/net_00_90_4b_24_f2_73'  (string)
  linux.subsystem = 'net'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  net.80211.mac_address = 619736003187  (0x904b24f273)  (uint64)
  info.product = 'Networking Interface'  (string)
  net.interface_up = false  (bool)
  net.arp_proto_hw_id = 1  (0x1)  (int)
  net.linux.ifindex = 4  (0x4)  (int)
  net.address = '00:90:4b:24:f2:73'  (string)
  net.interface = 'wlan0'  (string)
net.physical_device = '/org/freedesktop/Hal/devices/pci_14e4_4320' (string)
  info.capabilities = {'net', 'net.80211'} (string list)
  info.category = 'net.80211'  (string)
  info.parent = '/org/freedesktop/Hal/devices/pci_14e4_4320'  (string)
  linux.sysfs_path = '/sys/class/net/wlan0'  (string)

Notice that "info.linux.driver" is not defined. The code in NetworkManagerDevices.c is such that if this entry is missing, then the device is marked as unsupported. In order to get my wireless card working with NM again, I used the attached patch, which removes this check and allows a (null) value for dev->driver in several other places.

Since the driver name appears to be used only to check for blacklisted devices, I request that you consider my patch for inclusion in 0.5.2.



For other FC4 users, here is my recipe for upgrading to the 0.5.1,

# rpm -q -a | fgrep NetworkManager | xargs rpm -e
# reboot
[ download and untar NetworkManager-0.5.1.tar.bz ]
[ apply the attached patch ]
$ cd NetworkManager 0.5.1
$ ./configure --prefix=/usr --sysconfdir=/etc --with-distro=redhat
$ make
$ su
# make install
# gtk-update-icon-cache -f /usr/share/icons/hicolor
# cp test/nm-tool /usr/bin/nm-tool
# chkconfig --add NetworkManager
# chkconfig --add NetworkManagerDispatcher
# chkconfig NetworkManager on
# chkconfig NetworkManagerDispatcher on
# reboot

--- NetworkManager-0.5.1.orig/src/NetworkManagerDevice.c	2005-10-19 10:19:53.000000000 -0400
+++ NetworkManager-0.5.1/src/NetworkManagerDevice.c	2005-11-10 06:54:26.000000000 -0500
@@ -174,11 +174,11 @@
 	gboolean supported = TRUE;
 	g_return_val_if_fail (dev != NULL, FALSE);
-	g_return_val_if_fail (dev->driver != NULL, FALSE);
+/* 	g_return_val_if_fail (dev->driver != NULL, FALSE); */
 	for (drv = &driver_blacklist[0]; *drv; drv++)
-		if (!strcmp (*drv, dev->driver))
+		if (dev->driver && !strcmp (*drv, dev->driver))
 			supported = FALSE;
@@ -546,7 +546,7 @@
 		g_free (dev->udi);
 		g_free (dev->iface);
-		g_free (dev->driver);
+		if (dev->driver) g_free (dev->driver);
 		memset (dev, 0, sizeof (NMDevice));
 		g_free (dev);
 		deleted = TRUE;

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