]> err.no Git - linux-2.6/blobdiff - drivers/net/wireless/iwlwifi/iwl-3945.h
iwlwifi: 802.11n new framework structures preperation
[linux-2.6] / drivers / net / wireless / iwlwifi / iwl-3945.h
index 02040ef10da03d8dc936ffb68fc71ac35c6290dd..263b0b71c0c3c743748e8a320c1f49eacac2e0b7 100644 (file)
  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  *
  *****************************************************************************/
+/*
+ * Please use this file (iwl-3945.h) for driver implementation definitions.
+ * Please use iwl-3945-commands.h for uCode API definitions.
+ * Please use iwl-3945-hw.h for hardware-related definitions.
+ */
 
 #ifndef __iwl_3945_h__
 #define __iwl_3945_h__
@@ -31,8 +36,6 @@
 #include <linux/kernel.h>
 #include <net/ieee80211_radiotap.h>
 
-struct iwl3945_priv;
-
 /* Hardware specific file defines the PCI IDs table for that hardware module */
 extern struct pci_device_id iwl3945_hw_card_ids[];
 
@@ -130,6 +133,7 @@ struct iwl3945_queue {
 
 #define MAX_NUM_OF_TBS          (20)
 
+/* One for each TFD */
 struct iwl3945_tx_info {
        struct ieee80211_tx_status status;
        struct sk_buff *skb[MAX_NUM_OF_TBS];
@@ -137,10 +141,15 @@ struct iwl3945_tx_info {
 
 /**
  * struct iwl3945_tx_queue - Tx Queue for DMA
- * @need_update: need to update read/write index
- * @shed_retry: queue is HT AGG enabled
+ * @q: generic Rx/Tx queue descriptor
+ * @bd: base of circular buffer of TFDs
+ * @cmd: array of command/Tx buffers
+ * @dma_addr_cmd: physical address of cmd/tx buffer array
+ * @txb: array of per-TFD driver data
+ * @need_update: indicates need to update read/write index
  *
- * Queue consists of circular buffer of BD's and required locking structures.
+ * A Tx queue consists of circular buffer of BDs (a.k.a. TFDs, transmit frame
+ * descriptors) and required locking structures.
  */
 struct iwl3945_tx_queue {
        struct iwl3945_queue q;
@@ -149,7 +158,6 @@ struct iwl3945_tx_queue {
        dma_addr_t dma_addr_cmd;
        struct iwl3945_tx_info *txb;
        int need_update;
-       int sched_retry;
        int active;
 };
 
@@ -186,14 +194,6 @@ struct iwl3945_scan_power_info {
        s8 requested_power;     /* scan pwr (dBm) requested for chnl/rate */
 };
 
-/* Channel unlock period is 15 seconds. If no beacon or probe response
- * has been received within 15 seconds on a locked channel then the channel
- * remains locked. */
-#define TX_UNLOCK_PERIOD 15
-
-/* CSA lock period is 15 seconds.  If a CSA has been received on a channel in
- * the last 15 seconds, the channel is locked */
-#define CSA_LOCK_PERIOD 15
 /*
  * One for each channel, holds all channel setup data
  * Some of the fields (e.g. eeprom and flags/max_power_avg) are redundant
@@ -325,6 +325,13 @@ struct iwl3945_cmd_meta {
 
 } __attribute__ ((packed));
 
+/**
+ * struct iwl3945_cmd
+ *
+ * For allocation of the command and tx queues, this establishes the overall
+ * size of the largest command we send to uCode, except for a scan command
+ * (which is relatively huge; space is allocated separately).
+ */
 struct iwl3945_cmd {
        struct iwl3945_cmd_meta meta;
        struct iwl3945_cmd_header hdr;
@@ -522,6 +529,19 @@ struct iwl3945_ibss_seq {
        struct list_head list;
 };
 
+/**
+ * struct iwl4965_driver_hw_info
+ * @max_txq_num: Max # Tx queues supported
+ * @ac_queue_count: # Tx queues for EDCA Access Categories (AC)
+ * @tx_cmd_len: Size of Tx command (but not including frame itself)
+ * @max_rxq_size: Max # Rx frames in Rx queue (must be power-of-2)
+ * @rx_buffer_size:
+ * @max_rxq_log: Log-base-2 of max_rxq_size
+ * @max_stations:
+ * @bcast_sta_id:
+ * @shared_virt: Pointer to driver/uCode shared Tx Byte Counts and Rx status
+ * @shared_phys: Physical Pointer to Tx Byte Counts and Rx status
+ */
 struct iwl3945_driver_hw_info {
        u16 max_txq_num;
        u16 ac_queue_count;
@@ -535,19 +555,6 @@ struct iwl3945_driver_hw_info {
        dma_addr_t shared_phys;
 };
 
-
-#define STA_FLG_RTS_MIMO_PROT_MSK      __constant_cpu_to_le32(1 << 17)
-#define STA_FLG_AGG_MPDU_8US_MSK       __constant_cpu_to_le32(1 << 18)
-#define STA_FLG_MAX_AGG_SIZE_POS       (19)
-#define STA_FLG_MAX_AGG_SIZE_MSK       __constant_cpu_to_le32(3 << 19)
-#define STA_FLG_FAT_EN_MSK             __constant_cpu_to_le32(1 << 21)
-#define STA_FLG_MIMO_DIS_MSK           __constant_cpu_to_le32(1 << 22)
-#define STA_FLG_AGG_MPDU_DENSITY_POS   (23)
-#define STA_FLG_AGG_MPDU_DENSITY_MSK   __constant_cpu_to_le32(7 << 23)
-#define HT_SHORT_GI_20MHZ_ONLY          (1 << 0)
-#define HT_SHORT_GI_40MHZ_ONLY          (1 << 1)
-
-
 #define IWL_RX_HDR(x) ((struct iwl3945_rx_frame_hdr *)(\
                       x->u.rx_frame.stats.payload + \
                       x->u.rx_frame.stats.phy_count))
@@ -707,6 +714,7 @@ struct iwl3945_priv {
        struct ieee80211_hw *hw;
        struct ieee80211_channel *ieee_channels;
        struct ieee80211_rate *ieee_rates;
+       struct ieee80211_conf *cache_conf;
 
        /* temporary frame storage list */
        struct list_head free_frames;
@@ -743,6 +751,7 @@ struct iwl3945_priv {
 
        /* Scan related variables */
        unsigned long last_scan_jiffies;
+       unsigned long next_scan_jiffies;
        unsigned long scan_start;
        unsigned long scan_pass_start;
        unsigned long scan_start_tsf;
@@ -857,6 +866,8 @@ struct iwl3945_priv {
        u16 last_seq_num;
        u16 last_frag_num;
        unsigned long last_packet_time;
+
+       /* Hash table for finding stations in IBSS network */
        struct list_head ibss_mac_hash[IWL_IBSS_MAC_HASH_SIZE];
 
        /* eeprom */