Linux wireless drivers development
 help / color / mirror / Atom feed
* cfg80211 question: impedance mismatch of .connect versus .assoc
@ 2009-10-14  9:36 Holger Schurig
  2009-10-14 13:41 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Holger Schurig @ 2009-10-14  9:36 UTC (permalink / raw)
  To: linux-wireless

While playing with .auth/.deauth/.assoc/.disassoc 
versus .connect/.disconnect in libertas, I notices two things 
that makes things a bit hard for me.


BSS list driven vs. not
-----------------------
.auth/.assoc provides the BSSID to connect to. If cfg80211's BSS 
list is empty, it even will do a scan before 
calling .auth/.assoc.

However, for the .connect method this isn't true. .connect just 
get's the SSID.

My problem here is that the CMD_802_11_ASSOCIATE command for the 
libertas' firmware wants the AP's BSSID to connect to. For now, 
I do this:

	if (sme->bssid) {
		bss = cfg80211_get_bss(wiphy, sme->channel, sme->bssid,
			sme->ssid, sme->ssid_len,
			WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
	} else {
		ret = -ENOTSUPP;
		goto done;
	}

This makes the "iw connect" command only work if an "iw scan" did 
just take place and I provide an BSS on the command line. 

So maybe net/wireless/sme.c should be generalized ?



BSSID for .deauth/.disassoc vs. .disconnect
-------------------------------------------
Both the .deauth and .disassoc get the cfg80211_bss entry to 
deauth / disassociate against.

.disconnect doesn't get this.

But I need the BSSID for the CMD_802_11_DISASSOCIATE command, so 
I need to store the BSSID locally in priv->XXX. But I'm quite 
sure that cfg80211 already knows to which bssid I'm connected 
(see "iw xxx link"), so it's not nice that I need to store this 
twice.

-- 
http://www.holgerschurig.de

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

* Re: cfg80211 question: impedance mismatch of .connect versus .assoc
  2009-10-14  9:36 cfg80211 question: impedance mismatch of .connect versus .assoc Holger Schurig
@ 2009-10-14 13:41 ` Johannes Berg
  2009-10-14 14:26   ` Holger Schurig
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2009-10-14 13:41 UTC (permalink / raw)
  To: Holger Schurig; +Cc: linux-wireless

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

On Wed, 2009-10-14 at 11:36 +0200, Holger Schurig wrote:
> While playing with .auth/.deauth/.assoc/.disassoc 
> versus .connect/.disconnect in libertas, I notices two things 
> that makes things a bit hard for me.

> This makes the "iw connect" command only work if an "iw scan" did 
> just take place and I provide an BSS on the command line. 
> 
> So maybe net/wireless/sme.c should be generalized ?
> 
> 
> 
> BSSID for .deauth/.disassoc vs. .disconnect
> -------------------------------------------
> Both the .deauth and .disassoc get the cfg80211_bss entry to 
> deauth / disassociate against.
> 
> .disconnect doesn't get this.

This was intentional, as with ->connect() the driver is supposed to
handle roaming/pre-connect scanning etc. Basically it's mostly for the
case of full-mac drivers that do that in the device firmware.

What you perceive as a "mismatch" is fully intentional, due to the
separation of where roaming is handled.

johannes

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

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

* Re: cfg80211 question: impedance mismatch of .connect versus .assoc
  2009-10-14 13:41 ` Johannes Berg
@ 2009-10-14 14:26   ` Holger Schurig
  0 siblings, 0 replies; 3+ messages in thread
From: Holger Schurig @ 2009-10-14 14:26 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

> This was intentional, as with ->connect() the driver is
> supposed to handle roaming/pre-connect scanning etc. Basically
> it's mostly for the case of full-mac drivers that do that in
> the device firmware. 

The libertas firmware doesn't do roaming *)

But it also doesn't allow for individual auth/deauth
assoc/disassoc things, e.g. with the libertas firmware you cannot
stay authenticated when and just disassociate/reassociate when
some settings changes.  Therefore I have an impedance mismatch 
between libertas and .auth/.deauth .assoc/.disassoc as well. The 
most in-the-eye-springing point is that libertas doesn't have a 
CMD_802_11_DEASSOCIATE command. And the 
CMD_802_11_DEAUTHENTICATE command does both .deauth/.disassoc 
one go. Another mismatch is that CMD_802_11_ASSOCIATE also does 
both .auth/.assoc in one go.

So, libertas is not really FULLMAC and not really SOFTMAC, it's 
HALFMAC :-)





*) however, it can send a disconnect event when the AP is out of
reach, this will give you poor-mans roaming with the help of 
wpa_supplicant.

-- 
http://www.holgerschurig.de

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

end of thread, other threads:[~2009-10-14 14:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-14  9:36 cfg80211 question: impedance mismatch of .connect versus .assoc Holger Schurig
2009-10-14 13:41 ` Johannes Berg
2009-10-14 14:26   ` Holger Schurig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox