radiotap.netbsd.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
To: David Young <dyoung-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
Cc: radiotap-eZodSLrBbDpBDgjK7y7TUQ@public.gmane.org,
	linux-wireless
	<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Andy Green <andy-/Zus8d0mwwtBDgjK7y7TUQ@public.gmane.org>
Subject: Re: radiotap for TX
Date: Mon, 25 Jun 2007 08:39:40 +0200	[thread overview]
Message-ID: <1182753581.21939.147.camel__27234.5889978626$1216696517$gmane$org@johannes.berg> (raw)
In-Reply-To: <20070621175541.GQ19613-eZ+MEZF6i8Dc+919tysfdA@public.gmane.org>

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

On Thu, 2007-06-21 at 12:55 -0500, David Young wrote:

> >  * IEEE80211_RADIOTAP_SEND_AC		u8		access category
> 
> The MAC access parameters are an important parameter to control, but
> I think that if the control is self-contained, then people will use it
> in a predictable and consistent way.  As is, you have to interpret the
> access category by reference to the current MAC settings for the AC
> (AIFS, CWmin, CWmax, et cetera), which can change.

Good point. However, not all hardware allows setting these with each
frame, the Broadcom hardware I work with most allows only setting up the
parameters for four access categories and then using them by putting the
frame into different DMA rings.

> I propose that we add a field such as this,
> 
> 	IEEE80211_RADIOTAP_TX_WMEPARAM	u32	WME access parameters
> 
> with three 8-bit fields for AIFS, log(CWmin), and log(CWmax), and the
> remaining 8 bits reserved and set to 0.

That makes sense.

> This gives us the flexibility to use more MACs to the extent of their
> capabilities.  IIRC, one Realtek MAC lets us set the access parameters
> packet by packet, instead of category by category or queue by queue.

Oh ok, that'd be perfect for those then.

> Some 802.11 MACs have different transmit priority queues, but the queues'
> access parameters are not adjustable.  For those MACs, we should provide
> for selecting the queue by number:
> 
> 	IEEE80211_RADIOTAP_TX_QNUM		u8		queue number

That would work, although I think I'd still prefer being able to select
an AC as well because in most cases the queues would be set up according
to the four ACs. However, we can standardise that within the QNUM field
as well.

> I think it's reasonable to say in the _TX_QNUM definition that the queue
> numbers do not necessarily have any relationship to queue priority level
> or access parameters.

Definitely.

> >  *	Indicates which access category to send the frame in, 0-3.
> >  *
> >  * IEEE80211_RADIOTAP_SEND_FLAGS	u8		flags
> ...
> >    IEEE80211_RADIOTAP_SEND_FLAG_SEQNR (1<<3)
> >    /* set if the sequence number in the packet shouldn't be changed,
> >     * if not set then the packet is sequence numbered properly */
> 
> Let's re-use and augment IEEE80211_RADIOTAP_TX_FLAGS for transmission
> control.  For example, let the bits _F_TX_CTS/_F_TX_RTS indicate "use CTS"
> and "use RTS" when we transmit.  But see below.  Also, add _F_TX_SEQNR.

Sounds good to me as well.

> >    IEEE80211_RADIOTAP_SEND_FLAG_ENCRYPT (1<<0)
> >    /* encrypt with key for the station named in addr1 or default key */
> 
> Let's re-use IEEE80211_RADIOTAP_FLAGS[IEEE80211_RADIOTAP_F_WEP] for this.

Sure

> >    IEEE80211_RADIOTAP_SEND_FLAG_AUTO_RTSCTS (1<<1)
> >    /* automatically decide whether rts/cts are used, if unset then
> >     * rts/cts are used depending on IEEE80211_RADIOTAP_F_TX_{CTS,RTS} */
> 
> I believe implementors will have an easier time if you invert this:
> NOAUTO or (errr...) MANUAL.

Heh, probably.

> 16-bit fields IEEE80211_RADIOTAP_RTS_THRESHOLD and
> IEEE80211_RADIOTAP_CTS_THRESHOLD may be better: if absent, autoselect.
> If present and equal to 0, always use RTS(CTS).  If present and greater
> than or equal to the maximum packet length, never use RTS(CTS).  We can
> likewise control fragmentation.

Good point. However, in some cases where we may end up wanting to use
this feature, this means querying the kernel for the current
fragmentation threshold only to send it back into the kernel in the
radiotap header. That's perfectly acceptable of course.

> >    IEEE80211_RADIOTAP_SEND_FLAG_RATE_CONTROL (1<<2)
> >    /* should rate control be applied to this algorithm? if not, take
> >     * the value of IEEE80211_RADIOTAP_RATE or lowest rate */
> 
> Control this by the presence of the _RATE parameter.  If _RATE is absent,
> let the driver or NIC autoselect.

Yeah, good enough.

Thanks for your comments! Do you want me to send a patch against the
authoritative version of the radiotap header?

johannes

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

  parent reply	other threads:[~2007-06-25  6:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1182375853.3714.103.camel@johannes.berg>
     [not found] ` <1182375853.3714.103.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2007-06-21 17:55   ` radiotap for TX David Young
2007-06-21 20:49   ` Sam Leffler
     [not found] ` <20070621175541.GQ19613@che.ojctech.com>
     [not found]   ` <20070621175541.GQ19613-eZ+MEZF6i8Dc+919tysfdA@public.gmane.org>
2007-06-25  6:39     ` Johannes Berg [this message]
     [not found] ` <467AE460.1070606@errno.com>
     [not found]   ` <467AE460.1070606-zZXckVAlHaQAvxtiuMwx3w@public.gmane.org>
2007-06-21 21:12     ` Andy Green
2007-06-25  7:24     ` Johannes Berg
2007-06-20 21:44 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='1182753581.21939.147.camel__27234.5889978626$1216696517$gmane$org@johannes.berg' \
    --to=johannes-cdvu00un1vgdhxzaddlk8q@public.gmane.org \
    --cc=andy-/Zus8d0mwwtBDgjK7y7TUQ@public.gmane.org \
    --cc=dyoung-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=radiotap-eZodSLrBbDpBDgjK7y7TUQ@public.gmane.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 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).