On Fri, Sep 25, 2009 at 12:11 PM, Kalle Valo <kalle.valo@xxxxxx> wrote: > On Thu, Sep 24, 2009 at 1:11 PM, Luis R. Rodriguez <mcgrof@xxxxxxxxx> wrote: >> On Thu, Sep 24, 2009 at 12:10 PM, Kalle Valo <kalle.valo@xxxxxx> wrote: >> >>> BTW, is there an easy way to get the module name for the interface? >>> That's also helpful information for the user. >> >> If you can map the interface to PCI ID then I think its possible, >> lspci -k seems to do it. > > Not all drivers use PCI, we have USB, SDIO, SPI and so on. Sure, it was just an example of a transport where this does exist, I am hoping this doesn't use PCI specific stuff and based on a simple strace of "strace -o foo lspci -k -s 03:00.0" I see it actually ends up reading a /lib/modules/ file and am hoping this is what it uses to do the mapping. But you still first need the bus ID for the netdevice, not sure how to best to do that. I do see the sysfs ieee80211 class maps the phy%d to the bus: mcgrof@tux ~ $ ls -ld /sys/class/ieee80211/phy0/device lrwxrwxrwx 1 root root 0 2009-09-25 12:25 /sys/class/ieee80211/phy0/device -> ../../../0000:03:00.0 If you can extract the bus from here and then the device:vendor id I think you can read the /lib/modules/ map file for the driver. Check these files out: ls /lib/modules/2.6.31-wl/modules.*map Luis -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html