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);
        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 */
 
 
        if (vif->type == NL80211_IFTYPE_STATION &&
            ap_sta_id != IWL_MVM_STATION_COUNT) {
-               struct ieee80211_sta *sta;
-
-               sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[ap_sta_id],
-                                               lockdep_is_held(&mvm->mutex));
-               if (!IS_ERR_OR_NULL(sta)) {
-                       struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
+               struct iwl_mvm_sta *mvm_sta;
 
+               mvm_sta = iwl_mvm_sta_from_staid_protected(mvm, ap_sta_id);
+               if (mvm_sta) {
                        pos += scnprintf(buf+pos, bufsz-pos,
                                         "ap_sta_id %d - reduced Tx power %d\n",
                                         ap_sta_id,
 
                                        struct iwl_d0i3_iter_data *iter_data)
 {
        struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
-       struct ieee80211_sta *ap_sta;
        struct iwl_mvm_sta *mvmsta;
        u32 available_tids = 0;
        u8 tid;
                    mvmvif->ap_sta_id == IWL_MVM_STATION_COUNT))
                return false;
 
-       ap_sta = rcu_dereference(mvm->fw_id_to_mac_id[mvmvif->ap_sta_id]);
-       if (IS_ERR_OR_NULL(ap_sta))
+       mvmsta = iwl_mvm_sta_from_staid_rcu(mvm, mvmvif->ap_sta_id);
+       if (!mvmsta)
                return false;
 
-       mvmsta = iwl_mvm_sta_from_mac80211(ap_sta);
        spin_lock_bh(&mvmsta->lock);
        for (tid = 0; tid < IWL_MAX_TID_COUNT; tid++) {
                struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid];
 
            mvmvif->ap_sta_id != IWL_MVM_STATION_COUNT) {
                u8 sta_id = mvmvif->ap_sta_id;
 
-               sta = rcu_dereference_check(mvm->fw_id_to_mac_id[sta_id],
-                                           lockdep_is_held(&mvm->mutex));
                /*
                 * It is possible that the 'sta' parameter is NULL,
                 * for example when a GTK is removed - the sta_id will then
                 * be the AP ID, and no station was passed by mac80211.
                 */
-               if (IS_ERR_OR_NULL(sta))
-                       return NULL;
-
-               return iwl_mvm_sta_from_mac80211(sta);
+               return iwl_mvm_sta_from_staid_protected(mvm, sta_id);
        }
 
        return NULL;
 
 
 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);
 
        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;
 
        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 =