Changeset 1527

Show
Ignore:
Timestamp:
04/24/06 13:49:36 (3 years ago)
Author:
kelmo
Message:

1) Backout the wext 19 changes to ieee80211_init that caused this

problem (r1499).

2) Fix the real bug that made me change ieee80211_init in the first

place.

The real bug was a weird one. wpa_supplicant was setting the
authentication algorithm to "open system", which madwifi was
interpreting as "no encryption." However, those apparently do not
mean the same thing. The original "fix" was to avoid rescanning
after wpa_supplicant had set the authentication algorithm, which
allowed the association to complete.

The new fix is to ignore the authentication algorithm specified
by wpa_supplicant. wpa_supplicant falls back to setting the same
information via the IW_ENCODE flags, so the authentication system
still works.

Signed-Off-By: Brian Eaton <eaton.lists@gmail.com>

Files:

Legend:

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

    r1520 r1527  
    958958                        /* 
    959959                         * Try to be intelligent about clocking the state 
    960                          * machine.   
    961                          *    If forcescan is set, caller wants us to re-scan 
    962                          * to find an appropriate ap. 
    963                          *    If we are in run state, we drop back down to 
    964                          * associate to reapply any new state and/or parameters. 
    965                          *    If we are in some other state, then we are going 
    966                          * to be able to automatically apply those parameters 
    967                          * real soon now, so we don't muck with the state 
    968                          * machine. 
     960                         * machine.  If we're currently in RUN state then 
     961                         * we should be able to apply any new state/parameters 
     962                         * simply by re-associating.  Otherwise we need to 
     963                         * re-scan to select an appropriate ap. 
    969964                         */  
    970                         if (forcescan) 
     965                        if (vap->iv_state != IEEE80211_S_RUN || forcescan) 
    971966                                ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); 
    972                         else if (vap->iv_state == IEEE80211_S_RUN) 
     967                        else 
    973968                                ieee80211_new_state(vap, IEEE80211_S_ASSOC, 1); 
    974969                } else { 
  • trunk/net80211/ieee80211_wireless.c

    r1526 r1527  
    37973797 
    37983798 
     3799/* 
     3800 * The exact meaning of the IW_AUTH_ALG_* values is a little unclear. 
     3801 * For example, wpa_supplicant uses IW_AUTH_ALG_OPEN_SYSTEM for WPA-PSK 
     3802 * APs, unless you happen to set the auth_alg=SHARED option in your config 
     3803 * file in which case it uses IW_AUTH_ALG_SHARED_KEY.  Fortunately, 
     3804 * neither makes a any difference to madwifi, so for now we ignore it. 
     3805 */ 
    37993806static int 
    38003807siwauth_80211_auth_alg(struct net_device *dev, 
    38013808        struct iw_request_info *info, struct iw_param *erq, char *buf) 
    38023809{ 
    3803 #define VALID_ALGS_MASK (IW_AUTH_ALG_OPEN_SYSTEM|IW_AUTH_ALG_SHARED_KEY|IW_AUTH_ALG_LEAP) 
    3804         int mode = erq->value; 
    3805         int args[2]; 
    3806  
    3807         args[0] = IEEE80211_PARAM_AUTHMODE; 
    3808  
    3809         if (mode & ~VALID_ALGS_MASK) { 
    3810                 return -EINVAL; 
    3811         } 
    3812         if (mode & IW_AUTH_ALG_LEAP) { 
    3813                 args[1] = IEEE80211_AUTH_8021X; 
    3814         } else if ((mode & IW_AUTH_ALG_SHARED_KEY) && 
    3815                    (mode & IW_AUTH_ALG_OPEN_SYSTEM)) { 
    3816                 args[1] = IEEE80211_AUTH_AUTO; 
    3817         } else if (mode & IW_AUTH_ALG_SHARED_KEY) { 
    3818                 args[1] = IEEE80211_AUTH_SHARED; 
    3819         } else { 
    3820                 args[1] = IEEE80211_AUTH_OPEN; 
    3821         } 
    3822         return ieee80211_ioctl_setparam(dev, NULL, NULL, (char*)args); 
    3823 #undef VALID_ALGS_MASK 
     3810        return -EOPNOTSUPP; 
    38243811} 
    38253812 
     
    40674054        struct iw_request_info *info, struct iw_param *erq, char *buf) 
    40684055{ 
    4069         int arg; 
    4070         int rc; 
    4071  
    4072         arg = IEEE80211_PARAM_AUTHMODE; 
    4073         rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char*)&arg); 
    4074         if (rc) 
    4075                 return rc; 
    4076  
    4077         switch(arg) { 
    4078         case IEEE80211_AUTH_NONE: 
    4079         case IEEE80211_AUTH_OPEN: 
    4080                 erq->value = IW_AUTH_ALG_OPEN_SYSTEM; 
    4081                 break; 
    4082         case IEEE80211_AUTH_SHARED: 
    4083                 erq->value = IW_AUTH_ALG_SHARED_KEY; 
    4084                 break; 
    4085         case IEEE80211_AUTH_8021X: 
    4086                 erq->value = IW_AUTH_ALG_LEAP; 
    4087                 break; 
    4088         case IEEE80211_AUTH_WPA: 
    4089                 erq->value = IW_AUTH_ALG_LEAP|IW_AUTH_ALG_SHARED_KEY; 
    4090                 break; 
    4091         case IEEE80211_AUTH_AUTO: 
    4092         default: 
    4093                 erq->value = IW_AUTH_ALG_SHARED_KEY|IW_AUTH_ALG_OPEN_SYSTEM|IW_AUTH_ALG_LEAP; 
    4094                 break; 
    4095         } 
    4096         return 0; 
     4056        return -EOPNOTSUPP; 
    40974057} 
    40984058