linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jussi Kivilinna" <jussi.kivilinna@mbnet.fi>
To: "Dan Williams" <dcbw@redhat.com>
Cc: "Johannes Berg" <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org, linville@tuxdriver.com,
	"Jouni Malinen" <Jouni.Malinen@Atheros.com>
Subject: Re: [PATCH] rndis_wlan: wait association to complete
Date: Sat, 08 Aug 2009 11:33:24 +0300	[thread overview]
Message-ID: <20090808113324.11151dei7w1sr334@hayate.sektori.org> (raw)
In-Reply-To: <1249680718.26088.44.camel@localhost.localdomain>

Quoting "Dan Williams" <dcbw@redhat.com>:

> On Thu, 2009-08-06 at 22:34 +0300, Jussi Kivilinna wrote:
>> Quoting "Johannes Berg" <johannes@sipsolutions.net>:
>>
>> > On Thu, 2009-08-06 at 21:17 +0300, Jussi Kivilinna wrote:
>> >> Fix WPA authentication problems by waiting to association to complete.
>> >> Otherwise userspace (wpa_supplicant) receives authentication  
>> packets before
>> >> association events from driver.
>> >
>> >> +	/* If we return now, userspace would get association events too late
>> >> +	 * (after receiving first packets from access point). This causes
>> >> +	 * WPA authentication to fail.
>> >
>> > This is a bit weird, shouldn't you just send the event later then?
>> >
>>
>> rndis_wlan bases on rndis_host/usbnet. Problem is that rndis_host uses
>> polling for rndis_command() results to avoid more complex interrupt
>> based solution. Because rndis_host and therefore rndis_wlan doesn't
>> handle interrupts on command channel, rndis_wlan knows about completed
>> association too late. 'Too late' means here that device starts
>> receiving packets from AP, which end up ignored because userspace
>> thinks device isn't assosiated yet (I think).
>>
>> So this patch adds waiting in set_essid() and active polling for
>> association completion in worker.
>>
>> Real fix would probably be to hold on data channel until association
>> is complete, but that would mean touching usbnet/rndis_host little bit
>> too much than I'd like to.
>
> If this patch ever blocks SIOSIWESSID, then a huge NAK.  Setting the
> ESSID is an asynchronous operation, it should *not* block for operation
> to complete.  Completion is signaled only when an IWESSID event is sent
> to userspace.  What you should be doing is dropping packets from the AP
> on the floor until the firmware things the association is complete.
>

Ok, I noticed that I need to do this 'right way' anyway for  
cfg80211-connect conversion. So I'm taking this one back and work out  
better fix for/with connect patches.

-Jussi


      reply	other threads:[~2009-08-08  8:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06 18:17 [PATCH] rndis_wlan: wait association to complete Jussi Kivilinna
2009-08-06 18:46 ` Johannes Berg
2009-08-06 19:34   ` Jussi Kivilinna
2009-08-07 21:31     ` Dan Williams
2009-08-08  8:33       ` Jussi Kivilinna [this message]

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=20090808113324.11151dei7w1sr334@hayate.sektori.org \
    --to=jussi.kivilinna@mbnet.fi \
    --cc=Jouni.Malinen@Atheros.com \
    --cc=dcbw@redhat.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).