aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-eeprom.h
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/wireless/iwlwifi/iwl-eeprom.h
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-eeprom.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.h36
1 files changed, 28 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
index 80b9e45d9b9c..8171c701e4e1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
@@ -5,7 +5,7 @@
5 * 5 *
6 * GPL LICENSE SUMMARY 6 * GPL LICENSE SUMMARY
7 * 7 *
8 * Copyright(c) 2008 - 2009 Intel Corporation. All rights reserved. 8 * Copyright(c) 2008 - 2010 Intel Corporation. All rights reserved.
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of version 2 of the GNU General Public License as 11 * it under the terms of version 2 of the GNU General Public License as
@@ -30,7 +30,7 @@
30 * 30 *
31 * BSD LICENSE 31 * BSD LICENSE
32 * 32 *
33 * Copyright(c) 2005 - 2009 Intel Corporation. All rights reserved. 33 * Copyright(c) 2005 - 2010 Intel Corporation. All rights reserved.
34 * All rights reserved. 34 * All rights reserved.
35 * 35 *
36 * Redistribution and use in source and binary forms, with or without 36 * Redistribution and use in source and binary forms, with or without
@@ -63,6 +63,8 @@
63#ifndef __iwl_eeprom_h__ 63#ifndef __iwl_eeprom_h__
64#define __iwl_eeprom_h__ 64#define __iwl_eeprom_h__
65 65
66#include <net/mac80211.h>
67
66struct iwl_priv; 68struct iwl_priv;
67 69
68/* 70/*
@@ -125,19 +127,21 @@ struct iwl_eeprom_channel {
125 * Enhanced regulatory tx power portion of eeprom image can be broken down 127 * Enhanced regulatory tx power portion of eeprom image can be broken down
126 * into individual structures; each one is 8 bytes in size and contain the 128 * into individual structures; each one is 8 bytes in size and contain the
127 * following information 129 * following information
130 * @common: (desc + channel) not used by driver, should _NOT_ be "zero"
128 * @chain_a_max_pwr: chain a max power in 1/2 dBm 131 * @chain_a_max_pwr: chain a max power in 1/2 dBm
129 * @chain_b_max_pwr: chain b max power in 1/2 dBm 132 * @chain_b_max_pwr: chain b max power in 1/2 dBm
130 * @chain_c_max_pwr: chain c max power in 1/2 dBm 133 * @chain_c_max_pwr: chain c max power in 1/2 dBm
134 * @reserved: not used, should be "zero"
131 * @mimo2_max_pwr: mimo2 max power in 1/2 dBm 135 * @mimo2_max_pwr: mimo2 max power in 1/2 dBm
132 * @mimo3_max_pwr: mimo3 max power in 1/2 dBm 136 * @mimo3_max_pwr: mimo3 max power in 1/2 dBm
133 * 137 *
134 */ 138 */
135struct iwl_eeprom_enhanced_txpwr { 139struct iwl_eeprom_enhanced_txpwr {
136 u16 reserved; 140 __le16 common;
137 s8 chain_a_max; 141 s8 chain_a_max;
138 s8 chain_b_max; 142 s8 chain_b_max;
139 s8 chain_c_max; 143 s8 chain_c_max;
140 s8 reserved1; 144 s8 reserved;
141 s8 mimo2_max; 145 s8 mimo2_max;
142 s8 mimo3_max; 146 s8 mimo3_max;
143} __attribute__ ((packed)); 147} __attribute__ ((packed));
@@ -199,6 +203,10 @@ struct iwl_eeprom_enhanced_txpwr {
199#define EEPROM_5000_REG_BAND_52_HT40_CHANNELS ((0x92)\ 203#define EEPROM_5000_REG_BAND_52_HT40_CHANNELS ((0x92)\
200 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 22 bytes */ 204 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 22 bytes */
201 205
206/* 6000 regulatory - indirect access */
207#define EEPROM_6000_REG_BAND_24_HT40_CHANNELS ((0x80)\
208 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 14 bytes */
209
202/* 6000 and up regulatory tx power - indirect access */ 210/* 6000 and up regulatory tx power - indirect access */
203/* max. elements per section */ 211/* max. elements per section */
204#define EEPROM_MAX_TXPOWER_SECTION_ELEMENTS (8) 212#define EEPROM_MAX_TXPOWER_SECTION_ELEMENTS (8)
@@ -256,6 +264,15 @@ struct iwl_eeprom_enhanced_txpwr {
256#define EEPROM_5050_TX_POWER_VERSION (4) 264#define EEPROM_5050_TX_POWER_VERSION (4)
257#define EEPROM_5050_EEPROM_VERSION (0x21E) 265#define EEPROM_5050_EEPROM_VERSION (0x21E)
258 266
267/* 1000 Specific */
268#define EEPROM_1000_EEPROM_VERSION (0x15C)
269
270/* 6x00 Specific */
271#define EEPROM_6000_EEPROM_VERSION (0x434)
272
273/* 6x50 Specific */
274#define EEPROM_6050_EEPROM_VERSION (0x532)
275
259/* OTP */ 276/* OTP */
260/* lower blocks contain EEPROM image and calibration data */ 277/* lower blocks contain EEPROM image and calibration data */
261#define OTP_LOW_IMAGE_SIZE (2 * 512 * sizeof(u16)) /* 2 KB */ 278#define OTP_LOW_IMAGE_SIZE (2 * 512 * sizeof(u16)) /* 2 KB */
@@ -347,7 +364,7 @@ struct iwl_eeprom_calib_subband_info {
347struct iwl_eeprom_calib_info { 364struct iwl_eeprom_calib_info {
348 u8 saturation_power24; /* half-dBm (e.g. "34" = 17 dBm) */ 365 u8 saturation_power24; /* half-dBm (e.g. "34" = 17 dBm) */
349 u8 saturation_power52; /* half-dBm */ 366 u8 saturation_power52; /* half-dBm */
350 s16 voltage; /* signed */ 367 __le16 voltage; /* signed */
351 struct iwl_eeprom_calib_subband_info 368 struct iwl_eeprom_calib_subband_info
352 band_info[EEPROM_TX_POWER_BANDS]; 369 band_info[EEPROM_TX_POWER_BANDS];
353} __attribute__ ((packed)); 370} __attribute__ ((packed));
@@ -370,12 +387,10 @@ struct iwl_eeprom_calib_info {
370#define EEPROM_BOARD_PBA_NUMBER (2*0x3B+1) /* 9 bytes */ 387#define EEPROM_BOARD_PBA_NUMBER (2*0x3B+1) /* 9 bytes */
371#define EEPROM_VERSION (2*0x44) /* 2 bytes */ 388#define EEPROM_VERSION (2*0x44) /* 2 bytes */
372#define EEPROM_SKU_CAP (2*0x45) /* 1 bytes */ 389#define EEPROM_SKU_CAP (2*0x45) /* 1 bytes */
373#define EEPROM_LEDS_MODE (2*0x45+1) /* 1 bytes */
374#define EEPROM_OEM_MODE (2*0x46) /* 2 bytes */ 390#define EEPROM_OEM_MODE (2*0x46) /* 2 bytes */
375#define EEPROM_WOWLAN_MODE (2*0x47) /* 2 bytes */ 391#define EEPROM_WOWLAN_MODE (2*0x47) /* 2 bytes */
376#define EEPROM_RADIO_CONFIG (2*0x48) /* 2 bytes */ 392#define EEPROM_RADIO_CONFIG (2*0x48) /* 2 bytes */
377#define EEPROM_3945_M_VERSION (2*0x4A) /* 1 bytes */ 393#define EEPROM_3945_M_VERSION (2*0x4A) /* 1 bytes */
378#define EEPROM_ANTENNA_SWITCH_TYPE (2*0x4A+1) /* 1 bytes */
379 394
380/* The following masks are to be applied on EEPROM_RADIO_CONFIG */ 395/* The following masks are to be applied on EEPROM_RADIO_CONFIG */
381#define EEPROM_RF_CFG_TYPE_MSK(x) (x & 0x3) /* bits 0-1 */ 396#define EEPROM_RF_CFG_TYPE_MSK(x) (x & 0x3) /* bits 0-1 */
@@ -387,7 +402,12 @@ struct iwl_eeprom_calib_info {
387 402
388#define EEPROM_3945_RF_CFG_TYPE_MAX 0x0 403#define EEPROM_3945_RF_CFG_TYPE_MAX 0x0
389#define EEPROM_4965_RF_CFG_TYPE_MAX 0x1 404#define EEPROM_4965_RF_CFG_TYPE_MAX 0x1
390#define EEPROM_5000_RF_CFG_TYPE_MAX 0x3 405
406/* Radio Config for 5000 and up */
407#define EEPROM_RF_CONFIG_TYPE_R3x3 0x0
408#define EEPROM_RF_CONFIG_TYPE_R2x2 0x1
409#define EEPROM_RF_CONFIG_TYPE_R1x2 0x2
410#define EEPROM_RF_CONFIG_TYPE_MAX 0x3
391 411
392/* 412/*
393 * Per-channel regulatory data. 413 * Per-channel regulatory data.