diff options
author | Eliad Peller <eliad@wizery.com> | 2014-06-11 08:51:33 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-07-07 14:41:08 -0400 |
commit | ae969afe43273c9bc8d22629efd9c51627837615 (patch) | |
tree | 94cbcba9232e7ff4aae63af1c4292614e5dc4dde /drivers/net/wireless/iwlwifi/mvm/rs.h | |
parent | bdce40f006dc53bfdeeba4a4ff200d4c0cf5aac8 (diff) |
iwlwifi: mvm: rs: don't clear persistent fields
iwl_mvm_rs_rate_init() is called multiple times to re-init
the rate scaling statistics (e.g. after some idle time).
It clears all the lq_sta sta, including some fields that
shouldn't be cleared (e.g. debugfs pointers). Fix it
by adding a new 'persistent' sub-struct, and
avoid clearing it on (re-)init.
Move the initialization of the persistent fields to
rs_alloc_sta instead.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/rs.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rs.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.h b/drivers/net/wireless/iwlwifi/mvm/rs.h index 374a83d7db25..2e1a683d0162 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rs.h +++ b/drivers/net/wireless/iwlwifi/mvm/rs.h | |||
@@ -349,16 +349,6 @@ struct iwl_lq_sta { | |||
349 | struct iwl_lq_cmd lq; | 349 | struct iwl_lq_cmd lq; |
350 | struct iwl_scale_tbl_info lq_info[LQ_SIZE]; /* "active", "search" */ | 350 | struct iwl_scale_tbl_info lq_info[LQ_SIZE]; /* "active", "search" */ |
351 | u8 tx_agg_tid_en; | 351 | u8 tx_agg_tid_en; |
352 | #ifdef CONFIG_MAC80211_DEBUGFS | ||
353 | struct dentry *rs_sta_dbgfs_scale_table_file; | ||
354 | struct dentry *rs_sta_dbgfs_stats_table_file; | ||
355 | struct dentry *rs_sta_dbgfs_drv_tx_stats_file; | ||
356 | struct dentry *rs_sta_dbgfs_tx_agg_tid_en_file; | ||
357 | struct dentry *rs_sta_dbgfs_reduced_txp_file; | ||
358 | u32 dbg_fixed_rate; | ||
359 | u8 dbg_fixed_txp_reduction; | ||
360 | #endif | ||
361 | struct iwl_mvm *drv; | ||
362 | 352 | ||
363 | /* used to be in sta_info */ | 353 | /* used to be in sta_info */ |
364 | int last_txrate_idx; | 354 | int last_txrate_idx; |
@@ -369,6 +359,20 @@ struct iwl_lq_sta { | |||
369 | 359 | ||
370 | /* tx power reduce for this sta */ | 360 | /* tx power reduce for this sta */ |
371 | int tpc_reduce; | 361 | int tpc_reduce; |
362 | |||
363 | /* persistent fields - initialized only once - keep last! */ | ||
364 | struct { | ||
365 | #ifdef CONFIG_MAC80211_DEBUGFS | ||
366 | struct dentry *rs_sta_dbgfs_scale_table_file; | ||
367 | struct dentry *rs_sta_dbgfs_stats_table_file; | ||
368 | struct dentry *rs_sta_dbgfs_drv_tx_stats_file; | ||
369 | struct dentry *rs_sta_dbgfs_tx_agg_tid_en_file; | ||
370 | struct dentry *rs_sta_dbgfs_reduced_txp_file; | ||
371 | u32 dbg_fixed_rate; | ||
372 | u8 dbg_fixed_txp_reduction; | ||
373 | #endif | ||
374 | struct iwl_mvm *drv; | ||
375 | } pers; | ||
372 | }; | 376 | }; |
373 | 377 | ||
374 | /* Initialize station's rate scaling information after adding station */ | 378 | /* Initialize station's rate scaling information after adding station */ |