From: Michael Wu <flamingice@sourmilk.net>
To: andy@warmcat.com
Cc: linux-wireless@vger.kernel.org,
"Johannes Berg" <johannes@sipsolutions.net>
Subject: Re: [PATCH Try#11 3/4] cfg80211: Radiotap parser
Date: Tue, 12 Jun 2007 22:42:03 -0700 [thread overview]
Message-ID: <200706122242.08045.flamingice@sourmilk.net> (raw)
In-Reply-To: <20070612130502.157979021@warmcat.com>
[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]
On Tuesday 12 June 2007 06:04, andy@warmcat.com wrote:
> +typedef enum {
> + RADIOTAP_PARSER_OK = 0,
> + RADIOTAP_PARSER_DONE,
> + RADIOTAP_PARSER_INVALID
> +} ieee80211_radiotap_parser_retcode_t;
Yuck. I much prefer the standard error codes used in the previous version..
> +extern ieee80211_radiotap_parser_retcode_t ieee80211_radiotap_iterator_init(
> + struct ieee80211_radiotap_iterator *iterator,
> + struct ieee80211_radiotap_header *radiotap_header,
> + int max_length
> +);
Move the end of the parenthesis up a line to max_length.
> +ieee80211_radiotap_parser_retcode_t ieee80211_radiotap_iterator_init(
> + struct ieee80211_radiotap_iterator * iterator,
^
> + struct ieee80211_radiotap_header * radiotap_header,
^
> + /* find payload start allowing for extended bitmap(s) */
> +
> + if (unlikely(iterator->bitmap_shifter &
> + IEEE80211_RADIOTAP_PRESENT_EXTEND_MASK)) {
> + while (le32_to_cpu(*((u32 *)iterator->arg)) &
^ ^
> +ieee80211_radiotap_parser_retcode_t ieee80211_radiotap_iterator_next(
> + struct ieee80211_radiotap_iterator * iterator)
^
> + if (((ulong)iterator->arg - (ulong)iterator->rtheader) &
> + ((rt_sizes[iterator->arg_index] >> 4) - 1))
> + iterator->arg_index +=
> + (rt_sizes[iterator->arg_index] >> 4) -
> + ((((int)iterator->arg) -
> + ((int)iterator->rtheader)) &
> + ((rt_sizes[iterator->arg_index] >> 4) - 1));
> +
This part would probably look better if you stored:
((ulong)iterator->arg - (ulong)iterator->rtheader) & ((rt_sizes[iterator->arg_index] >> 4) - 1)
into a temporary variable.
-Michael Wu
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-06-13 5:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-12 13:04 [PATCH Try#11 0/4] Radiotap injection for Monitor Mode andy
2007-06-12 13:04 ` [PATCH Try#11 1/4] mac80211: Monitor mode radiotap injection docs andy
2007-06-12 13:04 ` [PATCH Try#11 2/4] mac80211: Define present bitmap extend bit mask andy
2007-06-13 5:15 ` Michael Wu
2007-06-12 13:04 ` [PATCH Try#11 3/4] cfg80211: Radiotap parser andy
2007-06-13 5:42 ` Michael Wu [this message]
2007-06-13 15:46 ` Johannes Berg
2007-06-13 16:07 ` Andy Green
2007-06-13 16:13 ` Johannes Berg
2007-06-12 13:04 ` [PATCH Try#11 4/4] mac80211: Monitor mode radiotap-based packet injection andy
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=200706122242.08045.flamingice@sourmilk.net \
--to=flamingice@sourmilk.net \
--cc=andy@warmcat.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).