iwlwifi: proper monitor support
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-3945.h
index 1f82061221a16388de3246aa4636ff6d366dc800..f1aa4dc5aac4e915d89999261714a0647ced6485 100644 (file)
@@ -36,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[];
 
@@ -77,6 +75,7 @@ enum iwl3945_antenna {
  * else RTS for data/management frames where MPDU is larger
  *   than RTS value.
  */
+#define IWL_RX_BUF_SIZE           3000U
 #define DEFAULT_RTS_THRESHOLD     2347U
 #define MIN_RTS_THRESHOLD         0U
 #define MAX_RTS_THRESHOLD         2347U
@@ -92,29 +91,6 @@ struct iwl3945_rx_mem_buffer {
        struct list_head list;
 };
 
-struct iwl3945_rt_rx_hdr {
-       struct ieee80211_radiotap_header rt_hdr;
-       __le64 rt_tsf;          /* TSF */
-       u8 rt_flags;            /* radiotap packet flags */
-       u8 rt_rate;             /* rate in 500kb/s */
-       __le16 rt_channelMHz;   /* channel in MHz */
-       __le16 rt_chbitmask;    /* channel bitfield */
-       s8 rt_dbmsignal;        /* signal in dBm, kluged to signed */
-       s8 rt_dbmnoise;
-       u8 rt_antenna;          /* antenna number */
-       u8 payload[0];          /* payload... */
-} __attribute__ ((packed));
-
-struct iwl3945_rt_tx_hdr {
-       struct ieee80211_radiotap_header rt_hdr;
-       u8 rt_rate;             /* rate in 500kb/s */
-       __le16 rt_channel;      /* channel in mHz */
-       __le16 rt_chbitmask;    /* channel bitfield */
-       s8 rt_dbmsignal;        /* signal in dBm, kluged to signed */
-       u8 rt_antenna;          /* antenna number */
-       u8 payload[0];          /* payload... */
-} __attribute__ ((packed));
-
 /*
  * Generic queue structure
  *
@@ -532,12 +508,13 @@ struct iwl3945_ibss_seq {
 };
 
 /**
- * struct iwl4965_driver_hw_info
+ * struct iwl3945_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:
+ * @rx_buf_size:
+ * @max_pkt_size:
  * @max_rxq_log: Log-base-2 of max_rxq_size
  * @max_stations:
  * @bcast_sta_id:
@@ -549,7 +526,8 @@ struct iwl3945_driver_hw_info {
        u16 ac_queue_count;
        u16 tx_cmd_len;
        u16 max_rxq_size;
-       u32 rx_buffer_size;
+       u32 rx_buf_size;
+       u32 max_pkt_size;
        u16 max_rxq_log;
        u8  max_stations;
        u8  bcast_sta_id;
@@ -716,6 +694,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;
@@ -723,6 +702,7 @@ struct iwl3945_priv {
 
        u8 phymode;
        int alloc_rxb_skb;
+       bool add_radiotap;
 
        void (*rx_handlers[REPLY_MAX])(struct iwl3945_priv *priv,
                                       struct iwl3945_rx_mem_buffer *rxb);
@@ -978,6 +958,16 @@ static inline int is_channel_ibss(const struct iwl3945_channel_info *ch)
        return ((ch->flags & EEPROM_CHANNEL_IBSS)) ? 1 : 0;
 }
 
+static inline int iwl3945_rate_index_from_plcp(int plcp)
+{
+       int i;
+
+       for (i = 0; i < IWL_RATE_COUNT; i++)
+               if (iwl3945_rates[i].plcp == plcp)
+                       return i;
+       return -1;
+}
+
 extern const struct iwl3945_channel_info *iwl3945_get_channel_info(
        const struct iwl3945_priv *priv, int phymode, u16 channel);
 
This page took 0.036035 seconds and 5 git commands to generate.