From: Dave <kilroyd@googlemail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: John Linville <linville@tuxdriver.com>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] don't use net/ieee80211.h
Date: Wed, 29 Oct 2008 15:27:38 +0000 [thread overview]
Message-ID: <490880EA.9090207@gmail.com> (raw)
In-Reply-To: <1225243531.1369.18.camel@johannes.berg>
Johannes Berg wrote:
> Convert all the drivers using net/ieee80211.h to use linux/ieee80211.h.
> Contains a bugfix in libertas where the SSID parsing could overrun the
> buffer when the AP sends invalid information.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> drivers/net/wireless/orinoco.c | 31 ++++++-----
Thanks for this. I have a similar version locally, waiting for me to
resolve other issues. A few comments below.
> --- everything.orig/drivers/net/wireless/orinoco.c 2008-10-29 01:21:22.000000000 +0100
> +++ everything/drivers/net/wireless/orinoco.c 2008-10-29 01:51:07.000000000 +0100
> @@ -391,8 +391,7 @@ static void orinoco_bss_data_init(struct
>
> }
>
> -static inline u8 *orinoco_get_ie(u8 *data, size_t len,
> - enum ieee80211_mfie eid)
> +static inline u8 *orinoco_get_ie(u8 *data, size_t len, u8 eid)
Would it be better to change to enum ieee80211_eid here?
> @@ -839,7 +838,8 @@ static int orinoco_change_mtu(struct net
> if ( (new_mtu < ORINOCO_MIN_MTU) || (new_mtu > ORINOCO_MAX_MTU) )
> return -EINVAL;
>
> - if ( (new_mtu + ENCAPS_OVERHEAD + IEEE80211_HLEN) >
> + /* MTU + encapsulation + header length */
> + if ( (new_mtu + ENCAPS_OVERHEAD + 24) >
I think that constant should be 30. I'd prefer it if we didn't use a
magic number here. How about sizeof(ieee80211_hdr)?
> @@ -3289,7 +3289,7 @@ static int orinoco_init(struct net_devic
>
> /* No need to lock, the hw_unavailable flag is already set in
> * alloc_orinocodev() */
> - priv->nicbuf_size = IEEE80211_FRAME_LEN + ETH_HLEN;
> + priv->nicbuf_size = IEEE80211_MAX_FRAME_LEN + ETH_HLEN;
Note that this changes nicbuf_size from 2334 to 2352. I don't expect any
problems, and haven't noticed anything while running my version with
this change.
Regards,
Dave.
next prev parent reply other threads:[~2008-10-29 15:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 1:25 [PATCH] don't use net/ieee80211.h Johannes Berg
2008-10-29 15:27 ` Dave [this message]
2008-10-30 10:38 ` Johannes Berg
2008-10-30 11:37 ` Dave
2008-10-30 11:44 ` Johannes Berg
2008-10-29 16:04 ` Pavel Roskin
2008-10-30 4:09 ` Dan Williams
2008-10-30 21:09 ` [PATCH v2] " Johannes Berg
2008-10-30 21:19 ` Dave
2008-10-30 21:38 ` Johannes Berg
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=490880EA.9090207@gmail.com \
--to=kilroyd@googlemail.com \
--cc=johannes@sipsolutions.net \
--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).