iwlwifi: mvm: use helpers to get iwl_mvm_sta
[deliverable/linux.git] / drivers / net / wireless / intel / iwlwifi / mvm / ops.c
index 2ba13691b481db0219760b700d3e0d5f2a376e2d..6f91c5bdfd62ec7f03a557f36b8666db30dc4ba9 100644 (file)
@@ -1210,7 +1210,6 @@ static bool iwl_mvm_disallow_offloading(struct iwl_mvm *mvm,
                                        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;
@@ -1219,11 +1218,10 @@ static bool iwl_mvm_disallow_offloading(struct iwl_mvm *mvm,
                    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];
This page took 0.073338 seconds and 5 git commands to generate.