All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Daniel Drake <dsd@gentoo.org>
Cc: linville@tuxdriver.com, netdev@vger.kernel.org,
	johannes@sipsolutions.net
Subject: Re: [PATCH] softmac: Fix handling of authentication failure
Date: Thu, 01 Jun 2006 21:43:01 -0500	[thread overview]
Message-ID: <447FA5B5.8020707@lwfinger.net> (raw)
In-Reply-To: <20060601143722.D0B2C89CF47@zog.reactivated.net>

Daniel Drake wrote:
> My router blew up earlier, but exhibited some interesting behaviour during
> its dying moments. It was broadcasting beacons but wouldn't respond to
> any authentication requests.
>
> I noticed that softmac wasn't playing nice with this, as I couldn't make it try
> to connect to other networks after it had timed out authenticating to my ill
> router.
>
> To resolve this, I modified the softmac event/notify API to pass the event
> code to the callback, so that callbacks being notified from
> IEEE80211SOFTMAC_EVENT_ANY masks can make some judgement. In this case, the
> ieee80211softmac_assoc callback needs to make a decision based upon whether
> the association passed or failed.
>
> Signed-off-by: Daniel Drake <dsd@gentoo.org>
> Acked-by: Johannes Berg <johannes@sipsolutions.net>
--snip--

> Index: linux/net/ieee80211/softmac/ieee80211softmac_assoc.c
> ===================================================================
> --- linux.orig/net/ieee80211/softmac/ieee80211softmac_assoc.c
> +++ linux/net/ieee80211/softmac/ieee80211softmac_assoc.c
> @@ -164,12 +164,28 @@ network_matches_request(struct ieee80211
>  }
>  
>  static void
> -ieee80211softmac_assoc_notify(struct net_device *dev, void *context)
> +ieee80211softmac_assoc_notify_scan(struct net_device *dev, int event_type, void *context)
>  {
>  	struct ieee80211softmac_device *mac = ieee80211_priv(dev);
>  	ieee80211softmac_assoc_work((void*)mac);
>  }
>  
> +static void
> +ieee80211softmac_assoc_notify_auth(struct net_device *dev, int event_type, void *context)
> +{
> +	struct ieee80211softmac_device *mac = ieee80211_priv(dev);
> +
> +	switch (event_type) {
> +	case IEEE80211SOFTMAC_EVENT_AUTHENTICATED:
> +		ieee80211softmac_assoc_work((void*)mac);
> +		break;
> +	case IEEE80211SOFTMAC_EVENT_AUTH_FAILED:
> +	case IEEE80211SOFTMAC_EVENT_AUTH_TIMEOUT:
> +		ieee80211softmac_disassoc(mac);
>   
This statement fails to compile on my system using Linus' tree, because 
ieee80211softmac_disassoc needs a second argument - the reason. It seems 
as if WLAN_REASON_PREV_AUTH_NOT_VALID would be appropriate.

Larry


  reply	other threads:[~2006-06-02  2:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-01 14:37 [PATCH] softmac: Fix handling of authentication failure Daniel Drake
2006-06-02  2:43 ` Larry Finger [this message]
2006-06-02 10:09   ` Daniel Drake
2006-06-02 12:04     ` John W. Linville
2006-06-02 14:55       ` Larry Finger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=447FA5B5.8020707@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=dsd@gentoo.org \
    --cc=johannes@sipsolutions.net \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.