iwlwifi: mvm: use helpers to get iwl_mvm_sta
[deliverable/linux.git] / drivers / net / wireless / intel / iwlwifi / mvm / tt.c
index eb3f460ce1b6b6bdc80a1b9f540c2bdbb7e3bf8f..58fc7b3c711c735c04fedddb94691a70c9aeef70 100644 (file)
@@ -359,16 +359,14 @@ static void iwl_mvm_tt_smps_iterator(void *_data, u8 *mac,
 
 static void iwl_mvm_tt_tx_protection(struct iwl_mvm *mvm, bool enable)
 {
-       struct ieee80211_sta *sta;
        struct iwl_mvm_sta *mvmsta;
        int i, err;
 
        for (i = 0; i < IWL_MVM_STATION_COUNT; i++) {
-               sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[i],
-                                               lockdep_is_held(&mvm->mutex));
-               if (IS_ERR_OR_NULL(sta))
+               mvmsta = iwl_mvm_sta_from_staid_protected(mvm, i);
+               if (!mvmsta)
                        continue;
-               mvmsta = iwl_mvm_sta_from_mac80211(sta);
+
                if (enable == mvmsta->tt_tx_protection)
                        continue;
                err = iwl_mvm_tx_protection(mvm, mvmsta, enable);
This page took 0.043392 seconds and 5 git commands to generate.