iwlwifi: mvm: use iwl_mvm_sta_from_mac80211() consistently
[cascardo/linux.git] / drivers / net / wireless / iwlwifi / mvm / d3.c
index 4b5849e..14e8fd6 100644 (file)
@@ -793,7 +793,7 @@ iwl_mvm_get_wowlan_config(struct iwl_mvm *mvm,
                          struct ieee80211_sta *ap_sta)
 {
        int ret;
-       struct iwl_mvm_sta *mvm_ap_sta = (struct iwl_mvm_sta *)ap_sta->drv_priv;
+       struct iwl_mvm_sta *mvm_ap_sta = iwl_mvm_sta_from_mac80211(ap_sta);
 
        /* TODO: wowlan_config_cmd->wowlan_ba_teardown_tids */
 
@@ -1657,7 +1657,7 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm,
        if (IS_ERR_OR_NULL(ap_sta))
                goto out_free;
 
-       mvm_ap_sta = (struct iwl_mvm_sta *)ap_sta->drv_priv;
+       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 */