diff options
author | Ben Cahill <ben.m.cahill@intel.com> | 2007-11-28 22:10:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:05:26 -0500 |
commit | fcd427bbba10fc315d1c958b85bba74448db4eb4 (patch) | |
tree | 88f66271649afb4699e095bd1cb69b4486bbb67f /drivers/net/wireless/iwlwifi/iwl-4965-hw.h | |
parent | 14519a0b46085db68e610147098d03386c34801f (diff) |
iwlwifi: move HT_IE_EXT_CHANNEL_* driver definitions to iwl-4965.h
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965-hw.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965-hw.h | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h index 962aef2f1ef2..3c09225c6623 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h | |||
@@ -60,6 +60,11 @@ | |||
60 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 60 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
61 | * | 61 | * |
62 | *****************************************************************************/ | 62 | *****************************************************************************/ |
63 | /* | ||
64 | * Please use this file (iwl-4965-hw.h) only for hardware-related definitions. | ||
65 | * Use iwl-4965-commands.h for uCode API definitions. | ||
66 | * Use iwl-4965.h for driver implementation definitions. | ||
67 | */ | ||
63 | 68 | ||
64 | #ifndef __iwl_4965_hw_h__ | 69 | #ifndef __iwl_4965_hw_h__ |
65 | #define __iwl_4965_hw_h__ | 70 | #define __iwl_4965_hw_h__ |
@@ -77,9 +82,7 @@ | |||
77 | /* Tx rates */ | 82 | /* Tx rates */ |
78 | #define IWL_CCK_RATES 4 | 83 | #define IWL_CCK_RATES 4 |
79 | #define IWL_OFDM_RATES 8 | 84 | #define IWL_OFDM_RATES 8 |
80 | |||
81 | #define IWL_HT_RATES 16 | 85 | #define IWL_HT_RATES 16 |
82 | |||
83 | #define IWL_MAX_RATES (IWL_CCK_RATES+IWL_OFDM_RATES+IWL_HT_RATES) | 86 | #define IWL_MAX_RATES (IWL_CCK_RATES+IWL_OFDM_RATES+IWL_HT_RATES) |
84 | 87 | ||
85 | /* Time constants */ | 88 | /* Time constants */ |
@@ -449,8 +452,6 @@ struct iwl4965_eeprom { | |||
449 | */ | 452 | */ |
450 | #define CSR_HW_REV_WA_REG (CSR_BASE+0x22C) | 453 | #define CSR_HW_REV_WA_REG (CSR_BASE+0x22C) |
451 | 454 | ||
452 | #define CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM (0x00200000) | ||
453 | |||
454 | /* interrupt flags in INTA, set by uCode or hardware (e.g. dma), | 455 | /* interrupt flags in INTA, set by uCode or hardware (e.g. dma), |
455 | * acknowledged (reset) by host writing "1" to flagged bits. */ | 456 | * acknowledged (reset) by host writing "1" to flagged bits. */ |
456 | #define CSR_INT_BIT_FH_RX (1<<31) /* Rx DMA, cmd responses, FH_INT[17:16] */ | 457 | #define CSR_INT_BIT_FH_RX (1<<31) /* Rx DMA, cmd responses, FH_INT[17:16] */ |
@@ -592,17 +593,12 @@ struct iwl4965_eeprom { | |||
592 | #define FH_TSSR_CBB_BASE (FH_TSSR_TABLE+0x000) | 593 | #define FH_TSSR_CBB_BASE (FH_TSSR_TABLE+0x000) |
593 | #define FH_TSSR_MSG_CONFIG (FH_TSSR_TABLE+0x008) | 594 | #define FH_TSSR_MSG_CONFIG (FH_TSSR_TABLE+0x008) |
594 | #define FH_TSSR_TX_STATUS (FH_TSSR_TABLE+0x010) | 595 | #define FH_TSSR_TX_STATUS (FH_TSSR_TABLE+0x010) |
595 | /* 18 - reserved */ | ||
596 | 596 | ||
597 | /* card static random access memory (SRAM) for processor data and instructs */ | ||
598 | #define RTC_INST_LOWER_BOUND (0x000000) | ||
599 | #define RTC_DATA_LOWER_BOUND (0x800000) | ||
600 | 597 | ||
601 | #define HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED (0x00000004) | 598 | #define HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED (0x00000004) |
602 | 599 | ||
603 | #define TFD_QUEUE_SIZE_MAX (256) | 600 | #define TFD_QUEUE_SIZE_MAX (256) |
604 | 601 | ||
605 | /* spectrum and channel data structures */ | ||
606 | #define IWL_NUM_SCAN_RATES (2) | 602 | #define IWL_NUM_SCAN_RATES (2) |
607 | 603 | ||
608 | #define IWL_DEFAULT_TX_RETRY 15 | 604 | #define IWL_DEFAULT_TX_RETRY 15 |
@@ -623,17 +619,26 @@ struct iwl4965_eeprom { | |||
623 | #define RX_FREE_BUFFERS 64 | 619 | #define RX_FREE_BUFFERS 64 |
624 | #define RX_LOW_WATERMARK 8 | 620 | #define RX_LOW_WATERMARK 8 |
625 | 621 | ||
626 | 622 | /* Size of one Rx buffer in host DRAM */ | |
627 | #define IWL_RX_BUF_SIZE (4 * 1024) | 623 | #define IWL_RX_BUF_SIZE (4 * 1024) |
628 | #define IWL_MAX_BSM_SIZE BSM_SRAM_SIZE | 624 | |
625 | /* Sizes and addresses for instruction and data memory (SRAM) in | ||
626 | * 4965's embedded processor. Driver access is via HBUS_TARG_MEM_* regs. */ | ||
627 | #define RTC_INST_LOWER_BOUND (0x000000) | ||
629 | #define KDR_RTC_INST_UPPER_BOUND (0x018000) | 628 | #define KDR_RTC_INST_UPPER_BOUND (0x018000) |
629 | |||
630 | #define RTC_DATA_LOWER_BOUND (0x800000) | ||
630 | #define KDR_RTC_DATA_UPPER_BOUND (0x80A000) | 631 | #define KDR_RTC_DATA_UPPER_BOUND (0x80A000) |
632 | |||
631 | #define KDR_RTC_INST_SIZE (KDR_RTC_INST_UPPER_BOUND - RTC_INST_LOWER_BOUND) | 633 | #define KDR_RTC_INST_SIZE (KDR_RTC_INST_UPPER_BOUND - RTC_INST_LOWER_BOUND) |
632 | #define KDR_RTC_DATA_SIZE (KDR_RTC_DATA_UPPER_BOUND - RTC_DATA_LOWER_BOUND) | 634 | #define KDR_RTC_DATA_SIZE (KDR_RTC_DATA_UPPER_BOUND - RTC_DATA_LOWER_BOUND) |
633 | 635 | ||
634 | #define IWL_MAX_INST_SIZE KDR_RTC_INST_SIZE | 636 | #define IWL_MAX_INST_SIZE KDR_RTC_INST_SIZE |
635 | #define IWL_MAX_DATA_SIZE KDR_RTC_DATA_SIZE | 637 | #define IWL_MAX_DATA_SIZE KDR_RTC_DATA_SIZE |
636 | 638 | ||
639 | /* Size of uCode instruction memory in bootstrap state machine */ | ||
640 | #define IWL_MAX_BSM_SIZE BSM_SRAM_SIZE | ||
641 | |||
637 | static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) | 642 | static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) |
638 | { | 643 | { |
639 | return (addr >= RTC_DATA_LOWER_BOUND) && | 644 | return (addr >= RTC_DATA_LOWER_BOUND) && |
@@ -641,13 +646,6 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) | |||
641 | } | 646 | } |
642 | 647 | ||
643 | /********************* START TXPOWER *****************************************/ | 648 | /********************* START TXPOWER *****************************************/ |
644 | enum { | ||
645 | HT_IE_EXT_CHANNEL_NONE = 0, | ||
646 | HT_IE_EXT_CHANNEL_ABOVE, | ||
647 | HT_IE_EXT_CHANNEL_INVALID, | ||
648 | HT_IE_EXT_CHANNEL_BELOW, | ||
649 | HT_IE_EXT_CHANNEL_MAX | ||
650 | }; | ||
651 | 649 | ||
652 | enum { | 650 | enum { |
653 | CALIB_CH_GROUP_1 = 0, | 651 | CALIB_CH_GROUP_1 = 0, |
@@ -812,6 +810,7 @@ enum { | |||
812 | #define CSR_HW_IF_CONFIG_REG_MSK_BOARD_VER (0x00000C00) | 810 | #define CSR_HW_IF_CONFIG_REG_MSK_BOARD_VER (0x00000C00) |
813 | #define CSR_HW_IF_CONFIG_REG_BIT_MAC_SI (0x00000100) | 811 | #define CSR_HW_IF_CONFIG_REG_BIT_MAC_SI (0x00000100) |
814 | #define CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI (0x00000200) | 812 | #define CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI (0x00000200) |
813 | #define CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM (0x00200000) | ||
815 | 814 | ||
816 | static inline u8 iwl4965_hw_get_rate(__le32 rate_n_flags) | 815 | static inline u8 iwl4965_hw_get_rate(__le32 rate_n_flags) |
817 | { | 816 | { |