Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #94: madwifi-module-autoload.diff

File madwifi-module-autoload.diff, 2.4 kB (added by svens, 14 years ago)
  • net80211/ieee80211.c

    old new  
    546546        if(vap->iv_flags & IEEE80211_F_XR) return 0;  
    547547#endif 
    548548 
    549         ieee80211_scanner_get(vap->iv_opmode); 
     549        ieee80211_scanner_get(vap->iv_opmode, 1); 
    550550 
    551551        /* NB: rtnl is held on entry so don't use register_netdev */ 
    552552        if (register_netdevice(dev)) { 
  • net80211/ieee80211_scan.c

    old new  
    186186static const struct ieee80211_scanner *scanners[IEEE80211_SCANNER_MAX]; 
    187187 
    188188const struct ieee80211_scanner * 
    189 ieee80211_scanner_get(enum ieee80211_opmode mode
     189ieee80211_scanner_get(enum ieee80211_opmode mode, int tryload
    190190{ 
    191191        int err; 
    192192        if (mode >= IEEE80211_SCANNER_MAX) 
    193193                return NULL; 
    194         if (scanners[mode] == NULL) { 
     194        if (scanners[mode] == NULL && tryload) { 
    195195                err = ieee80211_load_module(scan_modnames[mode]); 
    196196                if(scanners[mode] == NULL || err) 
    197197                        printk(KERN_WARNING "unable to load %s\n", scan_modnames[mode]); 
     
    372372        const struct ieee80211_scanner *scan; 
    373373        struct ieee80211_scan_state *ss = ic->ic_scan; 
    374374 
    375         scan = ieee80211_scanner_get(vap->iv_opmode); 
     375        scan = ieee80211_scanner_get(vap->iv_opmode, 0); 
    376376        if (scan == NULL) { 
    377377                IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, 
    378378                    "%s: no scanner support for mode %u\n", 
  • net80211/ieee80211_scan.h

    old new  
    223223                                const struct ieee80211_scan_entry *); 
    224224}; 
    225225const struct ieee80211_scanner * 
    226 ieee80211_scanner_get(enum ieee80211_opmode mode); 
     226ieee80211_scanner_get(enum ieee80211_opmode mode, int tryload); 
    227227void    ieee80211_scanner_register(enum ieee80211_opmode, 
    228228                const struct ieee80211_scanner *); 
    229229void    ieee80211_scanner_unregister(enum ieee80211_opmode, 
    230230                const struct ieee80211_scanner *); 
    231231void    ieee80211_scanner_unregister_all(const struct ieee80211_scanner *); 
    232 const struct ieee80211_scanner *ieee80211_scanner_get(enum ieee80211_opmode); 
     232 
    233233#endif /* _NET80211_IEEE80211_SCAN_H_ */