]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
iwlwifi: move HT_IE_EXT_CHANNEL_* driver definitions to iwl-4965.h
authorBen Cahill <ben.m.cahill@intel.com>
Thu, 29 Nov 2007 03:10:00 +0000 (11:10 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:05:26 +0000 (15:05 -0800)
Move HT_IE_EXT_CHANNEL_* driver definitions to iwl-4965.h

Add comments to guide .h file usage (hw/api/driver definitions)

Minor comment cleanup

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-3945-commands.h
drivers/net/wireless/iwlwifi/iwl-3945-hw.h
drivers/net/wireless/iwlwifi/iwl-3945.h
drivers/net/wireless/iwlwifi/iwl-4965-commands.h
drivers/net/wireless/iwlwifi/iwl-4965-hw.h
drivers/net/wireless/iwlwifi/iwl-4965.h

index dc7498d5621cd73660518286c9bfb4e457607f7a..794db78c932e2515209bc6b5cf3b3f4977654eb9 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  *****************************************************************************/
+/*
+ * Please use this file (iwl-3945-commands.h) only for uCode API definitions.
+ * Please use iwl-3945-hw.h for hardware-related definitions.
+ * Please use iwl-3945.h for driver implementation definitions.
+ */
 
 #ifndef __iwl_3945_commands_h__
 #define __iwl_3945_commands_h__
index 4fa947d7bad553c5a11d76c611e47d6c89f8bd3d..5dde41030cd717c66c7a42ca3c49cc55ec16ea40 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  *****************************************************************************/
+/*
+ * Please use this file (iwl-3945-hw.h) only for hardware-related definitions.
+ * Please use iwl-3945-commands.h for uCode API definitions.
+ * Please use iwl-3945.h for driver implementation definitions.
+ */
 
 #ifndef __iwl_3945_hw__
 #define __iwl_3945_hw__
@@ -73,9 +78,7 @@
 /* Tx rates */
 #define IWL_CCK_RATES 4
 #define IWL_OFDM_RATES 8
-
 #define IWL_HT_RATES 0
-
 #define IWL_MAX_RATES  (IWL_CCK_RATES+IWL_OFDM_RATES+IWL_HT_RATES)
 
 /* Time constants */
@@ -545,11 +548,6 @@ struct iwl3945_eeprom {
 #define FH_TSSR_CBB_BASE        (FH_TSSR_TABLE+0x000)
 #define FH_TSSR_MSG_CONFIG      (FH_TSSR_TABLE+0x008)
 #define FH_TSSR_TX_STATUS       (FH_TSSR_TABLE+0x010)
-/* 18 - reserved */
-
-/* card static random access memory (SRAM) for processor data and instructs */
-#define RTC_INST_LOWER_BOUND                   (0x000000)
-#define RTC_DATA_LOWER_BOUND                   (0x800000)
 
 
 /* DBM */
@@ -618,7 +616,6 @@ struct iwl3945_eeprom {
 #define TFD_QUEUE_MAX           6
 #define TFD_QUEUE_SIZE_MAX      (256)
 
-/* spectrum and channel data structures */
 #define IWL_NUM_SCAN_RATES         (2)
 
 #define IWL_DEFAULT_TX_RETRY  15
@@ -634,11 +631,6 @@ struct iwl3945_eeprom {
 
 #define U32_PAD(n)             ((4-(n))&0x3)
 
-/*
- * Generic queue structure
- *
- * Contains common data for Rx and Tx queues
- */
 #define TFD_CTL_COUNT_SET(n)       (n<<24)
 #define TFD_CTL_COUNT_GET(ctl)     ((ctl>>24) & 7)
 #define TFD_CTL_PAD_SET(n)         (n<<28)
@@ -656,18 +648,26 @@ struct iwl3945_eeprom {
 #define RX_FREE_BUFFERS 64
 #define RX_LOW_WATERMARK 8
 
-
+/* Size of one Rx buffer in host DRAM */
 #define IWL_RX_BUF_SIZE 3000
-/* card static random access memory (SRAM) for processor data and instructs */
+
+/* Sizes and addresses for instruction and data memory (SRAM) in
+ * 3945's embedded processor.  Driver access is via HBUS_TARG_MEM_* regs. */
+#define RTC_INST_LOWER_BOUND                   (0x000000)
 #define ALM_RTC_INST_UPPER_BOUND               (0x014000)
+
+#define RTC_DATA_LOWER_BOUND                   (0x800000)
 #define ALM_RTC_DATA_UPPER_BOUND               (0x808000)
 
 #define ALM_RTC_INST_SIZE (ALM_RTC_INST_UPPER_BOUND - RTC_INST_LOWER_BOUND)
 #define ALM_RTC_DATA_SIZE (ALM_RTC_DATA_UPPER_BOUND - RTC_DATA_LOWER_BOUND)
 
-#define IWL_MAX_BSM_SIZE ALM_RTC_INST_SIZE
 #define IWL_MAX_INST_SIZE ALM_RTC_INST_SIZE
 #define IWL_MAX_DATA_SIZE ALM_RTC_DATA_SIZE
+
+/* Size of uCode instruction memory in bootstrap state machine */
+#define IWL_MAX_BSM_SIZE ALM_RTC_INST_SIZE
+
 #define IWL_MAX_NUM_QUEUES     8
 
 static inline int iwl3945_hw_valid_rtc_data_addr(u32 addr)
index 2f3a8b41f99161ef67e0f7c3927e27e077b45357..75cef3ed9511d62bae710073599abc73a22488d8 100644 (file)
  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  *
  *****************************************************************************/
+/*
+ * Please use this file (iwl-3945.h) for driver implementation definitions.
+ * Please use iwl-3945-commands.h for uCode API definitions.
+ * Please use iwl-3945-hw.h for hardware-related definitions.
+ */
 
 #ifndef __iwl_3945_h__
 #define __iwl_3945_h__
index 49582b90f8cfdb438ceb759225a3b2dc6c962f2d..9910939f5a321fb4c7c64ddb9689c09c59083f62 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  *****************************************************************************/
+/*
+ * Please use this file (iwl-4965-commands.h) only for uCode API definitions.
+ * Please use iwl-4965-hw.h for hardware-related definitions.
+ * Please use iwl-4965.h for driver implementation definitions.
+ */
 
 #ifndef __iwl4965_commands_h__
 #define __iwl4965_commands_h__
index 962aef2f1ef2491c73eddba7691d9415035ad7a0..3c09225c662336265b47e64e076f9088a21a1924 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  *****************************************************************************/
+/*
+ * Please use this file (iwl-4965-hw.h) only for hardware-related definitions.
+ * Use iwl-4965-commands.h for uCode API definitions.
+ * Use iwl-4965.h for driver implementation definitions.
+ */
 
 #ifndef __iwl_4965_hw_h__
 #define __iwl_4965_hw_h__
@@ -77,9 +82,7 @@
 /* Tx rates */
 #define IWL_CCK_RATES 4
 #define IWL_OFDM_RATES 8
-
 #define IWL_HT_RATES 16
-
 #define IWL_MAX_RATES  (IWL_CCK_RATES+IWL_OFDM_RATES+IWL_HT_RATES)
 
 /* Time constants */
@@ -449,8 +452,6 @@ struct iwl4965_eeprom {
  */
 #define CSR_HW_REV_WA_REG      (CSR_BASE+0x22C)
 
-#define CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM     (0x00200000)
-
 /* interrupt flags in INTA, set by uCode or hardware (e.g. dma),
  * acknowledged (reset) by host writing "1" to flagged bits. */
 #define CSR_INT_BIT_FH_RX        (1<<31) /* Rx DMA, cmd responses, FH_INT[17:16] */
@@ -592,17 +593,12 @@ struct iwl4965_eeprom {
 #define FH_TSSR_CBB_BASE        (FH_TSSR_TABLE+0x000)
 #define FH_TSSR_MSG_CONFIG      (FH_TSSR_TABLE+0x008)
 #define FH_TSSR_TX_STATUS       (FH_TSSR_TABLE+0x010)
-/* 18 - reserved */
 
-/* card static random access memory (SRAM) for processor data and instructs */
-#define RTC_INST_LOWER_BOUND                   (0x000000)
-#define RTC_DATA_LOWER_BOUND                   (0x800000)
 
 #define HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED         (0x00000004)
 
 #define TFD_QUEUE_SIZE_MAX      (256)
 
-/* spectrum and channel data structures */
 #define IWL_NUM_SCAN_RATES         (2)
 
 #define IWL_DEFAULT_TX_RETRY  15
@@ -623,17 +619,26 @@ struct iwl4965_eeprom {
 #define RX_FREE_BUFFERS 64
 #define RX_LOW_WATERMARK 8
 
-
+/* Size of one Rx buffer in host DRAM */
 #define IWL_RX_BUF_SIZE (4 * 1024)
-#define IWL_MAX_BSM_SIZE BSM_SRAM_SIZE
+
+/* Sizes and addresses for instruction and data memory (SRAM) in
+ * 4965's embedded processor.  Driver access is via HBUS_TARG_MEM_* regs. */
+#define RTC_INST_LOWER_BOUND                   (0x000000)
 #define KDR_RTC_INST_UPPER_BOUND               (0x018000)
+
+#define RTC_DATA_LOWER_BOUND                   (0x800000)
 #define KDR_RTC_DATA_UPPER_BOUND               (0x80A000)
+
 #define KDR_RTC_INST_SIZE    (KDR_RTC_INST_UPPER_BOUND - RTC_INST_LOWER_BOUND)
 #define KDR_RTC_DATA_SIZE    (KDR_RTC_DATA_UPPER_BOUND - RTC_DATA_LOWER_BOUND)
 
 #define IWL_MAX_INST_SIZE KDR_RTC_INST_SIZE
 #define IWL_MAX_DATA_SIZE KDR_RTC_DATA_SIZE
 
+/* Size of uCode instruction memory in bootstrap state machine */
+#define IWL_MAX_BSM_SIZE BSM_SRAM_SIZE
+
 static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
 {
        return (addr >= RTC_DATA_LOWER_BOUND) &&
@@ -641,13 +646,6 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
 }
 
 /********************* START TXPOWER *****************************************/
-enum {
-       HT_IE_EXT_CHANNEL_NONE = 0,
-       HT_IE_EXT_CHANNEL_ABOVE,
-       HT_IE_EXT_CHANNEL_INVALID,
-       HT_IE_EXT_CHANNEL_BELOW,
-       HT_IE_EXT_CHANNEL_MAX
-};
 
 enum {
        CALIB_CH_GROUP_1 = 0,
@@ -812,6 +810,7 @@ enum {
 #define CSR_HW_IF_CONFIG_REG_MSK_BOARD_VER     (0x00000C00)
 #define CSR_HW_IF_CONFIG_REG_BIT_MAC_SI                (0x00000100)
 #define CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI      (0x00000200)
+#define CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM (0x00200000)
 
 static inline u8 iwl4965_hw_get_rate(__le32 rate_n_flags)
 {
index 9438c635f4540854c96beb0ba2945b6f9020825a..4a1ec9442c81d89e96962cd39c2158f644e280b5 100644 (file)
  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  *
  *****************************************************************************/
+/*
+ * Please use this file (iwl-4965.h) for driver implementation definitions.
+ * Please use iwl-4965-commands.h for uCode API definitions.
+ * Please use iwl-4965-hw.h for hardware-related definitions.
+ */
+
 #ifndef __iwl_4965_h__
 #define __iwl_4965_h__
 
@@ -192,6 +198,15 @@ struct iwl4965_scan_power_info {
        s8 requested_power;     /* scan pwr (dBm) requested for chnl/rate */
 };
 
+/* For fat_extension_channel */
+enum {
+       HT_IE_EXT_CHANNEL_NONE = 0,
+       HT_IE_EXT_CHANNEL_ABOVE,
+       HT_IE_EXT_CHANNEL_INVALID,
+       HT_IE_EXT_CHANNEL_BELOW,
+       HT_IE_EXT_CHANNEL_MAX
+};
+
 /*
  * One for each channel, holds all channel setup data
  * Some of the fields (e.g. eeprom and flags/max_power_avg) are redundant
@@ -202,14 +217,14 @@ struct iwl4965_scan_power_info {
 struct iwl4965_channel_info {
        struct iwl4965_channel_tgd_info tgd;
        struct iwl4965_channel_tgh_info tgh;
-       struct iwl4965_eeprom_channel eeprom;   /* EEPROM regulatory limit */
-       struct iwl4965_eeprom_channel fat_eeprom;       /* EEPROM regulatory limit for
-                                                * FAT channel */
+       struct iwl4965_eeprom_channel eeprom;     /* EEPROM regulatory limit */
+       struct iwl4965_eeprom_channel fat_eeprom; /* EEPROM regulatory limit for
+                                                  * FAT channel */
 
        u8 channel;       /* channel number */
        u8 flags;         /* flags copied from EEPROM */
        s8 max_power_avg; /* (dBm) regul. eeprom, normal Tx, any rate */
-       s8 curr_txpow;    /* (dBm) regulatory/spectrum/user (not h/w) */
+       s8 curr_txpow;    /* (dBm) regulatory/spectrum/user (not h/w) limit */
        s8 min_power;     /* always 0 */
        s8 scan_power;    /* (dBm) regul. eeprom, direct scans, any rate */
 
@@ -228,7 +243,7 @@ struct iwl4965_channel_info {
        s8 fat_min_power;       /* always 0 */
        s8 fat_scan_power;      /* (dBm) eeprom, direct scans, any rate */
        u8 fat_flags;           /* flags copied from EEPROM */
-       u8 fat_extension_channel;
+       u8 fat_extension_channel; /* HT_IE_EXT_CHANNEL_* */
 
        /* Radio/DSP gain settings for each scan rate, for directed scans. */
        struct iwl4965_scan_power_info scan_pwr_info[IWL_NUM_SCAN_RATES];