summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/rs.h
diff options
context:
space:
mode:
authorGregory Greenman <gregory.greenman@intel.com>2019-06-30 09:42:57 +0300
committerJohannes Berg <johannes.berg@intel.com>2019-07-30 18:34:24 +0200
commitf5d88fa334e6c8e2d840512ffbb30e3cb58d065b (patch)
treee6c951521263954b5003786cf9b1786a0519779e /drivers/net/wireless/intel/iwlwifi/mvm/rs.h
parentcd4d6b0bcd51580efda9ae54ab7b2d630b4147dc (diff)
iwlwifi: mvm: replace RS mutex with a spin_lock
The solution with the worker still had a bug, as in order to get sta, rcu_read_lock should be used and thus no mutex can be used inside iwl_mvm_rs_rate_init. Also, spin_lock is a simpler solution, no need to spawn a dedicated worker. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/rs.h')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rs.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.h b/drivers/net/wireless/intel/iwlwifi/mvm/rs.h
index 086f47e2a4f0..428642e66658 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.h
@@ -376,9 +376,6 @@ struct iwl_lq_sta {
/* tx power reduce for this sta */
int tpc_reduce;
- /* avoid races of reinit and update table from rx_tx */
- struct mutex mutex;
-
/* persistent fields - initialized only once - keep last! */
struct lq_sta_pers {
#ifdef CONFIG_MAC80211_DEBUGFS
@@ -393,6 +390,7 @@ struct iwl_lq_sta {
s8 last_rssi;
struct rs_rate_stats tx_stats[RS_COLUMN_COUNT][IWL_RATE_COUNT];
struct iwl_mvm *drv;
+ spinlock_t lock; /* for races in reinit/update table */
} pers;
};
@@ -443,8 +441,6 @@ struct iwl_mvm_sta;
int iwl_mvm_tx_protection(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta,
bool enable);
-void iwl_mvm_rs_init_wk(struct work_struct *wk);
-
#ifdef CONFIG_IWLWIFI_DEBUGFS
void iwl_mvm_reset_frame_stats(struct iwl_mvm *mvm);
#endif