1 /******************************************************************************
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
8 * Copyright(c) 2005 - 2007 Intel Corporation. All rights reserved.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of version 2 of the GNU General Public License as
12 * published by the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
24 * The full GNU General Public License is included in this distribution
25 * in the file called LICENSE.GPL.
27 * Contact Information:
28 * James P. Ketrenos <ipw2100-admin@linux.intel.com>
29 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
33 * Copyright(c) 2005 - 2007 Intel Corporation. All rights reserved.
34 * All rights reserved.
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions
40 * * Redistributions of source code must retain the above copyright
41 * notice, this list of conditions and the following disclaimer.
42 * * Redistributions in binary form must reproduce the above copyright
43 * notice, this list of conditions and the following disclaimer in
44 * the documentation and/or other materials provided with the
46 * * Neither the name Intel Corporation nor the names of its
47 * contributors may be used to endorse or promote products derived
48 * from this software without specific prior written permission.
50 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
51 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
52 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
53 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
54 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
55 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
56 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
57 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
58 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
59 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
60 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
62 *****************************************************************************/
64 * Please use this file (iwl-3945-commands.h) only for uCode API definitions.
65 * Please use iwl-3945-hw.h for hardware-related definitions.
66 * Please use iwl-3945.h for driver implementation definitions.
69 #ifndef __iwl_3945_commands_h__
70 #define __iwl_3945_commands_h__
76 /* RXON and QOS commands */
78 REPLY_RXON_ASSOC = 0x11,
79 REPLY_QOS_PARAM = 0x13,
80 REPLY_RXON_TIMING = 0x14,
82 /* Multi-Station support */
84 REPLY_REMOVE_STA = 0x19, /* not used */
85 REPLY_REMOVE_ALL_STA = 0x1a, /* not used */
88 REPLY_3945_RX = 0x1b, /* 3945 only */
90 REPLY_RATE_SCALE = 0x47, /* 3945 only */
91 REPLY_LEDS_CMD = 0x48,
92 REPLY_TX_LINK_QUALITY_CMD = 0x4e, /* 4965 only */
95 RADAR_NOTIFICATION = 0x70, /* not used */
96 REPLY_QUIET_CMD = 0x71, /* not used */
97 REPLY_CHANNEL_SWITCH = 0x72,
98 CHANNEL_SWITCH_NOTIFICATION = 0x73,
99 REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74,
100 SPECTRUM_MEASURE_NOTIFICATION = 0x75,
102 /* Power Management */
103 POWER_TABLE_CMD = 0x77,
104 PM_SLEEP_NOTIFICATION = 0x7A,
105 PM_DEBUG_STATISTIC_NOTIFIC = 0x7B,
107 /* Scan commands and notifications */
108 REPLY_SCAN_CMD = 0x80,
109 REPLY_SCAN_ABORT_CMD = 0x81,
110 SCAN_START_NOTIFICATION = 0x82,
111 SCAN_RESULTS_NOTIFICATION = 0x83,
112 SCAN_COMPLETE_NOTIFICATION = 0x84,
114 /* IBSS/AP commands */
115 BEACON_NOTIFICATION = 0x90,
116 REPLY_TX_BEACON = 0x91,
117 WHO_IS_AWAKE_NOTIFICATION = 0x94, /* not used */
119 /* Miscellaneous commands */
120 QUIET_NOTIFICATION = 0x96, /* not used */
121 REPLY_TX_PWR_TABLE_CMD = 0x97,
122 MEASURE_ABORT_NOTIFICATION = 0x99, /* not used */
124 /* BT config command */
125 REPLY_BT_CONFIG = 0x9b,
127 /* 4965 Statistics */
128 REPLY_STATISTICS_CMD = 0x9c,
129 STATISTICS_NOTIFICATION = 0x9d,
131 /* RF-KILL commands and notifications */
132 REPLY_CARD_STATE_CMD = 0xa0,
133 CARD_STATE_NOTIFICATION = 0xa1,
135 /* Missed beacons notification */
136 MISSED_BEACONS_NOTIFICATION = 0xa2,
141 /******************************************************************************
145 *****************************************************************************/
147 #define IWL_CMD_FAILED_MSK 0x40
149 struct iwl3945_cmd_header {
152 /* We have 15 LSB to use as we please (MSB indicates
153 * a frame Rx'd from the HW). We encode the following
154 * information into the sequence field:
157 * 8:13 fifo selection
158 * 14:14 bit indicating if this packet references the 'extra'
159 * storage at the end of the memory queue
160 * 15:15 (Rx indication)
165 /* command data follows immediately */
167 } __attribute__ ((packed));
169 /******************************************************************************
171 * Alive and Error Commands & Responses:
173 *****************************************************************************/
175 #define UCODE_VALID_OK __constant_cpu_to_le32(0x1)
176 #define INITIALIZE_SUBTYPE (9)
179 * REPLY_ALIVE = 0x1 (response only, not a command)
181 struct iwl3945_alive_resp {
189 __le32 log_event_table_ptr;
190 __le32 error_event_table_ptr;
193 } __attribute__ ((packed));
195 struct iwl3945_init_alive_resp {
203 __le32 log_event_table_ptr;
204 __le32 error_event_table_ptr;
207 } __attribute__ ((packed));
216 * REPLY_ERROR = 0x2 (response only, not a command)
218 struct iwl3945_error_resp {
222 __le16 bad_cmd_seq_num;
226 } __attribute__ ((packed));
228 /******************************************************************************
230 * RXON Commands & Responses:
232 *****************************************************************************/
235 * Rx config defines & structure
237 /* rx_config device types */
239 RXON_DEV_TYPE_AP = 1,
240 RXON_DEV_TYPE_ESS = 3,
241 RXON_DEV_TYPE_IBSS = 4,
242 RXON_DEV_TYPE_SNIFFER = 6,
245 /* rx_config flags */
246 /* band & modulation selection */
247 #define RXON_FLG_BAND_24G_MSK __constant_cpu_to_le32(1 << 0)
248 #define RXON_FLG_CCK_MSK __constant_cpu_to_le32(1 << 1)
249 /* auto detection enable */
250 #define RXON_FLG_AUTO_DETECT_MSK __constant_cpu_to_le32(1 << 2)
251 /* TGg protection when tx */
252 #define RXON_FLG_TGG_PROTECT_MSK __constant_cpu_to_le32(1 << 3)
253 /* cck short slot & preamble */
254 #define RXON_FLG_SHORT_SLOT_MSK __constant_cpu_to_le32(1 << 4)
255 #define RXON_FLG_SHORT_PREAMBLE_MSK __constant_cpu_to_le32(1 << 5)
256 /* antenna selection */
257 #define RXON_FLG_DIS_DIV_MSK __constant_cpu_to_le32(1 << 7)
258 #define RXON_FLG_ANT_SEL_MSK __constant_cpu_to_le32(0x0f00)
259 #define RXON_FLG_ANT_A_MSK __constant_cpu_to_le32(1 << 8)
260 #define RXON_FLG_ANT_B_MSK __constant_cpu_to_le32(1 << 9)
261 /* radar detection enable */
262 #define RXON_FLG_RADAR_DETECT_MSK __constant_cpu_to_le32(1 << 12)
263 #define RXON_FLG_TGJ_NARROW_BAND_MSK __constant_cpu_to_le32(1 << 13)
264 /* rx response to host with 8-byte TSF
265 * (according to ON_AIR deassertion) */
266 #define RXON_FLG_TSF2HOST_MSK __constant_cpu_to_le32(1 << 15)
268 /* rx_config filter flags */
269 /* accept all data frames */
270 #define RXON_FILTER_PROMISC_MSK __constant_cpu_to_le32(1 << 0)
271 /* pass control & management to host */
272 #define RXON_FILTER_CTL2HOST_MSK __constant_cpu_to_le32(1 << 1)
273 /* accept multi-cast */
274 #define RXON_FILTER_ACCEPT_GRP_MSK __constant_cpu_to_le32(1 << 2)
275 /* don't decrypt uni-cast frames */
276 #define RXON_FILTER_DIS_DECRYPT_MSK __constant_cpu_to_le32(1 << 3)
277 /* don't decrypt multi-cast frames */
278 #define RXON_FILTER_DIS_GRP_DECRYPT_MSK __constant_cpu_to_le32(1 << 4)
279 /* STA is associated */
280 #define RXON_FILTER_ASSOC_MSK __constant_cpu_to_le32(1 << 5)
281 /* transfer to host non bssid beacons in associated state */
282 #define RXON_FILTER_BCON_AWARE_MSK __constant_cpu_to_le32(1 << 6)
285 * REPLY_RXON = 0x10 (command, has simple generic response)
287 struct iwl3945_rxon_cmd {
292 u8 wlap_bssid_addr[6];
304 } __attribute__ ((packed));
307 * REPLY_RXON_ASSOC = 0x11 (command, has simple generic response)
309 struct iwl3945_rxon_assoc_cmd {
315 } __attribute__ ((packed));
318 * REPLY_RXON_TIMING = 0x14 (command, has simple generic response)
320 struct iwl3945_rxon_time_cmd {
322 __le16 beacon_interval;
324 __le32 beacon_init_val;
325 __le16 listen_interval;
327 } __attribute__ ((packed));
329 struct iwl3945_tx_power {
330 u8 tx_gain; /* gain for analog radio */
331 u8 dsp_atten; /* gain for DSP */
332 } __attribute__ ((packed));
334 struct iwl3945_power_per_rate {
336 struct iwl3945_tx_power tpc;
338 } __attribute__ ((packed));
341 * REPLY_CHANNEL_SWITCH = 0x72 (command, has simple generic response)
343 struct iwl3945_channel_switch_cmd {
348 __le32 rxon_filter_flags;
350 struct iwl3945_power_per_rate power[IWL_MAX_RATES];
351 } __attribute__ ((packed));
354 * CHANNEL_SWITCH_NOTIFICATION = 0x73 (notification only, not a command)
356 struct iwl3945_csa_notification {
359 __le32 status; /* 0 - OK, 1 - fail */
360 } __attribute__ ((packed));
362 /******************************************************************************
364 * Quality-of-Service (QOS) Commands & Responses:
366 *****************************************************************************/
367 struct iwl3945_ac_qos {
373 } __attribute__ ((packed));
375 /* QoS flags defines */
376 #define QOS_PARAM_FLG_UPDATE_EDCA_MSK __constant_cpu_to_le32(0x01)
377 #define QOS_PARAM_FLG_TGN_MSK __constant_cpu_to_le32(0x02)
378 #define QOS_PARAM_FLG_TXOP_TYPE_MSK __constant_cpu_to_le32(0x10)
381 * TXFIFO Queue number defines
383 /* number of Access categories (AC) (EDCA), queues 0..3 */
387 * REPLY_QOS_PARAM = 0x13 (command, has simple generic response)
389 struct iwl3945_qosparam_cmd {
391 struct iwl3945_ac_qos ac[AC_NUM];
392 } __attribute__ ((packed));
394 /******************************************************************************
396 * Add/Modify Stations Commands & Responses:
398 *****************************************************************************/
400 * Multi station support
403 #define IWL_MULTICAST_ID 1
406 #define IWL3945_BROADCAST_ID 24
407 #define IWL3945_STATION_COUNT 25
409 #define IWL4965_BROADCAST_ID 31
410 #define IWL4965_STATION_COUNT 32
412 #define IWL_STATION_COUNT 32 /* MAX(3945,4965)*/
413 #define IWL_INVALID_STATION 255
415 #define STA_FLG_TX_RATE_MSK __constant_cpu_to_le32(1<<2);
416 #define STA_FLG_PWR_SAVE_MSK __constant_cpu_to_le32(1<<8);
418 #define STA_CONTROL_MODIFY_MSK 0x01
420 /* key flags __le16*/
421 #define STA_KEY_FLG_ENCRYPT_MSK __constant_cpu_to_le16(0x7)
422 #define STA_KEY_FLG_NO_ENC __constant_cpu_to_le16(0x0)
423 #define STA_KEY_FLG_WEP __constant_cpu_to_le16(0x1)
424 #define STA_KEY_FLG_CCMP __constant_cpu_to_le16(0x2)
425 #define STA_KEY_FLG_TKIP __constant_cpu_to_le16(0x3)
427 #define STA_KEY_FLG_KEYID_POS 8
428 #define STA_KEY_FLG_INVALID __constant_cpu_to_le16(0x0800)
431 #define STA_MODIFY_KEY_MASK 0x01
432 #define STA_MODIFY_TID_DISABLE_TX 0x02
433 #define STA_MODIFY_TX_RATE_MSK 0x04
434 #define STA_MODIFY_ADDBA_TID_MSK 0x08
435 #define STA_MODIFY_DELBA_TID_MSK 0x10
436 #define BUILD_RAxTID(sta_id, tid) (((sta_id) << 4) + (tid))
440 * bit14:15 01 B inactive, A active
441 * 10 B active, A inactive
444 #define RATE_MCS_ANT_A_POS 14
445 #define RATE_MCS_ANT_B_POS 15
446 #define RATE_MCS_ANT_A_MSK 0x4000
447 #define RATE_MCS_ANT_B_MSK 0x8000
448 #define RATE_MCS_ANT_AB_MSK 0xc000
450 struct iwl3945_keyinfo {
452 u8 tkip_rx_tsc_byte2; /* TSC[2] for key mix ph1 detection */
454 __le16 tkip_rx_ttak[5]; /* 10-byte unicast TKIP TTAK */
456 u8 key[16]; /* 16-byte unicast decryption key */
457 } __attribute__ ((packed));
459 struct sta_id_modify {
465 } __attribute__ ((packed));
468 * REPLY_ADD_STA = 0x18 (command)
470 struct iwl3945_addsta_cmd {
473 struct sta_id_modify sta;
474 struct iwl3945_keyinfo key;
475 __le32 station_flags;
476 __le32 station_flags_msk;
477 __le16 tid_disable_tx;
479 u8 add_immediate_ba_tid;
480 u8 remove_immediate_ba_tid;
481 __le16 add_immediate_ba_ssn;
482 } __attribute__ ((packed));
485 * REPLY_ADD_STA = 0x18 (response)
487 struct iwl3945_add_sta_resp {
489 } __attribute__ ((packed));
491 #define ADD_STA_SUCCESS_MSK 0x1
493 /******************************************************************************
497 *****************************************************************************/
499 struct iwl3945_rx_frame_stats {
507 } __attribute__ ((packed));
509 struct iwl3945_rx_frame_hdr {
516 } __attribute__ ((packed));
518 #define RX_RES_STATUS_NO_CRC32_ERROR __constant_cpu_to_le32(1 << 0)
519 #define RX_RES_STATUS_NO_RXE_OVERFLOW __constant_cpu_to_le32(1 << 1)
521 #define RX_RES_PHY_FLAGS_BAND_24_MSK __constant_cpu_to_le16(1 << 0)
522 #define RX_RES_PHY_FLAGS_MOD_CCK_MSK __constant_cpu_to_le16(1 << 1)
523 #define RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK __constant_cpu_to_le16(1 << 2)
524 #define RX_RES_PHY_FLAGS_NARROW_BAND_MSK __constant_cpu_to_le16(1 << 3)
525 #define RX_RES_PHY_FLAGS_ANTENNA_MSK __constant_cpu_to_le16(0xf0)
527 #define RX_RES_STATUS_SEC_TYPE_MSK (0x7 << 8)
528 #define RX_RES_STATUS_SEC_TYPE_NONE (0x0 << 8)
529 #define RX_RES_STATUS_SEC_TYPE_WEP (0x1 << 8)
530 #define RX_RES_STATUS_SEC_TYPE_CCMP (0x2 << 8)
531 #define RX_RES_STATUS_SEC_TYPE_TKIP (0x3 << 8)
533 #define RX_RES_STATUS_DECRYPT_TYPE_MSK (0x3 << 11)
534 #define RX_RES_STATUS_NOT_DECRYPT (0x0 << 11)
535 #define RX_RES_STATUS_DECRYPT_OK (0x3 << 11)
536 #define RX_RES_STATUS_BAD_ICV_MIC (0x1 << 11)
537 #define RX_RES_STATUS_BAD_KEY_TTAK (0x2 << 11)
539 struct iwl3945_rx_frame_end {
542 __le32 beacon_timestamp;
543 } __attribute__ ((packed));
546 * REPLY_3945_RX = 0x1b (response only, not a command)
548 * NOTE: DO NOT dereference from casts to this structure
549 * It is provided only for calculating minimum data set size.
550 * The actual offsets of the hdr and end are dynamic based on
553 struct iwl3945_rx_frame {
554 struct iwl3945_rx_frame_stats stats;
555 struct iwl3945_rx_frame_hdr hdr;
556 struct iwl3945_rx_frame_end end;
557 } __attribute__ ((packed));
559 /* Fixed (non-configurable) rx data from phy */
560 #define RX_PHY_FLAGS_ANTENNAE_OFFSET (4)
561 #define RX_PHY_FLAGS_ANTENNAE_MASK (0x70)
562 #define IWL_AGC_DB_MASK (0x3f80) /* MASK(7,13) */
563 #define IWL_AGC_DB_POS (7)
564 struct iwl4965_rx_non_cfg_phy {
565 __le16 ant_selection; /* ant A bit 4, ant B bit 5, ant C bit 6 */
566 __le16 agc_info; /* agc code 0:6, agc dB 7:13, reserved 14:15 */
567 u8 rssi_info[6]; /* we use even entries, 0/2/4 for A/B/C rssi */
569 } __attribute__ ((packed));
572 * REPLY_4965_RX = 0xc3 (response only, not a command)
573 * Used only for legacy (non 11n) frames.
575 #define RX_RES_PHY_CNT 14
576 struct iwl4965_rx_phy_res {
577 u8 non_cfg_phy_cnt; /* non configurable DSP phy data byte count */
578 u8 cfg_phy_cnt; /* configurable DSP phy data byte count */
579 u8 stat_id; /* configurable DSP phy data set ID */
581 __le64 timestamp; /* TSF at on air rise */
582 __le32 beacon_time_stamp; /* beacon at on-air rise */
583 __le16 phy_flags; /* general phy flags: band, modulation, ... */
584 __le16 channel; /* channel number */
585 __le16 non_cfg_phy[RX_RES_PHY_CNT]; /* upto 14 phy entries */
588 __le16 byte_count; /* frame's byte-count */
590 } __attribute__ ((packed));
592 struct iwl4965_rx_mpdu_res_start {
595 } __attribute__ ((packed));
598 /******************************************************************************
600 * Tx Commands & Responses:
602 *****************************************************************************/
605 #define TX_CMD_FLG_RTS_MSK __constant_cpu_to_le32(1 << 1)
606 #define TX_CMD_FLG_CTS_MSK __constant_cpu_to_le32(1 << 2)
607 #define TX_CMD_FLG_ACK_MSK __constant_cpu_to_le32(1 << 3)
608 #define TX_CMD_FLG_STA_RATE_MSK __constant_cpu_to_le32(1 << 4)
609 #define TX_CMD_FLG_IMM_BA_RSP_MASK __constant_cpu_to_le32(1 << 6)
610 #define TX_CMD_FLG_FULL_TXOP_PROT_MSK __constant_cpu_to_le32(1 << 7)
611 #define TX_CMD_FLG_ANT_SEL_MSK __constant_cpu_to_le32(0xf00)
612 #define TX_CMD_FLG_ANT_A_MSK __constant_cpu_to_le32(1 << 8)
613 #define TX_CMD_FLG_ANT_B_MSK __constant_cpu_to_le32(1 << 9)
615 /* ucode ignores BT priority for this frame */
616 #define TX_CMD_FLG_BT_DIS_MSK __constant_cpu_to_le32(1 << 12)
618 /* ucode overrides sequence control */
619 #define TX_CMD_FLG_SEQ_CTL_MSK __constant_cpu_to_le32(1 << 13)
621 /* signal that this frame is non-last MPDU */
622 #define TX_CMD_FLG_MORE_FRAG_MSK __constant_cpu_to_le32(1 << 14)
624 /* calculate TSF in outgoing frame */
625 #define TX_CMD_FLG_TSF_MSK __constant_cpu_to_le32(1 << 16)
627 /* activate TX calibration. */
628 #define TX_CMD_FLG_CALIB_MSK __constant_cpu_to_le32(1 << 17)
630 /* signals that 2 bytes pad was inserted
631 after the MAC header */
632 #define TX_CMD_FLG_MH_PAD_MSK __constant_cpu_to_le32(1 << 20)
634 /* HCCA-AP - disable duration overwriting. */
635 #define TX_CMD_FLG_DUR_MSK __constant_cpu_to_le32(1 << 25)
638 * TX command security control
640 #define TX_CMD_SEC_WEP 0x01
641 #define TX_CMD_SEC_CCM 0x02
642 #define TX_CMD_SEC_TKIP 0x03
643 #define TX_CMD_SEC_MSK 0x03
644 #define TX_CMD_SEC_SHIFT 6
645 #define TX_CMD_SEC_KEY128 0x08
648 * TX command Frame life time
651 struct iwl3945_dram_scratch {
655 } __attribute__ ((packed));
658 * REPLY_TX = 0x1c (command)
660 struct iwl3945_tx_cmd {
662 __le16 next_frame_len;
674 __le32 next_frame_info;
680 u8 rts_retry_limit; /*byte 50 */
681 u8 data_retry_limit; /*byte 51 */
683 __le16 pm_frame_timeout;
684 __le16 attempt_duration;
688 struct ieee80211_hdr hdr[0];
689 } __attribute__ ((packed));
691 /* TX command response is sent after *all* transmission attempts.
695 * TX_STATUS_FAIL_NEXT_FRAG
697 * If the fragment flag in the MAC header for the frame being transmitted
698 * is set and there is insufficient time to transmit the next frame, the
699 * TX status will be returned with 'TX_STATUS_FAIL_NEXT_FRAG'.
701 * TX_STATUS_FIFO_UNDERRUN
703 * Indicates the host did not provide bytes to the FIFO fast enough while
704 * a TX was in progress.
706 * TX_STATUS_FAIL_MGMNT_ABORT
708 * This status is only possible if the ABORT ON MGMT RX parameter was
709 * set to true with the TX command.
711 * If the MSB of the status parameter is set then an abort sequence is
712 * required. This sequence consists of the host activating the TX Abort
713 * control line, and then waiting for the TX Abort command response. This
714 * indicates that a the device is no longer in a transmit state, and that the
715 * command FIFO has been cleared. The host must then deactivate the TX Abort
716 * control line. Receiving is still allowed in this case.
719 TX_STATUS_SUCCESS = 0x01,
720 TX_STATUS_DIRECT_DONE = 0x02,
721 TX_STATUS_FAIL_SHORT_LIMIT = 0x82,
722 TX_STATUS_FAIL_LONG_LIMIT = 0x83,
723 TX_STATUS_FAIL_FIFO_UNDERRUN = 0x84,
724 TX_STATUS_FAIL_MGMNT_ABORT = 0x85,
725 TX_STATUS_FAIL_NEXT_FRAG = 0x86,
726 TX_STATUS_FAIL_LIFE_EXPIRE = 0x87,
727 TX_STATUS_FAIL_DEST_PS = 0x88,
728 TX_STATUS_FAIL_ABORTED = 0x89,
729 TX_STATUS_FAIL_BT_RETRY = 0x8a,
730 TX_STATUS_FAIL_STA_INVALID = 0x8b,
731 TX_STATUS_FAIL_FRAG_DROPPED = 0x8c,
732 TX_STATUS_FAIL_TID_DISABLE = 0x8d,
733 TX_STATUS_FAIL_FRAME_FLUSHED = 0x8e,
734 TX_STATUS_FAIL_INSUFFICIENT_CF_POLL = 0x8f,
735 TX_STATUS_FAIL_TX_LOCKED = 0x90,
736 TX_STATUS_FAIL_NO_BEACON_ON_RADAR = 0x91,
739 #define TX_PACKET_MODE_REGULAR 0x0000
740 #define TX_PACKET_MODE_BURST_SEQ 0x0100
741 #define TX_PACKET_MODE_BURST_FIRST 0x0200
744 TX_POWER_PA_NOT_ACTIVE = 0x0,
748 TX_STATUS_MSK = 0x000000ff, /* bits 0:7 */
749 TX_STATUS_DELAY_MSK = 0x00000040,
750 TX_STATUS_ABORT_MSK = 0x00000080,
751 TX_PACKET_MODE_MSK = 0x0000ff00, /* bits 8:15 */
752 TX_FIFO_NUMBER_MSK = 0x00070000, /* bits 16:18 */
753 TX_RESERVED = 0x00780000, /* bits 19:22 */
754 TX_POWER_PA_DETECT_MSK = 0x7f800000, /* bits 23:30 */
755 TX_ABORT_REQUIRED_MSK = 0x80000000, /* bits 31:31 */
758 /* *******************************
759 * TX aggregation state
760 ******************************* */
763 AGG_TX_STATE_TRANSMITTED = 0x00,
764 AGG_TX_STATE_UNDERRUN_MSK = 0x01,
765 AGG_TX_STATE_BT_PRIO_MSK = 0x02,
766 AGG_TX_STATE_FEW_BYTES_MSK = 0x04,
767 AGG_TX_STATE_ABORT_MSK = 0x08,
768 AGG_TX_STATE_LAST_SENT_TTL_MSK = 0x10,
769 AGG_TX_STATE_LAST_SENT_TRY_CNT_MSK = 0x20,
770 AGG_TX_STATE_LAST_SENT_BT_KILL_MSK = 0x40,
771 AGG_TX_STATE_SCD_QUERY_MSK = 0x80,
772 AGG_TX_STATE_TEST_BAD_CRC32_MSK = 0x100,
773 AGG_TX_STATE_RESPONSE_MSK = 0x1ff,
774 AGG_TX_STATE_DUMP_TX_MSK = 0x200,
775 AGG_TX_STATE_DELAY_TX_MSK = 0x400
778 #define AGG_TX_STATE_LAST_SENT_MSK \
779 (AGG_TX_STATE_LAST_SENT_TTL_MSK | \
780 AGG_TX_STATE_LAST_SENT_TRY_CNT_MSK | \
781 AGG_TX_STATE_LAST_SENT_BT_KILL_MSK)
783 #define AGG_TX_STATE_TRY_CNT_POS 12
784 #define AGG_TX_STATE_TRY_CNT_MSK 0xf000
786 #define AGG_TX_STATE_SEQ_NUM_POS 16
787 #define AGG_TX_STATE_SEQ_NUM_MSK 0xffff0000
790 * REPLY_TX = 0x1c (response)
792 struct iwl3945_tx_resp {
797 __le32 wireless_media_time;
798 __le32 status; /* TX status (for aggregation status of 1st frame) */
799 } __attribute__ ((packed));
802 * REPLY_COMPRESSED_BA = 0xc5 (response only, not a command)
804 struct iwl3945_compressed_ba_resp {
805 __le32 sta_addr_lo32;
806 __le16 sta_addr_hi16;
815 } __attribute__ ((packed));
818 * REPLY_TX_PWR_TABLE_CMD = 0x97 (command, has simple generic response)
820 struct iwl3945_txpowertable_cmd {
821 u8 band; /* 0: 5 GHz, 1: 2.4 GHz */
824 struct iwl3945_power_per_rate power[IWL_MAX_RATES];
825 } __attribute__ ((packed));
827 struct iwl3945_rate_scaling_info {
831 } __attribute__ ((packed));
834 * struct iwl3945_rate_scaling_cmd - Rate Scaling Command & Response
836 * REPLY_RATE_SCALE = 0x47 (command, has simple generic response)
838 * NOTE: The table of rates passed to the uCode via the
839 * RATE_SCALE command sets up the corresponding order of
840 * rates used for all related commands, including rate
843 * For example, if you set 9MB (PLCP 0x0f) as the first
844 * rate in the rate table, the bit mask for that rate
845 * when passed through ofdm_basic_rates on the REPLY_RXON
846 * command would be bit 0 (1<<0)
848 struct iwl3945_rate_scaling_cmd {
851 struct iwl3945_rate_scaling_info table[IWL_MAX_RATES];
852 } __attribute__ ((packed));
855 * REPLY_BT_CONFIG = 0x9b (command, has simple generic response)
857 struct iwl3945_bt_cmd {
862 __le32 kill_ack_mask;
863 __le32 kill_cts_mask;
864 } __attribute__ ((packed));
866 /******************************************************************************
868 * Spectrum Management (802.11h) Commands, Responses, Notifications:
870 *****************************************************************************/
873 * Spectrum Management
875 #define MEASUREMENT_FILTER_FLAG (RXON_FILTER_PROMISC_MSK | \
876 RXON_FILTER_CTL2HOST_MSK | \
877 RXON_FILTER_ACCEPT_GRP_MSK | \
878 RXON_FILTER_DIS_DECRYPT_MSK | \
879 RXON_FILTER_DIS_GRP_DECRYPT_MSK | \
880 RXON_FILTER_ASSOC_MSK | \
881 RXON_FILTER_BCON_AWARE_MSK)
883 struct iwl3945_measure_channel {
884 __le32 duration; /* measurement duration in extended beacon
886 u8 channel; /* channel to measure */
887 u8 type; /* see enum iwl3945_measure_type */
889 } __attribute__ ((packed));
892 * REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74 (command)
894 struct iwl3945_spectrum_cmd {
895 __le16 len; /* number of bytes starting from token */
896 u8 token; /* token id */
897 u8 id; /* measurement id -- 0 or 1 */
898 u8 origin; /* 0 = TGh, 1 = other, 2 = TGk */
899 u8 periodic; /* 1 = periodic */
900 __le16 path_loss_timeout;
901 __le32 start_time; /* start time in extended beacon format */
903 __le32 flags; /* rxon flags */
904 __le32 filter_flags; /* rxon filter flags */
905 __le16 channel_count; /* minimum 1, maximum 10 */
907 struct iwl3945_measure_channel channels[10];
908 } __attribute__ ((packed));
911 * REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74 (response)
913 struct iwl3945_spectrum_resp {
915 u8 id; /* id of the prior command replaced, or 0xff */
916 __le16 status; /* 0 - command will be handled
917 * 1 - cannot handle (conflicts with another
919 } __attribute__ ((packed));
921 enum iwl3945_measurement_state {
922 IWL_MEASUREMENT_START = 0,
923 IWL_MEASUREMENT_STOP = 1,
926 enum iwl3945_measurement_status {
927 IWL_MEASUREMENT_OK = 0,
928 IWL_MEASUREMENT_CONCURRENT = 1,
929 IWL_MEASUREMENT_CSA_CONFLICT = 2,
930 IWL_MEASUREMENT_TGH_CONFLICT = 3,
932 IWL_MEASUREMENT_STOPPED = 6,
933 IWL_MEASUREMENT_TIMEOUT = 7,
934 IWL_MEASUREMENT_PERIODIC_FAILED = 8,
937 #define NUM_ELEMENTS_IN_HISTOGRAM 8
939 struct iwl3945_measurement_histogram {
940 __le32 ofdm[NUM_ELEMENTS_IN_HISTOGRAM]; /* in 0.8usec counts */
941 __le32 cck[NUM_ELEMENTS_IN_HISTOGRAM]; /* in 1usec counts */
942 } __attribute__ ((packed));
944 /* clear channel availability counters */
945 struct iwl3945_measurement_cca_counters {
948 } __attribute__ ((packed));
950 enum iwl3945_measure_type {
951 IWL_MEASURE_BASIC = (1 << 0),
952 IWL_MEASURE_CHANNEL_LOAD = (1 << 1),
953 IWL_MEASURE_HISTOGRAM_RPI = (1 << 2),
954 IWL_MEASURE_HISTOGRAM_NOISE = (1 << 3),
955 IWL_MEASURE_FRAME = (1 << 4),
956 /* bits 5:6 are reserved */
957 IWL_MEASURE_IDLE = (1 << 7),
961 * SPECTRUM_MEASURE_NOTIFICATION = 0x75 (notification only, not a command)
963 struct iwl3945_spectrum_notification {
964 u8 id; /* measurement id -- 0 or 1 */
966 u8 channel_index; /* index in measurement channel list */
967 u8 state; /* 0 - start, 1 - stop */
968 __le32 start_time; /* lower 32-bits of TSF */
969 u8 band; /* 0 - 5.2GHz, 1 - 2.4GHz */
971 u8 type; /* see enum iwl3945_measurement_type */
973 /* NOTE: cca_ofdm, cca_cck, basic_type, and histogram are only only
974 * valid if applicable for measurement type requested. */
975 __le32 cca_ofdm; /* cca fraction time in 40Mhz clock periods */
976 __le32 cca_cck; /* cca fraction time in 44Mhz clock periods */
977 __le32 cca_time; /* channel load time in usecs */
978 u8 basic_type; /* 0 - bss, 1 - ofdm preamble, 2 -
981 struct iwl3945_measurement_histogram histogram;
982 __le32 stop_time; /* lower 32-bits of TSF */
983 __le32 status; /* see iwl3945_measurement_status */
984 } __attribute__ ((packed));
986 /******************************************************************************
988 * Power Management Commands, Responses, Notifications:
990 *****************************************************************************/
993 * struct iwl3945_powertable_cmd - Power Table Command
996 * POWER_TABLE_CMD = 0x77 (command, has simple generic response)
999 * bit 0 - '0' Driver not allow power management
1000 * '1' Driver allow PM (use rest of parameters)
1001 * uCode send sleep notifications:
1002 * bit 1 - '0' Don't send sleep notification
1003 * '1' send sleep notification (SEND_PM_NOTIFICATION)
1005 * bit 2 - '0' PM have to walk up every DTIM
1006 * '1' PM could sleep over DTIM till listen Interval.
1008 * bit 3 - '0' (PCI_LINK_CTRL & 0x1)
1009 * '1' !(PCI_LINK_CTRL & 0x1)
1011 * bit 31/30- '00' use both mac/xtal sleeps
1012 * '01' force Mac sleep
1013 * '10' force xtal sleep
1016 * NOTE: if sleep_interval[SLEEP_INTRVL_TABLE_SIZE-1] > DTIM period then
1017 * ucode assume sleep over DTIM is allowed and we don't need to wakeup
1020 #define IWL_POWER_VEC_SIZE 5
1022 #define IWL_POWER_DRIVER_ALLOW_SLEEP_MSK __constant_cpu_to_le32(1<<0)
1023 #define IWL_POWER_SLEEP_OVER_DTIM_MSK __constant_cpu_to_le32(1<<2)
1024 #define IWL_POWER_PCI_PM_MSK __constant_cpu_to_le32(1<<3)
1025 struct iwl3945_powertable_cmd {
1027 __le32 rx_data_timeout;
1028 __le32 tx_data_timeout;
1029 __le32 sleep_interval[IWL_POWER_VEC_SIZE];
1030 } __attribute__((packed));
1033 * PM_SLEEP_NOTIFICATION = 0x7A (notification only, not a command)
1034 * 3945 and 4965 identical.
1036 struct iwl3945_sleep_notification {
1043 } __attribute__ ((packed));
1045 /* Sleep states. 3945 and 4965 identical. */
1047 IWL_PM_NO_SLEEP = 0,
1049 IWL_PM_SLP_FULL_MAC_UNASSOCIATE = 2,
1050 IWL_PM_SLP_FULL_MAC_CARD_STATE = 3,
1052 IWL_PM_SLP_REPENT = 5,
1053 IWL_PM_WAKEUP_BY_TIMER = 6,
1054 IWL_PM_WAKEUP_BY_DRIVER = 7,
1055 IWL_PM_WAKEUP_BY_RFKILL = 8,
1057 IWL_PM_NUM_OF_MODES = 12,
1061 * REPLY_CARD_STATE_CMD = 0xa0 (command, has simple generic response)
1063 #define CARD_STATE_CMD_DISABLE 0x00 /* Put card to sleep */
1064 #define CARD_STATE_CMD_ENABLE 0x01 /* Wake up card */
1065 #define CARD_STATE_CMD_HALT 0x02 /* Power down permanently */
1066 struct iwl3945_card_state_cmd {
1067 __le32 status; /* CARD_STATE_CMD_* request new power state */
1068 } __attribute__ ((packed));
1071 * CARD_STATE_NOTIFICATION = 0xa1 (notification only, not a command)
1073 struct iwl3945_card_state_notif {
1075 } __attribute__ ((packed));
1077 #define HW_CARD_DISABLED 0x01
1078 #define SW_CARD_DISABLED 0x02
1079 #define RF_CARD_DISABLED 0x04
1080 #define RXON_CARD_DISABLED 0x10
1082 struct iwl3945_ct_kill_config {
1084 __le32 critical_temperature_M;
1085 __le32 critical_temperature_R;
1086 } __attribute__ ((packed));
1088 /******************************************************************************
1090 * Scan Commands, Responses, Notifications:
1092 *****************************************************************************/
1094 struct iwl3945_scan_channel {
1095 /* type is defined as:
1096 * 0:0 active (0 - passive)
1098 * If 1 is set then corresponding SSID IE is transmitted in probe
1103 struct iwl3945_tx_power tpc;
1104 __le16 active_dwell;
1105 __le16 passive_dwell;
1106 } __attribute__ ((packed));
1108 struct iwl3945_ssid_ie {
1112 } __attribute__ ((packed));
1114 #define PROBE_OPTION_MAX 0x4
1115 #define TX_CMD_LIFE_TIME_INFINITE __constant_cpu_to_le32(0xFFFFFFFF)
1116 #define IWL_GOOD_CRC_TH __constant_cpu_to_le16(1)
1117 #define IWL_MAX_SCAN_SIZE 1024
1120 * REPLY_SCAN_CMD = 0x80 (command)
1122 struct iwl3945_scan_cmd {
1126 __le16 quiet_time; /* dwell only this long on quiet chnl
1128 __le16 quiet_plcp_th; /* quiet chnl is < this # pkts (typ. 1) */
1129 __le16 good_CRC_th; /* passive -> active promotion threshold */
1131 __le32 max_out_time; /* max usec to be out of associated (service)
1133 __le32 suspend_time; /* pause scan this long when returning to svc
1135 * 3945 -- 31:24 # beacons, 19:0 additional usec,
1136 * 4965 -- 31:22 # beacons, 21:0 additional usec.
1139 __le32 filter_flags;
1141 struct iwl3945_tx_cmd tx_cmd;
1142 struct iwl3945_ssid_ie direct_scan[PROBE_OPTION_MAX];
1146 * The channels start after the probe request payload and are of type:
1148 * struct iwl3945_scan_channel channels[0];
1150 * NOTE: Only one band of channels can be scanned per pass. You
1151 * can not mix 2.4GHz channels and 5.2GHz channels and must
1152 * request a scan multiple times (not concurrently)
1155 } __attribute__ ((packed));
1157 /* Can abort will notify by complete notification with abort status. */
1158 #define CAN_ABORT_STATUS __constant_cpu_to_le32(0x1)
1159 /* complete notification statuses */
1160 #define ABORT_STATUS 0x2
1163 * REPLY_SCAN_CMD = 0x80 (response)
1165 struct iwl3945_scanreq_notification {
1166 __le32 status; /* 1: okay, 2: cannot fulfill request */
1167 } __attribute__ ((packed));
1170 * SCAN_START_NOTIFICATION = 0x82 (notification only, not a command)
1172 struct iwl3945_scanstart_notification {
1175 __le32 beacon_timer;
1180 } __attribute__ ((packed));
1182 #define SCAN_OWNER_STATUS 0x1;
1183 #define MEASURE_OWNER_STATUS 0x2;
1185 #define NUMBER_OF_STATISTICS 1 /* first __le32 is good CRC */
1187 * SCAN_RESULTS_NOTIFICATION = 0x83 (notification only, not a command)
1189 struct iwl3945_scanresults_notification {
1195 __le32 statistics[NUMBER_OF_STATISTICS];
1196 } __attribute__ ((packed));
1199 * SCAN_COMPLETE_NOTIFICATION = 0x84 (notification only, not a command)
1201 struct iwl3945_scancomplete_notification {
1202 u8 scanned_channels;
1208 } __attribute__ ((packed));
1211 /******************************************************************************
1213 * IBSS/AP Commands and Notifications:
1215 *****************************************************************************/
1218 * BEACON_NOTIFICATION = 0x90 (notification only, not a command)
1220 struct iwl3945_beacon_notif {
1221 struct iwl3945_tx_resp beacon_notify_hdr;
1224 __le32 ibss_mgr_status;
1225 } __attribute__ ((packed));
1228 * REPLY_TX_BEACON = 0x91 (command, has simple generic response)
1230 struct iwl3945_tx_beacon_cmd {
1231 struct iwl3945_tx_cmd tx;
1235 struct ieee80211_hdr frame[0]; /* beacon frame */
1236 } __attribute__ ((packed));
1238 /******************************************************************************
1240 * Statistics Commands and Notifications:
1242 *****************************************************************************/
1244 #define IWL_TEMP_CONVERT 260
1246 #define SUP_RATE_11A_MAX_NUM_CHANNELS 8
1247 #define SUP_RATE_11B_MAX_NUM_CHANNELS 4
1248 #define SUP_RATE_11G_MAX_NUM_CHANNELS 12
1250 /* Used for passing to driver number of successes and failures per rate */
1251 struct rate_histogram {
1253 __le32 a[SUP_RATE_11A_MAX_NUM_CHANNELS];
1254 __le32 b[SUP_RATE_11B_MAX_NUM_CHANNELS];
1255 __le32 g[SUP_RATE_11G_MAX_NUM_CHANNELS];
1258 __le32 a[SUP_RATE_11A_MAX_NUM_CHANNELS];
1259 __le32 b[SUP_RATE_11B_MAX_NUM_CHANNELS];
1260 __le32 g[SUP_RATE_11G_MAX_NUM_CHANNELS];
1262 } __attribute__ ((packed));
1264 /* statistics command response */
1266 struct statistics_rx_phy {
1272 __le32 early_overrun_err;
1274 __le32 false_alarm_cnt;
1275 __le32 fina_sync_err_cnt;
1277 __le32 fina_timeout;
1278 __le32 unresponded_rts;
1279 __le32 rxe_frame_limit_overrun;
1280 __le32 sent_ack_cnt;
1281 __le32 sent_cts_cnt;
1282 } __attribute__ ((packed));
1284 struct statistics_rx_non_phy {
1285 __le32 bogus_cts; /* CTS received when not expecting CTS */
1286 __le32 bogus_ack; /* ACK received when not expecting ACK */
1287 __le32 non_bssid_frames; /* number of frames with BSSID that
1288 * doesn't belong to the STA BSSID */
1289 __le32 filtered_frames; /* count frames that were dumped in the
1290 * filtering process */
1291 __le32 non_channel_beacons; /* beacons with our bss id but not on
1292 * our serving channel */
1293 } __attribute__ ((packed));
1295 struct statistics_rx {
1296 struct statistics_rx_phy ofdm;
1297 struct statistics_rx_phy cck;
1298 struct statistics_rx_non_phy general;
1299 } __attribute__ ((packed));
1301 struct statistics_tx {
1302 __le32 preamble_cnt;
1303 __le32 rx_detected_cnt;
1304 __le32 bt_prio_defer_cnt;
1305 __le32 bt_prio_kill_cnt;
1306 __le32 few_bytes_cnt;
1309 __le32 expected_ack_cnt;
1310 __le32 actual_ack_cnt;
1311 } __attribute__ ((packed));
1313 struct statistics_dbg {
1317 } __attribute__ ((packed));
1319 struct statistics_div {
1324 } __attribute__ ((packed));
1326 struct statistics_general {
1328 struct statistics_dbg dbg;
1332 __le32 ttl_timestamp;
1333 struct statistics_div div;
1334 } __attribute__ ((packed));
1337 * REPLY_STATISTICS_CMD = 0x9c,
1338 * 3945 and 4965 identical.
1340 * This command triggers an immediate response containing uCode statistics.
1341 * The response is in the same format as STATISTICS_NOTIFICATION 0x9d, below.
1343 * If the CLEAR_STATS configuration flag is set, uCode will clear its
1344 * internal copy of the statistics (counters) after issuing the response.
1345 * This flag does not affect STATISTICS_NOTIFICATIONs after beacons (see below).
1347 * If the DISABLE_NOTIF configuration flag is set, uCode will not issue
1348 * STATISTICS_NOTIFICATIONs after received beacons (see below). This flag
1349 * does not affect the response to the REPLY_STATISTICS_CMD 0x9c itself.
1351 #define IWL_STATS_CONF_CLEAR_STATS __constant_cpu_to_le32(0x1) /* see above */
1352 #define IWL_STATS_CONF_DISABLE_NOTIF __constant_cpu_to_le32(0x2)/* see above */
1353 struct iwl3945_statistics_cmd {
1354 __le32 configuration_flags; /* IWL_STATS_CONF_* */
1355 } __attribute__ ((packed));
1358 * STATISTICS_NOTIFICATION = 0x9d (notification only, not a command)
1360 * By default, uCode issues this notification after receiving a beacon
1361 * while associated. To disable this behavior, set DISABLE_NOTIF flag in the
1362 * REPLY_STATISTICS_CMD 0x9c, above.
1364 * Statistics counters continue to increment beacon after beacon, but are
1365 * cleared when changing channels or when driver issues REPLY_STATISTICS_CMD
1366 * 0x9c with CLEAR_STATS bit set (see above).
1368 * uCode also issues this notification during scans. uCode clears statistics
1369 * appropriately so that each notification contains statistics for only the
1370 * one channel that has just been scanned.
1372 #define STATISTICS_REPLY_FLG_BAND_24G_MSK __constant_cpu_to_le32(0x2)
1373 #define STATISTICS_REPLY_FLG_FAT_MODE_MSK __constant_cpu_to_le32(0x8)
1374 struct iwl3945_notif_statistics {
1376 struct statistics_rx rx;
1377 struct statistics_tx tx;
1378 struct statistics_general general;
1379 } __attribute__ ((packed));
1383 * MISSED_BEACONS_NOTIFICATION = 0xa2 (notification only, not a command)
1385 /* if ucode missed CONSECUTIVE_MISSED_BCONS_TH beacons in a row,
1386 * then this notification will be sent. */
1387 #define CONSECUTIVE_MISSED_BCONS_TH 20
1389 struct iwl3945_missed_beacon_notif {
1390 __le32 consequtive_missed_beacons;
1391 __le32 total_missed_becons;
1392 __le32 num_expected_beacons;
1393 __le32 num_recvd_beacons;
1394 } __attribute__ ((packed));
1396 /******************************************************************************
1398 * Rx Calibration Commands:
1400 *****************************************************************************/
1402 #define PHY_CALIBRATE_DIFF_GAIN_CMD (7)
1403 #define HD_TABLE_SIZE (11)
1405 struct iwl3945_sensitivity_cmd {
1407 __le16 table[HD_TABLE_SIZE];
1408 } __attribute__ ((packed));
1410 struct iwl3945_calibration_cmd {
1418 } __attribute__ ((packed));
1420 /******************************************************************************
1422 * Miscellaneous Commands:
1424 *****************************************************************************/
1427 * LEDs Command & Response
1428 * REPLY_LEDS_CMD = 0x48 (command, has simple generic response)
1430 * For each of 3 possible LEDs (Activity/Link/Tech, selected by "id" field),
1431 * this command turns it on or off, or sets up a periodic blinking cycle.
1433 struct iwl3945_led_cmd {
1434 __le32 interval; /* "interval" in uSec */
1435 u8 id; /* 1: Activity, 2: Link, 3: Tech */
1436 u8 off; /* # intervals off while blinking;
1437 * "0", with >0 "on" value, turns LED on */
1438 u8 on; /* # intervals on while blinking;
1439 * "0", regardless of "off", turns LED off */
1441 } __attribute__ ((packed));
1443 /******************************************************************************
1445 * Union of all expected notifications/responses:
1447 *****************************************************************************/
1449 struct iwl3945_rx_packet {
1451 struct iwl3945_cmd_header hdr;
1453 struct iwl3945_alive_resp alive_frame;
1454 struct iwl3945_rx_frame rx_frame;
1455 struct iwl3945_tx_resp tx_resp;
1456 struct iwl3945_spectrum_notification spectrum_notif;
1457 struct iwl3945_csa_notification csa_notif;
1458 struct iwl3945_error_resp err_resp;
1459 struct iwl3945_card_state_notif card_state_notif;
1460 struct iwl3945_beacon_notif beacon_status;
1461 struct iwl3945_add_sta_resp add_sta;
1462 struct iwl3945_sleep_notification sleep_notif;
1463 struct iwl3945_spectrum_resp spectrum;
1464 struct iwl3945_notif_statistics stats;
1468 } __attribute__ ((packed));
1470 #define IWL_RX_FRAME_SIZE (4 + sizeof(struct iwl3945_rx_frame))
1472 #endif /* __iwl3945_3945_commands_h__ */