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

Commit 6f07a8a3 authored by Ulrich Kunitz's avatar Ulrich Kunitz Committed by John W. Linville
Browse files

[PATCH] ieee80211softmac: Fix errors related to the work_struct changes



The signature of work functions changed recently from a context
pointer to the work structure pointer. This caused a problem in
the ieee80211softmac code, because the ieee80211softmac_assox_work
function has  been called directly with a parameter explicitly
casted to (void*). This compiled correctly but resulted in a
softlock, because mutex_lock was called with the wrong memory
address. The patch fixes the problem. Another issue was a wrong
call of the schedule_work function. Softmac works again and this
fixes the problem I mentioned earlier in the zd1211rw rx tasklet
patch. The patch is against Linus' tree (commit af1713e0).

Signed-off-by: default avatarUlrich Kunitz <kune@deine-taler.de>
Acked-by: default avatarMichael Buesch <mb@bu3sch.de>
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4d1feabc
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -167,7 +167,7 @@ static void
ieee80211softmac_assoc_notify_scan(struct net_device *dev, int event_type, void *context)
ieee80211softmac_assoc_notify_scan(struct net_device *dev, int event_type, void *context)
{
{
	struct ieee80211softmac_device *mac = ieee80211_priv(dev);
	struct ieee80211softmac_device *mac = ieee80211_priv(dev);
	ieee80211softmac_assoc_work((void*)mac);
	ieee80211softmac_assoc_work(&mac->associnfo.work.work);
}
}


static void
static void
@@ -177,7 +177,7 @@ ieee80211softmac_assoc_notify_auth(struct net_device *dev, int event_type, void


	switch (event_type) {
	switch (event_type) {
	case IEEE80211SOFTMAC_EVENT_AUTHENTICATED:
	case IEEE80211SOFTMAC_EVENT_AUTHENTICATED:
		ieee80211softmac_assoc_work((void*)mac);
		ieee80211softmac_assoc_work(&mac->associnfo.work.work);
		break;
		break;
	case IEEE80211SOFTMAC_EVENT_AUTH_FAILED:
	case IEEE80211SOFTMAC_EVENT_AUTH_FAILED:
	case IEEE80211SOFTMAC_EVENT_AUTH_TIMEOUT:
	case IEEE80211SOFTMAC_EVENT_AUTH_TIMEOUT: