RE: ifupdown plugin adds wifi device as wired (with patch)



On Tue, 2009-03-24 at 17:49 +0100, Gertjan de Back wrote:
> > Your device is an SDIO device, right?  In that case, it should have
> the
> > MMC host as the parent device, and your SDIO driver as the 'driver'
> > device.
> 
> Ok, that is clear. Here is the sysfs info:
> 
> # ls -al /sys/class/net/wlan0
> drwxr-xr-x    5 root     root            0 Mar 24 16:32 .
> drwxr-xr-x    4 root     root            0 Mar 24 16:32 ..
> -r--r--r--    1 root     root         4096 Mar 24 16:39 addr_len
> -r--r--r--    1 root     root         4096 Mar 24 16:32 address
> -r--r--r--    1 root     root         4096 Mar 24 16:39 broadcast
> -r--r--r--    1 root     root         4096 Mar 24 16:39 carrier
> lrwxrwxrwx    1 root     root            0 Mar 24 16:32 device ->
> ../../../class/mmc_host/mmc1/mmc1:0001/mmc1:0001:1
> -r--r--r--    1 root     root         4096 Mar 24 16:39 dormant
> -r--r--r--    1 root     root         4096 Mar 24 16:39 features
> -rw-r--r--    1 root     root         4096 Mar 24 16:32 flags
> -r--r--r--    1 root     root         4096 Mar 24 16:32 ifindex
> -r--r--r--    1 root     root         4096 Mar 24 16:39 iflink
> -r--r--r--    1 root     root         4096 Mar 24 16:39 link_mode
> -rw-r--r--    1 root     root         4096 Mar 24 16:39 mtu
> -r--r--r--    1 root     root         4096 Mar 24 16:39 operstate
> drwxr-xr-x    2 root     root            0 Mar 24 16:39 power
> drwxr-xr-x    2 root     root            0 Mar 24 16:39 statistics
> lrwxrwxrwx    1 root     root            0 Mar 24 16:32 subsystem ->
> ../../../class/net
> -rw-r--r--    1 root     root         4096 Mar 24 16:39 tx_queue_len
> -r--r--r--    1 root     root         4096 Mar 24 16:32 type
> -rw-r--r--    1 root     root         4096 Mar 24 16:39 uevent
> drwxr-xr-x    2 root     root            0 Mar 24 16:32 wireless
> 
> # ls -al /sys/class/net/wlan0/device
> lrwxrwxrwx    1 root     root            0 Mar 24 16:32
> /sys/class/net/wlan0/device ->
> ../../../class/mmc_host/mmc1/mmc1:0001/mmc1:0001:1

My mistake, can you instead do:

ls -al /sys/class/net/wlan0/device/

(ie, with a / on the end)

if you don't have a 'driver' link in that directory, then something in
the wlan driver, or the sdio subsystem is busted.

For example:

[dcbw localhost ~]$ ls -al /sys/class/net/eth2/device/
...
lrwxrwxrwx 1 root root    0 2009-03-24 12:19 driver -> ../../../../bus/pci/drivers/ipw2200
...

Dan


> # ls -al /sys/class/net/wlan0/device/driver
> lrwxrwxrwx    1 root     root            0 Mar 24 16:32
> /sys/class/net/wlan0/device/driver ->
> ../../../../../bus/sdio/drivers/sdio_wlan
> 
> 
> HAL provides somewhat different info, though. MXCMCI is the iMX SDIO
> interface.
> 
> 
> # lshal --tree
> computer
>   <output trimmed>
>   platform_mxcmci_1
>     platform_mxcmci_1_mmc_host
>       net_00_12_cf_8f_26_b1
>   <output trimmed>
> 
> # lshal -u net_00_12_cf_8f_26_b1
> udi = '/org/freedesktop/Hal/devices/net_00_12_cf_8f_26_b1'
>   info.capabilities = {'net', 'net.80211'} (string list)
>   info.category = 'net.80211'  (string)
>   info.parent =
> '/org/freedesktop/Hal/devices/platform_mxcmci_1_mmc_host'  (string)
>   info.product = 'WLAN Interface'  (string)
>   info.subsystem = 'net'  (string)
>   info.udi = '/org/freedesktop/Hal/devices/net_00_12_cf_8f_26_b1'
> (string)
>   linux.hotplug_type = 2  (0x2)  (int)
>   linux.subsystem = 'net'  (string)
>   linux.sysfs_path = '/sys/class/net/wlan0'  (string)
>   net.80211.mac_address = 80791676593  (0x12cf8f26b1)  (uint64)
>   net.address = '00:12:cf:8f:26:b1'  (string)
>   net.arp_proto_hw_id = 1  (0x1)  (int)
>   net.interface = 'wlan0'  (string)
>   net.linux.ifindex = 7  (0x7)  (int)
>   net.originating_device =
> '/org/freedesktop/Hal/devices/platform_mxcmci_1_mmc_host'  (string)
> 
> # lshal -u platform_mxcmci_1_mmc_host
> udi = '/org/freedesktop/Hal/devices/platform_mxcmci_1_mmc_host'
>   info.capabilities = {'mmc_host'} (string list)
>   info.category = 'mmc_host'  (string)
>   info.parent = '/org/freedesktop/Hal/devices/platform_mxcmci_1'
> (string)
>   info.product = 'MMC/SD Host Adapter'  (string)
>   info.subsystem = 'mmc_host'  (string)
>   info.udi = '/org/freedesktop/Hal/devices/platform_mxcmci_1_mmc_host'
> (string)
>   linux.hotplug_type = 2  (0x2)  (int)
>   linux.subsystem = 'mmc_host'  (string)
>   linux.sysfs_path = '/sys/class/mmc_host/mmc1'  (string)
>   mmc_host.host = 1  (0x1)  (int)
> 
> # lshal -u platform_mxcmci_1         
> udi = '/org/freedesktop/Hal/devices/platform_mxcmci_1'
>   info.linux.driver = 'mxcmci'  (string)
>   info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
>   info.product = 'Platform Device (mxcmci.1)'  (string)
>   info.subsystem = 'platform'  (string)
>   info.udi = '/org/freedesktop/Hal/devices/platform_mxcmci_1'  (string)
>   linux.hotplug_type = 2  (0x2)  (int)
>   linux.subsystem = 'platform'  (string)
>   linux.sysfs_path = '/sys/devices/platform/mxcmci.1'  (string)
>   platform.id = 'mxcmci.1'  (string)
> 
> 
> Printing all this makes me think that platform_mxcmci_1_mmc_host should
> have info.linux.driver set to 'sdio_wlan'. Is that right? 
> 
> > Are you using the in-kernel SDIO subsystem, and if not, why not?
> 
> I believe the SDIO subsystem is provided by the kernel (2.26.24) which
> is Freescale-flavoured.
> 
> Regards,
> Gertjan



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