iwlwifi: mvm: disable PS during channel switch
Disable PS when pre_channel_switch is called and add the post_channel_switch operation to re-enable PS when the channel switch is completed. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
7ef0aab66b
commit
f6c34820d3
|
@ -3166,7 +3166,7 @@ static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
|
||||||
{
|
{
|
||||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||||
struct ieee80211_vif *csa_vif;
|
struct ieee80211_vif *csa_vif;
|
||||||
struct iwl_mvm_vif *mvmvif;
|
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
mutex_lock(&mvm->mutex);
|
mutex_lock(&mvm->mutex);
|
||||||
|
@ -3187,7 +3187,6 @@ static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
|
||||||
|
|
||||||
rcu_assign_pointer(mvm->csa_vif, vif);
|
rcu_assign_pointer(mvm->csa_vif, vif);
|
||||||
|
|
||||||
mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
|
||||||
if (WARN_ONCE(mvmvif->csa_countdown,
|
if (WARN_ONCE(mvmvif->csa_countdown,
|
||||||
"Previous CSA countdown didn't complete")) {
|
"Previous CSA countdown didn't complete")) {
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
|
@ -3199,7 +3198,11 @@ static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
mvmvif->ps_disabled = true;
|
||||||
|
|
||||||
|
ret = iwl_mvm_power_update_ps(mvm);
|
||||||
|
if (ret)
|
||||||
|
goto out_unlock;
|
||||||
|
|
||||||
out_unlock:
|
out_unlock:
|
||||||
mutex_unlock(&mvm->mutex);
|
mutex_unlock(&mvm->mutex);
|
||||||
|
@ -3207,6 +3210,24 @@ out_unlock:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw,
|
||||||
|
struct ieee80211_vif *vif)
|
||||||
|
{
|
||||||
|
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||||
|
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
mutex_lock(&mvm->mutex);
|
||||||
|
|
||||||
|
mvmvif->ps_disabled = false;
|
||||||
|
|
||||||
|
ret = iwl_mvm_power_update_ps(mvm);
|
||||||
|
|
||||||
|
mutex_unlock(&mvm->mutex);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
|
static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
|
||||||
struct ieee80211_vif *vif, u32 queues, bool drop)
|
struct ieee80211_vif *vif, u32 queues, bool drop)
|
||||||
{
|
{
|
||||||
|
@ -3300,6 +3321,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
|
||||||
.set_tim = iwl_mvm_set_tim,
|
.set_tim = iwl_mvm_set_tim,
|
||||||
|
|
||||||
.pre_channel_switch = iwl_mvm_pre_channel_switch,
|
.pre_channel_switch = iwl_mvm_pre_channel_switch,
|
||||||
|
.post_channel_switch = iwl_mvm_post_channel_switch,
|
||||||
|
|
||||||
.tdls_channel_switch = iwl_mvm_tdls_channel_switch,
|
.tdls_channel_switch = iwl_mvm_tdls_channel_switch,
|
||||||
.tdls_cancel_channel_switch = iwl_mvm_tdls_cancel_channel_switch,
|
.tdls_cancel_channel_switch = iwl_mvm_tdls_cancel_channel_switch,
|
||||||
|
|
Loading…
Reference in New Issue