Re: Failing to register my device to hal and NM



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 



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