Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4b42be7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  [PATCH] WE : Add missing auth compat-ioctl
  [PATCH] softmac: Fix inability to associate with WEP networks
parents 4aee491c 2aee6198
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3190,6 +3190,8 @@ COMPATIBLE_IOCTL(SIOCSIWRETRY)
COMPATIBLE_IOCTL(SIOCGIWRETRY)
COMPATIBLE_IOCTL(SIOCSIWPOWER)
COMPATIBLE_IOCTL(SIOCGIWPOWER)
COMPATIBLE_IOCTL(SIOCSIWAUTH)
COMPATIBLE_IOCTL(SIOCGIWAUTH)
/* hiddev */
COMPATIBLE_IOCTL(HIDIOCGVERSION)
COMPATIBLE_IOCTL(HIDIOCAPPLICATION)
+0 −2
Original line number Diff line number Diff line
@@ -273,8 +273,6 @@ ieee80211softmac_assoc_work(struct work_struct *work)
			ieee80211softmac_notify(mac->dev, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, ieee80211softmac_assoc_notify_scan, NULL);
			if (ieee80211softmac_start_scan(mac)) {
				dprintk(KERN_INFO PFX "Associate: failed to initiate scan. Is device up?\n");
				mac->associnfo.associating = 0;
				mac->associnfo.associated = 0;
			}
			goto out;
		} else {
+20 −34
Original line number Diff line number Diff line
@@ -70,26 +70,13 @@ ieee80211softmac_wx_set_essid(struct net_device *net_dev,
			      char *extra)
{
	struct ieee80211softmac_device *sm = ieee80211_priv(net_dev);
	struct ieee80211softmac_network *n;
	struct ieee80211softmac_auth_queue_item *authptr;
	int length = 0;

check_assoc_again:
	mutex_lock(&sm->associnfo.mutex);
	/* Check if we're already associating to this or another network
	 * If it's another network, cancel and start over with our new network
	 * If it's our network, ignore the change, we're already doing it!
	 */
	if((sm->associnfo.associating || sm->associnfo.associated) &&
	   (data->essid.flags && data->essid.length)) {
		/* Get the associating network */
		n = ieee80211softmac_get_network_by_bssid(sm, sm->associnfo.bssid);
		if(n && n->essid.len == data->essid.length &&
		   !memcmp(n->essid.data, extra, n->essid.len)) {
			dprintk(KERN_INFO PFX "Already associating or associated to "MAC_FMT"\n",
				MAC_ARG(sm->associnfo.bssid));
			goto out;
		} else {
		dprintk(KERN_INFO PFX "Canceling existing associate request!\n");
		/* Cancel assoc work */
		cancel_delayed_work(&sm->associnfo.work);
@@ -108,7 +95,6 @@ ieee80211softmac_wx_set_essid(struct net_device *net_dev,
		 * association while we flushed. */
		goto check_assoc_again;
	}
	}

	sm->associnfo.static_essid = 0;
	sm->associnfo.assoc_wait = 0;
@@ -153,13 +139,13 @@ ieee80211softmac_wx_get_essid(struct net_device *net_dev,
		data->essid.length = sm->associnfo.req_essid.len;
		data->essid.flags = 1;  /* active */
		memcpy(extra, sm->associnfo.req_essid.data, sm->associnfo.req_essid.len);
	}

		dprintk(KERN_INFO PFX "Getting essid from req_essid\n");
	} else if (sm->associnfo.associated || sm->associnfo.associating) {
	/* If we're associating/associated, return that */
	if (sm->associnfo.associated || sm->associnfo.associating) {
		data->essid.length = sm->associnfo.associate_essid.len;
		data->essid.flags = 1;  /* active */
		memcpy(extra, sm->associnfo.associate_essid.data, sm->associnfo.associate_essid.len);
		dprintk(KERN_INFO PFX "Getting essid from associate_essid\n");
	}
	mutex_unlock(&sm->associnfo.mutex);