Lines Matching refs:pu

147 	ctx->data.pu.tx = pu_select_phy(ctx->data.pu.tx);  in pu_prep_update_ind()
148 ctx->data.pu.rx = pu_select_phy(ctx->data.pu.rx); in pu_prep_update_ind()
150 if (ctx->data.pu.tx != conn->lll.phy_tx) { in pu_prep_update_ind()
151 ctx->data.pu.c_to_p_phy = ctx->data.pu.tx; in pu_prep_update_ind()
153 ctx->data.pu.c_to_p_phy = 0U; in pu_prep_update_ind()
155 if (ctx->data.pu.rx != conn->lll.phy_rx) { in pu_prep_update_ind()
156 ctx->data.pu.p_to_c_phy = ctx->data.pu.rx; in pu_prep_update_ind()
158 ctx->data.pu.p_to_c_phy = 0U; in pu_prep_update_ind()
206 if (!phy_validation_check_phy_ind(ctx->data.pu.c_to_p_phy) || in pu_check_update_ind()
207 !phy_validation_check_phy_ind(ctx->data.pu.p_to_c_phy)) { in pu_check_update_ind()
209 ctx->data.pu.error = BT_HCI_ERR_UNSUPP_FEATURE_PARAM_VAL; in pu_check_update_ind()
214 if (!((ctx->data.pu.c_to_p_phy | ctx->data.pu.p_to_c_phy) & 0x07)) { in pu_check_update_ind()
216 ctx->data.pu.error = BT_HCI_ERR_SUCCESS; in pu_check_update_ind()
220 if (is_instant_reached_or_passed(ctx->data.pu.instant, in pu_check_update_ind()
222 ctx->data.pu.error = BT_HCI_ERR_INSTANT_PASSED; in pu_check_update_ind()
243 const uint8_t p_to_c_phy = ctx->data.pu.p_to_c_phy & phy_bitmask; in pu_apply_phy_update()
244 const uint8_t c_to_p_phy = ctx->data.pu.c_to_p_phy & phy_bitmask; in pu_apply_phy_update()
294 if ((ctx->data.pu.p_to_c_phy && (lll->role == BT_HCI_ROLE_PERIPHERAL)) || in pu_update_eff_times()
295 (ctx->data.pu.c_to_p_phy && (lll->role == BT_HCI_ROLE_CENTRAL))) { in pu_update_eff_times()
299 if ((ctx->data.pu.p_to_c_phy && (lll->role == BT_HCI_ROLE_CENTRAL)) || in pu_update_eff_times()
300 (ctx->data.pu.c_to_p_phy && (lll->role == BT_HCI_ROLE_PERIPHERAL))) { in pu_update_eff_times()
323 conn->phy_pref_rx = ctx->data.pu.rx; in pu_set_preferred_phys()
324 conn->phy_pref_tx = ctx->data.pu.tx; in pu_set_preferred_phys()
331 conn->lll.phy_flags = ctx->data.pu.flags; in pu_set_preferred_phys()
338 ctx->data.pu.rx &= rx; in pu_combine_phys()
339 ctx->data.pu.tx &= tx; in pu_combine_phys()
352 if (conn->lll.role == BT_HCI_ROLE_CENTRAL && (!ctx->data.pu.rx || !ctx->data.pu.tx)) { in pu_combine_phys()
353 ctx->data.pu.tx = 0; in pu_combine_phys()
354 ctx->data.pu.rx = 0; in pu_combine_phys()
364 if (ctx->data.pu.c_to_p_phy != 0 || ctx->data.pu.p_to_c_phy != 0) { in pu_prepare_instant()
365 ctx->data.pu.instant = ull_conn_event_counter(conn) + conn->lll.latency + in pu_prepare_instant()
368 ctx->data.pu.instant = 0; in pu_prepare_instant()
392 ctx->data.pu.ntf_dle_node = llcp_ntf_alloc(); in lp_pu_tx()
393 LL_ASSERT(ctx->data.pu.ntf_dle_node); in lp_pu_tx()
440 if (ctx->data.pu.ntf_pu) { in pu_ntf()
446 pdu->status = ctx->data.pu.error; in pu_ntf()
456 ctx->data.pu.ntf_pu = 0; in pu_ntf()
466 ntf = ctx->data.pu.ntf_dle_node; in pu_dle_ntf()
468 if (!ctx->data.pu.ntf_dle) { in pu_dle_ntf()
491 ctx->data.pu.ntf_dle = 0; in pu_dle_ntf()
492 ctx->data.pu.ntf_dle_node = NULL; in pu_dle_ntf()
590 uint8_t tx_pref = ctx->data.pu.tx; in lp_pu_st_wait_rx_phy_rsp()
591 uint8_t rx_pref = ctx->data.pu.rx; in lp_pu_st_wait_rx_phy_rsp()
614 ctx->data.pu.error = BT_HCI_ERR_UNSUPP_REMOTE_FEATURE; in lp_pu_st_wait_rx_phy_rsp()
615 ctx->data.pu.ntf_pu = 1; in lp_pu_st_wait_rx_phy_rsp()
642 conn, pu_select_phy_timing_restrict(conn, ctx->data.pu.tx)); in lp_pu_st_wait_tx_ack_phy_req()
680 if (ctx->data.pu.p_to_c_phy || ctx->data.pu.c_to_p_phy) { in lp_pu_st_wait_tx_ack_phy_update_ind()
682 if (ctx->data.pu.c_to_p_phy) { in lp_pu_st_wait_tx_ack_phy_update_ind()
684 pu_set_timing_restrict(conn, ctx->data.pu.c_to_p_phy); in lp_pu_st_wait_tx_ack_phy_update_ind()
696 ctx->data.pu.error = BT_HCI_ERR_SUCCESS; in lp_pu_st_wait_tx_ack_phy_update_ind()
697 ctx->data.pu.ntf_pu = ctx->data.pu.host_initiated; in lp_pu_st_wait_tx_ack_phy_update_ind()
724 if (ctx->data.pu.p_to_c_phy) { in lp_pu_st_wait_rx_phy_update_ind()
726 pu_set_timing_restrict(conn, ctx->data.pu.p_to_c_phy); in lp_pu_st_wait_rx_phy_update_ind()
737 if (ctx->data.pu.error != BT_HCI_ERR_SUCCESS) { in lp_pu_st_wait_rx_phy_update_ind()
739 conn->llcp_terminate.reason_final = ctx->data.pu.error; in lp_pu_st_wait_rx_phy_update_ind()
741 ctx->data.pu.ntf_pu = ctx->data.pu.host_initiated; in lp_pu_st_wait_rx_phy_update_ind()
748 ctx->data.pu.error = ctx->reject_ext_ind.error_code; in lp_pu_st_wait_rx_phy_update_ind()
754 ctx->data.pu.error = BT_HCI_ERR_UNSUPP_REMOTE_FEATURE; in lp_pu_st_wait_rx_phy_update_ind()
759 ctx->data.pu.ntf_pu = 1; in lp_pu_st_wait_rx_phy_update_ind()
773 if (is_instant_reached_or_passed(ctx->data.pu.instant, ull_conn_event_counter(conn))) { in lp_pu_check_instant()
777 ctx->data.pu.ntf_dle = pu_update_eff_times(conn, ctx); in lp_pu_check_instant()
781 ctx->data.pu.error = BT_HCI_ERR_SUCCESS; in lp_pu_check_instant()
782 ctx->data.pu.ntf_pu = (phy_changed || ctx->data.pu.host_initiated); in lp_pu_check_instant()
941 ctx->data.pu.ntf_dle_node = llcp_ntf_alloc(); in rp_pu_tx()
942 LL_ASSERT(ctx->data.pu.ntf_dle_node); in rp_pu_tx()
1111 conn, pu_select_phy_timing_restrict(conn, ctx->data.pu.tx)); in rp_pu_st_wait_tx_ack_phy()
1118 if (ctx->data.pu.c_to_p_phy || ctx->data.pu.p_to_c_phy) { in rp_pu_st_wait_tx_ack_phy()
1120 if (ctx->data.pu.c_to_p_phy) { in rp_pu_st_wait_tx_ack_phy()
1125 pu_set_timing_restrict(conn, ctx->data.pu.c_to_p_phy); in rp_pu_st_wait_tx_ack_phy()
1177 if (ctx->data.pu.error == BT_HCI_ERR_INSTANT_PASSED) { in rp_pu_st_wait_rx_phy_update_ind()
1194 if (is_instant_reached_or_passed(ctx->data.pu.instant, ull_conn_event_counter(conn))) { in rp_pu_check_instant()
1195 ctx->data.pu.error = BT_HCI_ERR_SUCCESS; in rp_pu_check_instant()
1199 ctx->data.pu.ntf_dle = pu_update_eff_times(conn, ctx); in rp_pu_check_instant()
1203 ctx->data.pu.ntf_pu = phy_changed; in rp_pu_check_instant()