aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-dev.h
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-06-11 21:47:12 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-14 12:18:08 -0400
commitf53696de6722a4aac00b76e25a5321c01e88a55f (patch)
treecd735b6fd5bfa7a5ba593eb591cfc6d62d26e7dd /drivers/net/wireless/iwlwifi/iwl-dev.h
parente7d326ac437e9e9425dcd79382f4e5f6ca31fb16 (diff)
iwlwifi: cleans up scanning code
This patch 1. cleans up scanning code. 2. It adds round robin of TX antannas/chains. Signed-off-by: Tomas Winkler <tomas.winkler@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-dev.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h33
1 files changed, 1 insertions, 32 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 69765c975d38..ef7415928b74 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -157,35 +157,11 @@ struct iwl4965_channel_tgh_info {
157 s64 last_radar_time; 157 s64 last_radar_time;
158}; 158};
159 159
160/* current Tx power values to use, one for each rate for each channel.
161 * requested power is limited by:
162 * -- regulatory EEPROM limits for this channel
163 * -- hardware capabilities (clip-powers)
164 * -- spectrum management
165 * -- user preference (e.g. iwconfig)
166 * when requested power is set, base power index must also be set. */
167struct iwl4965_channel_power_info {
168 struct iwl4965_tx_power tpc; /* actual radio and DSP gain settings */
169 s8 power_table_index; /* actual (compenst'd) index into gain table */
170 s8 base_power_index; /* gain index for power at factory temp. */
171 s8 requested_power; /* power (dBm) requested for this chnl/rate */
172};
173
174/* current scan Tx power values to use, one for each scan rate for each
175 * channel. */
176struct iwl4965_scan_power_info {
177 struct iwl4965_tx_power tpc; /* actual radio and DSP gain settings */
178 s8 power_table_index; /* actual (compenst'd) index into gain table */
179 s8 requested_power; /* scan pwr (dBm) requested for chnl/rate */
180};
181
182/* 160/*
183 * One for each channel, holds all channel setup data 161 * One for each channel, holds all channel setup data
184 * Some of the fields (e.g. eeprom and flags/max_power_avg) are redundant 162 * Some of the fields (e.g. eeprom and flags/max_power_avg) are redundant
185 * with one another! 163 * with one another!
186 */ 164 */
187#define IWL4965_MAX_RATE (33)
188
189struct iwl_channel_info { 165struct iwl_channel_info {
190 struct iwl4965_channel_tgd_info tgd; 166 struct iwl4965_channel_tgd_info tgd;
191 struct iwl4965_channel_tgh_info tgh; 167 struct iwl4965_channel_tgh_info tgh;
@@ -204,11 +180,6 @@ struct iwl_channel_info {
204 u8 band_index; /* 0-4, maps channel to band1/2/3/4/5 */ 180 u8 band_index; /* 0-4, maps channel to band1/2/3/4/5 */
205 enum ieee80211_band band; 181 enum ieee80211_band band;
206 182
207 /* Radio/DSP gain settings for each "normal" data Tx rate.
208 * These include, in addition to RF and DSP gain, a few fields for
209 * remembering/modifying gain settings (indexes). */
210 struct iwl4965_channel_power_info power_info[IWL4965_MAX_RATE];
211
212 /* FAT channel info */ 183 /* FAT channel info */
213 s8 fat_max_power_avg; /* (dBm) regul. eeprom, normal Tx, any rate */ 184 s8 fat_max_power_avg; /* (dBm) regul. eeprom, normal Tx, any rate */
214 s8 fat_curr_txpow; /* (dBm) regulatory/spectrum/user (not h/w) */ 185 s8 fat_curr_txpow; /* (dBm) regulatory/spectrum/user (not h/w) */
@@ -216,9 +187,6 @@ struct iwl_channel_info {
216 s8 fat_scan_power; /* (dBm) eeprom, direct scans, any rate */ 187 s8 fat_scan_power; /* (dBm) eeprom, direct scans, any rate */
217 u8 fat_flags; /* flags copied from EEPROM */ 188 u8 fat_flags; /* flags copied from EEPROM */
218 u8 fat_extension_channel; /* HT_IE_EXT_CHANNEL_* */ 189 u8 fat_extension_channel; /* HT_IE_EXT_CHANNEL_* */
219
220 /* Radio/DSP gain settings for each scan rate, for directed scans. */
221 struct iwl4965_scan_power_info scan_pwr_info[IWL_NUM_SCAN_RATES];
222}; 190};
223 191
224struct iwl4965_clip_group { 192struct iwl4965_clip_group {
@@ -974,6 +942,7 @@ struct iwl_priv {
974 u8 direct_ssid_len; 942 u8 direct_ssid_len;
975 u8 direct_ssid[IW_ESSID_MAX_SIZE]; 943 u8 direct_ssid[IW_ESSID_MAX_SIZE];
976 struct iwl_scan_cmd *scan; 944 struct iwl_scan_cmd *scan;
945 u32 scan_tx_ant[IEEE80211_NUM_BANDS];
977 946
978 /* spinlock */ 947 /* spinlock */
979 spinlock_t lock; /* protect general shared data */ 948 spinlock_t lock; /* protect general shared data */