linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <larry.finger@lwfinger.net>
To: Dan Williams <dcbw@redhat.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	dragoran <drago01@gmail.com>,
	linux-wireless@vger.kernel.org,
	John Linville <linville@redhat.com>
Subject: Re: mac80211 does not support WPA when used with wext
Date: Sat, 31 Mar 2007 13:09:13 -0500	[thread overview]
Message-ID: <460EA3C9.6020207@lwfinger.net> (raw)
In-Reply-To: <1175363333.9349.10.camel@localhost.localdomain>

Dan Williams wrote:
> On Sat, 2007-03-31 at 12:00 +0200, Johannes Berg wrote:
>> On Sat, 2007-03-31 at 11:36 +0200, dragoran wrote:
>>> Hello
>>> While testing the iwlwifi driver I noticed that the mac80211 does 
>>> provide a wext interface but does not support wpa with it.
>> You must have done something wrong, it works well.
> 
> Nope!  This time it's really mac80211 :)
> 
> Take a look at ieee80211_sta_scan_result() in mac80211/ieee80211_sta.c.
> Note that it returns custom events for the WPA & RSN IEs.  That's just
> wrong.  We should be using already-defined events.
> 
> [ Hopefully in cfg80211 we'll have a very easy way to extend the defined
> tag-list for attributes returned from scan results.  If you look at what
> various drivers have custom-defined for the CUSTOM tag, we weren't very
> aggressive about standardizing custom tags into IWEV* events. ]
> 
> I'm not sure where the heck these bits of mac80211 came from; both
> hostap and ieee80211 do it right (also airo, libertas, and prism54,
> though I'm to blame for those).  Plus, it's a net loss of code to do it
> with IWEVGENIE, and no additional kzalloc that can fail!  Bonus+2!
> 
> hostap:
> -------------
> 	if (bss && bss->wpa_ie_len > 0 && bss->wpa_ie_len <= MAX_WPA_IE_LEN) {
> 		memset(&iwe, 0, sizeof(iwe));
> 		iwe.cmd = IWEVGENIE;
> 		iwe.u.data.length = bss->wpa_ie_len;
> 		current_ev = iwe_stream_add_point(
> 			current_ev, end_buf, &iwe, bss->wpa_ie);
> 	}
> 
> 	if (bss && bss->rsn_ie_len > 0 && bss->rsn_ie_len <= MAX_WPA_IE_LEN) {
> 		memset(&iwe, 0, sizeof(iwe));
> 		iwe.cmd = IWEVGENIE;
> 		iwe.u.data.length = bss->rsn_ie_len;
> 		current_ev = iwe_stream_add_point(
> 			current_ev, end_buf, &iwe, bss->rsn_ie);
> 	}
> 
> ieee80211:
> -------------
> 
> 	memset(&iwe, 0, sizeof(iwe));
> 	if (network->wpa_ie_len) {
> 		char buf[MAX_WPA_IE_LEN];
> 		memcpy(buf, network->wpa_ie, network->wpa_ie_len);
> 		iwe.cmd = IWEVGENIE;
> 		iwe.u.data.length = network->wpa_ie_len;
> 		start = iwe_stream_add_point(start, stop, &iwe, buf);
> 	}
> 
> 	memset(&iwe, 0, sizeof(iwe));
> 	if (network->rsn_ie_len) {
> 		char buf[MAX_WPA_IE_LEN];
> 		memcpy(buf, network->rsn_ie, network->rsn_ie_len);
> 		iwe.cmd = IWEVGENIE;
> 		iwe.u.data.length = network->rsn_ie_len;
> 		start = iwe_stream_add_point(start, stop, &iwe, buf);
> 	}
> 
> <rant>
> 
> I don't quite get why mac80211/d80211 was so behind in wireless
> extensions support.  Didn't Jouni and Devicescape basically _write_
> WE-18/19 WPA support?  Did d80211 just not get the love that
> wpa_supplicant and the other drivers got when they were updated to WE-18
> and later?
> 
> </rant>
> 
> I can whip something up that _looks_ right but hasn't been compile
> tested if somebody else can test it.
> 

I can test it. ATM, I cannot get NM to connect, which prevents any testing of mac80211.

Larry

  parent reply	other threads:[~2007-03-31 18:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-31  9:36 mac80211 does not support WPA when used with wext dragoran
2007-03-31 10:00 ` Johannes Berg
2007-03-31 10:11   ` dragoran
2007-03-31 11:19   ` dragoran
2007-03-31 16:37     ` Michael Buesch
2007-03-31 16:39       ` Michael Buesch
2007-03-31 17:57       ` Dan Williams
2007-03-31 17:48   ` Dan Williams
2007-03-31 17:59     ` Jouni Malinen
2007-03-31 18:09     ` Larry Finger [this message]
2007-03-31 19:03     ` Michael Wu
     [not found]       ` <f6ca9fed0703311256m1b14ec35p836a62de532dd804@mail.gmail.com>
2007-03-31 21:00         ` Michael Wu
2007-04-01  0:50           ` Dan Williams
2007-04-02  3:50             ` WPA does not connect to bcm43xx-mac80211 when using NetworkManager Larry Finger
2007-04-02  4:12               ` Dan Williams
2007-04-03 14:26                 ` Larry Finger
2007-04-02  5:26               ` Michael Wu
2007-04-01  8:18           ` mac80211 does not support WPA when used with wext Johannes Berg
     [not found]           ` <f6ca9fed0704081445u5536e596m4ca4caeb44f7f87@mail.gmail.com>
2007-04-08 21:54             ` Michael Wu
     [not found]               ` <f6ca9fed0704081527j641a4ecat44151e107cab7342@mail.gmail.com>
2007-04-10  7:13                 ` dragoran
2007-04-10 12:25                   ` Dan Williams
2007-04-10 14:34                     ` dragoran dragoran
2007-04-10 14:39                   ` Larry Finger
2007-04-10 14:44                     ` dragoran dragoran
2007-04-01  0:55       ` Dan Williams
2007-04-01  1:21         ` Michael Wu
2007-04-01  4:51           ` Dan Williams

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=460EA3C9.6020207@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=dcbw@redhat.com \
    --cc=drago01@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@redhat.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).