Lines Matching refs:te_data
84 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_te_clear_data() argument
88 if (!te_data || !te_data->vif) in iwl_mvm_te_clear_data()
91 list_del(&te_data->list); in iwl_mvm_te_clear_data()
92 te_data->running = false; in iwl_mvm_te_clear_data()
93 te_data->uid = 0; in iwl_mvm_te_clear_data()
94 te_data->id = TE_MAX; in iwl_mvm_te_clear_data()
95 te_data->vif = NULL; in iwl_mvm_te_clear_data()
213 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_te_handle_notify_csa() argument
216 struct ieee80211_vif *vif = te_data->vif; in iwl_mvm_te_handle_notify_csa()
222 switch (te_data->vif->type) { in iwl_mvm_te_handle_notify_csa()
234 iwl_mvm_csa_client_absent(mvm, te_data->vif); in iwl_mvm_te_handle_notify_csa()
236 ieee80211_chswitch_done(te_data->vif, true); in iwl_mvm_te_handle_notify_csa()
245 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notify_csa()
250 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_te_check_trigger() argument
257 ieee80211_vif_to_wdev(te_data->vif), in iwl_mvm_te_check_trigger()
271 if (trig_te_id != te_data->id || in iwl_mvm_te_check_trigger()
278 te_data->id, in iwl_mvm_te_check_trigger()
293 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_te_handle_notif() argument
302 iwl_mvm_te_check_trigger(mvm, notif, te_data); in iwl_mvm_te_handle_notif()
322 if (iwl_mvm_te_check_disconnect(mvm, te_data->vif, msg)) { in iwl_mvm_te_handle_notif()
323 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notif()
331 jiffies, te_data->end_jiffies); in iwl_mvm_te_handle_notif()
333 switch (te_data->vif->type) { in iwl_mvm_te_handle_notif()
344 iwl_mvm_te_check_disconnect(mvm, te_data->vif, in iwl_mvm_te_handle_notif()
351 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notif()
353 te_data->running = true; in iwl_mvm_te_handle_notif()
354 te_data->end_jiffies = TU_TO_EXP_TIME(te_data->duration); in iwl_mvm_te_handle_notif()
356 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_te_handle_notif()
359 } else if (te_data->id == TE_CHANNEL_SWITCH_PERIOD) { in iwl_mvm_te_handle_notif()
360 iwl_mvm_te_handle_notify_csa(mvm, te_data, notif); in iwl_mvm_te_handle_notif()
373 struct iwl_mvm_time_event_data *te_data, *tmp; in iwl_mvm_aux_roc_te_handle_notif() local
376 list_for_each_entry_safe(te_data, tmp, &mvm->aux_roc_te_list, list) { in iwl_mvm_aux_roc_te_handle_notif()
377 if (le32_to_cpu(notif->unique_id) == te_data->uid) { in iwl_mvm_aux_roc_te_handle_notif()
385 iwl_mvm_te_check_trigger(mvm, notif, te_data); in iwl_mvm_aux_roc_te_handle_notif()
397 list_del(&te_data->list); /* remove from list */ in iwl_mvm_aux_roc_te_handle_notif()
398 te_data->running = false; in iwl_mvm_aux_roc_te_handle_notif()
399 te_data->vif = NULL; in iwl_mvm_aux_roc_te_handle_notif()
400 te_data->uid = 0; in iwl_mvm_aux_roc_te_handle_notif()
401 te_data->id = TE_MAX; in iwl_mvm_aux_roc_te_handle_notif()
404 te_data->running = true; in iwl_mvm_aux_roc_te_handle_notif()
424 struct iwl_mvm_time_event_data *te_data, *tmp; in iwl_mvm_rx_time_event_notif() local
435 list_for_each_entry_safe(te_data, tmp, &mvm->time_event_list, list) { in iwl_mvm_rx_time_event_notif()
436 if (le32_to_cpu(notif->unique_id) == te_data->uid) in iwl_mvm_rx_time_event_notif()
437 iwl_mvm_te_handle_notif(mvm, te_data, notif); in iwl_mvm_rx_time_event_notif()
448 struct iwl_mvm_time_event_data *te_data = data; in iwl_mvm_te_notif() local
463 if (le32_to_cpu(resp->unique_id) != te_data->uid) in iwl_mvm_te_notif()
467 te_data->uid); in iwl_mvm_te_notif()
480 struct iwl_mvm_time_event_data *te_data = data; in iwl_mvm_time_event_response() local
495 if (WARN_ON_ONCE(le32_to_cpu(resp->id) != te_data->id)) in iwl_mvm_time_event_response()
498 te_data->uid = le32_to_cpu(resp->unique_id); in iwl_mvm_time_event_response()
500 te_data->uid); in iwl_mvm_time_event_response()
506 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_time_event_send_add() argument
519 if (WARN_ON(te_data->id != TE_MAX)) { in iwl_mvm_time_event_send_add()
523 te_data->vif = vif; in iwl_mvm_time_event_send_add()
524 te_data->duration = le32_to_cpu(te_cmd->duration); in iwl_mvm_time_event_send_add()
525 te_data->id = le32_to_cpu(te_cmd->id); in iwl_mvm_time_event_send_add()
526 list_add_tail(&te_data->list, &mvm->time_event_list); in iwl_mvm_time_event_send_add()
541 iwl_mvm_time_event_response, te_data); in iwl_mvm_time_event_send_add()
559 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_time_event_send_add()
571 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_protect_session() local
578 if (te_data->running && in iwl_mvm_protect_session()
579 time_after(te_data->end_jiffies, TU_TO_EXP_TIME(min_duration))) { in iwl_mvm_protect_session()
581 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_protect_session()
585 if (te_data->running) { in iwl_mvm_protect_session()
587 te_data->uid, in iwl_mvm_protect_session()
588 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_protect_session()
618 iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_protect_session()
629 iwl_mvm_te_notif, te_data); in iwl_mvm_protect_session()
632 if (iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd)) { in iwl_mvm_protect_session()
642 struct iwl_mvm_time_event_data *te_data, in __iwl_mvm_remove_time_event() argument
654 *uid = te_data->uid; in __iwl_mvm_remove_time_event()
655 id = te_data->id; in __iwl_mvm_remove_time_event()
660 iwl_mvm_te_clear_data(mvm, te_data); in __iwl_mvm_remove_time_event()
684 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_remove_aux_roc_te() argument
692 if (!__iwl_mvm_remove_time_event(mvm, te_data, &uid)) in iwl_mvm_remove_aux_roc_te()
715 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_remove_time_event() argument
721 if (!__iwl_mvm_remove_time_event(mvm, te_data, &uid)) in iwl_mvm_remove_time_event()
741 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_stop_session_protection() local
747 id = te_data->id; in iwl_mvm_stop_session_protection()
757 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_stop_session_protection()
764 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_start_p2p_roc() local
768 if (te_data->running) { in iwl_mvm_start_p2p_roc()
806 return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_start_p2p_roc()
811 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_get_roc_te() local
824 list_for_each_entry(te_data, &mvm->time_event_list, list) { in iwl_mvm_get_roc_te()
825 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) in iwl_mvm_get_roc_te()
832 te_data = list_first_entry_or_null(&mvm->aux_roc_te_list, in iwl_mvm_get_roc_te()
837 return te_data; in iwl_mvm_get_roc_te()
842 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_cleanup_roc_te() local
845 te_data = iwl_mvm_get_roc_te(mvm); in iwl_mvm_cleanup_roc_te()
846 if (te_data) in iwl_mvm_cleanup_roc_te()
847 __iwl_mvm_remove_time_event(mvm, te_data, &uid); in iwl_mvm_cleanup_roc_te()
853 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_stop_roc() local
855 te_data = iwl_mvm_get_roc_te(mvm); in iwl_mvm_stop_roc()
856 if (!te_data) { in iwl_mvm_stop_roc()
861 mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); in iwl_mvm_stop_roc()
863 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_stop_roc()
864 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_stop_roc()
867 iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data); in iwl_mvm_stop_roc()
878 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_schedule_csa_period() local
883 if (te_data->running) { in iwl_mvm_schedule_csa_period()
887 id = te_data->id; in iwl_mvm_schedule_csa_period()
900 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_schedule_csa_period()
917 return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_schedule_csa_period()