aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.h
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2009-10-30 17:36:13 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-11-02 15:39:47 -0500
commit62a94926183374d8414ab2ec633d9fe9530644ec (patch)
tree8fb56c5b8d01e7061301099c8dee85a836cf4041 /drivers/net/wireless/iwlwifi/iwl-3945.h
parent9a9ca65fbfa1cd14a6c016b793d61492f9f613d0 (diff)
iwl3945: store station rate scale information in mac80211 station structure
Currently the rate scale information is pointed to from the mac80211 station structure but since that is the only member we might as well make it part of the structure. Also move the rate scaling initialization to the init function, no need to do it when we allocate the structure. This fits with how mac80211 deals with rate scaling information (it always calls init after allocation) and makes it easier for us to later call initialization directly. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index ebb999a51b58..2b0d65c5780a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -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 {