Lines Matching refs:te_data

82 			   struct iwl_mvm_time_event_data *te_data)  in iwl_mvm_te_clear_data()  argument
86 if (!te_data || !te_data->vif) in iwl_mvm_te_clear_data()
89 list_del(&te_data->list); in iwl_mvm_te_clear_data()
90 te_data->running = false; in iwl_mvm_te_clear_data()
91 te_data->uid = 0; in iwl_mvm_te_clear_data()
92 te_data->id = TE_MAX; in iwl_mvm_te_clear_data()
93 te_data->vif = NULL; in iwl_mvm_te_clear_data()
216 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_te_handle_notify_csa() argument
219 struct ieee80211_vif *vif = te_data->vif; in iwl_mvm_te_handle_notify_csa()
225 switch (te_data->vif->type) { in iwl_mvm_te_handle_notify_csa()
237 iwl_mvm_csa_client_absent(mvm, te_data->vif); in iwl_mvm_te_handle_notify_csa()
239 ieee80211_chswitch_done(te_data->vif, true); in iwl_mvm_te_handle_notify_csa()
248 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notify_csa()
253 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_te_check_trigger() argument
260 ieee80211_vif_to_wdev(te_data->vif), in iwl_mvm_te_check_trigger()
274 if (trig_te_id != te_data->id || in iwl_mvm_te_check_trigger()
281 te_data->id, in iwl_mvm_te_check_trigger()
296 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_te_handle_notif() argument
305 iwl_mvm_te_check_trigger(mvm, notif, te_data); in iwl_mvm_te_handle_notif()
325 if (iwl_mvm_te_check_disconnect(mvm, te_data->vif, msg)) { in iwl_mvm_te_handle_notif()
326 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notif()
334 jiffies, te_data->end_jiffies); in iwl_mvm_te_handle_notif()
336 switch (te_data->vif->type) { in iwl_mvm_te_handle_notif()
347 iwl_mvm_te_check_disconnect(mvm, te_data->vif, in iwl_mvm_te_handle_notif()
354 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notif()
356 te_data->running = true; in iwl_mvm_te_handle_notif()
357 te_data->end_jiffies = TU_TO_EXP_TIME(te_data->duration); in iwl_mvm_te_handle_notif()
359 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_te_handle_notif()
362 } else if (te_data->id == TE_CHANNEL_SWITCH_PERIOD) { in iwl_mvm_te_handle_notif()
363 iwl_mvm_te_handle_notify_csa(mvm, te_data, notif); in iwl_mvm_te_handle_notif()
376 struct iwl_mvm_time_event_data *te_data, *tmp; in iwl_mvm_aux_roc_te_handle_notif() local
379 list_for_each_entry_safe(te_data, tmp, &mvm->aux_roc_te_list, list) { in iwl_mvm_aux_roc_te_handle_notif()
380 if (le32_to_cpu(notif->unique_id) == te_data->uid) { in iwl_mvm_aux_roc_te_handle_notif()
388 iwl_mvm_te_check_trigger(mvm, notif, te_data); in iwl_mvm_aux_roc_te_handle_notif()
400 list_del(&te_data->list); /* remove from list */ in iwl_mvm_aux_roc_te_handle_notif()
401 te_data->running = false; in iwl_mvm_aux_roc_te_handle_notif()
402 te_data->vif = NULL; in iwl_mvm_aux_roc_te_handle_notif()
403 te_data->uid = 0; in iwl_mvm_aux_roc_te_handle_notif()
404 te_data->id = TE_MAX; in iwl_mvm_aux_roc_te_handle_notif()
407 te_data->running = true; in iwl_mvm_aux_roc_te_handle_notif()
427 struct iwl_mvm_time_event_data *te_data, *tmp; in iwl_mvm_rx_time_event_notif() local
438 list_for_each_entry_safe(te_data, tmp, &mvm->time_event_list, list) { in iwl_mvm_rx_time_event_notif()
439 if (le32_to_cpu(notif->unique_id) == te_data->uid) in iwl_mvm_rx_time_event_notif()
440 iwl_mvm_te_handle_notif(mvm, te_data, notif); in iwl_mvm_rx_time_event_notif()
451 struct iwl_mvm_time_event_data *te_data = data; in iwl_mvm_te_notif() local
466 if (le32_to_cpu(resp->unique_id) != te_data->uid) in iwl_mvm_te_notif()
470 te_data->uid); in iwl_mvm_te_notif()
483 struct iwl_mvm_time_event_data *te_data = data; in iwl_mvm_time_event_response() local
498 if (WARN_ON_ONCE(le32_to_cpu(resp->id) != te_data->id)) in iwl_mvm_time_event_response()
501 te_data->uid = le32_to_cpu(resp->unique_id); in iwl_mvm_time_event_response()
503 te_data->uid); in iwl_mvm_time_event_response()
509 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_time_event_send_add() argument
522 if (WARN_ON(te_data->id != TE_MAX)) { in iwl_mvm_time_event_send_add()
526 te_data->vif = vif; in iwl_mvm_time_event_send_add()
527 te_data->duration = le32_to_cpu(te_cmd->duration); in iwl_mvm_time_event_send_add()
528 te_data->id = le32_to_cpu(te_cmd->id); in iwl_mvm_time_event_send_add()
529 list_add_tail(&te_data->list, &mvm->time_event_list); in iwl_mvm_time_event_send_add()
544 iwl_mvm_time_event_response, te_data); in iwl_mvm_time_event_send_add()
562 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_time_event_send_add()
574 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_protect_session() local
581 if (te_data->running && in iwl_mvm_protect_session()
582 time_after(te_data->end_jiffies, TU_TO_EXP_TIME(min_duration))) { in iwl_mvm_protect_session()
584 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_protect_session()
588 if (te_data->running) { in iwl_mvm_protect_session()
590 te_data->uid, in iwl_mvm_protect_session()
591 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_protect_session()
621 iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_protect_session()
632 iwl_mvm_te_notif, te_data); in iwl_mvm_protect_session()
635 if (iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd)) { in iwl_mvm_protect_session()
665 struct iwl_mvm_time_event_data *te_data, in __iwl_mvm_remove_time_event() argument
669 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); in __iwl_mvm_remove_time_event()
678 *uid = te_data->uid; in __iwl_mvm_remove_time_event()
679 id = te_data->id; in __iwl_mvm_remove_time_event()
684 iwl_mvm_te_clear_data(mvm, te_data); in __iwl_mvm_remove_time_event()
695 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { in __iwl_mvm_remove_time_event()
723 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_remove_aux_roc_te() argument
731 if (!__iwl_mvm_remove_time_event(mvm, te_data, &uid)) in iwl_mvm_remove_aux_roc_te()
754 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_remove_time_event() argument
760 if (!__iwl_mvm_remove_time_event(mvm, te_data, &uid)) in iwl_mvm_remove_time_event()
785 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_stop_session_protection() local
791 id = te_data->id; in iwl_mvm_stop_session_protection()
801 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_stop_session_protection()
823 struct iwl_mvm_time_event_data *te_data = in iwl_mvm_rx_session_protect_notif() local
830 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_rx_session_protect_notif()
836 te_data->running = le32_to_cpu(notif->start); in iwl_mvm_rx_session_protect_notif()
837 te_data->end_jiffies = in iwl_mvm_rx_session_protect_notif()
838 TU_TO_EXP_TIME(te_data->duration); in iwl_mvm_rx_session_protect_notif()
848 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_rx_session_protect_notif()
917 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_start_p2p_roc() local
921 if (te_data->running) { in iwl_mvm_start_p2p_roc()
965 return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_start_p2p_roc()
970 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_get_roc_te() local
983 list_for_each_entry(te_data, &mvm->time_event_list, list) { in iwl_mvm_get_roc_te()
984 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) in iwl_mvm_get_roc_te()
991 te_data = list_first_entry_or_null(&mvm->aux_roc_te_list, in iwl_mvm_get_roc_te()
996 return te_data; in iwl_mvm_get_roc_te()
1001 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_cleanup_roc_te() local
1004 te_data = iwl_mvm_get_roc_te(mvm); in iwl_mvm_cleanup_roc_te()
1005 if (te_data) in iwl_mvm_cleanup_roc_te()
1006 __iwl_mvm_remove_time_event(mvm, te_data, &uid); in iwl_mvm_cleanup_roc_te()
1012 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_stop_roc() local
1031 te_data = iwl_mvm_get_roc_te(mvm); in iwl_mvm_stop_roc()
1032 if (!te_data) { in iwl_mvm_stop_roc()
1037 mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); in iwl_mvm_stop_roc()
1039 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_stop_roc()
1040 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_stop_roc()
1043 iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data); in iwl_mvm_stop_roc()
1053 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_remove_csa_period() local
1058 if (!te_data->running) in iwl_mvm_remove_csa_period()
1062 id = te_data->id; in iwl_mvm_remove_csa_period()
1068 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_remove_csa_period()
1076 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_schedule_csa_period() local
1081 if (te_data->running) { in iwl_mvm_schedule_csa_period()
1085 id = te_data->id; in iwl_mvm_schedule_csa_period()
1098 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_schedule_csa_period()
1115 return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_schedule_csa_period()
1150 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_schedule_session_protection() local
1171 if (te_data->running && in iwl_mvm_schedule_session_protection()
1172 time_after(te_data->end_jiffies, TU_TO_EXP_TIME(min_duration))) { in iwl_mvm_schedule_session_protection()
1174 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_schedule_session_protection()
1180 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_schedule_session_protection()
1181 te_data->duration = le32_to_cpu(cmd.duration_tu); in iwl_mvm_schedule_session_protection()
1195 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_schedule_session_protection()