iwlwifi: mvm: don't send a CSA command the firmware doesn't know
We introduced a new flow to remove an on-going CSA but we assumed the firwmare understands the CHANNEL_SWITCH_TIME_EVENT_CMD. This is not true for 7265 and down. Don't send this command for those devices, but rather use the older command. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/iwlwifi.20201008181047.2574e3e47927.Ic0c56411da1096e9a45ee5c3383edf777c5baca0@changeid
This commit is contained in:
parent
8fac81b500
commit
58ddd9b6d1
3 changed files with 35 additions and 6 deletions
|
@ -1409,6 +1409,10 @@ static void iwl_mvm_abort_channel_switch(struct ieee80211_hw *hw,
|
||||||
IWL_DEBUG_MAC80211(mvm, "Abort CSA on mac %d\n", mvmvif->id);
|
IWL_DEBUG_MAC80211(mvm, "Abort CSA on mac %d\n", mvmvif->id);
|
||||||
|
|
||||||
mutex_lock(&mvm->mutex);
|
mutex_lock(&mvm->mutex);
|
||||||
|
if (!fw_has_capa(&mvm->fw->ucode_capa,
|
||||||
|
IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD))
|
||||||
|
iwl_mvm_remove_csa_period(mvm, vif);
|
||||||
|
else
|
||||||
WARN_ON(iwl_mvm_send_cmd_pdu(mvm,
|
WARN_ON(iwl_mvm_send_cmd_pdu(mvm,
|
||||||
WIDE_ID(MAC_CONF_GROUP,
|
WIDE_ID(MAC_CONF_GROUP,
|
||||||
CHANNEL_SWITCH_TIME_EVENT_CMD),
|
CHANNEL_SWITCH_TIME_EVENT_CMD),
|
||||||
|
|
|
@ -1016,6 +1016,28 @@ void iwl_mvm_stop_roc(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||||
iwl_mvm_roc_finished(mvm);
|
iwl_mvm_roc_finished(mvm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void iwl_mvm_remove_csa_period(struct iwl_mvm *mvm,
|
||||||
|
struct ieee80211_vif *vif)
|
||||||
|
{
|
||||||
|
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||||
|
struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data;
|
||||||
|
u32 id;
|
||||||
|
|
||||||
|
lockdep_assert_held(&mvm->mutex);
|
||||||
|
|
||||||
|
if (!te_data->running)
|
||||||
|
return;
|
||||||
|
|
||||||
|
spin_lock_bh(&mvm->time_event_lock);
|
||||||
|
id = te_data->id;
|
||||||
|
spin_unlock_bh(&mvm->time_event_lock);
|
||||||
|
|
||||||
|
if (id != TE_CHANNEL_SWITCH_PERIOD)
|
||||||
|
return;
|
||||||
|
|
||||||
|
iwl_mvm_remove_time_event(mvm, mvmvif, te_data);
|
||||||
|
}
|
||||||
|
|
||||||
int iwl_mvm_schedule_csa_period(struct iwl_mvm *mvm,
|
int iwl_mvm_schedule_csa_period(struct iwl_mvm *mvm,
|
||||||
struct ieee80211_vif *vif,
|
struct ieee80211_vif *vif,
|
||||||
u32 duration, u32 apply_time)
|
u32 duration, u32 apply_time)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
||||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||||
* Copyright (C) 2019 Intel Corporation
|
* Copyright (C) 2019 - 2020 Intel Corporation
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of version 2 of the GNU General Public License as
|
* it under the terms of version 2 of the GNU General Public License as
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
*
|
*
|
||||||
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
||||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||||
* Copyright (C) 2019 Intel Corporation
|
* Copyright (C) 2019 - 2020 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -216,6 +216,9 @@ void iwl_mvm_te_clear_data(struct iwl_mvm *mvm,
|
||||||
void iwl_mvm_cleanup_roc_te(struct iwl_mvm *mvm);
|
void iwl_mvm_cleanup_roc_te(struct iwl_mvm *mvm);
|
||||||
void iwl_mvm_roc_done_wk(struct work_struct *wk);
|
void iwl_mvm_roc_done_wk(struct work_struct *wk);
|
||||||
|
|
||||||
|
void iwl_mvm_remove_csa_period(struct iwl_mvm *mvm,
|
||||||
|
struct ieee80211_vif *vif);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iwl_mvm_schedule_csa_period - request channel switch absence period
|
* iwl_mvm_schedule_csa_period - request channel switch absence period
|
||||||
* @mvm: the mvm component
|
* @mvm: the mvm component
|
||||||
|
|
Loading…
Add table
Reference in a new issue