aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-11-10 04:10:17 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-11-24 01:30:33 -0500
commit622e3f9b71f9a97408cd751851c6588d4e6c4fd0 (patch)
tree13f0a088c88040197060719fe7b769cee19499d6 /drivers/net/wireless/iwlwifi
parenta57c688d34a05cbc72ec8cf4f05758cbafdd9893 (diff)
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c15
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/time-event.c1
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index c85c0f12867a..7acdfa700ec1 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -3143,6 +3143,20 @@ static int iwl_mvm_mac_testmode_cmd(struct ieee80211_hw *hw,
3143} 3143}
3144#endif 3144#endif
3145 3145
3146static void iwl_mvm_channel_switch(struct ieee80211_hw *hw,
3147 struct ieee80211_vif *vif,
3148 struct ieee80211_channel_switch *chsw)
3149{
3150 /* By implementing this operation, we prevent mac80211 from
3151 * starting its own channel switch timer, so that we can call
3152 * ieee80211_chswitch_done() ourselves at the right time
3153 * (which is when the absence time event starts).
3154 */
3155
3156 IWL_DEBUG_MAC80211(IWL_MAC80211_GET_MVM(hw),
3157 "dummy channel switch op\n");
3158}
3159
3146static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw, 3160static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
3147 struct ieee80211_vif *vif, 3161 struct ieee80211_vif *vif,
3148 struct ieee80211_channel_switch *chsw) 3162 struct ieee80211_channel_switch *chsw)
@@ -3336,6 +3350,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
3336 3350
3337 .set_tim = iwl_mvm_set_tim, 3351 .set_tim = iwl_mvm_set_tim,
3338 3352
3353 .channel_switch = iwl_mvm_channel_switch,
3339 .pre_channel_switch = iwl_mvm_pre_channel_switch, 3354 .pre_channel_switch = iwl_mvm_pre_channel_switch,
3340 .post_channel_switch = iwl_mvm_post_channel_switch, 3355 .post_channel_switch = iwl_mvm_post_channel_switch,
3341 3356
diff --git a/drivers/net/wireless/iwlwifi/mvm/time-event.c b/drivers/net/wireless/iwlwifi/mvm/time-event.c
index 1a537be216ce..ff631cc5e5e7 100644
--- a/drivers/net/wireless/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/iwlwifi/mvm/time-event.c
@@ -207,6 +207,7 @@ iwl_mvm_te_handle_notify_csa(struct iwl_mvm *mvm,
207 break; 207 break;
208 case NL80211_IFTYPE_STATION: 208 case NL80211_IFTYPE_STATION:
209 iwl_mvm_csa_client_absent(mvm, te_data->vif); 209 iwl_mvm_csa_client_absent(mvm, te_data->vif);
210 ieee80211_chswitch_done(te_data->vif, true);
210 break; 211 break;
211 default: 212 default:
212 /* should never happen */ 213 /* should never happen */