linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] rt2x00: Fix rate detection for invalid signals
@ 2008-03-25 13:12 Ivo van Doorn
  2008-03-25 13:13 ` [PATCH 2/2] rt2x00: Fix in_atomic() usage Ivo van Doorn
  0 siblings, 1 reply; 2+ messages in thread
From: Ivo van Doorn @ 2008-03-25 13:12 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

It has been observed on rt2500pci hardware that some
frames received with signal 0x0C do not have the OFDM
flag set.

Signals can have 2 meanings:
 1) The PLCP value
 2) The bitrate * 10

For rt2500pci (1) is for frames received with a OFDM rate,
and (2) is for frames received with a CCK rate.
But 0x0C is a invalid bitrate value but is a valid PLCP
value for 54Mbs (obvious OFDM rate).
This means that it is possible that the hardware does not
set the OFDM bit correctly under all circumstances.
This results in rt2x00 failing to detect the rate and
mac80211 triggering a WARN_ON() and dropping the frame.

To bypass this, print a warning when such a frame is received,
and reset the rate to the lowest supported rate for the current band.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2x00dev.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 566f707..d2c0967 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -589,6 +589,13 @@ void rt2x00lib_rxdone(struct queue_entry *entry,
 		}
 	}
 
+	if (idx < 0) {
+		WARNING(rt2x00dev, "Frame received with unrecognized signal,"
+			"signal=0x%.2x, plcp=%d.\n", rxdesc->signal,
+			!!(rxdesc->dev_flags & RXDONE_SIGNAL_PLCP));
+		idx = 0;
+	}
+
 	/*
 	 * Only update link status if this is a beacon frame carrying our bssid.
 	 */
-- 
1.5.4.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-25 13:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-25 13:12 [PATCH 1/2] rt2x00: Fix rate detection for invalid signals Ivo van Doorn
2008-03-25 13:13 ` [PATCH 2/2] rt2x00: Fix in_atomic() usage Ivo van Doorn

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).