rt2x00: Add Signal type flag
authorIvo van Doorn <ivdoorn@gmail.com>
Fri, 29 Aug 2008 19:07:16 +0000 (21:07 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 29 Aug 2008 20:24:12 +0000 (16:24 -0400)
Instead of using the PLCP flag to indicate if the
signal value is plcp or the bitrate we should add
a new flag to mark the bitrate type explicitely.
This is usefull when new types are added later for
rt2800.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2500pci.c
drivers/net/wireless/rt2x00/rt2500usb.c
drivers/net/wireless/rt2x00/rt2x00dev.c
drivers/net/wireless/rt2x00/rt2x00queue.h
drivers/net/wireless/rt2x00/rt61pci.c
drivers/net/wireless/rt2x00/rt73usb.c

index 5cc706a45e59b23aed9ae7a390b82c9af95f7846..2a96a011f2ad0c7924828ea1a300bef1c5d6d34d 100644 (file)
@@ -1316,6 +1316,8 @@ static void rt2500pci_fill_rxdone(struct queue_entry *entry,
 
        if (rt2x00_get_field32(word0, RXD_W0_OFDM))
                rxdesc->dev_flags |= RXDONE_SIGNAL_PLCP;
+       else
+               rxdesc->dev_flags |= RXDONE_SIGNAL_BITRATE;
        if (rt2x00_get_field32(word0, RXD_W0_MY_BSS))
                rxdesc->dev_flags |= RXDONE_MY_BSS;
 }
index c6be4dd81b1a5b706e37542e1b37cdcb7d887b33..c5f49e36559a205e71381a48c295bed9fc627931 100644 (file)
@@ -1280,6 +1280,8 @@ static void rt2500usb_fill_rxdone(struct queue_entry *entry,
 
        if (rt2x00_get_field32(word0, RXD_W0_OFDM))
                rxdesc->dev_flags |= RXDONE_SIGNAL_PLCP;
+       else
+               rxdesc->dev_flags |= RXDONE_SIGNAL_BITRATE;
        if (rt2x00_get_field32(word0, RXD_W0_MY_BSS))
                rxdesc->dev_flags |= RXDONE_MY_BSS;
 
index 5278ae2e374ceab2c6d40f50ebaf6f06b9e591bf..369b0b2d8643ae8a8d583e4ed806024d8e113b37 100644 (file)
@@ -653,7 +653,7 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev,
 
                if (((rxdesc.dev_flags & RXDONE_SIGNAL_PLCP) &&
                     (rate->plcp == rxdesc.signal)) ||
-                   (!(rxdesc.dev_flags & RXDONE_SIGNAL_PLCP) &&
+                   ((rxdesc.dev_flags & RXDONE_SIGNAL_BITRATE) &&
                      (rate->bitrate == rxdesc.signal))) {
                        idx = i;
                        break;
index 654fa0c624d3abbb1d2f6692a721e78a315ddd09..9dbf04f0f04c1ceeae6ac10f0789aec9eb649a95 100644 (file)
@@ -140,13 +140,14 @@ static inline struct skb_frame_desc* get_skb_frame_desc(struct sk_buff *skb)
 /**
  * enum rxdone_entry_desc_flags: Flags for &struct rxdone_entry_desc
  *
- * @RXDONE_SIGNAL_PLCP: Does the signal field contain the plcp value,
- *     or does it contain the bitrate itself.
+ * @RXDONE_SIGNAL_PLCP: Signal field contains the plcp value.
+ * @RXDONE_SIGNAL_BITRATE: Signal field contains the bitrate value.
  * @RXDONE_MY_BSS: Does this frame originate from device's BSS.
  */
 enum rxdone_entry_desc_flags {
        RXDONE_SIGNAL_PLCP = 1 << 0,
-       RXDONE_MY_BSS = 1 << 1,
+       RXDONE_SIGNAL_BITRATE = 1 << 1,
+       RXDONE_MY_BSS = 1 << 2,
 };
 
 /**
index 52537101c908de5414ff9100892ead4988af9b65..d740f560ccd0cce742ac336d60f02230629796db 100644 (file)
@@ -1991,6 +1991,8 @@ static void rt61pci_fill_rxdone(struct queue_entry *entry,
 
        if (rt2x00_get_field32(word0, RXD_W0_OFDM))
                rxdesc->dev_flags |= RXDONE_SIGNAL_PLCP;
+       else
+               rxdesc->dev_flags |= RXDONE_SIGNAL_BITRATE;
        if (rt2x00_get_field32(word0, RXD_W0_MY_BSS))
                rxdesc->dev_flags |= RXDONE_MY_BSS;
 }
index 636b4e0d0ef59e51aecd45c8c2247c2def12dd57..cf236ec533a9696cd50d99e5521a0884f4aa7bb5 100644 (file)
@@ -1766,6 +1766,8 @@ static void rt73usb_fill_rxdone(struct queue_entry *entry,
 
        if (rt2x00_get_field32(word0, RXD_W0_OFDM))
                rxdesc->dev_flags |= RXDONE_SIGNAL_PLCP;
+       else
+               rxdesc->dev_flags |= RXDONE_SIGNAL_BITRATE;
        if (rt2x00_get_field32(word0, RXD_W0_MY_BSS))
                rxdesc->dev_flags |= RXDONE_MY_BSS;