Changeset 2225

Show
Ignore:
Timestamp:
03/27/07 07:32:03 (2 years ago)
Author:
proski
Message:

Return better error codes from ieee80211_ioctl_setmlme

If the interface is down, return 0 (no error) for the requests that
reduce stations' "access level" and -ENETDOWN for others.

This avoids messages about failing IEEE80211_IOCTL_SETMLME from hostapd.

Files:

Legend:

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

    r2210 r2225  
    33303330        struct ieee80211_node *ni; 
    33313331 
    3332         if (!IS_UP(dev)) 
    3333                 return -EINVAL; 
     3332        if (!IS_UP(dev)) { 
     3333                switch (mlme->im_op) { 
     3334                case IEEE80211_MLME_DISASSOC: 
     3335                case IEEE80211_MLME_DEAUTH: 
     3336                case IEEE80211_MLME_UNAUTHORIZE: 
     3337                        return 0; 
     3338                default: 
     3339                        return -ENETDOWN; 
     3340                } 
     3341        } 
    33343342        switch (mlme->im_op) { 
    33353343        case IEEE80211_MLME_ASSOC: