Re: Failing to register my device to hal and NM



Hi Dan, Thanks for your quick reply. I'm using kernel 2.6.31. Here is the output log from my device according to your recommendation. Where I still don't see where I'm doing anything wrong: insmod sdio.ko insmod tiwlan_drv.ko NetworkManager: nm_device_802_11_wireless_new: assertion `driver != NULL' failed root omap-4430sdp:/wlan# cd /sys/class/net/ root omap-4430sdp:/sys/class/net# ls -l drwxr-xr-x 3 root root 0 Jan 1 00:00 lo drwxr-xr-x 4 root root 0 Jan 1 00:11 tiwlan0 root omap-4430sdp:/sys/class/net# cd tiwlan0/ root omap-4430sdp:/sys/class/net/tiwlan0# ls -l -r--r--r-- 1 root root 4096 Jan 1 00:12 addr_len -r--r--r-- 1 root root 4096 Jan 1 00:11 address -r--r--r-- 1 root root 4096 Jan 1 00:12 broadcast -r--r--r-- 1 root root 4096 Jan 1 00:12 carrier -r--r--r-- 1 root root 4096 Jan 1 00:12 dev_id lrwxrwxrwx 1 root root 0 Jan 1 00:11 device -> ../../../devices/platform/tiwlan.3 -r--r--r-- 1 root root 4096 Jan 1 00:12 dormant -r--r--r-- 1 root root 4096 Jan 1 00:12 features -rw-r--r-- 1 root root 4096 Jan 1 00:11 flags -rw-r--r-- 1 root root 4096 Jan 1 00:12 ifalias -r--r--r-- 1 root root 4096 Jan 1 00:11 ifindex -r--r--r-- 1 root root 4096 Jan 1 00:12 iflink -r--r--r-- 1 root root 4096 Jan 1 00:12 link_mode -rw-r--r-- 1 root root 4096 Jan 1 00:12 mtu -r--r--r-- 1 root root 4096 Jan 1 00:12 operstate drwxr-xr-x 2 root root 0 Jan 1 00:12 statistics lrwxrwxrwx 1 root root 0 Jan 1 00:11 subsystem -> ../../net -rw-r--r-- 1 root root 4096 Jan 1 00:12 tx_queue_len -r--r--r-- 1 root root 4096 Jan 1 00:11 type -rw-r--r-- 1 root root 4096 Jan 1 00:12 uevent drwxr-xr-x 2 root root 0 Jan 1 00:11 wireless root omap-4430sdp:/sys/class/net/tiwlan0# ls -al drwxr-xr-x 4 root root 0 Jan 1 00:11 . drwxr-xr-x 4 root root 0 Jan 1 00:11 .. -r--r--r-- 1 root root 4096 Jan 1 00:12 addr_len -r--r--r-- 1 root root 4096 Jan 1 00:11 address -r--r--r-- 1 root root 4096 Jan 1 00:12 broadcast -r--r--r-- 1 root root 4096 Jan 1 00:12 carrier -r--r--r-- 1 root root 4096 Jan 1 00:12 dev_id lrwxrwxrwx 1 root root 0 Jan 1 00:11 device -> ../../../devices/platform/tiwlan.3 -r--r--r-- 1 root root 4096 Jan 1 00:12 dormant -r--r--r-- 1 root root 4096 Jan 1 00:12 features -rw-r--r-- 1 root root 4096 Jan 1 00:11 flags -rw-r--r-- 1 root root 4096 Jan 1 00:12 ifalias -r--r--r-- 1 root root 4096 Jan 1 00:11 ifindex -r--r--r-- 1 root root 4096 Jan 1 00:12 iflink -r--r--r-- 1 root root 4096 Jan 1 00:12 link_mode -rw-r--r-- 1 root root 4096 Jan 1 00:12 mtu -r--r--r-- 1 root root 4096 Jan 1 00:12 operstate drwxr-xr-x 2 root root 0 Jan 1 00:12 statistics lrwxrwxrwx 1 root root 0 Jan 1 00:11 subsystem -> ../../net -rw-r--r-- 1 root root 4096 Jan 1 00:12 tx_queue_len -r--r--r-- 1 root root 4096 Jan 1 00:11 type -rw-r--r-- 1 root root 4096 Jan 1 00:12 uevent drwxr-xr-x 2 root root 0 Jan 1 00:11 wireless root omap-4430sdp:/sys/class/net/tiwlan0# cd device/ root omap-4430sdp:/sys/devices/platform/tiwlan%d.3# ls -l lrwxrwxrwx 1 root root 0 Jan 1 00:11 bus -> ../../../bus/platform lrwxrwxrwx 1 root root 0 Jan 1 00:11 driver -> ../../../bus/platform/drivers/tiwlan -r--r--r-- 1 root root 4096 Jan 1 00:13 modalias lrwxrwxrwx 1 root root 0 Jan 1 00:13 net:tiwlan0 -> ../../../class/net/tiwlan0 lrwxrwxrwx 1 root root 0 Jan 1 00:11 subsystem -> ../../../bus/platform -rw-r--r-- 1 root root 4096 Jan 1 00:13 uevent root omap-4430sdp:/sys/devices/platform/tiwlan%d.3# cd driver/ root omap-4430sdp:/sys/bus/platform/drivers/tiwlan%d# ls -l --w------- 1 root root 4096 Jan 1 00:18 bind lrwxrwxrwx 1 root root 0 Jan 1 00:18 module -> ../../../../module/tiwlan_drv lrwxrwxrwx 1 root root 0 Jan 1 00:18 tiwlan%d.3 -> ../../../../devices/platform/tiwlan.3 --w------- 1 root root 4096 Jan 1 00:18 uevent --w------- 1 root root 4096 Jan 1 00:18 unbind root omap-4430sdp:/sys/bus/platform/drivers/tiwlan# Benzy
Dan Williams wrote:
On Mon, 2009-11-30 at 13:17 -0800, Benzy wrote: > Hi, > > I'm correctly working with NM 0.2 on TI processor (Embedded device). (I'll > soon move to the latest 0.7 or 0.8) > I'm trying to register my WiFi device to the hal and I'm getting the > following error message while doing so: > "# NetworkManager: nm_device_802_11_wireless_new: assertion `driver != NULL' > failed " > > As I'm a newbe in this area I am probably missing something here. So below > is the structure that I am using in my WLAN driver. Yup; looks like the driver or stack isn't properly registering with the kernel and sysfs. If this is the TI vendor driver, I highly doubt it's got the right bits but I could be wrong. You're looking for the 'device' link in sysfs when you do this: [dcbw localhost ~]$ cd /sys/class/net/wlan0/ [dcbw localhost wlan0]$ ls -al ... -r--r--r--. 1 root root 4096 2009-12-01 00:28 carrier lrwxrwxrwx. 1 root root 0 2009-12-01 00:28 device -> ../../../0000:02:00.0 -r--r--r--. 1 root root 4096 2009-12-01 00:28 dev_id ... [dcbw localhost wlan0]$ if you then 'cd device', and do 'ls -al' you'll see: [dcbw localhost wlan0]$ cd device [dcbw localhost device]$ ls -al ... -rw-r--r--. 1 root root 4096 2009-12-01 00:29 debug_level -r--r--r--. 1 root root 4096 2009-12-01 00:29 device lrwxrwxrwx. 1 root root 0 2009-11-30 23:21 driver -> ../../../../bus/pci/drivers/iwlagn -rw-------. 1 root root 4096 2009-12-01 00:29 enable ... and bingo, there's the 'driver' link pointing to the right kernel module. This requires that the bus driver doesn't suck; all official in-kernel drivers do this correctly. Additionally, when the WLAN device is connected and active, what do you get for: ls /sys/bus/sdio/drivers/ ? If you don't get anything, this further points to problems in the driver or SDIO stack. For example, when I have a Marvell Libertas SD8686 device connected, I'll see this there: [dcbw localhost device]$ ls /sys/bus/sdio/drivers libertas_sdio [dcbw localhost device]$ indicating that the libertas_sdio driver is currently in-use on the SDIO bus. Dan > struct platform_device tiwlan_dev = { > .name ="TI_WLAN", > .id =3, > .dev = { > .dma_mask = &mmc_wlan_dmamask, > .platform_data = &mmc_wlan_data, > }, > .num_resources = ARRAY_SIZE(mmc_wlan), > .resource = mmc_wlan, > }; > > > struct platform_driver tiwlan_drv = { > .probe = tiwlan_probe, > .remove = tiwlan_remove, > .driver = { > .name = "TI_WLAN", > .owner = THIS_MODULE, > }, > }; > > Your help is appreciated. > > Benz _______________________________________________ NetworkManager-list mailing list NetworkManager-list gnome org http://mail.gnome.org/mailman/listinfo/networkmanager-list


View this message in context: Re: Failing to register my device to hal and NM
Sent from the Gnome - NetworkManager mailing list archive at Nabble.com.


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