From: Andy Green <[email protected]>
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 <[email protected]>
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 ?
--
On Saturday 07 April 2007 06:51, [email protected] wrote:
> 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).
I know about this problem. The rate reporting in zd1211rw-mac80211 was always
wrong and needs to be fixed there, or the mac80211 interface should modified
to remove the assumption that TX hw rate == RX hw rate. In either case, this
is the wrong way to fix this issue.
-Michael Wu