iwlwifi: mvm: use helpers to get iwl_mvm_sta
[deliverable/linux.git] / drivers / net / wireless / intel / iwlwifi / mvm / tx.c
index 3b645683d233e85dc5e7e7a695f1b0063cdb84e6..ff615b92e4ef81b782b8f6be53fd89b462886fd0 100644 (file)
@@ -1464,7 +1464,7 @@ static void iwl_mvm_rx_tx_cmd_agg(struct iwl_mvm *mvm,
        int sta_id = IWL_MVM_TX_RES_GET_RA(tx_resp->ra_tid);
        int tid = IWL_MVM_TX_RES_GET_TID(tx_resp->ra_tid);
        u16 sequence = le16_to_cpu(pkt->hdr.sequence);
-       struct ieee80211_sta *sta;
+       struct iwl_mvm_sta *mvmsta;
 
        if (WARN_ON_ONCE(SEQ_TO_QUEUE(sequence) < mvm->first_agg_queue))
                return;
@@ -1476,10 +1476,9 @@ static void iwl_mvm_rx_tx_cmd_agg(struct iwl_mvm *mvm,
 
        rcu_read_lock();
 
-       sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]);
+       mvmsta = iwl_mvm_sta_from_staid_rcu(mvm, sta_id);
 
-       if (!WARN_ON_ONCE(IS_ERR_OR_NULL(sta))) {
-               struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
+       if (!WARN_ON_ONCE(!mvmsta)) {
                mvmsta->tid_data[tid].rate_n_flags =
                        le32_to_cpu(tx_resp->initial_rate);
                mvmsta->tid_data[tid].tx_time =
This page took 0.024074 seconds and 5 git commands to generate.