summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-dev.h
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2008-12-19 05:37:15 +0300
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 23:59:01 +0300
commitd20b3c65f2a3e18ea86542e6ca4fe1c6d16c91df (patch)
tree78f8c8e4861160f0751240a8c65e2d8b0d9ab785 /drivers/net/wireless/iwlwifi/iwl-dev.h
parent1125eff3ae26b2e39c6bf940b5e0b8774ebd2896 (diff)
downloadlinux-d20b3c65f2a3e18ea86542e6ca4fe1c6d16c91df.tar.xz
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.h33
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 @@
#include "iwl-rfkill.h"
#include "iwl-eeprom.h"
#include "iwl-4965-hw.h"
+#include "iwl-3945-hw.h"
#include "iwl-csr.h"
#include "iwl-prph.h"
#include "iwl-debug.h"
@@ -153,6 +154,30 @@ struct iwl4965_channel_tgh_info {
s64 last_radar_time;
};
+#define IWL4965_MAX_RATE (33)
+
+/* current Tx power values to use, one for each rate for each channel.
+ * requested power is limited by:
+ * -- regulatory EEPROM limits for this channel
+ * -- hardware capabilities (clip-powers)
+ * -- spectrum management
+ * -- user preference (e.g. iwconfig)
+ * when requested power is set, base power index must also be set. */
+struct iwl3945_channel_power_info {
+ struct iwl3945_tx_power tpc; /* actual radio and DSP gain settings */
+ s8 power_table_index; /* actual (compenst'd) index into gain table */
+ s8 base_power_index; /* gain index for power at factory temp. */
+ s8 requested_power; /* power (dBm) requested for this chnl/rate */
+};
+
+/* current scan Tx power values to use, one for each scan rate for each
+ * channel. */
+struct iwl3945_scan_power_info {
+ struct iwl3945_tx_power tpc; /* actual radio and DSP gain settings */
+ s8 power_table_index; /* actual (compenst'd) index into gain table */
+ s8 requested_power; /* scan pwr (dBm) requested for chnl/rate */
+};
+
/*
* One for each channel, holds all channel setup data
* Some of the fields (e.g. eeprom and flags/max_power_avg) are redundant
@@ -183,6 +208,14 @@ struct iwl_channel_info {
s8 fat_scan_power; /* (dBm) eeprom, direct scans, any rate */
u8 fat_flags; /* flags copied from EEPROM */
u8 fat_extension_channel; /* HT_IE_EXT_CHANNEL_* */
+
+ /* Radio/DSP gain settings for each "normal" data Tx rate.
+ * These include, in addition to RF and DSP gain, a few fields for
+ * remembering/modifying gain settings (indexes). */
+ struct iwl3945_channel_power_info power_info[IWL4965_MAX_RATE];
+
+ /* Radio/DSP gain settings for each scan rate, for directed scans. */
+ struct iwl3945_scan_power_info scan_pwr_info[IWL_NUM_SCAN_RATES];
};