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 2/7] mac80211: replace ieee80211_get_morefrag with ieee80211_has_morefrags
Date: Mon, 09 Jun 2008 10:32:14 -0700	[thread overview]
Message-ID: <1213032734.5974.24.camel@brick> (raw)
In-Reply-To: <1213032133.22220.3.camel@johannes.berg>

On Mon, 2008-06-09 at 19:22 +0200, Johannes Berg wrote:
> On Mon, 2008-06-09 at 09:29 -0700, Harvey Harrison wrote:
> > On Mon, 2008-06-09 at 09:38 +0200, Johannes Berg wrote:
> > > > -	if (ieee80211_get_morefrag(hdr))
> > > > +	if (ieee80211_has_morefrags(hdr->frame_control))
> > >=20
> > > looks fine to me, though I wonder if we should have
> > >=20
> > > ieee80211_has_morefrags(struct 80211hdr)
> > > and
> > > __ieee80211_has_morefrags(__le16 fc)
> > >=20
> > > or something with variants of the functions that do the ->frame_c=
ontrol?
> >=20
> > I considered that, but thought it was a small benefit for doubling =
the
> > number of helpers.
> >=20
> > I chose the __le16 variant as there is some driver code that checks=
 these
> > values in driver-specific structures, so I just left it up to the c=
aller
> > to dereference whatever structure the frame control is held in.
> >=20
> > But if both sets are wanted, I would suggest:
> >=20
> > =EF=BB=BFieee80211_fc_has_morefrags(__le16 fc);
> >=20
> > ieee80211_has_morefrags(struct ieee80211 *hdr)
> > {
> > 	return ieee80211_fc_has_morefrags(hdr->frame_control);
> > }
> >=20
> > Do you think I should add the struct helper(s)?
>=20
> It looks like you'd be using them in many places, so don't you think =
it
> would be helpful? I don't really care too much.
>=20

OK, I've added kernel-doc and incorporated the other comments, I'm not
going to add additional helpers for the struct ieee80211 case at this
time.

I'll check it over and send a revised version in a bit.

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 17:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-06 17:51 [PATCH 2/7] mac80211: replace ieee80211_get_morefrag with ieee80211_has_morefrags Harvey Harrison
2008-06-09  7:38 ` Johannes Berg
2008-06-09 16:29   ` Harvey Harrison
2008-06-09 17:22     ` Johannes Berg
2008-06-09 17:32       ` Harvey Harrison [this message]

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=1213032734.5974.24.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).