From: Pavel Roskin <proski@gnu.org>
To: Michael Wu <flamingice@sourmilk.net>
Cc: John Linville <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, acme@ghostprotocols.net,
pe1rxq@amsat.org
Subject: Re: [PATCH] orinoco, wl3501, zd1201: use linux/ieee80211.h instead of net/ieee80211.h
Date: Tue, 31 Jul 2007 09:36:16 -0400 [thread overview]
Message-ID: <1185888976.12153.16.camel@mj> (raw)
In-Reply-To: <200707310036.15013.flamingice@sourmilk.net>
On Tue, 2007-07-31 at 00:36 -0700, Michael Wu wrote:
> From: Michael Wu <flamingice@sourmilk.net>
>
> These drivers only need 802.11 definitions.
I have nothing against the change if I understand the motivation.
What's the point?
> -#define ORINOCO_MAX_MTU (IEEE80211_DATA_LEN - ENCAPS_OVERHEAD)
> +#define ORINOCO_MAX_MTU (IEEE80211_MAX_DATA_LEN - ENCAPS_OVERHEAD)
We probably want to standardize on one name and use it consistently in
all drivers.
> - if ( (new_mtu + ENCAPS_OVERHEAD + IEEE80211_HLEN) >
> + if ( (new_mtu + ENCAPS_OVERHEAD + sizeof(struct ieee80211_hdr)) >
I prefer the original code. "Size of 802.11 header" is easier to
understand than "size of the structure representing 802.11 header".
Can we please make IEEE80211_HLEN available to all wireless drivers?
And by the way, the definition of struct ieee80211_hdr includes payload
(which is a good thing in my opinion). The definition uses a
gcc-specific 0-size array, which we may want to convert to a c99 style
flexible array (i.e. payload[] as opposed to payload[0]).
Taking sizeof of a structure with a flexible array is dubious and is
likely to be discouraged in the future (I would support having a warning
in sparse). What we really want is the offset of the payload in the
frame, not the size allocated by the compiler for the frame with 0-byte
payload.
I would prefer all the necessary changes to occur without disturbing the
individual drivers.
--
Regards,
Pavel Roskin
prev parent reply other threads:[~2007-07-31 13:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-31 7:36 [PATCH] orinoco, wl3501, zd1201: use linux/ieee80211.h instead of net/ieee80211.h Michael Wu
2007-07-31 13:36 ` Pavel Roskin [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=1185888976.12153.16.camel@mj \
--to=proski@gnu.org \
--cc=acme@ghostprotocols.net \
--cc=flamingice@sourmilk.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=pe1rxq@amsat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.