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()
187 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_te_handle_notify_csa() argument
190 struct ieee80211_vif *vif = te_data->vif; in iwl_mvm_te_handle_notify_csa()
196 switch (te_data->vif->type) { in iwl_mvm_te_handle_notify_csa()
208 iwl_mvm_csa_client_absent(mvm, te_data->vif); in iwl_mvm_te_handle_notify_csa()
210 ieee80211_chswitch_done(te_data->vif, true); in iwl_mvm_te_handle_notify_csa()
219 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notify_csa()
224 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_te_check_trigger() argument
231 ieee80211_vif_to_wdev(te_data->vif), in iwl_mvm_te_check_trigger()
245 if (trig_te_id != te_data->id || in iwl_mvm_te_check_trigger()
252 te_data->id, in iwl_mvm_te_check_trigger()
279 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_te_handle_notif() argument
288 iwl_mvm_te_check_trigger(mvm, notif, te_data); in iwl_mvm_te_handle_notif()
308 if (iwl_mvm_te_check_disconnect(mvm, te_data->vif, msg)) { in iwl_mvm_te_handle_notif()
309 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notif()
317 jiffies, te_data->end_jiffies); in iwl_mvm_te_handle_notif()
319 switch (te_data->vif->type) { in iwl_mvm_te_handle_notif()
330 if (te_data->id == TE_CHANNEL_SWITCH_PERIOD) { in iwl_mvm_te_handle_notif()
340 iwl_mvm_te_check_disconnect(mvm, te_data->vif, in iwl_mvm_te_handle_notif()
341 !te_data->vif->bss_conf.assoc ? in iwl_mvm_te_handle_notif()
349 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notif()
351 te_data->running = true; in iwl_mvm_te_handle_notif()
352 te_data->end_jiffies = TU_TO_EXP_TIME(te_data->duration); in iwl_mvm_te_handle_notif()
354 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_te_handle_notif()
357 } else if (te_data->id == TE_CHANNEL_SWITCH_PERIOD) { in iwl_mvm_te_handle_notif()
358 iwl_mvm_te_handle_notify_csa(mvm, te_data, notif); in iwl_mvm_te_handle_notif()
371 struct iwl_mvm_time_event_data *te_data, *tmp; in iwl_mvm_aux_roc_te_handle_notif() local
374 list_for_each_entry_safe(te_data, tmp, &mvm->aux_roc_te_list, list) { in iwl_mvm_aux_roc_te_handle_notif()
375 if (le32_to_cpu(notif->unique_id) == te_data->uid) { in iwl_mvm_aux_roc_te_handle_notif()
383 iwl_mvm_te_check_trigger(mvm, notif, te_data); in iwl_mvm_aux_roc_te_handle_notif()
395 list_del(&te_data->list); /* remove from list */ in iwl_mvm_aux_roc_te_handle_notif()
396 te_data->running = false; in iwl_mvm_aux_roc_te_handle_notif()
397 te_data->vif = NULL; in iwl_mvm_aux_roc_te_handle_notif()
398 te_data->uid = 0; in iwl_mvm_aux_roc_te_handle_notif()
399 te_data->id = TE_MAX; in iwl_mvm_aux_roc_te_handle_notif()
402 te_data->running = true; in iwl_mvm_aux_roc_te_handle_notif()
422 struct iwl_mvm_time_event_data *te_data, *tmp; in iwl_mvm_rx_time_event_notif() local
433 list_for_each_entry_safe(te_data, tmp, &mvm->time_event_list, list) { in iwl_mvm_rx_time_event_notif()
434 if (le32_to_cpu(notif->unique_id) == te_data->uid) in iwl_mvm_rx_time_event_notif()
435 iwl_mvm_te_handle_notif(mvm, te_data, notif); in iwl_mvm_rx_time_event_notif()
446 struct iwl_mvm_time_event_data *te_data = data; in iwl_mvm_te_notif() local
461 if (le32_to_cpu(resp->unique_id) != te_data->uid) in iwl_mvm_te_notif()
465 te_data->uid); in iwl_mvm_te_notif()
478 struct iwl_mvm_time_event_data *te_data = data; in iwl_mvm_time_event_response() local
493 if (WARN_ON_ONCE(le32_to_cpu(resp->id) != te_data->id)) in iwl_mvm_time_event_response()
496 te_data->uid = le32_to_cpu(resp->unique_id); in iwl_mvm_time_event_response()
498 te_data->uid); in iwl_mvm_time_event_response()
504 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_time_event_send_add() argument
517 if (WARN_ON(te_data->id != TE_MAX)) { in iwl_mvm_time_event_send_add()
521 te_data->vif = vif; in iwl_mvm_time_event_send_add()
522 te_data->duration = le32_to_cpu(te_cmd->duration); in iwl_mvm_time_event_send_add()
523 te_data->id = le32_to_cpu(te_cmd->id); in iwl_mvm_time_event_send_add()
524 list_add_tail(&te_data->list, &mvm->time_event_list); in iwl_mvm_time_event_send_add()
539 iwl_mvm_time_event_response, te_data); in iwl_mvm_time_event_send_add()
557 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_time_event_send_add()
569 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_protect_session() local
576 if (te_data->running && in iwl_mvm_protect_session()
577 time_after(te_data->end_jiffies, TU_TO_EXP_TIME(min_duration))) { in iwl_mvm_protect_session()
579 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_protect_session()
583 if (te_data->running) { in iwl_mvm_protect_session()
585 te_data->uid, in iwl_mvm_protect_session()
586 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_protect_session()
616 iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_protect_session()
627 iwl_mvm_te_notif, te_data); in iwl_mvm_protect_session()
630 if (iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd)) { in iwl_mvm_protect_session()
661 struct iwl_mvm_time_event_data *te_data, in __iwl_mvm_remove_time_event() argument
668 if (!te_data->vif) in __iwl_mvm_remove_time_event()
671 mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); in __iwl_mvm_remove_time_event()
672 iftype = te_data->vif->type; in __iwl_mvm_remove_time_event()
681 *uid = te_data->uid; in __iwl_mvm_remove_time_event()
682 id = te_data->id; in __iwl_mvm_remove_time_event()
687 iwl_mvm_te_clear_data(mvm, te_data); in __iwl_mvm_remove_time_event()
725 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_remove_aux_roc_te() argument
733 if (!__iwl_mvm_remove_time_event(mvm, te_data, &uid)) in iwl_mvm_remove_aux_roc_te()
756 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_remove_time_event() argument
762 if (!__iwl_mvm_remove_time_event(mvm, te_data, &uid)) in iwl_mvm_remove_time_event()
782 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_stop_session_protection() local
788 id = te_data->id; in iwl_mvm_stop_session_protection()
806 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_stop_session_protection()
828 struct iwl_mvm_time_event_data *te_data = in iwl_mvm_rx_session_protect_notif() local
835 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_rx_session_protect_notif()
841 te_data->running = le32_to_cpu(notif->start); in iwl_mvm_rx_session_protect_notif()
842 te_data->end_jiffies = in iwl_mvm_rx_session_protect_notif()
843 TU_TO_EXP_TIME(te_data->duration); in iwl_mvm_rx_session_protect_notif()
855 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_rx_session_protect_notif()
923 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_start_p2p_roc() local
927 if (te_data->running) { in iwl_mvm_start_p2p_roc()
971 return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_start_p2p_roc()
976 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_get_roc_te() local
989 list_for_each_entry(te_data, &mvm->time_event_list, list) { in iwl_mvm_get_roc_te()
990 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) in iwl_mvm_get_roc_te()
997 te_data = list_first_entry_or_null(&mvm->aux_roc_te_list, in iwl_mvm_get_roc_te()
1002 return te_data; in iwl_mvm_get_roc_te()
1007 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_cleanup_roc_te() local
1010 te_data = iwl_mvm_get_roc_te(mvm); in iwl_mvm_cleanup_roc_te()
1011 if (te_data) in iwl_mvm_cleanup_roc_te()
1012 __iwl_mvm_remove_time_event(mvm, te_data, &uid); in iwl_mvm_cleanup_roc_te()
1018 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_stop_roc() local
1037 te_data = iwl_mvm_get_roc_te(mvm); in iwl_mvm_stop_roc()
1038 if (!te_data) { in iwl_mvm_stop_roc()
1043 mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); in iwl_mvm_stop_roc()
1045 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_stop_roc()
1046 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_stop_roc()
1049 iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data); in iwl_mvm_stop_roc()
1058 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_remove_csa_period() local
1064 id = te_data->id; in iwl_mvm_remove_csa_period()
1070 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_remove_csa_period()
1078 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_schedule_csa_period() local
1083 if (te_data->running) { in iwl_mvm_schedule_csa_period()
1087 id = te_data->id; in iwl_mvm_schedule_csa_period()
1100 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_schedule_csa_period()
1117 return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_schedule_csa_period()
1152 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_schedule_session_protection() local
1173 if (te_data->running && in iwl_mvm_schedule_session_protection()
1174 time_after(te_data->end_jiffies, TU_TO_EXP_TIME(min_duration))) { in iwl_mvm_schedule_session_protection()
1176 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_schedule_session_protection()
1182 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_schedule_session_protection()
1183 te_data->duration = le32_to_cpu(cmd.duration_tu); in iwl_mvm_schedule_session_protection()
1184 te_data->vif = vif; in iwl_mvm_schedule_session_protection()
1198 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_schedule_session_protection()