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()
203 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_te_handle_notify_csa() argument
206 struct ieee80211_vif *vif = te_data->vif; in iwl_mvm_te_handle_notify_csa()
212 switch (te_data->vif->type) { in iwl_mvm_te_handle_notify_csa()
224 iwl_mvm_csa_client_absent(mvm, te_data->vif); in iwl_mvm_te_handle_notify_csa()
226 ieee80211_chswitch_done(te_data->vif, true); in iwl_mvm_te_handle_notify_csa()
235 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notify_csa()
240 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_te_check_trigger() argument
247 ieee80211_vif_to_wdev(te_data->vif), in iwl_mvm_te_check_trigger()
261 if (trig_te_id != te_data->id || in iwl_mvm_te_check_trigger()
268 te_data->id, in iwl_mvm_te_check_trigger()
295 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_te_handle_notif() argument
304 iwl_mvm_te_check_trigger(mvm, notif, te_data); in iwl_mvm_te_handle_notif()
324 if (iwl_mvm_te_check_disconnect(mvm, te_data->vif, msg)) { in iwl_mvm_te_handle_notif()
325 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notif()
333 jiffies, te_data->end_jiffies); in iwl_mvm_te_handle_notif()
335 switch (te_data->vif->type) { in iwl_mvm_te_handle_notif()
346 if (te_data->id == TE_CHANNEL_SWITCH_PERIOD) { in iwl_mvm_te_handle_notif()
356 iwl_mvm_te_check_disconnect(mvm, te_data->vif, in iwl_mvm_te_handle_notif()
357 !te_data->vif->cfg.assoc ? in iwl_mvm_te_handle_notif()
365 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notif()
367 te_data->running = true; in iwl_mvm_te_handle_notif()
368 te_data->end_jiffies = TU_TO_EXP_TIME(te_data->duration); in iwl_mvm_te_handle_notif()
370 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_te_handle_notif()
373 } else if (te_data->id == TE_CHANNEL_SWITCH_PERIOD) { in iwl_mvm_te_handle_notif()
374 iwl_mvm_te_handle_notify_csa(mvm, te_data, notif); in iwl_mvm_te_handle_notif()
387 struct iwl_mvm_time_event_data *aux_roc_te = NULL, *te_data; in iwl_mvm_aux_roc_te_handle_notif() local
389 list_for_each_entry(te_data, &mvm->aux_roc_te_list, list) { in iwl_mvm_aux_roc_te_handle_notif()
390 if (le32_to_cpu(notif->unique_id) == te_data->uid) { in iwl_mvm_aux_roc_te_handle_notif()
391 aux_roc_te = te_data; in iwl_mvm_aux_roc_te_handle_notif()
398 iwl_mvm_te_check_trigger(mvm, notif, te_data); in iwl_mvm_aux_roc_te_handle_notif()
410 list_del(&te_data->list); /* remove from list */ in iwl_mvm_aux_roc_te_handle_notif()
411 te_data->running = false; in iwl_mvm_aux_roc_te_handle_notif()
412 te_data->vif = NULL; in iwl_mvm_aux_roc_te_handle_notif()
413 te_data->uid = 0; in iwl_mvm_aux_roc_te_handle_notif()
414 te_data->id = TE_MAX; in iwl_mvm_aux_roc_te_handle_notif()
417 te_data->running = true; in iwl_mvm_aux_roc_te_handle_notif()
437 struct iwl_mvm_time_event_data *te_data, *tmp; in iwl_mvm_rx_time_event_notif() local
448 list_for_each_entry_safe(te_data, tmp, &mvm->time_event_list, list) { in iwl_mvm_rx_time_event_notif()
449 if (le32_to_cpu(notif->unique_id) == te_data->uid) in iwl_mvm_rx_time_event_notif()
450 iwl_mvm_te_handle_notif(mvm, te_data, notif); in iwl_mvm_rx_time_event_notif()
461 struct iwl_mvm_time_event_data *te_data = data; in iwl_mvm_te_notif() local
476 if (le32_to_cpu(resp->unique_id) != te_data->uid) in iwl_mvm_te_notif()
480 te_data->uid); in iwl_mvm_te_notif()
493 struct iwl_mvm_time_event_data *te_data = data; in iwl_mvm_time_event_response() local
508 if (WARN_ON_ONCE(le32_to_cpu(resp->id) != te_data->id)) in iwl_mvm_time_event_response()
511 te_data->uid = le32_to_cpu(resp->unique_id); in iwl_mvm_time_event_response()
513 te_data->uid); in iwl_mvm_time_event_response()
519 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_time_event_send_add() argument
532 if (WARN_ON(te_data->id != TE_MAX)) { in iwl_mvm_time_event_send_add()
536 te_data->vif = vif; in iwl_mvm_time_event_send_add()
537 te_data->duration = le32_to_cpu(te_cmd->duration); in iwl_mvm_time_event_send_add()
538 te_data->id = le32_to_cpu(te_cmd->id); in iwl_mvm_time_event_send_add()
539 list_add_tail(&te_data->list, &mvm->time_event_list); in iwl_mvm_time_event_send_add()
554 iwl_mvm_time_event_response, te_data); in iwl_mvm_time_event_send_add()
572 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_time_event_send_add()
584 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_protect_session() local
591 if (te_data->running && in iwl_mvm_protect_session()
592 time_after(te_data->end_jiffies, TU_TO_EXP_TIME(min_duration))) { in iwl_mvm_protect_session()
594 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_protect_session()
598 if (te_data->running) { in iwl_mvm_protect_session()
600 te_data->uid, in iwl_mvm_protect_session()
601 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_protect_session()
631 iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_protect_session()
642 iwl_mvm_te_notif, te_data); in iwl_mvm_protect_session()
645 if (iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd)) { in iwl_mvm_protect_session()
676 struct iwl_mvm_time_event_data *te_data, in __iwl_mvm_remove_time_event() argument
683 if (!te_data->vif) in __iwl_mvm_remove_time_event()
686 mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); in __iwl_mvm_remove_time_event()
687 iftype = te_data->vif->type; in __iwl_mvm_remove_time_event()
696 *uid = te_data->uid; in __iwl_mvm_remove_time_event()
697 id = te_data->id; in __iwl_mvm_remove_time_event()
702 iwl_mvm_te_clear_data(mvm, te_data); in __iwl_mvm_remove_time_event()
743 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_remove_aux_roc_te() argument
751 if (!__iwl_mvm_remove_time_event(mvm, te_data, &uid)) in iwl_mvm_remove_aux_roc_te()
774 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_remove_time_event() argument
780 if (!__iwl_mvm_remove_time_event(mvm, te_data, &uid)) in iwl_mvm_remove_time_event()
800 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_stop_session_protection() local
806 id = te_data->id; in iwl_mvm_stop_session_protection()
824 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_stop_session_protection()
846 struct iwl_mvm_time_event_data *te_data = in iwl_mvm_rx_session_protect_notif() local
853 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_rx_session_protect_notif()
859 te_data->running = le32_to_cpu(notif->start); in iwl_mvm_rx_session_protect_notif()
860 te_data->end_jiffies = in iwl_mvm_rx_session_protect_notif()
861 TU_TO_EXP_TIME(te_data->duration); in iwl_mvm_rx_session_protect_notif()
873 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_rx_session_protect_notif()
941 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_start_p2p_roc() local
945 if (te_data->running) { in iwl_mvm_start_p2p_roc()
989 return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_start_p2p_roc()
994 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_get_roc_te() local
1007 list_for_each_entry(te_data, &mvm->time_event_list, list) { in iwl_mvm_get_roc_te()
1008 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) in iwl_mvm_get_roc_te()
1015 te_data = list_first_entry_or_null(&mvm->aux_roc_te_list, in iwl_mvm_get_roc_te()
1020 return te_data; in iwl_mvm_get_roc_te()
1025 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_cleanup_roc_te() local
1028 te_data = iwl_mvm_get_roc_te(mvm); in iwl_mvm_cleanup_roc_te()
1029 if (te_data) in iwl_mvm_cleanup_roc_te()
1030 __iwl_mvm_remove_time_event(mvm, te_data, &uid); in iwl_mvm_cleanup_roc_te()
1036 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_stop_roc() local
1055 te_data = iwl_mvm_get_roc_te(mvm); in iwl_mvm_stop_roc()
1056 if (!te_data) { in iwl_mvm_stop_roc()
1061 mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); in iwl_mvm_stop_roc()
1063 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_stop_roc()
1064 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_stop_roc()
1067 iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data); in iwl_mvm_stop_roc()
1076 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_remove_csa_period() local
1082 id = te_data->id; in iwl_mvm_remove_csa_period()
1088 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_remove_csa_period()
1096 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_schedule_csa_period() local
1101 if (te_data->running) { in iwl_mvm_schedule_csa_period()
1105 id = te_data->id; in iwl_mvm_schedule_csa_period()
1118 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_schedule_csa_period()
1135 return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_schedule_csa_period()
1170 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_schedule_session_protection() local
1185 if (te_data->running && in iwl_mvm_schedule_session_protection()
1186 time_after(te_data->end_jiffies, TU_TO_EXP_TIME(min_duration))) { in iwl_mvm_schedule_session_protection()
1188 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_schedule_session_protection()
1194 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_schedule_session_protection()
1199 te_data->id = le32_to_cpu(cmd.conf_id); in iwl_mvm_schedule_session_protection()
1200 te_data->duration = le32_to_cpu(cmd.duration_tu); in iwl_mvm_schedule_session_protection()
1201 te_data->vif = vif; in iwl_mvm_schedule_session_protection()
1214 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_schedule_session_protection()