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 09:29:20 -0700	[thread overview]
Message-ID: <1213028961.5974.18.camel@brick> (raw)
In-Reply-To: <1212997132.698.53.camel@johannes.berg>

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_contr=
ol?

I considered that, but thought it was a small benefit for doubling the
number of helpers.

I chose the __le16 variant as there is some driver code that checks the=
se
values in driver-specific structures, so I just left it up to the calle=
r
to dereference whatever structure the frame control is held in.

But if both sets are wanted, I would suggest:

=EF=BB=BFieee80211_fc_has_morefrags(__le16 fc);

ieee80211_has_morefrags(struct ieee80211 *hdr)
{
	return ieee80211_fc_has_morefrags(hdr->frame_control);
}

Do you think I should add the struct helper(s)?

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 16:29 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 [this message]
2008-06-09 17:22     ` Johannes Berg
2008-06-09 17:32       ` Harvey Harrison

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