diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/time-event.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/time-event.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/time-event.c b/drivers/net/wireless/iwlwifi/mvm/time-event.c index ad9bbca99213..9f100363b177 100644 --- a/drivers/net/wireless/iwlwifi/mvm/time-event.c +++ b/drivers/net/wireless/iwlwifi/mvm/time-event.c | |||
@@ -73,7 +73,6 @@ | |||
73 | #include "iwl-prph.h" | 73 | #include "iwl-prph.h" |
74 | 74 | ||
75 | /* A TimeUnit is 1024 microsecond */ | 75 | /* A TimeUnit is 1024 microsecond */ |
76 | #define TU_TO_JIFFIES(_tu) (usecs_to_jiffies((_tu) * 1024)) | ||
77 | #define MSEC_TO_TU(_msec) (_msec*1000/1024) | 76 | #define MSEC_TO_TU(_msec) (_msec*1000/1024) |
78 | 77 | ||
79 | /* | 78 | /* |
@@ -191,8 +190,7 @@ static void iwl_mvm_te_handle_notif(struct iwl_mvm *mvm, | |||
191 | iwl_mvm_te_clear_data(mvm, te_data); | 190 | iwl_mvm_te_clear_data(mvm, te_data); |
192 | } else if (le32_to_cpu(notif->action) & TE_NOTIF_HOST_EVENT_START) { | 191 | } else if (le32_to_cpu(notif->action) & TE_NOTIF_HOST_EVENT_START) { |
193 | te_data->running = true; | 192 | te_data->running = true; |
194 | te_data->end_jiffies = jiffies + | 193 | te_data->end_jiffies = TU_TO_EXP_TIME(te_data->duration); |
195 | TU_TO_JIFFIES(te_data->duration); | ||
196 | 194 | ||
197 | if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { | 195 | if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { |
198 | set_bit(IWL_MVM_STATUS_ROC_RUNNING, &mvm->status); | 196 | set_bit(IWL_MVM_STATUS_ROC_RUNNING, &mvm->status); |
@@ -329,8 +327,7 @@ void iwl_mvm_protect_session(struct iwl_mvm *mvm, | |||
329 | lockdep_assert_held(&mvm->mutex); | 327 | lockdep_assert_held(&mvm->mutex); |
330 | 328 | ||
331 | if (te_data->running && | 329 | if (te_data->running && |
332 | time_after(te_data->end_jiffies, | 330 | time_after(te_data->end_jiffies, TU_TO_EXP_TIME(min_duration))) { |
333 | jiffies + TU_TO_JIFFIES(min_duration))) { | ||
334 | IWL_DEBUG_TE(mvm, "We have enough time in the current TE: %u\n", | 331 | IWL_DEBUG_TE(mvm, "We have enough time in the current TE: %u\n", |
335 | jiffies_to_msecs(te_data->end_jiffies - jiffies)); | 332 | jiffies_to_msecs(te_data->end_jiffies - jiffies)); |
336 | return; | 333 | return; |