iwlwifi: mvm: use iwl_mvm_sta_from_mac80211() consistently
[cascardo/linux.git] / drivers / net / wireless / iwlwifi / mvm / mac80211.c
index 084689b..c4552b5 100644 (file)
@@ -2137,7 +2137,7 @@ static void iwl_mvm_sta_pre_rcu_remove(struct ieee80211_hw *hw,
                                       struct ieee80211_sta *sta)
 {
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
-       struct iwl_mvm_sta *mvm_sta = (void *)sta->drv_priv;
+       struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
 
        /*
         * This is called before mac80211 does RCU synchronisation,
@@ -3152,7 +3152,7 @@ static int iwl_mvm_set_tim(struct ieee80211_hw *hw,
                           bool set)
 {
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
-       struct iwl_mvm_sta *mvm_sta = (void *)sta->drv_priv;
+       struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
 
        if (!mvm_sta || !mvm_sta->vif) {
                IWL_ERR(mvm, "Station is not associated to a vif\n");