Changeset 1408

Show
Ignore:
Timestamp:
01/23/06 08:30:44 (5 years ago)
Author:
svens
Message:

Fix for ticket #94, #183, #237. Don't try to load modules while atomic,
and print a warning if a module couldn't be loaded.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/net80211/ieee80211_linux.c

    r1366 r1408  
    298298ieee80211_load_module(const char *modname) 
    299299{ 
    300         request_module(modname); 
    301         return 0; 
     300        return in_atomic() ? -EINVAL : request_module(modname); 
    302301} 
    303302 
  • trunk/net80211/ieee80211_scan.c

    r1336 r1408  
    189189ieee80211_scanner_get(enum ieee80211_opmode mode) 
    190190{ 
     191        int err; 
    191192        if (mode >= IEEE80211_SCANNER_MAX) 
    192193                return NULL; 
    193         if (scanners[mode] == NULL) 
    194                 ieee80211_load_module(scan_modnames[mode]); 
     194        if (scanners[mode] == NULL) { 
     195                err = ieee80211_load_module(scan_modnames[mode]); 
     196                if(scanners[mode] == NULL || err) 
     197                        printk(KERN_WARNING "unable to load %s\n", scan_modnames[mode]); 
     198        } 
    195199        return scanners[mode]; 
    196200}