iwlwifi: fix resart flow after fw error
[safe/jmp/linux-2.6] / drivers / net / wireless / rt2x00 / rt73usb.h
index f095151..1484935 100644 (file)
@@ -1,5 +1,5 @@
 /*
-       Copyright (C) 2004 - 2007 rt2x00 SourceForge Project
+       Copyright (C) 2004 - 2008 rt2x00 SourceForge Project
        <http://rt2x00.serialmonkey.com>
 
        This program is free software; you can redistribute it and/or modify
@@ -39,8 +39,6 @@
  * Signal information.
  * Defaul offset is required for RSSI <-> dBm conversion.
  */
-#define MAX_SIGNAL                     100
-#define MAX_RX_SSI                     -1
 #define DEFAULT_RSSI_OFFSET            120
 
 /*
 #define RF_SIZE                                0x0014
 
 /*
+ * Number of TX queues.
+ */
+#define NUM_TX_QUEUES                  4
+
+/*
  * USB registers.
  */
 
@@ -114,6 +117,9 @@ struct hw_pairwise_ta_entry {
 #define HW_BEACON_BASE2                        0x2600
 #define HW_BEACON_BASE3                        0x2700
 
+#define HW_BEACON_OFFSET(__index) \
+       ( HW_BEACON_BASE0 + (__index * 0x0100) )
+
 /*
  * MAC Control/Status Registers(CSR).
  * Some values are set in TU, whereas 1 TU == 1024 us.
@@ -146,6 +152,11 @@ struct hw_pairwise_ta_entry {
 
 /*
  * MAC_CSR3: STA MAC register 1.
+ * UNICAST_TO_ME_MASK:
+ *     Used to mask off bits from byte 5 of the MAC address
+ *     to determine the UNICAST_TO_ME bit for RX frames.
+ *     The full mask is complemented by BSS_ID_MASK:
+ *             MASK = BSS_ID_MASK & UNICAST_TO_ME_MASK
  */
 #define MAC_CSR3                       0x300c
 #define MAC_CSR3_BYTE4                 FIELD32(0x000000ff)
@@ -163,7 +174,14 @@ struct hw_pairwise_ta_entry {
 
 /*
  * MAC_CSR5: BSSID register 1.
- * BSS_ID_MASK: 3: one BSSID, 0: 4 BSSID, 2 or 1: 2 BSSID.
+ * BSS_ID_MASK:
+ *     This mask is used to mask off bits 0 and 1 of byte 5 of the
+ *     BSSID. This will make sure that those bits will be ignored
+ *     when determining the MY_BSS of RX frames.
+ *             0: 1-BSSID mode (BSS index = 0)
+ *             1: 2-BSSID mode (BSS index: Byte5, bit 0)
+ *             2: 2-BSSID mode (BSS index: byte5, bit 1)
+ *             3: 4-BSSID mode (BSS index: byte5, bit 0 - 1)
  */
 #define MAC_CSR5                       0x3014
 #define MAC_CSR5_BYTE4                 FIELD32(0x000000ff)
@@ -713,13 +731,19 @@ struct hw_pairwise_ta_entry {
  * R4: RX antenna control
  * FRAME_END: 1 - DPDT, 0 - SPDT (Only valid for 802.11G, RF2527 & RF2529)
  */
-#define BBP_R4_RX_ANTENNA              FIELD8(0x03)
+
+/*
+ * ANTENNA_CONTROL semantics (guessed):
+ * 0x1: Software controlled antenna switching (fixed or SW diversity)
+ * 0x2: Hardware diversity.
+ */
+#define BBP_R4_RX_ANTENNA_CONTROL      FIELD8(0x03)
 #define BBP_R4_RX_FRAME_END            FIELD8(0x20)
 
 /*
  * R77
  */
-#define BBP_R77_PAIR                   FIELD8(0x03)
+#define BBP_R77_RX_ANTENNA             FIELD8(0x03)
 
 /*
  * RF registers
@@ -860,8 +884,9 @@ struct hw_pairwise_ta_entry {
 /*
  * DMA descriptor defines.
  */
-#define TXD_DESC_SIZE                  ( 6 * sizeof(struct data_desc) )
-#define RXD_DESC_SIZE                  ( 6 * sizeof(struct data_desc) )
+#define TXD_DESC_SIZE                  ( 6 * sizeof(__le32) )
+#define TXINFO_SIZE                    ( 6 * sizeof(__le32) )
+#define RXD_DESC_SIZE                  ( 6 * sizeof(__le32) )
 
 /*
  * TX descriptor format for TX, PRIO and Beacon Ring.
@@ -1001,8 +1026,8 @@ struct hw_pairwise_ta_entry {
 #define RXD_W5_RESERVED                        FIELD32(0xffffffff)
 
 /*
- * Macro's for converting txpower from EEPROM to dscape value
- * and from dscape value to register value.
+ * Macro's for converting txpower from EEPROM to mac80211 value
+ * and from mac80211 value to register value.
  */
 #define MIN_TXPOWER    0
 #define MAX_TXPOWER    31