radiotap.netbsd.org archive mirror
 help / color / mirror / Atom feed
From: Bill Stafford <bill.stafford-BUHhN+a2lJ4@public.gmane.org>
To: radiotap-sUITvd46vNxg9hUCZPvPmw@public.gmane.org
Subject: Re: MCS field: RFA
Date: Mon, 1 Feb 2010 22:09:37 +0000 (UTC)	[thread overview]
Message-ID: <loom.20100201T230554-2@post.gmane.org> (raw)
In-Reply-To: 40101cc31001270732h3e27511bn9270e2a5a082735f@mail.gmail.com

Matteo Croce <technoboy85@...> writes:
> On Wed, Jan 27, 2010 at 4:30 PM, David Young <dyoung@...> wrote:
> > On Wed, Jan 27, 2010 at 10:36:05AM +0100, Johannes Berg wrote:
> >> On Tue, 2010-01-26 at 11:47 -0600, David Young wrote:
> >>
> >> > FreeBSD uses the flags field and the channel flags to indicate Short
> >> > GI and 40 MHz frames.  Let's adopt the FreeBSD definitions for that
> >> > purpose.
> >>
> >> I'd mostly agree, but I'm not sure what they really use the 40MHz flag
> >> for. For instance, might there be value in knowing that the AP opened
> >> the channel for 40MHz, but for some reason we are doing 20MHz
> >> transmissions instead? And would this be an appropriate way of
> >> conferring that information?
> >
> > I should take a closer look at the implementation.  A per-packet radio
> > information header does not need to carry the information of what the
> > AP could have done, but didn't, does it?  I think it should carry the
> > information that describes the properties of the packet.
> > 
> The channel width is a packet property in 802.11n IIRC

Yes, it is in both the TXVECTOR and RXVECTOR of the PHY service interface.

The MCS field description (http://www.radiotap.org/suggested-fields/MCS)
just shows a bit for 40 MHz Channel and a bit for Short GI.

On the "40 MHz Channel" bit, it seems like it make more sense as "40 MHz
transmission". That is, it is a description of the modulation of the
packet, not a description of the channel to which the radio is currently
tuned. But there is more to the packet bandwidth than just 20 vs 40
MHz. When a device is tuned to a 40 MHz channel, it may receive 20 MHz
packets on either half of the 40-wide channel.

So the bandwidth options for a packet when the device is tuned to a 40 MHz
channel are:
40 MHz (full 40 MHz bandwidth packet)
20L (20 MHz packet in the lower 20 MHz of the 40 MHz channel)
20U (20 MHz packet in the upper 20 MHz of the 40 MHz channel)

When tuned to a 20 MHz channel, the packets can only be 20MHz

There are other parameters to the modulation that seem like they are all
important. A field that is going to capture the MCS, transmission
bandwidth, and short/long GI, should also note the HT Format of
Mixed/Greenfield, and the FEC (Forward Error Correction) mode BCC/LDPC.

So should the flags be:
0x03 - Bandwidth (0 -> 20 MHz, 1 -> 40 MHz, 2 -> 20L, 3 -> 20U)
0x04 - GI (0 -> Long, 1 -> Short)
0x10 - Format (0 -> Mixed, 1 -> Greenfield)
0x20 - FEC mode (0 -> BCC, 1 -> LDPC)

I also have a question about how the RadioTap design deals with information
that may not be available. I know that RadioTap works for many different
drivers, and I am wondering if all the drivers get full information about
the packets. For example, is it better to have a single bit for the GI
Short/Long, or two bits? If there were two bits, one for Short GI, and one
for Long GI, then a driver that did not get the GI information at all would
send up a RadioTap header with neither bit set, indicating nothing about
the GI of the packet. If there is only one bit, then by not setting the
Short GI bit in the field, it is indicating a Long GI.

Also, on the use of RadioTap for a user app to attach modulation
information, using separate bits might be a way to leave the choice up to
the driver. So if the user app just wanted to send a frame with a
particular MCS, it could use this field, but leave both the Short GI and
Long GI bits zero, so that the driver would pick whatever is appropriate.

So if it was in this longer format the flags might be something like this:
0x0001 20 MHz
0x0002 40 MHz
0x0004 20L (20 MHz in lower half of 40 MHz channel)
0x0008 20U (20 MHz in upper half of 40 MHz channel)
0x0010 Long GI
0x0020 Short GI
0x0040 HT Format - Mixed
0x0080 HT Format - Greenfield
0x0100 FEC type BCC
0x0200 FEC type LDPC

It seems like this expanded bitfield might be better than the more compact
version.

On Tue, 2010-01-26 at 11:47 -0600, David Young wrote:
> FreeBSD uses the flags field and the channel flags to indicate Short
> GI and 40 MHz frames.  Let's adopt the FreeBSD definitions for that
> purpose.

I can see using the channel bandwidth to indicate the packet transmission
bandwidth. In the expanded bit format above it would mean dropping the 20 MHz
and 40 MHz bits. When the radio is tuned to a 20 MHz channel, assume 20MHz
packets, and when tuned to 40 MHz assume 40 MHz packets. That covers the full
channel bandwidth modulations, but leaves 20-in-40 MHz packet modulations to be
addressed.

When the radio is tuned to a 40 MHz channel, then the 20L and 20U bits could
indicate a 20 MHz packet on the lower or upper side of the 40 MHz channel. I
think leaving in the 20L/U bits would be better than changing the channel field
to indicate the modulation of the packet. It might be better to leave the
channel field describing the channel to which the radio is tuned, and these
20U/L bits to indicate how the receiver saw the packets. When capturing packets,
it would seem surprising to see the channel field indicating channel changes on
what might be a packet by packet basis. On the transmit side, where radiotap is
describing a frame transmit, it seems like it would be better to leave the
channel field indicating a 40 MHz channel, and use the 20U/L bits when sending
20-in-40 MHz packets, or leaving them clear to do a straight 40 MHz
transmission. Changing the channel bandwidth might lead a driver to switch how
the radio is tuned which might be inefficient on what might be a packet by
packet change.

The GI short/long attribute really seems to belong to info related to the packet
modulation, not an attribute of the channel to which the radio is tuned.

-Bill

  reply	other threads:[~2010-02-01 22:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26 14:26 MCS field: RFA Matteo Croce
     [not found] ` <40101cc31001260626g4a47b7c6gde6f99e477e69ac9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-26 17:47   ` David Young
     [not found]     ` <20100126174728.GV1060-eZodSLrBbDpBDgjK7y7TUQ@public.gmane.org>
2010-01-27  9:36       ` Johannes Berg
     [not found]         ` <1264584965.25642.15.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>
2010-01-27 15:30           ` David Young
     [not found]             ` <20100127153002.GC1060-eZodSLrBbDpBDgjK7y7TUQ@public.gmane.org>
2010-01-27 15:32               ` Matteo Croce
2010-02-01 22:09                 ` Bill Stafford [this message]
     [not found]                   ` <loom.20100201T230554-2-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2010-02-02 18:24                     ` Johannes Berg
2010-02-02 19:54                     ` David Young
     [not found]                       ` <20100202195424.GE1060-eZodSLrBbDpBDgjK7y7TUQ@public.gmane.org>
2010-02-03  5:24                         ` Bill Stafford
     [not found]                           ` <C33B109A-9A6C-4931-8A69-5147A418E8B5-BUHhN+a2lJ4@public.gmane.org>
2010-02-04  1:11                             ` Joshua (Shiwei) Zhao
     [not found]                               ` <d521a2311002031711i4293ae26i8c460aa3f41997e6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-02-04  5:50                                 ` Bill Stafford
     [not found]                                   ` <1F39C830-A521-456A-A5FA-2FC97914A74A-BUHhN+a2lJ4@public.gmane.org>
2010-02-04  6:14                                     ` Joshua (Shiwei) Zhao
2010-03-25 23:50                         ` David Young
     [not found]                           ` <20100325235000.GX414-eZodSLrBbDpBDgjK7y7TUQ@public.gmane.org>
2010-03-26  4:57                             ` Johannes Berg
     [not found]                               ` <1269579436.4581.0.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2010-08-09 12:10                                 ` Johannes Berg
2010-02-02 17:36 ` Bill Stafford
     [not found]   ` <loom.20100202T174119-204-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2010-02-02 18:20     ` Johannes Berg
2010-02-02 18:24     ` David Young
2010-02-06 20:02 ` MCS field: RFA (wireshark patch) Bill Stafford
     [not found]   ` <loom.20100206T204036-824-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2010-02-06 20:31     ` Johannes Berg
2011-04-18  9:49 ` MCS field: RFA Roberto Riggio
     [not found]   ` <loom.20110418T114722-716-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2011-04-18 10:01     ` Johannes Berg
     [not found]       ` <1303120873.3588.5.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2011-04-18 10:06         ` Roberto Riggio
     [not found]           ` <BANLkTikV_YxYnFxjHrFE7XgYfi1T7J=3Tw@mail.gmail.com>
     [not found]             ` <BANLkTikV_YxYnFxjHrFE7XgYfi1T7J=3Tw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-20 13:12               ` Roberto Riggio
     [not found]                 ` <4DAEDBAB.5070100-2TmCWn7/4sHOQU1ULcgDhA@public.gmane.org>
2011-04-21 15:04                   ` Matteo Croce
     [not found]                     ` <BANLkTi=psWmOSJXDRQvGC2ABwYfR=8EFrg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-22  7:07                       ` Roberto Riggio
2010-08-30 21:21 Bill Stafford

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=loom.20100201T230554-2@post.gmane.org \
    --to=bill.stafford-buhhn+a2lj4@public.gmane.org \
    --cc=radiotap-sUITvd46vNxg9hUCZPvPmw@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).