Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79058
b: refs/heads/master
c: fcd427b
h: refs/heads/master
v: v3
  • Loading branch information
Ben Cahill authored and David S. Miller committed Jan 28, 2008
1 parent 7c83f1a commit 7697711
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 40 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 14519a0b46085db68e610147098d03386c34801f
refs/heads/master: fcd427bbba10fc315d1c958b85bba74448db4eb4
5 changes: 5 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-3945-commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
* 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__
Expand Down
32 changes: 16 additions & 16 deletions trunk/drivers/net/wireless/iwlwifi/iwl-3945-hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
* 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__
Expand All @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-3945.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
* 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__
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-4965-commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
* 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__
Expand Down
35 changes: 17 additions & 18 deletions trunk/drivers/net/wireless/iwlwifi/iwl-4965-hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
* 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__
Expand All @@ -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 */
Expand Down Expand Up @@ -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] */
Expand Down Expand Up @@ -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
Expand All @@ -623,31 +619,33 @@ 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) &&
(addr < KDR_RTC_DATA_UPPER_BOUND);
}

/********************* 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,
Expand Down Expand Up @@ -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)
{
Expand Down
25 changes: 20 additions & 5 deletions trunk/drivers/net/wireless/iwlwifi/iwl-4965.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
* 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__

Expand Down Expand Up @@ -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
Expand All @@ -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 */

Expand All @@ -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];
Expand Down

0 comments on commit 7697711

Please sign in to comment.