All of lore.kernel.org
 help / color / mirror / Atom feed
* mac80211: bad use of bss_conf.use_short_preamble
@ 2008-03-27 13:22 Vladimir Koutny
  2008-03-27 13:41 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Koutny @ 2008-03-27 13:22 UTC (permalink / raw)
  To: linux-wireless

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

Hi,
does anyone know what values were intended to be used for
bss_conf.use_short_preamble? The way it is handled now is not
optimal for sure:

/* WLAN_ERP_BARKER_PREAMBLE values */
enum {
        WLAN_ERP_PREAMBLE_SHORT = 0,
        WLAN_ERP_PREAMBLE_LONG = 1,
};

ieee80211_reset_erp_info():
	sdata->bss_conf.use_short_preamble = 0;

ieee80211_frame_duration():
		dur += short_preamble ? (72 + 24) : (144 + 48);

ieee80211_handle_erp_ie():
	printk(KERN_DEBUG "%s: switched to %s barker preamble"
		" (BSSID=%s)\n",
		sdata->dev->name,
		(preamble_mode == WLAN_ERP_PREAMBLE_SHORT) ?
		"short" : "long",
		print_mac(mac, ifsta->bssid));


In short, the value driver receives in bss_info_changed() callback
uses WLAN_ERP_PREAMBLE_xxx constants, but ie. frame_duration() uses
0=long, 1=short semantics (reset_erp_info() probably wants to set
long preambles as well). There are more places like this I suppose.

My reason for looking at this is that if you associate to 11b AP,
the value of use_short_preamble is not set correctly - seems that
it is set only based on ERP IE and not based on capability info.
However I'm not sure yet if this is related to above inconsistency
or not, I have to dig into it.

Regards,
  Vlado




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 370 bytes --]

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

* Re: mac80211: bad use of bss_conf.use_short_preamble
  2008-03-27 13:22 mac80211: bad use of bss_conf.use_short_preamble Vladimir Koutny
@ 2008-03-27 13:41 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2008-03-27 13:41 UTC (permalink / raw)
  To: Vladimir Koutny; +Cc: linux-wireless, Daniel Drake

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


> does anyone know what values were intended to be used for
> bss_conf.use_short_preamble? The way it is handled now is not
> optimal for sure:

Huh, I guess we screwed that up when converting it to bss_conf. The
WLAN_ERP_... values shouldn't be used internally nor with the driver and
be converted to the bool value.

johannes

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

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

end of thread, other threads:[~2008-03-27 13:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-27 13:22 mac80211: bad use of bss_conf.use_short_preamble Vladimir Koutny
2008-03-27 13:41 ` Johannes Berg

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.