diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index e8264e11b12d..7e169b085afe 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -557,11 +557,9 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw, | |||
557 | return ret; | 557 | return ret; |
558 | } | 558 | } |
559 | 559 | ||
560 | static void iwl_mvm_mac_remove_interface(struct ieee80211_hw *hw, | 560 | static void iwl_mvm_prepare_mac_removal(struct iwl_mvm *mvm, |
561 | struct ieee80211_vif *vif) | 561 | struct ieee80211_vif *vif) |
562 | { | 562 | { |
563 | struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); | ||
564 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | ||
565 | u32 tfd_msk = 0, ac; | 563 | u32 tfd_msk = 0, ac; |
566 | 564 | ||
567 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) | 565 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) |
@@ -594,12 +592,21 @@ static void iwl_mvm_mac_remove_interface(struct ieee80211_hw *hw, | |||
594 | */ | 592 | */ |
595 | flush_work(&mvm->sta_drained_wk); | 593 | flush_work(&mvm->sta_drained_wk); |
596 | } | 594 | } |
595 | } | ||
596 | |||
597 | static void iwl_mvm_mac_remove_interface(struct ieee80211_hw *hw, | ||
598 | struct ieee80211_vif *vif) | ||
599 | { | ||
600 | struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); | ||
601 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | ||
602 | |||
603 | iwl_mvm_prepare_mac_removal(mvm, vif); | ||
597 | 604 | ||
598 | mutex_lock(&mvm->mutex); | 605 | mutex_lock(&mvm->mutex); |
599 | 606 | ||
600 | /* | 607 | /* |
601 | * For AP/GO interface, the tear down of the resources allocated to the | 608 | * For AP/GO interface, the tear down of the resources allocated to the |
602 | * interface should be handled as part of the bss_info_changed flow. | 609 | * interface is be handled as part of the stop_ap flow. |
603 | */ | 610 | */ |
604 | if (vif->type == NL80211_IFTYPE_AP) { | 611 | if (vif->type == NL80211_IFTYPE_AP) { |
605 | iwl_mvm_dealloc_int_sta(mvm, &mvmvif->bcast_sta); | 612 | iwl_mvm_dealloc_int_sta(mvm, &mvmvif->bcast_sta); |
@@ -763,6 +770,8 @@ static void iwl_mvm_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | |||
763 | struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); | 770 | struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); |
764 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | 771 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
765 | 772 | ||
773 | iwl_mvm_prepare_mac_removal(mvm, vif); | ||
774 | |||
766 | mutex_lock(&mvm->mutex); | 775 | mutex_lock(&mvm->mutex); |
767 | 776 | ||
768 | mvmvif->ap_active = false; | 777 | mvmvif->ap_active = false; |