All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Koutny <vlado@work.ksp.sk>
To: linux-wireless@vger.kernel.org
Subject: mac80211: bad use of bss_conf.use_short_preamble
Date: Thu, 27 Mar 2008 14:22:27 +0100	[thread overview]
Message-ID: <47EB9F93.3060206@work.ksp.sk> (raw)

[-- 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 --]

             reply	other threads:[~2008-03-27 13:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27 13:22 Vladimir Koutny [this message]
2008-03-27 13:41 ` mac80211: bad use of bss_conf.use_short_preamble Johannes Berg

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=47EB9F93.3060206@work.ksp.sk \
    --to=vlado@work.ksp.sk \
    --cc=linux-wireless@vger.kernel.org \
    /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 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.