aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-eeprom.h
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2009-11-13 14:56:23 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-18 17:09:02 -0500
commit85f0d9e87794818356146996826b829100daa6bc (patch)
tree6420ac21cd980e3685a6adfc2d77a2cd26c92ab0 /drivers/net/wireless/iwlwifi/iwl-eeprom.h
parentdfef948ed2ba69cf041840b5e860d6b4e16fa0b1 (diff)
iwlwifi: validate enhanced tx power entry
Validate enhanced tx power entry read from EEPROM before applying the tx power value. Different versions of EEPROM might contain different size of table; always a good idea to make sure the entry is valid before applying to the targeted channel. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-eeprom.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
index 5ba5a4e9e49a..5cd2b66bbe45 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
@@ -127,19 +127,21 @@ struct iwl_eeprom_channel {
127 * 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
128 * 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
129 * following information 129 * following information
130 * @common: (desc + channel) not used by driver, should _NOT_ be "zero"
130 * @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
131 * @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
132 * @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"
133 * @mimo2_max_pwr: mimo2 max power in 1/2 dBm 135 * @mimo2_max_pwr: mimo2 max power in 1/2 dBm
134 * @mimo3_max_pwr: mimo3 max power in 1/2 dBm 136 * @mimo3_max_pwr: mimo3 max power in 1/2 dBm
135 * 137 *
136 */ 138 */
137struct iwl_eeprom_enhanced_txpwr { 139struct iwl_eeprom_enhanced_txpwr {
138 u16 reserved; 140 u16 common;
139 s8 chain_a_max; 141 s8 chain_a_max;
140 s8 chain_b_max; 142 s8 chain_b_max;
141 s8 chain_c_max; 143 s8 chain_c_max;
142 s8 reserved1; 144 s8 reserved;
143 s8 mimo2_max; 145 s8 mimo2_max;
144 s8 mimo3_max; 146 s8 mimo3_max;
145} __attribute__ ((packed)); 147} __attribute__ ((packed));