Lines Matching refs:te_data
26 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_te_clear_data() argument
30 if (!te_data || !te_data->vif) in iwl_mvm_te_clear_data()
33 list_del(&te_data->list); in iwl_mvm_te_clear_data()
39 INIT_LIST_HEAD(&te_data->list); in iwl_mvm_te_clear_data()
41 te_data->running = false; in iwl_mvm_te_clear_data()
42 te_data->uid = 0; in iwl_mvm_te_clear_data()
43 te_data->id = TE_MAX; in iwl_mvm_te_clear_data()
44 te_data->vif = NULL; in iwl_mvm_te_clear_data()
195 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_te_handle_notify_csa() argument
198 struct ieee80211_vif *vif = te_data->vif; in iwl_mvm_te_handle_notify_csa()
204 switch (te_data->vif->type) { in iwl_mvm_te_handle_notify_csa()
216 iwl_mvm_csa_client_absent(mvm, te_data->vif); in iwl_mvm_te_handle_notify_csa()
218 ieee80211_chswitch_done(te_data->vif, true); in iwl_mvm_te_handle_notify_csa()
227 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notify_csa()
232 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_te_check_trigger() argument
239 ieee80211_vif_to_wdev(te_data->vif), in iwl_mvm_te_check_trigger()
253 if (trig_te_id != te_data->id || in iwl_mvm_te_check_trigger()
260 te_data->id, in iwl_mvm_te_check_trigger()
287 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_te_handle_notif() argument
296 iwl_mvm_te_check_trigger(mvm, notif, te_data); in iwl_mvm_te_handle_notif()
316 if (iwl_mvm_te_check_disconnect(mvm, te_data->vif, msg)) { in iwl_mvm_te_handle_notif()
317 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notif()
325 jiffies, te_data->end_jiffies); in iwl_mvm_te_handle_notif()
327 switch (te_data->vif->type) { in iwl_mvm_te_handle_notif()
338 if (te_data->id == TE_CHANNEL_SWITCH_PERIOD) { in iwl_mvm_te_handle_notif()
348 iwl_mvm_te_check_disconnect(mvm, te_data->vif, in iwl_mvm_te_handle_notif()
349 !te_data->vif->cfg.assoc ? in iwl_mvm_te_handle_notif()
357 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notif()
359 te_data->running = true; in iwl_mvm_te_handle_notif()
360 te_data->end_jiffies = TU_TO_EXP_TIME(te_data->duration); in iwl_mvm_te_handle_notif()
362 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_te_handle_notif()
365 } else if (te_data->id == TE_CHANNEL_SWITCH_PERIOD) { in iwl_mvm_te_handle_notif()
366 iwl_mvm_te_handle_notify_csa(mvm, te_data, notif); in iwl_mvm_te_handle_notif()
379 struct iwl_mvm_time_event_data *te_data, *tmp; in iwl_mvm_aux_roc_te_handle_notif() local
382 list_for_each_entry_safe(te_data, tmp, &mvm->aux_roc_te_list, list) { in iwl_mvm_aux_roc_te_handle_notif()
383 if (le32_to_cpu(notif->unique_id) == te_data->uid) { in iwl_mvm_aux_roc_te_handle_notif()
391 iwl_mvm_te_check_trigger(mvm, notif, te_data); in iwl_mvm_aux_roc_te_handle_notif()
403 list_del(&te_data->list); /* remove from list */ in iwl_mvm_aux_roc_te_handle_notif()
404 te_data->running = false; in iwl_mvm_aux_roc_te_handle_notif()
405 te_data->vif = NULL; in iwl_mvm_aux_roc_te_handle_notif()
406 te_data->uid = 0; in iwl_mvm_aux_roc_te_handle_notif()
407 te_data->id = TE_MAX; in iwl_mvm_aux_roc_te_handle_notif()
410 te_data->running = true; in iwl_mvm_aux_roc_te_handle_notif()
430 struct iwl_mvm_time_event_data *te_data, *tmp; in iwl_mvm_rx_time_event_notif() local
441 list_for_each_entry_safe(te_data, tmp, &mvm->time_event_list, list) { in iwl_mvm_rx_time_event_notif()
442 if (le32_to_cpu(notif->unique_id) == te_data->uid) in iwl_mvm_rx_time_event_notif()
443 iwl_mvm_te_handle_notif(mvm, te_data, notif); in iwl_mvm_rx_time_event_notif()
454 struct iwl_mvm_time_event_data *te_data = data; in iwl_mvm_te_notif() local
469 if (le32_to_cpu(resp->unique_id) != te_data->uid) in iwl_mvm_te_notif()
473 te_data->uid); in iwl_mvm_te_notif()
486 struct iwl_mvm_time_event_data *te_data = data; in iwl_mvm_time_event_response() local
501 if (WARN_ON_ONCE(le32_to_cpu(resp->id) != te_data->id)) in iwl_mvm_time_event_response()
504 te_data->uid = le32_to_cpu(resp->unique_id); in iwl_mvm_time_event_response()
506 te_data->uid); in iwl_mvm_time_event_response()
512 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_time_event_send_add() argument
525 if (WARN_ON(te_data->id != TE_MAX)) { in iwl_mvm_time_event_send_add()
529 te_data->vif = vif; in iwl_mvm_time_event_send_add()
530 te_data->duration = le32_to_cpu(te_cmd->duration); in iwl_mvm_time_event_send_add()
531 te_data->id = le32_to_cpu(te_cmd->id); in iwl_mvm_time_event_send_add()
532 list_add_tail(&te_data->list, &mvm->time_event_list); in iwl_mvm_time_event_send_add()
547 iwl_mvm_time_event_response, te_data); in iwl_mvm_time_event_send_add()
565 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_time_event_send_add()
577 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_protect_session() local
584 if (te_data->running && in iwl_mvm_protect_session()
585 time_after(te_data->end_jiffies, TU_TO_EXP_TIME(min_duration))) { in iwl_mvm_protect_session()
587 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_protect_session()
591 if (te_data->running) { in iwl_mvm_protect_session()
593 te_data->uid, in iwl_mvm_protect_session()
594 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_protect_session()
624 iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_protect_session()
635 iwl_mvm_te_notif, te_data); in iwl_mvm_protect_session()
638 if (iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd)) { in iwl_mvm_protect_session()
669 struct iwl_mvm_time_event_data *te_data, in __iwl_mvm_remove_time_event() argument
676 if (!te_data->vif) in __iwl_mvm_remove_time_event()
679 mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); in __iwl_mvm_remove_time_event()
680 iftype = te_data->vif->type; in __iwl_mvm_remove_time_event()
689 *uid = te_data->uid; in __iwl_mvm_remove_time_event()
690 id = te_data->id; in __iwl_mvm_remove_time_event()
695 iwl_mvm_te_clear_data(mvm, te_data); in __iwl_mvm_remove_time_event()
736 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_remove_aux_roc_te() argument
744 if (!__iwl_mvm_remove_time_event(mvm, te_data, &uid)) in iwl_mvm_remove_aux_roc_te()
767 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_remove_time_event() argument
773 if (!__iwl_mvm_remove_time_event(mvm, te_data, &uid)) in iwl_mvm_remove_time_event()
793 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_stop_session_protection() local
799 id = te_data->id; in iwl_mvm_stop_session_protection()
817 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_stop_session_protection()
839 struct iwl_mvm_time_event_data *te_data = in iwl_mvm_rx_session_protect_notif() local
846 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_rx_session_protect_notif()
852 te_data->running = le32_to_cpu(notif->start); in iwl_mvm_rx_session_protect_notif()
853 te_data->end_jiffies = in iwl_mvm_rx_session_protect_notif()
854 TU_TO_EXP_TIME(te_data->duration); in iwl_mvm_rx_session_protect_notif()
866 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_rx_session_protect_notif()
934 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_start_p2p_roc() local
938 if (te_data->running) { in iwl_mvm_start_p2p_roc()
982 return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_start_p2p_roc()
987 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_get_roc_te() local
1000 list_for_each_entry(te_data, &mvm->time_event_list, list) { in iwl_mvm_get_roc_te()
1001 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) in iwl_mvm_get_roc_te()
1008 te_data = list_first_entry_or_null(&mvm->aux_roc_te_list, in iwl_mvm_get_roc_te()
1013 return te_data; in iwl_mvm_get_roc_te()
1018 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_cleanup_roc_te() local
1021 te_data = iwl_mvm_get_roc_te(mvm); in iwl_mvm_cleanup_roc_te()
1022 if (te_data) in iwl_mvm_cleanup_roc_te()
1023 __iwl_mvm_remove_time_event(mvm, te_data, &uid); in iwl_mvm_cleanup_roc_te()
1029 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_stop_roc() local
1048 te_data = iwl_mvm_get_roc_te(mvm); in iwl_mvm_stop_roc()
1049 if (!te_data) { in iwl_mvm_stop_roc()
1054 mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); in iwl_mvm_stop_roc()
1056 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_stop_roc()
1057 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_stop_roc()
1060 iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data); in iwl_mvm_stop_roc()
1069 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_remove_csa_period() local
1075 id = te_data->id; in iwl_mvm_remove_csa_period()
1081 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_remove_csa_period()
1089 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_schedule_csa_period() local
1094 if (te_data->running) { in iwl_mvm_schedule_csa_period()
1098 id = te_data->id; in iwl_mvm_schedule_csa_period()
1111 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_schedule_csa_period()
1128 return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_schedule_csa_period()
1163 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_schedule_session_protection() local
1178 if (te_data->running && in iwl_mvm_schedule_session_protection()
1179 time_after(te_data->end_jiffies, TU_TO_EXP_TIME(min_duration))) { in iwl_mvm_schedule_session_protection()
1181 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_schedule_session_protection()
1187 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_schedule_session_protection()
1192 te_data->id = le32_to_cpu(cmd.conf_id); in iwl_mvm_schedule_session_protection()
1193 te_data->duration = le32_to_cpu(cmd.duration_tu); in iwl_mvm_schedule_session_protection()
1194 te_data->vif = vif; in iwl_mvm_schedule_session_protection()
1207 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_schedule_session_protection()