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()
45 te_data->link_id = -1; in iwl_mvm_te_clear_data()
233 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_te_handle_notify_csa() argument
236 struct ieee80211_vif *vif = te_data->vif; in iwl_mvm_te_handle_notify_csa()
242 switch (te_data->vif->type) { in iwl_mvm_te_handle_notify_csa()
254 iwl_mvm_csa_client_absent(mvm, te_data->vif); in iwl_mvm_te_handle_notify_csa()
256 ieee80211_chswitch_done(te_data->vif, true, 0); in iwl_mvm_te_handle_notify_csa()
265 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notify_csa()
270 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_te_check_trigger() argument
277 ieee80211_vif_to_wdev(te_data->vif), in iwl_mvm_te_check_trigger()
291 if (trig_te_id != te_data->id || in iwl_mvm_te_check_trigger()
298 te_data->id, in iwl_mvm_te_check_trigger()
313 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_te_handle_notif() argument
322 iwl_mvm_te_check_trigger(mvm, notif, te_data); in iwl_mvm_te_handle_notif()
342 if (iwl_mvm_te_check_disconnect(mvm, te_data->vif, msg)) { in iwl_mvm_te_handle_notif()
343 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notif()
351 jiffies, te_data->end_jiffies); in iwl_mvm_te_handle_notif()
353 switch (te_data->vif->type) { in iwl_mvm_te_handle_notif()
364 if (te_data->id == TE_CHANNEL_SWITCH_PERIOD) { in iwl_mvm_te_handle_notif()
374 iwl_mvm_te_check_disconnect(mvm, te_data->vif, in iwl_mvm_te_handle_notif()
375 !te_data->vif->cfg.assoc ? in iwl_mvm_te_handle_notif()
383 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_te_handle_notif()
385 te_data->running = true; in iwl_mvm_te_handle_notif()
386 te_data->end_jiffies = TU_TO_EXP_TIME(te_data->duration); in iwl_mvm_te_handle_notif()
388 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_te_handle_notif()
391 } else if (te_data->id == TE_CHANNEL_SWITCH_PERIOD) { in iwl_mvm_te_handle_notif()
392 iwl_mvm_te_handle_notify_csa(mvm, te_data, notif); in iwl_mvm_te_handle_notif()
458 struct iwl_mvm_time_event_data *aux_roc_te = NULL, *te_data; in iwl_mvm_aux_roc_te_handle_notif() local
460 list_for_each_entry(te_data, &mvm->aux_roc_te_list, list) { in iwl_mvm_aux_roc_te_handle_notif()
461 if (le32_to_cpu(notif->unique_id) == te_data->uid) { in iwl_mvm_aux_roc_te_handle_notif()
462 aux_roc_te = te_data; in iwl_mvm_aux_roc_te_handle_notif()
469 iwl_mvm_te_check_trigger(mvm, notif, te_data); in iwl_mvm_aux_roc_te_handle_notif()
481 list_del(&te_data->list); /* remove from list */ in iwl_mvm_aux_roc_te_handle_notif()
482 te_data->running = false; in iwl_mvm_aux_roc_te_handle_notif()
483 te_data->vif = NULL; in iwl_mvm_aux_roc_te_handle_notif()
484 te_data->uid = 0; in iwl_mvm_aux_roc_te_handle_notif()
485 te_data->id = TE_MAX; in iwl_mvm_aux_roc_te_handle_notif()
488 te_data->running = true; in iwl_mvm_aux_roc_te_handle_notif()
508 struct iwl_mvm_time_event_data *te_data, *tmp; in iwl_mvm_rx_time_event_notif() local
519 list_for_each_entry_safe(te_data, tmp, &mvm->time_event_list, list) { in iwl_mvm_rx_time_event_notif()
520 if (le32_to_cpu(notif->unique_id) == te_data->uid) in iwl_mvm_rx_time_event_notif()
521 iwl_mvm_te_handle_notif(mvm, te_data, notif); in iwl_mvm_rx_time_event_notif()
532 struct iwl_mvm_time_event_data *te_data = data; in iwl_mvm_te_notif() local
547 if (le32_to_cpu(resp->unique_id) != te_data->uid) in iwl_mvm_te_notif()
551 te_data->uid); in iwl_mvm_te_notif()
564 struct iwl_mvm_time_event_data *te_data = data; in iwl_mvm_time_event_response() local
579 if (WARN_ON_ONCE(le32_to_cpu(resp->id) != te_data->id)) in iwl_mvm_time_event_response()
582 te_data->uid = le32_to_cpu(resp->unique_id); in iwl_mvm_time_event_response()
584 te_data->uid); in iwl_mvm_time_event_response()
590 struct iwl_mvm_time_event_data *te_data, in iwl_mvm_time_event_send_add() argument
603 if (WARN_ON(te_data->id != TE_MAX)) { in iwl_mvm_time_event_send_add()
607 te_data->vif = vif; in iwl_mvm_time_event_send_add()
608 te_data->duration = le32_to_cpu(te_cmd->duration); in iwl_mvm_time_event_send_add()
609 te_data->id = le32_to_cpu(te_cmd->id); in iwl_mvm_time_event_send_add()
610 list_add_tail(&te_data->list, &mvm->time_event_list); in iwl_mvm_time_event_send_add()
625 iwl_mvm_time_event_response, te_data); in iwl_mvm_time_event_send_add()
643 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_time_event_send_add()
655 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_protect_session() local
662 if (te_data->running && in iwl_mvm_protect_session()
663 time_after(te_data->end_jiffies, TU_TO_EXP_TIME(min_duration))) { in iwl_mvm_protect_session()
665 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_protect_session()
669 if (te_data->running) { in iwl_mvm_protect_session()
671 te_data->uid, in iwl_mvm_protect_session()
672 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_protect_session()
702 iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_protect_session()
713 iwl_mvm_te_notif, te_data); in iwl_mvm_protect_session()
716 if (iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd)) { in iwl_mvm_protect_session()
788 struct iwl_mvm_time_event_data *te_data, in __iwl_mvm_remove_time_event() argument
792 struct ieee80211_vif *vif = te_data->vif; in __iwl_mvm_remove_time_event()
803 mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); in __iwl_mvm_remove_time_event()
804 iftype = te_data->vif->type; in __iwl_mvm_remove_time_event()
813 *uid = te_data->uid; in __iwl_mvm_remove_time_event()
814 id = te_data->id; in __iwl_mvm_remove_time_event()
815 link_id = te_data->link_id; in __iwl_mvm_remove_time_event()
820 iwl_mvm_te_clear_data(mvm, te_data); in __iwl_mvm_remove_time_event()
870 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_remove_aux_roc_te() argument
878 if (!__iwl_mvm_remove_time_event(mvm, te_data, &uid)) in iwl_mvm_remove_aux_roc_te()
901 struct iwl_mvm_time_event_data *te_data) in iwl_mvm_remove_time_event() argument
907 if (!__iwl_mvm_remove_time_event(mvm, te_data, &uid)) in iwl_mvm_remove_time_event()
927 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_stop_session_protection() local
933 id = te_data->id; in iwl_mvm_stop_session_protection()
951 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_stop_session_protection()
995 struct iwl_mvm_time_event_data *te_data = in iwl_mvm_rx_session_protect_notif() local
1002 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_rx_session_protect_notif()
1008 te_data->running = le32_to_cpu(notif->start); in iwl_mvm_rx_session_protect_notif()
1009 te_data->end_jiffies = in iwl_mvm_rx_session_protect_notif()
1010 TU_TO_EXP_TIME(te_data->duration); in iwl_mvm_rx_session_protect_notif()
1022 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_rx_session_protect_notif()
1190 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_start_p2p_roc() local
1194 if (te_data->running) { in iwl_mvm_start_p2p_roc()
1238 return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_start_p2p_roc()
1243 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_get_roc_te() local
1256 list_for_each_entry(te_data, &mvm->time_event_list, list) { in iwl_mvm_get_roc_te()
1257 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) in iwl_mvm_get_roc_te()
1264 te_data = list_first_entry_or_null(&mvm->aux_roc_te_list, in iwl_mvm_get_roc_te()
1269 return te_data; in iwl_mvm_get_roc_te()
1274 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_cleanup_roc_te() local
1277 te_data = iwl_mvm_get_roc_te(mvm); in iwl_mvm_cleanup_roc_te()
1278 if (te_data) in iwl_mvm_cleanup_roc_te()
1279 __iwl_mvm_remove_time_event(mvm, te_data, &uid); in iwl_mvm_cleanup_roc_te()
1285 struct iwl_mvm_time_event_data *te_data; in iwl_mvm_stop_roc() local
1301 te_data = &mvmvif->time_event_data; in iwl_mvm_stop_roc()
1304 if (te_data->id >= SESSION_PROTECT_CONF_MAX_ID) { in iwl_mvm_stop_roc()
1311 te_data->id, in iwl_mvm_stop_roc()
1312 te_data->link_id); in iwl_mvm_stop_roc()
1320 te_data = iwl_mvm_get_roc_te(mvm); in iwl_mvm_stop_roc()
1321 if (!te_data) { in iwl_mvm_stop_roc()
1327 mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); in iwl_mvm_stop_roc()
1328 iftype = te_data->vif->type; in iwl_mvm_stop_roc()
1330 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_stop_roc()
1332 iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data); in iwl_mvm_stop_roc()
1353 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_remove_csa_period() local
1359 id = te_data->id; in iwl_mvm_remove_csa_period()
1365 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_remove_csa_period()
1373 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_schedule_csa_period() local
1378 if (te_data->running) { in iwl_mvm_schedule_csa_period()
1382 id = te_data->id; in iwl_mvm_schedule_csa_period()
1395 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); in iwl_mvm_schedule_csa_period()
1412 return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); in iwl_mvm_schedule_csa_period()
1448 struct iwl_mvm_time_event_data *te_data = &mvmvif->time_event_data; in iwl_mvm_schedule_session_protection() local
1465 if (te_data->running && te_data->link_id == link_id && in iwl_mvm_schedule_session_protection()
1466 time_after(te_data->end_jiffies, TU_TO_EXP_TIME(min_duration))) { in iwl_mvm_schedule_session_protection()
1468 jiffies_to_msecs(te_data->end_jiffies - jiffies)); in iwl_mvm_schedule_session_protection()
1474 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_schedule_session_protection()
1479 te_data->id = le32_to_cpu(cmd.conf_id); in iwl_mvm_schedule_session_protection()
1480 te_data->duration = le32_to_cpu(cmd.duration_tu); in iwl_mvm_schedule_session_protection()
1481 te_data->vif = vif; in iwl_mvm_schedule_session_protection()
1482 te_data->link_id = link_id; in iwl_mvm_schedule_session_protection()
1518 iwl_mvm_te_clear_data(mvm, te_data); in iwl_mvm_schedule_session_protection()