Changeset 733


Ignore:
Timestamp:
2005-04-27T16:37:11+02:00 (13 years ago)
Author:
nbd
Message:

make wlcompat probe for the device to use

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openwrt/package/openwrt/wlcompat.c

    r704 r733  
    696696static int __init wlcompat_init() 
    697697{ 
    698         dev = dev_get_by_name("eth1"); 
     698        int found = 0, i; 
     699        char *devname = "eth0"; 
     700         
     701        while (!found && devname[3] < '3') { 
     702                devname[3]++; 
     703                 
     704                dev = dev_get_by_name(devname); 
     705                if ((wl_ioctl(dev, WLC_GET_MAGIC, &i, sizeof(i)) == 0) && i == WLC_IOCTL_MAGIC) 
     706                        found = 1; 
     707        } 
     708         
     709        if (!found) { 
     710                printk("No Broadcom devices found.\n"); 
     711                return -ENODEV; 
     712        } 
     713                 
     714 
    699715#ifdef DEBUG 
    700716        old_ioctl = dev->do_ioctl; 
Note: See TracChangeset for help on using the changeset viewer.