linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 1/7] mac80211: add helpers for frame control testing
Date: Mon, 09 Jun 2008 11:22:47 -0700	[thread overview]
Message-ID: <1213035768.5974.46.camel@brick> (raw)
In-Reply-To: <1213034570.22220.18.camel@johannes.berg>

On Mon, 2008-06-09 at 20:02 +0200, Johannes Berg wrote:
> > Well, the way the other functions of the same type:
> >=20
> > ieee80211_ctl_is_ack
> > ieee80211_mgmt_is_beacon
> >=20
> > check not only that the ftype is exactly ctl/mgmt and that it is of
> > stype ack/beacon.
>=20
> Hah. Well, I think they should probably be named
> ieee80211_is_ctl_ack/is_mgmt_beacon then, or just shorter
> _is_ack/_is_beacon (since everybody knows ack are ctl and beacon are
> mgmt.)

OK, just for clarity, could you spell out the helper names you'd like t=
o
see, and I'll adjust accordingly, at this point I think you would agree
with:

ieee80211_is_data
=EF=BB=BFieee80211_is_ctl
=EF=BB=BFieee80211_is_mgmt

ieee80211_has_protected
=EF=BB=BFieee80211_has_morefrags
ieee80211_has_tods
ieee80211_has_fromds
ieee80211_has_a4

And you'd like to see the following changes:

ieee80211_data_has_qos -> ieee80211_is_data_qos (maybe dataqos)
ieee80211_ctl_is_ack -> ieee80211_is_ack
=EF=BB=BFieee80211_ctl_is_pspoll -> ieee80211_is_pspoll
ieee80211_ctl_is_back_req -> ieee80211_is_back_req
=EF=BB=BFieee80211_mgmt_is_beacon -> ieee80211_is_beacon

I agree that does look nicer, and it just has to be clear that these
explicity check the ftype as well.

>=20
> >   I chose ieee80211_data_has_qos because it checks
> > the ftype _is_ data _and_ that it _has_ qos included.  I think my
> > naming is more consistent with this.
> >=20
> > Do you still think it should be changed?
>=20
> I think you're looking at the bits too much. If you look at 802.11-20=
07,
> Table 7-1, you'll notice that all frames that have data ftype and the
> "QoS bit" set in the subtype are actually data+qos frames, just with
> extra functionality added onto them by the other stype bits.
>=20
> Hence, I do think it should be changed, we're more interested in the
> semantic meaning ("this is a data+QoS [possibly +stuff] frame") rathe=
r
> than the bitwise meaning ("this is a data frame which has some QoS bi=
t
> set"). I guess the correct way would be to say "this is data frame wh=
ich
> has QoS information" which we'd have to express as "_is_data_has_qos"=
 or
> something, no?

Well, I agree with your semantics argument above, so this won't be nece=
ssary.
I guess I got a little caught up in the checks themselves vs the semant=
ics
it was expressing.

So choose a colour for the bikeshed and I'll get painting ;-)

Cheers,

Harvey

--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-06-09 18:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-06 17:51 [PATCH 1/7] mac80211: add helpers for frame control testing Harvey Harrison
2008-06-09  7:37 ` Johannes Berg
2008-06-09 16:25   ` Harvey Harrison
2008-06-09  7:41 ` Johannes Berg
2008-06-09 16:31   ` Harvey Harrison
2008-06-09 17:21     ` Johannes Berg
2008-06-09 17:43       ` Harvey Harrison
2008-06-09 17:46         ` Johannes Berg
2008-06-09 17:54           ` Harvey Harrison
2008-06-09 18:02             ` Johannes Berg
2008-06-09 18:22               ` Harvey Harrison [this message]
2008-06-09 18:27                 ` 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=1213035768.5974.46.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=johannes@sipsolutions.net \
    --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 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).