diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2008-12-18 21:37:15 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:59:01 -0500 |
commit | d20b3c65f2a3e18ea86542e6ca4fe1c6d16c91df (patch) | |
tree | 78f8c8e4861160f0751240a8c65e2d8b0d9ab785 /drivers/net/wireless/iwlwifi/iwl-dev.h | |
parent | 1125eff3ae26b2e39c6bf940b5e0b8774ebd2896 (diff) |
iwl3945: iwl3945_queue and iwl3945_channel_info replacement
This patch replaces the queue and channel info 3945 structures with the iwl
ones.
The initial goal was to replace the channel info structure. Once we do that,
and then include iwl-dev.h instead of iwl-3945.h, we still get build errors
due to several routines and macro redefinitions. This is why this patch also
includes:
- TFD39_MAX_PAYLOAD definition for 3945.
- CMD_SIZE, CMD_HUGE, CMD_SKB duplication removal.
- iwl3945_queue replacement in order to also get rid of the duplicated
get_cmd_index routine.
Getting rid of any of those needs the iwl-dev.h inclusion which then creates
build errors due to definitions duplication. This is why we include all those
in the same patch.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@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-dev.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 73a0b6c53e18..f63209aaeaf6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #include "iwl-rfkill.h" | 39 | #include "iwl-rfkill.h" |
40 | #include "iwl-eeprom.h" | 40 | #include "iwl-eeprom.h" |
41 | #include "iwl-4965-hw.h" | 41 | #include "iwl-4965-hw.h" |
42 | #include "iwl-3945-hw.h" | ||
42 | #include "iwl-csr.h" | 43 | #include "iwl-csr.h" |
43 | #include "iwl-prph.h" | 44 | #include "iwl-prph.h" |
44 | #include "iwl-debug.h" | 45 | #include "iwl-debug.h" |
@@ -153,6 +154,30 @@ struct iwl4965_channel_tgh_info { | |||
153 | s64 last_radar_time; | 154 | s64 last_radar_time; |
154 | }; | 155 | }; |
155 | 156 | ||
157 | #define IWL4965_MAX_RATE (33) | ||
158 | |||
159 | /* current Tx power values to use, one for each rate for each channel. | ||
160 | * requested power is limited by: | ||
161 | * -- regulatory EEPROM limits for this channel | ||
162 | * -- hardware capabilities (clip-powers) | ||
163 | * -- spectrum management | ||
164 | * -- user preference (e.g. iwconfig) | ||
165 | * when requested power is set, base power index must also be set. */ | ||
166 | struct iwl3945_channel_power_info { | ||
167 | struct iwl3945_tx_power tpc; /* actual radio and DSP gain settings */ | ||
168 | s8 power_table_index; /* actual (compenst'd) index into gain table */ | ||
169 | s8 base_power_index; /* gain index for power at factory temp. */ | ||
170 | s8 requested_power; /* power (dBm) requested for this chnl/rate */ | ||
171 | }; | ||
172 | |||
173 | /* current scan Tx power values to use, one for each scan rate for each | ||
174 | * channel. */ | ||
175 | struct iwl3945_scan_power_info { | ||
176 | struct iwl3945_tx_power tpc; /* actual radio and DSP gain settings */ | ||
177 | s8 power_table_index; /* actual (compenst'd) index into gain table */ | ||
178 | s8 requested_power; /* scan pwr (dBm) requested for chnl/rate */ | ||
179 | }; | ||
180 | |||
156 | /* | 181 | /* |
157 | * One for each channel, holds all channel setup data | 182 | * One for each channel, holds all channel setup data |
158 | * Some of the fields (e.g. eeprom and flags/max_power_avg) are redundant | 183 | * Some of the fields (e.g. eeprom and flags/max_power_avg) are redundant |
@@ -183,6 +208,14 @@ struct iwl_channel_info { | |||
183 | s8 fat_scan_power; /* (dBm) eeprom, direct scans, any rate */ | 208 | s8 fat_scan_power; /* (dBm) eeprom, direct scans, any rate */ |
184 | u8 fat_flags; /* flags copied from EEPROM */ | 209 | u8 fat_flags; /* flags copied from EEPROM */ |
185 | u8 fat_extension_channel; /* HT_IE_EXT_CHANNEL_* */ | 210 | u8 fat_extension_channel; /* HT_IE_EXT_CHANNEL_* */ |
211 | |||
212 | /* Radio/DSP gain settings for each "normal" data Tx rate. | ||
213 | * These include, in addition to RF and DSP gain, a few fields for | ||
214 | * remembering/modifying gain settings (indexes). */ | ||
215 | struct iwl3945_channel_power_info power_info[IWL4965_MAX_RATE]; | ||
216 | |||
217 | /* Radio/DSP gain settings for each scan rate, for directed scans. */ | ||
218 | struct iwl3945_scan_power_info scan_pwr_info[IWL_NUM_SCAN_RATES]; | ||
186 | }; | 219 | }; |
187 | 220 | ||
188 | 221 | ||