some compile errors with that patch. drvinfo.driver is a char[32] and brackets are mismatched.
wifi-utils.c: In function 'wifi_utils_init': wifi-utils.c:76:17: error: incompatible types when assigning to type 'char[32]' from type 'void *' wifi-utils.c:85:3: error: expected ')' before 'ret' wifi-utils.c:95:1: error: expected expression before '}' token the unbalanced brackets at 85 i've made some changes so it compiles, but im not 100% sure if it's correct (I'm a bit under the weather at the moment). revised patch to test Index: network-manager-0.9.4.0/src/wifi/wifi-utils.c =================================================================== --- network-manager-0.9.4.0.orig/src/wifi/wifi-utils.c 2012-03-01 05:26:37.000000000 +0000 +++ network-manager-0.9.4.0/src/wifi/wifi-utils.c 2012-04-06 21:01:47.808432103 +0100 @@ -25,6 +25,11 @@ #include <string.h> #include <glib.h> +#include <sys/socket.h> +#include <linux/sockios.h> +#include <linux/if.h> +#include <linux/ethtool.h> + #include "wifi-utils.h" #include "wifi-utils-private.h" #include "wifi-utils-nl80211.h" @@ -57,11 +62,30 @@ wifi_utils_init (const char *iface, int ifindex, gboolean check_scan) { WifiData *ret; + struct ifreq ifr; + struct ethtool_drvinfo drvinfo; + int fd; g_return_val_if_fail (iface != NULL, NULL); g_return_val_if_fail (ifindex > 0, NULL); - ret = wifi_nl80211_init (iface, ifindex); + fd = socket(AF_INET, SOCK_DGRAM, 0); + + strcpy(ifr.ifr_name, iface); + drvinfo.cmd = ETHTOOL_GDRVINFO; + drvinfo.driver[0] = '\0'; + + ifr.ifr_data = &drvinfo; + + ioctl(fd, SIOCETHTOOL, &ifr); + + if (drvinfo.driver[0] && + (strcmp (drvinfo.driver, "ipw2200") == 0) || + (strcmp (drvinfo.driver, "ipw2100") == 0)) + ret = NULL; + else + ret = wifi_nl80211_init (iface, ifindex); + if (ret == NULL) { #if HAVE_WEXT ret = wifi_wext_init (iface, ifindex, check_scan); -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to network-manager in Ubuntu. https://bugs.launchpad.net/bugs/973241 Title: ipw2200 driver doesn't report any capabilities or wireless properties using the nl80211 interface to network-manager Status in The Linux Kernel: Confirmed Status in “linux” package in Ubuntu: Triaged Status in “network-manager” package in Ubuntu: In Progress Bug description: I filed this as a bug to network manager first (https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/971628). Using standard network-manager nm-tool (and subsequently all tools built upon nm) reports - Device: eth1 [SERVANTS-WLAN] ------------------------------------------------ Type: 802.11 WiFi Driver: ipw2200 State: connected Default: yes HW Address: <whatever> Capabilities: Wireless Properties Wireless Access Points ... Apr 4 11:28:57 Marias-NB NetworkManager[1053]: <info> (eth1): using nl80211 for WiFi device control (Note: the NB is connected becaus I configured the connection once, but I couldn't create a new one.) If I persude nm to use wext nm-tool reports: - Device: eth1 [SERVANTS-WLAN] ------------------------------------------------ Type: 802.11 WiFi Driver: ipw2200 State: connected Default: yes HW Address: <whatever> Capabilities: Speed: 24 Mb/s Wireless Properties WEP Encryption: yes WPA Encryption: yes WPA2 Encryption: yes ... Apr 4 11:01:59 Marias-NB NetworkManager[851]: <info> (eth1): using WEXT for WiFi device control And that's how I configured the connection in the first place. Perhaps this could be fixed just by disabling nl80211 in ipw2200? ProblemType: Bug DistroRelease: Ubuntu 12.04 Package: linux-image-3.2.0-21-generic 3.2.0-21.34 ProcVersionSignature: Ubuntu 3.2.0-21.34-generic 3.2.13 Uname: Linux 3.2.0-21-generic i686 AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24. ApportVersion: 2.0-0ubuntu4 Architecture: i386 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/controlC0: maria 1622 F.... pulseaudio CRDA: Error: [Errno 2] Datei oder Verzeichnis nicht gefunden Date: Wed Apr 4 11:41:28 2012 HibernationDevice: RESUME=UUID=08e50249-9faa-47d0-b184-bf67fdaccb1f MachineType: IBM 2373FWG PccardctlIdent: Socket 0: no product info available Socket 1: no product info available PccardctlStatus: Socket 0: no card Socket 1: no card ProcEnviron: LANGUAGE=de_AT:de TERM=xterm LANG=de_AT.UTF-8 SHELL=/bin/bash ProcFB: 0 radeondrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-21-generic root=UUID=5689445c-8671-45c4-a990-68885a255d8f ro splash quiet vt.handoff=7 SourcePackage: linux UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 06/18/2007 dmi.bios.vendor: IBM dmi.bios.version: 1RETDRWW (3.23 ) dmi.board.name: 2373FWG dmi.board.vendor: IBM dmi.board.version: Not Available dmi.chassis.asset.tag: No Asset Information dmi.chassis.type: 10 dmi.chassis.vendor: IBM dmi.chassis.version: Not Available dmi.modalias: dmi:bvnIBM:bvr1RETDRWW(3.23):bd06/18/2007:svnIBM:pn2373FWG:pvrThinkPadT42:rvnIBM:rn2373FWG:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable: dmi.product.name: 2373FWG dmi.product.version: ThinkPad T42 dmi.sys.vendor: IBM To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/973241/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp