aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-12-20 04:59:55 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:58:41 -0500
commitb30dd5c043eda4b3d23659ef550c16ce4f6ecb47 (patch)
treefeda7614c327fb3273766475eaf26785a894f4b0 /drivers/net/wireless
parent2bdb35c7ffb61f4b9d963dd447a2c54add5f02c5 (diff)
rt2x00: Introduce RXDONE_SIGNAL_MASK mask
Improve error message reporting when a frame was received with unknown rate. Instead of using the boolean check if the frame is supposed to be a PLCP value or not, we should add a new mask (RXDONE_SIGNAL_MASK) which returns the type identification for a signal value (i.e. PLCP). At the moment we only have 2 different types, but more will arrive when support for 11n is added. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.h8
2 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index c7bd212656df..12331b15fe79 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -392,8 +392,8 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev,
392 392
393 if (idx < 0) { 393 if (idx < 0) {
394 WARNING(rt2x00dev, "Frame received with unrecognized signal," 394 WARNING(rt2x00dev, "Frame received with unrecognized signal,"
395 "signal=0x%.2x, plcp=%d.\n", rxdesc.signal, 395 "signal=0x%.2x, type=%d.\n", rxdesc.signal,
396 !!(rxdesc.dev_flags & RXDONE_SIGNAL_PLCP)); 396 (rxdesc.dev_flags & RXDONE_SIGNAL_MASK));
397 idx = 0; 397 idx = 0;
398 } 398 }
399 399
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
index 1bd1a952e42c..98209d2e93af 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.h
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
@@ -158,6 +158,14 @@ enum rxdone_entry_desc_flags {
158}; 158};
159 159
160/** 160/**
161 * RXDONE_SIGNAL_MASK - Define to mask off all &rxdone_entry_desc_flags flags
162 * except for the RXDONE_SIGNAL_* flags. This is useful to convert the dev_flags
163 * from &rxdone_entry_desc to a signal value type.
164 */
165#define RXDONE_SIGNAL_MASK \
166 ( RXDONE_SIGNAL_PLCP | RXDONE_SIGNAL_BITRATE )
167
168/**
161 * struct rxdone_entry_desc: RX Entry descriptor 169 * struct rxdone_entry_desc: RX Entry descriptor
162 * 170 *
163 * Summary of information that has been read from the RX frame descriptor. 171 * Summary of information that has been read from the RX frame descriptor.