]> err.no Git - linux-2.6/blobdiff - drivers/net/wireless/iwlwifi/iwl-3945-commands.h
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
[linux-2.6] / drivers / net / wireless / iwlwifi / iwl-3945-commands.h
index 0c80ed5d7ea6d017868bdd47f96947132ee67faa..817ece7736434f9645749c2e12940aca11f1106a 100644 (file)
@@ -5,7 +5,7 @@
  *
  * GPL LICENSE SUMMARY
  *
- * Copyright(c) 2005 - 2007 Intel Corporation. All rights reserved.
+ * Copyright(c) 2005 - 2008 Intel Corporation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -30,7 +30,7 @@
  *
  * BSD LICENSE
  *
- * Copyright(c) 2005 - 2007 Intel Corporation. All rights reserved.
+ * Copyright(c) 2005 - 2008 Intel Corporation. All rights reserved.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -508,21 +508,27 @@ struct iwl3945_qosparam_cmd {
 #define        IWL_STATION_COUNT       32      /* MAX(3945,4965)*/
 #define        IWL_INVALID_STATION     255
 
-#define STA_FLG_TX_RATE_MSK            __constant_cpu_to_le32(1<<2);
-#define STA_FLG_PWR_SAVE_MSK           __constant_cpu_to_le32(1<<8);
+#define STA_FLG_TX_RATE_MSK            __constant_cpu_to_le32(1 << 2);
+#define STA_FLG_PWR_SAVE_MSK           __constant_cpu_to_le32(1 << 8);
 
 /* Use in mode field.  1: modify existing entry, 0: add new station entry */
 #define STA_CONTROL_MODIFY_MSK         0x01
 
 /* key flags __le16*/
-#define STA_KEY_FLG_ENCRYPT_MSK        __constant_cpu_to_le16(0x7)
-#define STA_KEY_FLG_NO_ENC     __constant_cpu_to_le16(0x0)
-#define STA_KEY_FLG_WEP                __constant_cpu_to_le16(0x1)
-#define STA_KEY_FLG_CCMP       __constant_cpu_to_le16(0x2)
-#define STA_KEY_FLG_TKIP       __constant_cpu_to_le16(0x3)
+#define STA_KEY_FLG_ENCRYPT_MSK        __constant_cpu_to_le16(0x0007)
+#define STA_KEY_FLG_NO_ENC     __constant_cpu_to_le16(0x0000)
+#define STA_KEY_FLG_WEP                __constant_cpu_to_le16(0x0001)
+#define STA_KEY_FLG_CCMP       __constant_cpu_to_le16(0x0002)
+#define STA_KEY_FLG_TKIP       __constant_cpu_to_le16(0x0003)
 
 #define STA_KEY_FLG_KEYID_POS  8
 #define STA_KEY_FLG_INVALID    __constant_cpu_to_le16(0x0800)
+/* wep key is either from global key (0) or from station info array (1) */
+#define STA_KEY_FLG_WEP_KEY_MAP_MSK  __constant_cpu_to_le16(0x0008)
+
+/* wep key in STA: 5-bytes (0) or 13-bytes (1) */
+#define STA_KEY_FLG_KEY_SIZE_MSK     __constant_cpu_to_le16(0x1000)
+#define STA_KEY_MULTICAST_MSK        __constant_cpu_to_le16(0x4000)
 
 /* Flags indicate whether to modify vs. don't change various station params */
 #define        STA_MODIFY_KEY_MASK             0x01
@@ -546,7 +552,8 @@ struct iwl3945_keyinfo {
        u8 tkip_rx_tsc_byte2;   /* TSC[2] for key mix ph1 detection */
        u8 reserved1;
        __le16 tkip_rx_ttak[5]; /* 10-byte unicast TKIP TTAK */
-       __le16 reserved2;
+       u8 key_offset;
+       u8 reserved2;
        u8 key[16];             /* 16-byte unicast decryption key */
 } __attribute__ ((packed));
 
@@ -659,26 +666,26 @@ struct iwl3945_rx_frame_hdr {
        u8 payload[0];
 } __attribute__ ((packed));
 
-#define        RX_RES_STATUS_NO_CRC32_ERROR    __constant_cpu_to_le32(1 << 0)
-#define        RX_RES_STATUS_NO_RXE_OVERFLOW   __constant_cpu_to_le32(1 << 1)
+#define RX_RES_STATUS_NO_CRC32_ERROR   __constant_cpu_to_le32(1 << 0)
+#define RX_RES_STATUS_NO_RXE_OVERFLOW  __constant_cpu_to_le32(1 << 1)
 
-#define        RX_RES_PHY_FLAGS_BAND_24_MSK    __constant_cpu_to_le16(1 << 0)
-#define        RX_RES_PHY_FLAGS_MOD_CCK_MSK            __constant_cpu_to_le16(1 << 1)
-#define        RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK     __constant_cpu_to_le16(1 << 2)
-#define        RX_RES_PHY_FLAGS_NARROW_BAND_MSK        __constant_cpu_to_le16(1 << 3)
-#define        RX_RES_PHY_FLAGS_ANTENNA_MSK            __constant_cpu_to_le16(0xf0)
+#define RX_RES_PHY_FLAGS_BAND_24_MSK   __constant_cpu_to_le16(1 << 0)
+#define RX_RES_PHY_FLAGS_MOD_CCK_MSK           __constant_cpu_to_le16(1 << 1)
+#define RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK    __constant_cpu_to_le16(1 << 2)
+#define RX_RES_PHY_FLAGS_NARROW_BAND_MSK       __constant_cpu_to_le16(1 << 3)
+#define RX_RES_PHY_FLAGS_ANTENNA_MSK           __constant_cpu_to_le16(0xf0)
 
-#define        RX_RES_STATUS_SEC_TYPE_MSK      (0x7 << 8)
-#define        RX_RES_STATUS_SEC_TYPE_NONE     (0x0 << 8)
-#define        RX_RES_STATUS_SEC_TYPE_WEP      (0x1 << 8)
-#define        RX_RES_STATUS_SEC_TYPE_CCMP     (0x2 << 8)
-#define        RX_RES_STATUS_SEC_TYPE_TKIP     (0x3 << 8)
+#define RX_RES_STATUS_SEC_TYPE_MSK     (0x7 << 8)
+#define RX_RES_STATUS_SEC_TYPE_NONE    (0x0 << 8)
+#define RX_RES_STATUS_SEC_TYPE_WEP     (0x1 << 8)
+#define RX_RES_STATUS_SEC_TYPE_CCMP    (0x2 << 8)
+#define RX_RES_STATUS_SEC_TYPE_TKIP    (0x3 << 8)
 
-#define        RX_RES_STATUS_DECRYPT_TYPE_MSK  (0x3 << 11)
-#define        RX_RES_STATUS_NOT_DECRYPT       (0x0 << 11)
-#define        RX_RES_STATUS_DECRYPT_OK        (0x3 << 11)
-#define        RX_RES_STATUS_BAD_ICV_MIC       (0x1 << 11)
-#define        RX_RES_STATUS_BAD_KEY_TTAK      (0x2 << 11)
+#define RX_RES_STATUS_DECRYPT_TYPE_MSK (0x3 << 11)
+#define RX_RES_STATUS_NOT_DECRYPT      (0x0 << 11)
+#define RX_RES_STATUS_DECRYPT_OK       (0x3 << 11)
+#define RX_RES_STATUS_BAD_ICV_MIC      (0x1 << 11)
+#define RX_RES_STATUS_BAD_KEY_TTAK     (0x2 << 11)
 
 struct iwl3945_rx_frame_end {
        __le32 status;
@@ -700,45 +707,6 @@ struct iwl3945_rx_frame {
        struct iwl3945_rx_frame_end end;
 } __attribute__ ((packed));
 
-/* Fixed (non-configurable) rx data from phy */
-#define RX_PHY_FLAGS_ANTENNAE_OFFSET           (4)
-#define RX_PHY_FLAGS_ANTENNAE_MASK             (0x70)
-#define IWL_AGC_DB_MASK        (0x3f80)        /* MASK(7,13) */
-#define IWL_AGC_DB_POS         (7)
-struct iwl4965_rx_non_cfg_phy {
-       __le16 ant_selection;   /* ant A bit 4, ant B bit 5, ant C bit 6 */
-       __le16 agc_info;        /* agc code 0:6, agc dB 7:13, reserved 14:15 */
-       u8 rssi_info[6];        /* we use even entries, 0/2/4 for A/B/C rssi */
-       u8 pad[0];
-} __attribute__ ((packed));
-
-/*
- * REPLY_4965_RX = 0xc3 (response only, not a command)
- * Used only for legacy (non 11n) frames.
- */
-#define RX_RES_PHY_CNT 14
-struct iwl4965_rx_phy_res {
-       u8 non_cfg_phy_cnt;     /* non configurable DSP phy data byte count */
-       u8 cfg_phy_cnt;         /* configurable DSP phy data byte count */
-       u8 stat_id;             /* configurable DSP phy data set ID */
-       u8 reserved1;
-       __le64 timestamp;       /* TSF at on air rise */
-       __le32 beacon_time_stamp; /* beacon at on-air rise */
-       __le16 phy_flags;       /* general phy flags: band, modulation, ... */
-       __le16 channel;         /* channel number */
-       __le16 non_cfg_phy[RX_RES_PHY_CNT];     /* upto 14 phy entries */
-       __le32 reserved2;
-       __le32 rate_n_flags;
-       __le16 byte_count;              /* frame's byte-count */
-       __le16 reserved3;
-} __attribute__ ((packed));
-
-struct iwl4965_rx_mpdu_res_start {
-       __le16 byte_count;
-       __le16 reserved;
-} __attribute__ ((packed));
-
-
 /******************************************************************************
  * (5)
  * Tx Commands & Responses:
@@ -1010,7 +978,7 @@ struct iwl3945_rate_scaling_info {
  * For example, if you set 9MB (PLCP 0x0f) as the first
  * rate in the rate table, the bit mask for that rate
  * when passed through ofdm_basic_rates on the REPLY_RXON
- * command would be bit 0 (1<<0)
+ * command would be bit 0 (1 << 0)
  */
 struct iwl3945_rate_scaling_cmd {
        u8 table_id;
@@ -1190,9 +1158,9 @@ struct iwl3945_spectrum_notification {
  */
 #define IWL_POWER_VEC_SIZE 5
 
-#define IWL_POWER_DRIVER_ALLOW_SLEEP_MSK       __constant_cpu_to_le32(1<<0)
-#define IWL_POWER_SLEEP_OVER_DTIM_MSK          __constant_cpu_to_le32(1<<2)
-#define IWL_POWER_PCI_PM_MSK                   __constant_cpu_to_le32(1<<3)
+#define IWL_POWER_DRIVER_ALLOW_SLEEP_MSK       __constant_cpu_to_le32(1 << 0)
+#define IWL_POWER_SLEEP_OVER_DTIM_MSK          __constant_cpu_to_le32(1 << 2)
+#define IWL_POWER_PCI_PM_MSK                   __constant_cpu_to_le32(1 << 3)
 struct iwl3945_powertable_cmd {
        __le32 flags;
        __le32 rx_data_timeout;