iwlwifi: mvm: add a channel_switch op to bypass mac80211 timer
We need to call ieee80211_chswitch_done() ourselves just when the absence TE started, so we perform the actual context switch early enough. To do so, add a dummy channel_switch op, which will cause mac80211 to skip the countdown timer and allow us to call ieee80211_chswitch_done() to complete the operation. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
a57c688d34
commit
622e3f9b71
2 changed files with 16 additions and 0 deletions
|
@ -3143,6 +3143,20 @@ static int iwl_mvm_mac_testmode_cmd(struct ieee80211_hw *hw,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static void iwl_mvm_channel_switch(struct ieee80211_hw *hw,
|
||||||
|
struct ieee80211_vif *vif,
|
||||||
|
struct ieee80211_channel_switch *chsw)
|
||||||
|
{
|
||||||
|
/* By implementing this operation, we prevent mac80211 from
|
||||||
|
* starting its own channel switch timer, so that we can call
|
||||||
|
* ieee80211_chswitch_done() ourselves at the right time
|
||||||
|
* (which is when the absence time event starts).
|
||||||
|
*/
|
||||||
|
|
||||||
|
IWL_DEBUG_MAC80211(IWL_MAC80211_GET_MVM(hw),
|
||||||
|
"dummy channel switch op\n");
|
||||||
|
}
|
||||||
|
|
||||||
static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
|
static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
|
||||||
struct ieee80211_vif *vif,
|
struct ieee80211_vif *vif,
|
||||||
struct ieee80211_channel_switch *chsw)
|
struct ieee80211_channel_switch *chsw)
|
||||||
|
@ -3336,6 +3350,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
|
||||||
|
|
||||||
.set_tim = iwl_mvm_set_tim,
|
.set_tim = iwl_mvm_set_tim,
|
||||||
|
|
||||||
|
.channel_switch = iwl_mvm_channel_switch,
|
||||||
.pre_channel_switch = iwl_mvm_pre_channel_switch,
|
.pre_channel_switch = iwl_mvm_pre_channel_switch,
|
||||||
.post_channel_switch = iwl_mvm_post_channel_switch,
|
.post_channel_switch = iwl_mvm_post_channel_switch,
|
||||||
|
|
||||||
|
|
|
@ -207,6 +207,7 @@ iwl_mvm_te_handle_notify_csa(struct iwl_mvm *mvm,
|
||||||
break;
|
break;
|
||||||
case NL80211_IFTYPE_STATION:
|
case NL80211_IFTYPE_STATION:
|
||||||
iwl_mvm_csa_client_absent(mvm, te_data->vif);
|
iwl_mvm_csa_client_absent(mvm, te_data->vif);
|
||||||
|
ieee80211_chswitch_done(te_data->vif, true);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* should never happen */
|
/* should never happen */
|
||||||
|
|
Loading…
Add table
Reference in a new issue