From: David Kimdon <david.kimdon@devicescape.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: netdev@vger.kernel.org, Jiri Benc <jbenc@suse.cz>,
"John W. Linville" <linville@tuxdriver.com>,
Simon Barber <simon@devicescape.com>,
Jouni Malinen <jkm@devicescape.com>,
Hong Liu <hong.liu@intel.com>,
David Kimdon <david.kimdon@devicescape.com>,
Michael Wu <flamingice@sourmilk.net>,
Michael Buesch <mbuesch@freenet.de>,
Ivo van Doorn <ivdoorn@gmail.com>
Subject: Re: [PATCH 4/10] d80211: reduce mdev usage, fix ieee80211_rx_mgmt
Date: Sun, 19 Nov 2006 08:35:45 -0800 [thread overview]
Message-ID: <20061119163545.GA25557@devicescape.com> (raw)
Reply-To:
In-Reply-To: <1163802439.3392.47.camel@johannes.berg>
>
> --- wireless-dev.orig/net/d80211/ieee80211.c 2006-11-17 20:01:54.999703408 +0100
> +++ wireless-dev/net/d80211/ieee80211.c 2006-11-17 20:01:55.659703408 +0100
> @@ -210,9 +210,16 @@ static void ieee80211_key_threshold_noti
> struct ieee80211_key *key,
> struct sta_info *sta)
> {
> + struct ieee80211_local *local = dev->ieee80211_ptr;
> struct sk_buff *skb;
> struct ieee80211_msg_key_notification *msg;
>
> + /* if no one will get it anyway, don't even allocate it.
> + * unlikely because this is only relevant for APs
> + * where the device must be open... */
> + if (unlikely(!local->apdev))
> + return;
Why not just let it Oops and show the bug? In what cases is it ok
for apdev to not be set?
> skb = dev_alloc_skb(sizeof(struct ieee80211_frame_info) +
> sizeof(struct ieee80211_msg_key_notification));
> if (!skb)
Can we get whitespace changes like this in a separate patch?
>
> - jiffies_to_timespec(status->hosttime, &ts);
> + jiffies_to_timespec(status->hosttime, &ts);
> fi->hosttime = cpu_to_be64((u64) ts.tv_sec * 1000000 +
> ts.tv_nsec / 1000);
> fi->mactime = cpu_to_be64(status->mactime);
> switch (status->phymode) {
> - case MODE_IEEE80211A:
> - fi->phytype = htonl(ieee80211_phytype_ofdm_dot11_a);
> - break;
> - case MODE_IEEE80211B:
> - fi->phytype = htonl(ieee80211_phytype_dsss_dot11_b);
> - break;
> - case MODE_IEEE80211G:
> - fi->phytype = htonl(ieee80211_phytype_pbcc_dot11_g);
> - break;
> - case MODE_ATHEROS_TURBO:
> + case MODE_IEEE80211A:
> + fi->phytype = htonl(ieee80211_phytype_ofdm_dot11_a);
> + break;
> + case MODE_IEEE80211B:
> + fi->phytype = htonl(ieee80211_phytype_dsss_dot11_b);
> + break;
> + case MODE_IEEE80211G:
> + fi->phytype = htonl(ieee80211_phytype_pbcc_dot11_g);
> + break;
> + case MODE_ATHEROS_TURBO:
> fi->phytype =
> htonl(ieee80211_phytype_dsss_dot11_turbo);
> break;
> default:
> - fi->phytype = 0xAAAAAAAA;
> + fi->phytype = 0xAAAAAAAA;
> break;
> - }
> - fi->channel = htonl(status->channel);
> + }
> + fi->channel = htonl(status->channel);
. . .
> int ieee80211_set_aid_for_sta(struct net_device *dev, u8 *peer_address,
> u16 aid)
> {
> + struct ieee80211_local *local = dev->ieee80211_ptr;
> struct sk_buff *skb;
> struct ieee80211_msg_set_aid_for_sta *msg;
>
> + /* unlikely because if this event only happens for APs,
> + * which require an open ap device. */
> + if (unlikely(!local->apdev))
> + return 0;
again, so should we just let the Oops happen?
-David
next reply other threads:[~2006-11-19 16:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-19 16:35 David Kimdon [this message]
2006-11-19 16:37 ` [PATCH 4/10] d80211: reduce mdev usage, fix ieee80211_rx_mgmt Johannes Berg
2006-11-20 17:44 ` Jiri Benc
2006-11-20 17:55 ` 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=20061119163545.GA25557@devicescape.com \
--to=david.kimdon@devicescape.com \
--cc=flamingice@sourmilk.net \
--cc=hong.liu@intel.com \
--cc=ivdoorn@gmail.com \
--cc=jbenc@suse.cz \
--cc=jkm@devicescape.com \
--cc=johannes@sipsolutions.net \
--cc=linville@tuxdriver.com \
--cc=mbuesch@freenet.de \
--cc=netdev@vger.kernel.org \
--cc=simon@devicescape.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 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.