aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.h80
1 files changed, 39 insertions, 41 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index 21679bf3a1aa..452dfd5456c6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -1,6 +1,6 @@
1/****************************************************************************** 1/******************************************************************************
2 * 2 *
3 * Copyright(c) 2003 - 2009 Intel Corporation. All rights reserved. 3 * Copyright(c) 2003 - 2010 Intel Corporation. All rights reserved.
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify it 5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as 6 * under the terms of version 2 of the GNU General Public License as
@@ -37,7 +37,7 @@
37#include <net/ieee80211_radiotap.h> 37#include <net/ieee80211_radiotap.h>
38 38
39/* Hardware specific file defines the PCI IDs table for that hardware module */ 39/* Hardware specific file defines the PCI IDs table for that hardware module */
40extern struct pci_device_id iwl3945_hw_card_ids[]; 40extern const struct pci_device_id iwl3945_hw_card_ids[];
41 41
42#include "iwl-csr.h" 42#include "iwl-csr.h"
43#include "iwl-prph.h" 43#include "iwl-prph.h"
@@ -46,7 +46,7 @@ extern struct pci_device_id iwl3945_hw_card_ids[];
46#include "iwl-debug.h" 46#include "iwl-debug.h"
47#include "iwl-power.h" 47#include "iwl-power.h"
48#include "iwl-dev.h" 48#include "iwl-dev.h"
49#include "iwl-3945-led.h" 49#include "iwl-led.h"
50 50
51/* Highest firmware API version supported */ 51/* Highest firmware API version supported */
52#define IWL3945_UCODE_API_MAX 2 52#define IWL3945_UCODE_API_MAX 2
@@ -74,8 +74,41 @@ extern struct pci_device_id iwl3945_hw_card_ids[];
74/* Module parameters accessible from iwl-*.c */ 74/* Module parameters accessible from iwl-*.c */
75extern struct iwl_mod_params iwl3945_mod_params; 75extern struct iwl_mod_params iwl3945_mod_params;
76 76
77struct iwl3945_rate_scale_data {
78 u64 data;
79 s32 success_counter;
80 s32 success_ratio;
81 s32 counter;
82 s32 average_tpt;
83 unsigned long stamp;
84};
85
86struct iwl3945_rs_sta {
87 spinlock_t lock;
88 struct iwl_priv *priv;
89 s32 *expected_tpt;
90 unsigned long last_partial_flush;
91 unsigned long last_flush;
92 u32 flush_time;
93 u32 last_tx_packets;
94 u32 tx_packets;
95 u8 tgg;
96 u8 flush_pending;
97 u8 start_rate;
98 u8 ibss_sta_added;
99 struct timer_list rate_scale_flush;
100 struct iwl3945_rate_scale_data win[IWL_RATE_COUNT_3945];
101#ifdef CONFIG_MAC80211_DEBUGFS
102 struct dentry *rs_sta_dbgfs_stats_table_file;
103#endif
104
105 /* used to be in sta_info */
106 int last_txrate_idx;
107};
108
109
77struct iwl3945_sta_priv { 110struct iwl3945_sta_priv {
78 struct iwl3945_rs_sta *rs_sta; 111 struct iwl3945_rs_sta rs_sta;
79}; 112};
80 113
81enum iwl3945_antenna { 114enum iwl3945_antenna {
@@ -130,12 +163,6 @@ struct iwl3945_frame {
130#define SN_TO_SEQ(ssn) (((ssn) << 4) & IEEE80211_SCTL_SEQ) 163#define SN_TO_SEQ(ssn) (((ssn) << 4) & IEEE80211_SCTL_SEQ)
131#define MAX_SN ((IEEE80211_SCTL_SEQ) >> 4) 164#define MAX_SN ((IEEE80211_SCTL_SEQ) >> 4)
132 165
133/*
134 * RX related structures and functions
135 */
136#define RX_FREE_BUFFERS 64
137#define RX_LOW_WATERMARK 8
138
139#define SUP_RATE_11A_MAX_NUM_CHANNELS 8 166#define SUP_RATE_11A_MAX_NUM_CHANNELS 8
140#define SUP_RATE_11B_MAX_NUM_CHANNELS 4 167#define SUP_RATE_11B_MAX_NUM_CHANNELS 4
141#define SUP_RATE_11G_MAX_NUM_CHANNELS 12 168#define SUP_RATE_11G_MAX_NUM_CHANNELS 12
@@ -144,24 +171,6 @@ struct iwl3945_frame {
144 171
145#define SCAN_INTERVAL 100 172#define SCAN_INTERVAL 100
146 173
147#define STATUS_HCMD_ACTIVE 0 /* host command in progress */
148#define STATUS_HCMD_SYNC_ACTIVE 1 /* sync host command in progress */
149#define STATUS_INT_ENABLED 2
150#define STATUS_RF_KILL_HW 3
151#define STATUS_INIT 5
152#define STATUS_ALIVE 6
153#define STATUS_READY 7
154#define STATUS_TEMPERATURE 8
155#define STATUS_GEO_CONFIGURED 9
156#define STATUS_EXIT_PENDING 10
157#define STATUS_STATISTICS 12
158#define STATUS_SCANNING 13
159#define STATUS_SCAN_ABORTING 14
160#define STATUS_SCAN_HW 15
161#define STATUS_POWER_PMI 16
162#define STATUS_FW_ERROR 17
163#define STATUS_CONF_PENDING 18
164
165#define MAX_TID_COUNT 9 174#define MAX_TID_COUNT 9
166 175
167#define IWL_INVALID_RATE 0xFF 176#define IWL_INVALID_RATE 0xFF
@@ -194,22 +203,13 @@ struct iwl3945_ibss_seq {
194 * for use by iwl-*.c 203 * for use by iwl-*.c
195 * 204 *
196 *****************************************************************************/ 205 *****************************************************************************/
197extern int iwl3945_power_init_handle(struct iwl_priv *priv);
198extern int iwl3945_eeprom_init(struct iwl_priv *priv);
199extern int iwl3945_calc_db_from_ratio(int sig_ratio); 206extern int iwl3945_calc_db_from_ratio(int sig_ratio);
200extern int iwl3945_calc_sig_qual(int rssi_dbm, int noise_dbm);
201extern int iwl3945_tx_queue_init(struct iwl_priv *priv,
202 struct iwl_tx_queue *txq, int count, u32 id);
203extern void iwl3945_rx_replenish(void *data); 207extern void iwl3945_rx_replenish(void *data);
204extern void iwl3945_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq); 208extern void iwl3945_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq);
205extern void iwl3945_tx_queue_free(struct iwl_priv *priv, struct iwl_tx_queue *txq);
206extern int iwl3945_send_cmd_pdu(struct iwl_priv *priv, u8 id, u16 len,
207 const void *data);
208extern int __must_check iwl3945_send_cmd(struct iwl_priv *priv,
209 struct iwl_host_cmd *cmd);
210extern unsigned int iwl3945_fill_beacon_frame(struct iwl_priv *priv, 209extern unsigned int iwl3945_fill_beacon_frame(struct iwl_priv *priv,
211 struct ieee80211_hdr *hdr,int left); 210 struct ieee80211_hdr *hdr,int left);
212extern void iwl3945_dump_nic_event_log(struct iwl_priv *priv); 211extern int iwl3945_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
212 char **buf, bool display);
213extern void iwl3945_dump_nic_error_log(struct iwl_priv *priv); 213extern void iwl3945_dump_nic_error_log(struct iwl_priv *priv);
214 214
215/* 215/*
@@ -280,8 +280,6 @@ extern void iwl3945_config_ap(struct iwl_priv *priv);
280 */ 280 */
281extern u8 iwl3945_hw_find_station(struct iwl_priv *priv, const u8 *bssid); 281extern u8 iwl3945_hw_find_station(struct iwl_priv *priv, const u8 *bssid);
282 282
283extern int iwl3945_hw_channel_switch(struct iwl_priv *priv, u16 channel);
284
285/* 283/*
286 * Forward declare iwl-3945.c functions for iwl-base.c 284 * Forward declare iwl-3945.c functions for iwl-base.c
287 */ 285 */