iwlwifi: mvm: use helpers to get iwl_mvm_sta
[deliverable/linux.git] / drivers / net / wireless / intel / iwlwifi / mvm / d3.c
index e3561bbc2468c71e6fa4c891bc36de367b419f0a..4fdc3dad3e85437492efc25df76b8ce8a02ad0ec 100644 (file)
@@ -1804,7 +1804,6 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm,
        struct iwl_wowlan_status *fw_status;
        int i;
        bool keep;
-       struct ieee80211_sta *ap_sta;
        struct iwl_mvm_sta *mvm_ap_sta;
 
        fw_status = iwl_mvm_get_wakeup_status(mvm, vif);
@@ -1823,13 +1822,10 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm,
        status.wake_packet = fw_status->wake_packet;
 
        /* still at hard-coded place 0 for D3 image */
-       ap_sta = rcu_dereference_protected(
-                       mvm->fw_id_to_mac_id[0],
-                       lockdep_is_held(&mvm->mutex));
-       if (IS_ERR_OR_NULL(ap_sta))
+       mvm_ap_sta = iwl_mvm_sta_from_staid_protected(mvm, 0);
+       if (!mvm_ap_sta)
                goto out_free;
 
-       mvm_ap_sta = iwl_mvm_sta_from_mac80211(ap_sta);
        for (i = 0; i < IWL_MAX_TID_COUNT; i++) {
                u16 seq = status.qos_seq_ctr[i];
                /* firmware stores last-used value, we store next value */
This page took 0.039 seconds and 5 git commands to generate.