linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	John Linville <linville@tuxdriver.com>
Subject: Re: [RFC-PATCH] mac80211: add helpers for frame control tests
Date: Fri, 16 May 2008 22:31:06 +0200	[thread overview]
Message-ID: <1210969866.6381.46.camel@johannes.berg> (raw)
In-Reply-To: <1210966704.5915.51.camel@brick> (sfid-20080516_213833_934385_1E372539)

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]


> +static inline int ieee80211_fctl_tods(struct ieee80211_hdr *hdr)

> +static inline int ieee80211_fctl_fromds(struct ieee80211_hdr *hdr)

These seem fine though I don't see why you implement them with a > 0
rather than != 0 comparison?

> +static inline int ieee80211_fctl_has_a4(struct ieee80211_hdr *hdr)

That seems fine too.

> +static inline int ieee80211_ftype(struct ieee80211_hdr *hdr, u16 ftype)

That, I think, is misnamed, it should be ieee80211_is_ftype()

> +static inline int ieee80211_stype(struct ieee80211_hdr *hdr, u16 stype)
> +{
> +	return (hdr->frame_control & cpu_to_le16(stype)) != 0;
> +}

And that even seems implemented wrongly? stype is a 4-bit field, this
doesn't make much sense to me.

> +static inline int ieee80211_ftype_mgmt(struct ieee80211_hdr *hdr)

> +static inline int ieee80211_ftype_ctl(struct ieee80211_hdr *hdr)

> +static inline int ieee80211_ftype_data(struct ieee80211_hdr *hdr)

similarly, ieee80211_is_data() (remove the ftype, everybody hacking
wireless should know that data/mgmt/ctl are frame types)

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2008-05-16 20:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16 19:29 [RFC-PATCH] mac80211: add helpers for frame control tests Harvey Harrison
2008-05-16 19:38 ` Harvey Harrison
2008-05-16 20:31   ` Johannes Berg [this message]
2008-05-16 20:40     ` Johannes Berg
2008-05-16 21:04     ` Harvey Harrison
2008-05-16 21:12       ` Johannes Berg
2008-05-16 21:57         ` Harvey Harrison
2008-05-16 22:03           ` Johannes Berg
2008-05-16 23:48             ` Harvey Harrison
2008-05-17  9:12               ` Johannes Berg
2008-05-16 20:42   ` Michael Buesch

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=1210969866.6381.46.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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).