From: Johannes Berg <johannes@sipsolutions.net>
To: Harvey Harrison <harvey.harrison@gmail.com>
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 19:22:13 +0200 [thread overview]
Message-ID: <1213032133.22220.3.camel@johannes.berg> (raw)
In-Reply-To: <1213028961.5974.18.camel@brick> (sfid-20080609_182929_823786_13F038F5)
[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]
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))
> >
> > looks fine to me, though I wonder if we should have
> >
> > ieee80211_has_morefrags(struct 80211hdr)
> > and
> > __ieee80211_has_morefrags(__le16 fc)
> >
> > or something with variants of the functions that do the ->frame_control?
>
> 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 these
> values in driver-specific structures, so I just left it up to the caller
> to dereference whatever structure the frame control is held in.
>
> But if both sets are wanted, I would suggest:
>
> ieee80211_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)?
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.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2008-06-09 17:25 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 [this message]
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=1213032133.22220.3.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=harvey.harrison@gmail.com \
--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).