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 #241: hostapd-devel-committed.diff

File hostapd-devel-committed.diff, 1.4 kB (added by jmaline@cc.hut.fi, 13 years ago)

hostapd change committed to CVS devel branch

  • driver_madwifi.c

    old new  
    686686        struct hostapd_data *hapd = drv->hapd; 
    687687        struct ieee80211req_wpaie ie; 
    688688        int ielen, res; 
     689        u8 *iebuf; 
    689690 
    690691        /* 
    691692         * Fetch negotiated WPA/RSN parameters from the system. 
     
    696697                printf("Failed to get WPA/RSN information element.\n"); 
    697698                return -1;              /* XXX not right */ 
    698699        } 
    699         ielen = ie.wpa_ie[1]; 
     700        iebuf = ie.wpa_ie; 
     701#ifdef MADWIFI_NG 
     702        if (iebuf[1] == 0 && ie.rsn_ie[1] > 0) { 
     703                /* madwifi-ng svn #1453 added rsn_ie. Use it, if wpa_ie was not 
     704                 * set. This is needed for WPA2. */ 
     705                iebuf = ie.rsn_ie; 
     706        } 
     707#endif /* MADWIFI_NG */ 
     708        ielen = iebuf[1]; 
    700709        if (ielen == 0) { 
    701710                printf("No WPA/RSN information element for station!?\n"); 
    702711                return -1;              /* XXX not right */ 
     
    709718                return -1; 
    710719        } 
    711720        res = wpa_validate_wpa_ie(hapd->wpa_auth, sta->wpa_sm, 
    712                                   ie.wpa_ie, ielen); 
     721                                  iebuf, ielen); 
    713722        if (res != WPA_IE_OK) { 
    714723                printf("WPA/RSN information element rejected? (res %u)\n", res); 
    715724                return -1;