Lines Matching full:state

18 static const char * const state2str(enum gptp_port_state state)  in state2str()  argument
20 switch (state) { in state2str()
44 static const char * const pa_info_state2str(enum gptp_pa_info_states state) in pa_info_state2str() argument
46 switch (state) { in pa_info_state2str()
72 void gptp_change_port_state_debug(int port, enum gptp_port_state state, in gptp_change_port_state_debug() argument
76 void gptp_change_port_state(int port, enum gptp_port_state state) in gptp_change_port_state_debug()
81 if (global_ds->selected_role[port] == state) { in gptp_change_port_state_debug()
86 NET_DBG("[%d] state %s -> %s (%s():%d)", port, in gptp_change_port_state_debug()
88 state2str(state), caller, line); in gptp_change_port_state_debug()
91 global_ds->selected_role[port] = state; in gptp_change_port_state_debug()
98 enum gptp_pa_info_states state, in gptp_change_pa_info_state_debug() argument
105 enum gptp_pa_info_states state) in gptp_change_pa_info_state_debug()
108 if (pa_info_state->state == state) { in gptp_change_pa_info_state_debug()
113 NET_DBG("[%d] PA info state %s -> %s (%s():%d)", port, in gptp_change_pa_info_state_debug()
114 pa_info_state2str(pa_info_state->state), in gptp_change_pa_info_state_debug()
115 pa_info_state2str(state), caller, line); in gptp_change_pa_info_state_debug()
118 pa_info_state->state = state; in gptp_change_pa_info_state_debug()
123 struct gptp_pss_send_state *state; in gptp_mi_half_sync_itv_timeout() local
127 state = &GPTP_PORT_STATE(port)->pss_send; in gptp_mi_half_sync_itv_timeout()
128 if (&state->half_sync_itv_timer == timer) { in gptp_mi_half_sync_itv_timeout()
129 if (!state->half_sync_itv_timer_expired) { in gptp_mi_half_sync_itv_timeout()
130 state->half_sync_itv_timer_expired = true; in gptp_mi_half_sync_itv_timeout()
135 state->sync_itv_timer_expired = true; in gptp_mi_half_sync_itv_timeout()
143 struct gptp_pss_rcv_state *state; in gptp_mi_rcv_sync_receipt_timeout() local
147 state = &GPTP_PORT_STATE(port)->pss_rcv; in gptp_mi_rcv_sync_receipt_timeout()
148 if (&state->rcv_sync_receipt_timeout_timer == timer) { in gptp_mi_rcv_sync_receipt_timeout()
149 state->rcv_sync_receipt_timeout_timer_expired = true; in gptp_mi_rcv_sync_receipt_timeout()
158 struct gptp_pss_send_state *state; in gptp_mi_send_sync_receipt_timeout() local
162 state = &GPTP_PORT_STATE(port)->pss_send; in gptp_mi_send_sync_receipt_timeout()
163 if (&state->send_sync_receipt_timeout_timer == timer) { in gptp_mi_send_sync_receipt_timeout()
164 state->send_sync_receipt_timeout_timer_expired = true; in gptp_mi_send_sync_receipt_timeout()
181 pss_rcv->state = GPTP_PSS_RCV_DISCARD; in gptp_mi_init_port_sync_sync_rcv_sm()
196 pss_send->state = GPTP_PSS_SEND_TRANSMIT_INIT; in gptp_mi_init_port_sync_sync_send_sm()
205 site_ss->state = GPTP_SSS_INITIALIZING; in gptp_mi_init_site_sync_sync_sm()
214 clk_ss->state = GPTP_CLK_SLAVE_SYNC_INITIALIZING; in gptp_mi_init_clock_slave_sync_sm()
224 pa_rcv->state = GPTP_PA_RCV_DISCARD; in gptp_mi_init_port_announce_rcv_sm()
233 cms_rcv->state = GPTP_CMS_RCV_INITIALIZING; in gptp_mi_init_clock_master_sync_rcv_sm()
239 struct gptp_port_announce_information_state *state; in announce_timer_handler() local
242 state = &GPTP_PORT_STATE(port)->pa_info; in announce_timer_handler()
243 if (&state->ann_rcpt_expiry_timer == timer) { in announce_timer_handler()
244 state->ann_expired = true; in announce_timer_handler()
253 struct gptp_port_announce_information_state *state; in gptp_mi_init_port_announce_info_sm() local
255 state = &GPTP_PORT_STATE(port)->pa_info; in gptp_mi_init_port_announce_info_sm()
257 k_timer_init(&state->ann_rcpt_expiry_timer, in gptp_mi_init_port_announce_info_sm()
260 state->ann_expired = false; in gptp_mi_init_port_announce_info_sm()
261 gptp_change_pa_info_state(port, state, GPTP_PA_INFO_DISABLED); in gptp_mi_init_port_announce_info_sm()
284 struct gptp_port_announce_transmit_state *state; in announce_periodic_timer_handler() local
287 state = &GPTP_PORT_STATE(port)->pa_transmit; in announce_periodic_timer_handler()
288 if (&state->ann_send_periodic_timer == timer) { in announce_periodic_timer_handler()
289 state->ann_trigger = true; in announce_periodic_timer_handler()
297 struct gptp_port_announce_transmit_state *state; in gptp_mi_init_port_announce_transmit_sm() local
299 state = &GPTP_PORT_STATE(port)->pa_transmit; in gptp_mi_init_port_announce_transmit_sm()
301 k_timer_init(&state->ann_send_periodic_timer, in gptp_mi_init_port_announce_transmit_sm()
304 state->ann_trigger = false; in gptp_mi_init_port_announce_transmit_sm()
305 state->state = GPTP_PA_TRANSMIT_INIT; in gptp_mi_init_port_announce_transmit_sm()
310 GPTP_STATE()->pr_sel.state = GPTP_PR_SELECTION_INIT_BRIDGE; in gptp_mi_init_port_role_selection_sm()
376 struct gptp_pss_rcv_state *state; in gptp_mi_pss_rcv_compute() local
381 state = &GPTP_PORT_STATE(port)->pss_rcv; in gptp_mi_pss_rcv_compute()
382 pss = &state->pss; in gptp_mi_pss_rcv_compute()
383 sync_rcv = &state->sync_rcv; in gptp_mi_pss_rcv_compute()
386 state->rate_ratio = sync_rcv->rate_ratio; in gptp_mi_pss_rcv_compute()
387 state->rate_ratio += (port_ds->neighbor_rate_ratio - 1.0); in gptp_mi_pss_rcv_compute()
402 pss->sync_info.rate_ratio = state->rate_ratio; in gptp_mi_pss_rcv_compute()
406 struct gptp_pss_rcv_state *state) in start_rcv_sync_timer() argument
413 k_timer_start(&state->rcv_sync_receipt_timeout_timer, duration, in start_rcv_sync_timer()
419 struct gptp_pss_rcv_state *state; in gptp_mi_pss_rcv_state_machine() local
423 state = &GPTP_PORT_STATE(port)->pss_rcv; in gptp_mi_pss_rcv_state_machine()
428 state->rcvd_md_sync = false; in gptp_mi_pss_rcv_state_machine()
429 state->state = GPTP_PSS_RCV_DISCARD; in gptp_mi_pss_rcv_state_machine()
433 switch (state->state) { in gptp_mi_pss_rcv_state_machine()
435 k_timer_stop(&state->rcv_sync_receipt_timeout_timer); in gptp_mi_pss_rcv_state_machine()
436 state->rcv_sync_receipt_timeout_timer_expired = false; in gptp_mi_pss_rcv_state_machine()
440 if (state->rcvd_md_sync) { in gptp_mi_pss_rcv_state_machine()
441 state->rcvd_md_sync = false; in gptp_mi_pss_rcv_state_machine()
444 state->state = GPTP_PSS_RCV_RECEIVED_SYNC; in gptp_mi_pss_rcv_state_machine()
446 site_ss_state->pss_rcv_ptr = &state->pss; in gptp_mi_pss_rcv_state_machine()
449 k_timer_stop(&state->rcv_sync_receipt_timeout_timer); in gptp_mi_pss_rcv_state_machine()
450 state->rcv_sync_receipt_timeout_timer_expired = false; in gptp_mi_pss_rcv_state_machine()
453 start_rcv_sync_timer(port_ds, state); in gptp_mi_pss_rcv_state_machine()
463 struct gptp_pss_send_state *state; in gptp_mi_pss_store_last_pss() local
467 state = &GPTP_PORT_STATE(port)->pss_send; in gptp_mi_pss_store_last_pss()
468 pss_ptr = state->pss_sync_ptr; in gptp_mi_pss_store_last_pss()
471 state->last_rcvd_port_num = pss_ptr->local_port_number; in gptp_mi_pss_store_last_pss()
473 memcpy(&state->last_precise_orig_ts, &sync_info->precise_orig_ts, in gptp_mi_pss_store_last_pss()
475 memcpy(&state->last_gm_phase_change, &sync_info->last_gm_phase_change, in gptp_mi_pss_store_last_pss()
478 state->last_follow_up_correction_field = in gptp_mi_pss_store_last_pss()
480 state->last_rate_ratio = sync_info->rate_ratio; in gptp_mi_pss_store_last_pss()
481 state->last_upstream_tx_time = sync_info->upstream_tx_time; in gptp_mi_pss_store_last_pss()
482 state->last_gm_time_base_indicator = sync_info->gm_time_base_indicator; in gptp_mi_pss_store_last_pss()
483 state->last_gm_freq_change = sync_info->last_gm_freq_change; in gptp_mi_pss_store_last_pss()
488 struct gptp_pss_send_state *state; in gptp_mi_pss_send_md_sync_send() local
492 state = &GPTP_PORT_STATE(port)->pss_send; in gptp_mi_pss_send_md_sync_send()
493 pss_ptr = state->pss_sync_ptr; in gptp_mi_pss_send_md_sync_send()
496 memcpy(&state->sync_send, &pss_ptr->sync_info, in gptp_mi_pss_send_md_sync_send()
499 sync_send->sync_send_ptr = &state->sync_send; in gptp_mi_pss_send_md_sync_send()
505 struct gptp_pss_send_state *state; in gptp_mi_pss_send_state_machine() local
511 state = &GPTP_PORT_STATE(port)->pss_send; in gptp_mi_pss_send_state_machine()
514 /* Reset interval as defined in LinkDelaySyncIntervalSetting state in gptp_mi_pss_send_state_machine()
521 if (state->rcvd_pss_sync && ((!port_ds->ptt_port_enabled) || in gptp_mi_pss_send_state_machine()
523 state->rcvd_pss_sync = false; in gptp_mi_pss_send_state_machine()
524 state->state = GPTP_PSS_SEND_TRANSMIT_INIT; in gptp_mi_pss_send_state_machine()
529 switch (state->state) { in gptp_mi_pss_send_state_machine()
532 if (state->rcvd_pss_sync && in gptp_mi_pss_send_state_machine()
533 (state->pss_sync_ptr->local_port_number != port) && in gptp_mi_pss_send_state_machine()
535 state->state = GPTP_PSS_SEND_SEND_MD_SYNC; in gptp_mi_pss_send_state_machine()
542 if (state->rcvd_pss_sync) { in gptp_mi_pss_send_state_machine()
544 state->rcvd_pss_sync = false; in gptp_mi_pss_send_state_machine()
548 k_timer_stop(&state->half_sync_itv_timer); in gptp_mi_pss_send_state_machine()
549 k_timer_stop(&state->send_sync_receipt_timeout_timer); in gptp_mi_pss_send_state_machine()
551 state->half_sync_itv_timer_expired = false; in gptp_mi_pss_send_state_machine()
552 state->sync_itv_timer_expired = false; in gptp_mi_pss_send_state_machine()
553 state->send_sync_receipt_timeout_timer_expired = false; in gptp_mi_pss_send_state_machine()
560 k_timer_start(&state->half_sync_itv_timer, duration, in gptp_mi_pss_send_state_machine()
566 memcpy(&state->pss_sync_ptr->sync_info.src_port_id.clk_id, in gptp_mi_pss_send_state_machine()
569 state->pss_sync_ptr->sync_info.src_port_id.port_number = port; in gptp_mi_pss_send_state_machine()
579 * already tested with rcvdPSSync for the reset of this state in gptp_mi_pss_send_state_machine()
583 ((state->rcvd_pss_sync && in gptp_mi_pss_send_state_machine()
584 state->half_sync_itv_timer_expired && in gptp_mi_pss_send_state_machine()
585 state->pss_sync_ptr->local_port_number != port) || in gptp_mi_pss_send_state_machine()
586 (state->sync_itv_timer_expired && in gptp_mi_pss_send_state_machine()
587 (state->last_rcvd_port_num != port) && in gptp_mi_pss_send_state_machine()
590 state->state = GPTP_PSS_SEND_SEND_MD_SYNC; in gptp_mi_pss_send_state_machine()
592 } else if ((state->state == GPTP_PSS_SEND_SEND_MD_SYNC) || in gptp_mi_pss_send_state_machine()
593 (state->rcvd_pss_sync && in gptp_mi_pss_send_state_machine()
594 !state->sync_itv_timer_expired && in gptp_mi_pss_send_state_machine()
597 state->pss_sync_ptr->local_port_number != port)) { in gptp_mi_pss_send_state_machine()
599 /* Change state as it may have transitioned from in gptp_mi_pss_send_state_machine()
602 state->state = GPTP_PSS_SEND_SET_SYNC_RECEIPT_TIMEOUT; in gptp_mi_pss_send_state_machine()
605 k_timer_stop(&state->send_sync_receipt_timeout_timer); in gptp_mi_pss_send_state_machine()
606 state->send_sync_receipt_timeout_timer_expired = false; in gptp_mi_pss_send_state_machine()
612 k_timer_start(&state->send_sync_receipt_timeout_timer, in gptp_mi_pss_send_state_machine()
615 } else if (state->send_sync_receipt_timeout_timer_expired) { in gptp_mi_pss_send_state_machine()
616 state->state = GPTP_PSS_SEND_SYNC_RECEIPT_TIMEOUT; in gptp_mi_pss_send_state_machine()
625 struct gptp_site_sync_sync_state *state; in gptp_mi_site_ss_prepare_pss_send() local
627 state = &GPTP_STATE()->site_ss; in gptp_mi_site_ss_prepare_pss_send()
629 memcpy(&state->pss_send, state->pss_rcv_ptr, in gptp_mi_site_ss_prepare_pss_send()
635 struct gptp_site_sync_sync_state *state; in gptp_mi_site_ss_send_to_pss() local
639 state = &GPTP_STATE()->site_ss; in gptp_mi_site_ss_send_to_pss()
643 pss_send->pss_sync_ptr = &state->pss_send; in gptp_mi_site_ss_send_to_pss()
652 struct gptp_site_sync_sync_state *state; in gptp_mi_site_sync_sync_state_machine() local
655 state = &GPTP_STATE()->site_ss; in gptp_mi_site_sync_sync_state_machine()
659 if (!state->pss_rcv_ptr) { in gptp_mi_site_sync_sync_state_machine()
664 local_port_number = state->pss_rcv_ptr->local_port_number; in gptp_mi_site_sync_sync_state_machine()
666 switch (state->state) { in gptp_mi_site_sync_sync_state_machine()
668 state->rcvd_pss = false; in gptp_mi_site_sync_sync_state_machine()
669 state->state = GPTP_SSS_RECEIVING_SYNC; in gptp_mi_site_sync_sync_state_machine()
673 if (state->rcvd_pss) { in gptp_mi_site_sync_sync_state_machine()
674 state->rcvd_pss = false; in gptp_mi_site_sync_sync_state_machine()
681 * PortSyncSyncSend State Machines. in gptp_mi_site_sync_sync_state_machine()
687 * ClockSlaveSync State Machine. in gptp_mi_site_sync_sync_state_machine()
689 clk_ss->pss_rcv_ptr = &state->pss_send; in gptp_mi_site_sync_sync_state_machine()
700 struct gptp_clk_slave_sync_state *state; in gptp_mi_clk_slave_sync_compute() local
707 state = &GPTP_STATE()->clk_slave_sync; in gptp_mi_clk_slave_sync_compute()
710 port_ds = GPTP_PORT_DS(state->pss_rcv_ptr->local_port_number); in gptp_mi_clk_slave_sync_compute()
712 pss = &state->pss_rcv_ptr->sync_info; in gptp_mi_clk_slave_sync_compute()
744 struct gptp_clk_slave_sync_state *state; in gptp_update_local_port_clock() local
754 state = &GPTP_STATE()->clk_slave_sync; in gptp_update_local_port_clock()
756 port = state->pss_rcv_ptr->local_port_number; in gptp_update_local_port_clock()
853 struct gptp_clk_slave_sync_state *state; in gptp_mi_clk_slave_sync_state_machine() local
855 state = &GPTP_STATE()->clk_slave_sync; in gptp_mi_clk_slave_sync_state_machine()
857 switch (state->state) { in gptp_mi_clk_slave_sync_state_machine()
859 state->rcvd_pss = false; in gptp_mi_clk_slave_sync_state_machine()
860 state->state = GPTP_CLK_SLAVE_SYNC_SEND_SYNC_IND; in gptp_mi_clk_slave_sync_state_machine()
864 if (state->rcvd_pss) { in gptp_mi_clk_slave_sync_state_machine()
865 state->rcvd_pss = false; in gptp_mi_clk_slave_sync_state_machine()
881 struct gptp_clk_master_sync_offset_state *state; in gptp_mi_clk_master_sync_offset_state_machine() local
884 state = &GPTP_STATE()->clk_master_sync_offset; in gptp_mi_clk_master_sync_offset_state_machine()
887 switch (state->state) { in gptp_mi_clk_master_sync_offset_state_machine()
889 state->rcvd_sync_receipt_time = false; in gptp_mi_clk_master_sync_offset_state_machine()
890 state->state = GPTP_CMS_OFFSET_INDICATION; in gptp_mi_clk_master_sync_offset_state_machine()
893 if (!state->rcvd_sync_receipt_time) { in gptp_mi_clk_master_sync_offset_state_machine()
897 state->rcvd_sync_receipt_time = false; in gptp_mi_clk_master_sync_offset_state_machine()
916 NET_ERR("Unrecognised state %d", state->state); in gptp_mi_clk_master_sync_offset_state_machine()
924 struct gptp_clk_master_sync_snd_state *state; in gptp_mi_setup_sync_send_time() local
928 state = &GPTP_STATE()->clk_master_sync_send; in gptp_mi_setup_sync_send_time()
931 time_helper = state->sync_send_time.low; in gptp_mi_setup_sync_send_time()
933 state->sync_send_time.low += in gptp_mi_setup_sync_send_time()
937 if (state->sync_send_time.low < time_helper) { in gptp_mi_setup_sync_send_time()
938 state->sync_send_time.high += 1U; in gptp_mi_setup_sync_send_time()
939 state->sync_send_time.low = in gptp_mi_setup_sync_send_time()
940 UINT64_MAX - state->sync_send_time.low; in gptp_mi_setup_sync_send_time()
946 struct gptp_clk_master_sync_snd_state *state; in gptp_mi_set_ps_sync_cmss() local
952 state = &GPTP_STATE()->clk_master_sync_send; in gptp_mi_set_ps_sync_cmss()
954 sync_info = &state->pss_snd.sync_info; in gptp_mi_set_ps_sync_cmss()
956 state->pss_snd.local_port_number = 0U; in gptp_mi_set_ps_sync_cmss()
983 state->pss_snd.sync_receipt_timeout_time = UINT64_MAX; in gptp_mi_set_ps_sync_cmss()
997 struct gptp_clk_master_sync_snd_state *state; in gptp_mi_tx_ps_sync_cmss() local
1001 state = &GPTP_STATE()->clk_master_sync_send; in gptp_mi_tx_ps_sync_cmss()
1005 pss_send->pss_sync_ptr = &state->pss_snd; in gptp_mi_tx_ps_sync_cmss()
1013 struct gptp_clk_master_sync_snd_state *state; in gptp_mi_clk_master_sync_snd_state_machine() local
1016 state = &GPTP_STATE()->clk_master_sync_send; in gptp_mi_clk_master_sync_snd_state_machine()
1018 switch (state->state) { in gptp_mi_clk_master_sync_snd_state_machine()
1022 state->state = GPTP_CMS_SND_INDICATION; in gptp_mi_clk_master_sync_snd_state_machine()
1028 if (current_time >= state->sync_send_time.low) { in gptp_mi_clk_master_sync_snd_state_machine()
1038 NET_ERR("Unrecognised state %d", state->state); in gptp_mi_clk_master_sync_snd_state_machine()
1052 struct gptp_clk_master_sync_rcv_state *state; in gptp_compute_gm_rate_ratio() local
1056 state = &GPTP_STATE()->clk_master_sync_receive; in gptp_compute_gm_rate_ratio()
1060 memcpy(&src_time_n, &state->rcvd_clk_src_req.src_time, in gptp_compute_gm_rate_ratio()
1164 switch (s->state) { in gptp_mi_clk_master_sync_rcv_state_machine()
1166 s->state = GPTP_CMS_RCV_WAITING; in gptp_mi_clk_master_sync_rcv_state_machine()
1171 s->state = GPTP_CMS_RCV_SOURCE_TIME; in gptp_mi_clk_master_sync_rcv_state_machine()
1200 s->state = GPTP_CMS_RCV_WAITING; in gptp_mi_clk_master_sync_rcv_state_machine()
1204 NET_ERR("Unrecognised state %d", s->state); in gptp_mi_clk_master_sync_rcv_state_machine()
1270 struct gptp_port_announce_receive_state *state; in gptp_mi_port_announce_receive_state_machine() local
1273 state = &GPTP_PORT_STATE(port)->pa_rcv; in gptp_mi_port_announce_receive_state_machine()
1278 state->state = GPTP_PA_RCV_DISCARD; in gptp_mi_port_announce_receive_state_machine()
1281 switch (state->state) { in gptp_mi_port_announce_receive_state_machine()
1283 state->rcvd_announce = false; in gptp_mi_port_announce_receive_state_machine()
1290 state->state = GPTP_PA_RCV_RECEIVE; in gptp_mi_port_announce_receive_state_machine()
1295 if (state->rcvd_announce && in gptp_mi_port_announce_receive_state_machine()
1299 state->rcvd_announce = false; in gptp_mi_port_announce_receive_state_machine()
1429 struct gptp_port_announce_information_state *state; in gptp_mi_port_announce_information_state_machine() local
1436 state = &GPTP_PORT_STATE(port)->pa_info; in gptp_mi_port_announce_information_state_machine()
1442 gptp_change_pa_info_state(port, state, GPTP_PA_INFO_DISABLED); in gptp_mi_port_announce_information_state_machine()
1445 switch (state->state) { in gptp_mi_port_announce_information_state_machine()
1451 gptp_change_pa_info_state(port, state, in gptp_mi_port_announce_information_state_machine()
1453 k_timer_stop(&state->ann_rcpt_expiry_timer); in gptp_mi_port_announce_information_state_machine()
1454 state->ann_expired = true; in gptp_mi_port_announce_information_state_machine()
1459 gptp_change_pa_info_state(port, state, in gptp_mi_port_announce_information_state_machine()
1462 gptp_change_pa_info_state(port, state, in gptp_mi_port_announce_information_state_machine()
1472 /* Transition will be actually tested in UPDATE state. */ in gptp_mi_port_announce_information_state_machine()
1473 gptp_change_pa_info_state(port, state, GPTP_PA_INFO_UPDATE); in gptp_mi_port_announce_information_state_machine()
1487 gptp_change_pa_info_state(port, state, in gptp_mi_port_announce_information_state_machine()
1496 gptp_change_pa_info_state(port, state, in gptp_mi_port_announce_information_state_machine()
1499 gptp_change_pa_info_state(port, state, in gptp_mi_port_announce_information_state_machine()
1504 (state->ann_expired || in gptp_mi_port_announce_information_state_machine()
1507 gptp_change_pa_info_state(port, state, in gptp_mi_port_announce_information_state_machine()
1516 gptp_change_pa_info_state(port, state, in gptp_mi_port_announce_information_state_machine()
1520 gptp_change_pa_info_state(port, state, in gptp_mi_port_announce_information_state_machine()
1526 gptp_change_pa_info_state(port, state, in gptp_mi_port_announce_information_state_machine()
1542 gptp_change_pa_info_state(port, state, in gptp_mi_port_announce_information_state_machine()
1563 k_timer_stop(&state->ann_rcpt_expiry_timer); in gptp_mi_port_announce_information_state_machine()
1564 state->ann_expired = false; in gptp_mi_port_announce_information_state_machine()
1565 k_timer_start(&state->ann_rcpt_expiry_timer, in gptp_mi_port_announce_information_state_machine()
1578 gptp_change_pa_info_state(port, state, GPTP_PA_INFO_CURRENT); in gptp_mi_port_announce_information_state_machine()
1902 struct gptp_port_role_selection_state *state; in gptp_mi_port_role_selection_state_machine() local
1904 state = &GPTP_STATE()->pr_sel; in gptp_mi_port_role_selection_state_machine()
1906 switch (state->state) { in gptp_mi_port_role_selection_state_machine()
1909 state->state = GPTP_PR_SELECTION_ROLE_SELECTION; in gptp_mi_port_role_selection_state_machine()
1940 struct gptp_port_announce_transmit_state *state; in gptp_mi_port_announce_transmit_state_machine() local
1946 state = &GPTP_PORT_STATE(port)->pa_transmit; in gptp_mi_port_announce_transmit_state_machine()
1949 * state machine. in gptp_mi_port_announce_transmit_state_machine()
1955 switch (state->state) { in gptp_mi_port_announce_transmit_state_machine()
1961 k_timer_stop(&state->ann_send_periodic_timer); in gptp_mi_port_announce_transmit_state_machine()
1962 state->ann_trigger = false; in gptp_mi_port_announce_transmit_state_machine()
1963 k_timer_start(&state->ann_send_periodic_timer, in gptp_mi_port_announce_transmit_state_machine()
1968 state->state = GPTP_PA_TRANSMIT_POST_IDLE; in gptp_mi_port_announce_transmit_state_machine()
1974 state->ann_trigger) { in gptp_mi_port_announce_transmit_state_machine()
1976 state->state = GPTP_PA_TRANSMIT_PERIODIC; in gptp_mi_port_announce_transmit_state_machine()
1980 !state->ann_trigger && in gptp_mi_port_announce_transmit_state_machine()
1987 state->state = GPTP_PA_TRANSMIT_IDLE; in gptp_mi_port_announce_transmit_state_machine()
1996 state->state = GPTP_PA_TRANSMIT_IDLE; in gptp_mi_port_announce_transmit_state_machine()
2023 * Only call ClockMasterSyncSend state machine in case a Grand Master clock in gptp_mi_state_machines()
2026 * 10.2.9.3, the SiteSyncSync state machine shall not take into account in gptp_mi_state_machines()
2029 * state machine send sync indication to the PortSync entities, instead of in gptp_mi_state_machines()
2030 * sending it to the SiteSyncSync entity. And the SiteSyncSync state machine in gptp_mi_state_machines()