From: andy@warmcat.com
To: linux-wireless@vger.kernel.org
Cc: Andy Green <andy@warmcat.com>
Subject: [PATCH 3/7] mac80211: Radiotap rx to use fallback rate calc if ieee80211_get_rate fails
Date: Sat, 07 Apr 2007 11:51:01 +0100 [thread overview]
Message-ID: <20070407105138.693035816@warmcat.com> (raw)
In-Reply-To: 20070407105058.762762192@warmcat.com
From: Andy Green <andy@warmcat.com>
Michael Wu's radiotap rx code gave me a rate of 0 on zd1211rw-mac80211, perhaps
because no interface to the physical device was associated. Added some fallback
code so that if the rate could not be computed by ieee80211_get_rate it uses
Michael's original method (which always worked for me).
Signed-off-by: Andy Green <andy@warmcat.com>
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index e8c5f8d..211886c 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -2821,6 +2821,8 @@ ieee80211_rx_monitor(struct net_device *dev, struct sk_buff *skb,
rate = ieee80211_get_rate(local, status->phymode, status->rate);
if (rate)
rthdr->rate = rate->rate / 5;
+ else
+ rthdr->rate = status->rate / 5;
rthdr->chan_freq = cpu_to_le16(status->freq);
rthdr->chan_flags =
status->phymode == MODE_IEEE80211A ?
--
next prev parent reply other threads:[~2007-04-07 10:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-07 10:50 [PATCH 0/7] Try #7: Radiotap on Monitor Mode interfaces for rx and tx andy
2007-04-07 10:50 ` [PATCH 1/7] sync wireless-dev with radiotap header in wireless-2.6 andy
2007-04-07 10:51 ` [PATCH 2/7] mac80211: Add radiotap support andy
2007-04-07 10:51 ` andy [this message]
2007-04-07 19:25 ` [PATCH 3/7] mac80211: Radiotap rx to use fallback rate calc if ieee80211_get_rate fails Michael Wu
2007-04-07 10:51 ` [PATCH 4/7] mac80211: Monitor mode radiotap injection docs andy
2007-04-07 10:51 ` [PATCH 5/7] mac80211: Define present bitmap extend bit mask andy
2007-04-07 10:51 ` [PATCH 6/7] cfg80211: Radiotap parser andy
2007-04-07 10:51 ` [PATCH 7/7] 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=20070407105138.693035816@warmcat.com \
--to=andy@warmcat.com \
--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).