linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/5] libertas: fix WPA adhoc network creation
@ 2009-05-23  0:09 Dan Williams
  2009-05-23  0:16 ` Dan Williams
  2009-05-23  8:24 ` Johannes Berg
  0 siblings, 2 replies; 6+ messages in thread
From: Dan Williams @ 2009-05-23  0:09 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless

Oddly enough, the firmware's JOIN/START commands don't appear to have
any facility for setting custom IEs, thus the started adhoc network
doesn't advertise its WPA capability in the beacon.  Whee!

Signed-off-by: Dan Williams <dcbw@redhat.com>

diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index cb73720..b9b3741 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -711,11 +711,13 @@ static int lbs_adhoc_start(struct lbs_private *priv,
 
 	/* set capability info */
 	tmpcap = WLAN_CAPABILITY_IBSS;
-	if (assoc_req->secinfo.wep_enabled) {
-		lbs_deb_join("ADHOC_START: WEP enabled, setting privacy on\n");
+	if (assoc_req->secinfo.wep_enabled ||
+	    assoc_req->secinfo.WPAenabled ||
+	    assoc_req->secinfo.WPA2enabled) {
+		lbs_deb_join("ADHOC_START: WEP/WPA enabled, privacy on\n");
 		tmpcap |= WLAN_CAPABILITY_PRIVACY;
 	} else
-		lbs_deb_join("ADHOC_START: WEP disabled, setting privacy off\n");
+		lbs_deb_join("ADHOC_START: WEP disabled, privacy off\n");
 
 	cmd.capability = cpu_to_le16(tmpcap);
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 5/5] libertas: fix WPA adhoc network creation
  2009-05-23  0:09 [PATCH 5/5] libertas: fix WPA adhoc network creation Dan Williams
@ 2009-05-23  0:16 ` Dan Williams
  2009-05-23  8:24 ` Johannes Berg
  1 sibling, 0 replies; 6+ messages in thread
From: Dan Williams @ 2009-05-23  0:16 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless

On Fri, 2009-05-22 at 20:09 -0400, Dan Williams wrote:
> Oddly enough, the firmware's JOIN/START commands don't appear to have
> any facility for setting custom IEs, thus the started adhoc network
> doesn't advertise its WPA capability in the beacon.  Whee!

Turns out v10 firmware now has this capability, but v9 and lower do not.
Just for the record.

Dan

> Signed-off-by: Dan Williams <dcbw@redhat.com>
> 
> diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
> index cb73720..b9b3741 100644
> --- a/drivers/net/wireless/libertas/assoc.c
> +++ b/drivers/net/wireless/libertas/assoc.c
> @@ -711,11 +711,13 @@ static int lbs_adhoc_start(struct lbs_private *priv,
>  
>  	/* set capability info */
>  	tmpcap = WLAN_CAPABILITY_IBSS;
> -	if (assoc_req->secinfo.wep_enabled) {
> -		lbs_deb_join("ADHOC_START: WEP enabled, setting privacy on\n");
> +	if (assoc_req->secinfo.wep_enabled ||
> +	    assoc_req->secinfo.WPAenabled ||
> +	    assoc_req->secinfo.WPA2enabled) {
> +		lbs_deb_join("ADHOC_START: WEP/WPA enabled, privacy on\n");
>  		tmpcap |= WLAN_CAPABILITY_PRIVACY;
>  	} else
> -		lbs_deb_join("ADHOC_START: WEP disabled, setting privacy off\n");
> +		lbs_deb_join("ADHOC_START: WEP disabled, privacy off\n");
>  
>  	cmd.capability = cpu_to_le16(tmpcap);
>  
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 5/5] libertas: fix WPA adhoc network creation
  2009-05-23  0:09 [PATCH 5/5] libertas: fix WPA adhoc network creation Dan Williams
  2009-05-23  0:16 ` Dan Williams
@ 2009-05-23  8:24 ` Johannes Berg
  2009-05-24 13:19   ` Dan Williams
  1 sibling, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2009-05-23  8:24 UTC (permalink / raw)
  To: Dan Williams; +Cc: John W. Linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 332 bytes --]

On Fri, 2009-05-22 at 20:09 -0400, Dan Williams wrote:
> Oddly enough, the firmware's JOIN/START commands don't appear to have
> any facility for setting custom IEs, thus the started adhoc network
> doesn't advertise its WPA capability in the beacon.  Whee!

We don't even properly support WPA IBSS in mac80211...

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 5/5] libertas: fix WPA adhoc network creation
  2009-05-23  8:24 ` Johannes Berg
@ 2009-05-24 13:19   ` Dan Williams
  2009-05-24 17:24     ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Williams @ 2009-05-24 13:19 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John W. Linville, linux-wireless

On Sat, 2009-05-23 at 10:24 +0200, Johannes Berg wrote:
> On Fri, 2009-05-22 at 20:09 -0400, Dan Williams wrote:
> > Oddly enough, the firmware's JOIN/START commands don't appear to have
> > any facility for setting custom IEs, thus the started adhoc network
> > doesn't advertise its WPA capability in the beacon.  Whee!
> 
> We don't even properly support WPA IBSS in mac80211...

Hmm, I support creating WPA-PSK adhoc networks in the NM UI (worked last
summer when I added the code), can you give a 10 second summary of
what's missing here?

Dan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 5/5] libertas: fix WPA adhoc network creation
  2009-05-24 13:19   ` Dan Williams
@ 2009-05-24 17:24     ` Johannes Berg
  2009-05-25  7:51       ` Jouni Malinen
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2009-05-24 17:24 UTC (permalink / raw)
  To: Dan Williams; +Cc: John W. Linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

On Sun, 2009-05-24 at 09:19 -0400, Dan Williams wrote:
> On Sat, 2009-05-23 at 10:24 +0200, Johannes Berg wrote:
> > On Fri, 2009-05-22 at 20:09 -0400, Dan Williams wrote:
> > > Oddly enough, the firmware's JOIN/START commands don't appear to have
> > > any facility for setting custom IEs, thus the started adhoc network
> > > doesn't advertise its WPA capability in the beacon.  Whee!
> > 
> > We don't even properly support WPA IBSS in mac80211...
> 
> Hmm, I support creating WPA-PSK adhoc networks in the NM UI (worked last
> summer when I added the code), can you give a 10 second summary of
> what's missing here?

Hm, well, Jouni says it doesn't play well with XP or Vista and we don't
have per-station group keys we'd need in theory.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 5/5] libertas: fix WPA adhoc network creation
  2009-05-24 17:24     ` Johannes Berg
@ 2009-05-25  7:51       ` Jouni Malinen
  0 siblings, 0 replies; 6+ messages in thread
From: Jouni Malinen @ 2009-05-25  7:51 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Dan Williams, John W. Linville, linux-wireless

On Sun, May 24, 2009 at 07:24:46PM +0200, Johannes Berg wrote:
> On Sun, 2009-05-24 at 09:19 -0400, Dan Williams wrote:
> > On Sat, 2009-05-23 at 10:24 +0200, Johannes Berg wrote:
> > > On Fri, 2009-05-22 at 20:09 -0400, Dan Williams wrote:
> > > > Oddly enough, the firmware's JOIN/START commands don't appear to have
> > > > any facility for setting custom IEs, thus the started adhoc network
> > > > doesn't advertise its WPA capability in the beacon.  Whee!
> > > 
> > > We don't even properly support WPA IBSS in mac80211...
> > 
> > Hmm, I support creating WPA-PSK adhoc networks in the NM UI (worked last
> > summer when I added the code), can you give a 10 second summary of
> > what's missing here?
> 
> Hm, well, Jouni says it doesn't play well with XP or Vista and we don't
> have per-station group keys we'd need in theory.

Please note that "WPA IBSS" and "RSN IBSS" are two quite different
beasts. WPA (as in the old v1 before IEEE 802.11i was finished)
introduced a WPA-None mode in which there is actually no key management
and the TKIP (or CCMP) key is pre-configured on the stations. This
interoperates to more or less the extent possible (the mode itself is
not really very nice design taken into account the replay protection and
no mechanism to deliver current packet number). I do not know how
strictly various implementations require the WPA IE to be in the Beacon
frames for WPA IBSS/WPA-None to work.

RSN IBSS (the mechanism introduced in the IEEE 802.11i-2004 and in
theory, included in WPA2, but not really interop tested that much)
includes full authentication and key management step similarly to the
managed AP--station case. This is likely to require the Beacon and Probe
Response frames to include the correct RSN IE.

I haven't tested RSN IBSS with XP (and don't even know a driver that
would support it there), but as far as brief tests with Vista are
concerned, there seemed to be some interop issues in the 4-way
handshake. Anyway, we do not yet have the needed support for this in
mac80211 (per-STA GTK/group key).

-- 
Jouni Malinen                                            PGP id EFC895FA

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-05-25  7:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-23  0:09 [PATCH 5/5] libertas: fix WPA adhoc network creation Dan Williams
2009-05-23  0:16 ` Dan Williams
2009-05-23  8:24 ` Johannes Berg
2009-05-24 13:19   ` Dan Williams
2009-05-24 17:24     ` Johannes Berg
2009-05-25  7:51       ` Jouni Malinen

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).