diff options
author | Sara Sharon <sara.sharon@intel.com> | 2016-04-10 08:51:54 -0400 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2016-05-10 15:34:04 -0400 |
commit | 13303c0fb1481e40377d072a29570e005e7bd032 (patch) | |
tree | 500e217b7348e158f05a1319d9a38bbfe069de10 /drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |
parent | ce1f27787d493bc28d2f523a3b4c9f72aa9cee7d (diff) |
iwlwifi: mvm: use helpers to get iwl_mvm_sta
Getting the mvm station out of station id requires dereferencing
the station id to get ieee80211_sta, then checking for pointer
validity and only then extract mvm station out.
Given that there are helpers to do it - use them instead of
duplicating the code whenever we need only mvm station.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/ops.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 2ba13691b481..6f91c5bdfd62 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
@@ -1210,7 +1210,6 @@ static bool iwl_mvm_disallow_offloading(struct iwl_mvm *mvm, | |||
1210 | struct iwl_d0i3_iter_data *iter_data) | 1210 | struct iwl_d0i3_iter_data *iter_data) |
1211 | { | 1211 | { |
1212 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | 1212 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
1213 | struct ieee80211_sta *ap_sta; | ||
1214 | struct iwl_mvm_sta *mvmsta; | 1213 | struct iwl_mvm_sta *mvmsta; |
1215 | u32 available_tids = 0; | 1214 | u32 available_tids = 0; |
1216 | u8 tid; | 1215 | u8 tid; |
@@ -1219,11 +1218,10 @@ static bool iwl_mvm_disallow_offloading(struct iwl_mvm *mvm, | |||
1219 | mvmvif->ap_sta_id == IWL_MVM_STATION_COUNT)) | 1218 | mvmvif->ap_sta_id == IWL_MVM_STATION_COUNT)) |
1220 | return false; | 1219 | return false; |
1221 | 1220 | ||
1222 | ap_sta = rcu_dereference(mvm->fw_id_to_mac_id[mvmvif->ap_sta_id]); | 1221 | mvmsta = iwl_mvm_sta_from_staid_rcu(mvm, mvmvif->ap_sta_id); |
1223 | if (IS_ERR_OR_NULL(ap_sta)) | 1222 | if (!mvmsta) |
1224 | return false; | 1223 | return false; |
1225 | 1224 | ||
1226 | mvmsta = iwl_mvm_sta_from_mac80211(ap_sta); | ||
1227 | spin_lock_bh(&mvmsta->lock); | 1225 | spin_lock_bh(&mvmsta->lock); |
1228 | for (tid = 0; tid < IWL_MAX_TID_COUNT; tid++) { | 1226 | for (tid = 0; tid < IWL_MAX_TID_COUNT; tid++) { |
1229 | struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; | 1227 | struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; |