aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945-commands.h
diff options
context:
space:
mode:
authorBen Cahill <ben.m.cahill@intel.com>2007-11-28 22:10:09 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:05:33 -0500
commit80cc0c382db318de88577eff027d5c4097abef81 (patch)
treeae9e22b93e112e9f6fb08fa152e44befcf8b44b9 /drivers/net/wireless/iwlwifi/iwl-3945-commands.h
parent075416cd18cb4a7ed057d9a96b388bc23b43c4b1 (diff)
iwlwifi: add comments to RXON command and txpower formats
Add comments to RXON command and txpower formats Signed-off-by: Ben Cahill <ben.m.cahill@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-3945-commands.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-commands.h62
1 files changed, 48 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-commands.h b/drivers/net/wireless/iwlwifi/iwl-3945-commands.h
index 3d3c7e3d37ea..4a8fc6878cff 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-commands.h
@@ -124,7 +124,7 @@ enum {
124 /* Bluetooth device coexistance config command */ 124 /* Bluetooth device coexistance config command */
125 REPLY_BT_CONFIG = 0x9b, 125 REPLY_BT_CONFIG = 0x9b,
126 126
127 /* 4965 Statistics */ 127 /* Statistics */
128 REPLY_STATISTICS_CMD = 0x9c, 128 REPLY_STATISTICS_CMD = 0x9c,
129 STATISTICS_NOTIFICATION = 0x9d, 129 STATISTICS_NOTIFICATION = 0x9d,
130 130
@@ -140,7 +140,8 @@ enum {
140 140
141/****************************************************************************** 141/******************************************************************************
142 * (0) 142 * (0)
143 * Header 143 * Commonly used structures and definitions:
144 * Command header, txpower
144 * 145 *
145 *****************************************************************************/ 146 *****************************************************************************/
146 147
@@ -183,6 +184,36 @@ struct iwl3945_cmd_header {
183 u8 data[0]; 184 u8 data[0];
184} __attribute__ ((packed)); 185} __attribute__ ((packed));
185 186
187/**
188 * struct iwl3945_tx_power
189 *
190 * Used in REPLY_TX_PWR_TABLE_CMD, REPLY_SCAN_CMD, REPLY_CHANNEL_SWITCH
191 *
192 * Each entry contains two values:
193 * 1) DSP gain (or sometimes called DSP attenuation). This is a fine-grained
194 * linear value that multiplies the output of the digital signal processor,
195 * before being sent to the analog radio.
196 * 2) Radio gain. This sets the analog gain of the radio Tx path.
197 * It is a coarser setting, and behaves in a logarithmic (dB) fashion.
198 *
199 * Driver obtains values from struct iwl3945_tx_power power_gain_table[][].
200 */
201struct iwl3945_tx_power {
202 u8 tx_gain; /* gain for analog radio */
203 u8 dsp_atten; /* gain for DSP */
204} __attribute__ ((packed));
205
206/**
207 * struct iwl3945_power_per_rate
208 *
209 * Used in REPLY_TX_PWR_TABLE_CMD, REPLY_CHANNEL_SWITCH
210 */
211struct iwl3945_power_per_rate {
212 u8 rate; /* plcp */
213 struct iwl3945_tx_power tpc;
214 u8 reserved;
215} __attribute__ ((packed));
216
186/****************************************************************************** 217/******************************************************************************
187 * (0a) 218 * (0a)
188 * Alive and Error Commands & Responses: 219 * Alive and Error Commands & Responses:
@@ -328,8 +359,22 @@ enum {
328/* transfer to host non bssid beacons in associated state */ 359/* transfer to host non bssid beacons in associated state */
329#define RXON_FILTER_BCON_AWARE_MSK __constant_cpu_to_le32(1 << 6) 360#define RXON_FILTER_BCON_AWARE_MSK __constant_cpu_to_le32(1 << 6)
330 361
331/* 362/**
332 * REPLY_RXON = 0x10 (command, has simple generic response) 363 * REPLY_RXON = 0x10 (command, has simple generic response)
364 *
365 * RXON tunes the radio tuner to a service channel, and sets up a number
366 * of parameters that are used primarily for Rx, but also for Tx operations.
367 *
368 * NOTE: When tuning to a new channel, driver must set the
369 * RXON_FILTER_ASSOC_MSK to 0. This will clear station-dependent
370 * info within the device, including the station tables, tx retry
371 * rate tables, and txpower tables. Driver must build a new station
372 * table and txpower table before transmitting anything on the RXON
373 * channel.
374 *
375 * NOTE: All RXONs wipe clean the internal txpower table. Driver must
376 * issue a new REPLY_TX_PWR_TABLE_CMD after each REPLY_RXON (0x10),
377 * regardless of whether RXON_FILTER_ASSOC_MSK is set.
333 */ 378 */
334struct iwl3945_rxon_cmd { 379struct iwl3945_rxon_cmd {
335 u8 node_addr[6]; 380 u8 node_addr[6];
@@ -373,17 +418,6 @@ struct iwl3945_rxon_time_cmd {
373 __le16 reserved; 418 __le16 reserved;
374} __attribute__ ((packed)); 419} __attribute__ ((packed));
375 420
376struct iwl3945_tx_power {
377 u8 tx_gain; /* gain for analog radio */
378 u8 dsp_atten; /* gain for DSP */
379} __attribute__ ((packed));
380
381struct iwl3945_power_per_rate {
382 u8 rate; /* plcp */
383 struct iwl3945_tx_power tpc;
384 u8 reserved;
385} __attribute__ ((packed));
386
387/* 421/*
388 * REPLY_CHANNEL_SWITCH = 0x72 (command, has simple generic response) 422 * REPLY_CHANNEL_SWITCH = 0x72 (command, has simple generic response)
389 */ 423 */