~ubuntu-branches/ubuntu/lucid/wpasupplicant/lucid-updates

« back to all changes in this revision

Viewing changes to driver_madwifi.c

  • Committer: Bazaar Package Importer
  • Author(s): Kel Modderman
  • Date: 2006-10-05 08:04:01 UTC
  • mfrom: (1.1.5 upstream) (3 etch)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20061005080401-r8lqlix4390yos7b
Tags: 0.5.5-2
* Update madwifi headers to latest SVN. (Closes: #388316)
* Remove failed attempt at action locking. [debian/functions.sh,
  debian/wpa_action.sh]
* Add hysteresis checking functions, to avoid "event loops" while
  using wpa-roam. [debian/functions.sh, debian/wpa_action.sh]
* Change of co-maintainer email address.
* Add ishex() function to functions.sh to determine wpa-psk value type in
  plaintext or hex. This effectively eliminates the need for the bogus and
  somewhat confusing wpa-passphrase contruct specific to our scripts and
  allows wpa-psk to work with either a 8 to 63 character long plaintext
  string or 64 character long hex string.
* Adjust README.modes to not refer to the redundant wpa-passphrase stuff.
* Add big fat NOTE about acceptable wpa-psk's to top of example gallery.
* Strip surrounding quotes from wpa-ssid if present, instead of just whining
  about them.
* Update email address in copyright blurb of functions.sh, ifupdown.sh and
  wpa_action.sh.  

Show diffs side-by-side

added added

removed removed

Lines of Context:
371
371
                 * change something in the driver */
372
372
                if (set80211param(drv, IEEE80211_PARAM_ROAMING, 0, 1) < 0)
373
373
                        ret = -1;
374
 
        }
375
374
 
376
 
        if (wpa_driver_wext_set_ssid(drv->wext, params->ssid,
377
 
                                     params->ssid_len) < 0)
378
 
                ret = -1;
379
 
        if (params->bssid) {
 
375
                if (wpa_driver_wext_set_ssid(drv->wext, params->ssid,
 
376
                                             params->ssid_len) < 0)
 
377
                        ret = -1;
 
378
        } else {
380
379
                if (set80211param(drv, IEEE80211_PARAM_ROAMING, 2, 1) < 0)
381
380
                        ret = -1;
 
381
                if (wpa_driver_wext_set_ssid(drv->wext, params->ssid,
 
382
                                             params->ssid_len) < 0)
 
383
                        ret = -1;
382
384
                memset(&mlme, 0, sizeof(mlme));
383
385
                mlme.im_op = IEEE80211_MLME_ASSOC;
384
386
                memcpy(mlme.im_macaddr, params->bssid, IEEE80211_ADDR_LEN);
385
387
                if (set80211priv(drv, IEEE80211_IOCTL_SETMLME, &mlme,
386
 
                                 sizeof(mlme), 1) < 0)
 
388
                                 sizeof(mlme), 1) < 0) {
 
389
                        wpa_printf(MSG_DEBUG, "%s: SETMLME[ASSOC] failed",
 
390
                                   __func__);
387
391
                        ret = -1;
 
392
                }
388
393
        }
389
394
 
390
395
        return ret;