/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_data_length_update/src/ |
D | main.c | 52 static struct ll_conn conn; variable 56 test_setup(&conn); in dle_setup() 92 test_set_role(&conn, BT_HCI_ROLE_CENTRAL); in ZTEST() 94 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST() 98 ull_dle_init(&conn, PHY_1M); in ZTEST() 101 err = ull_cp_data_length_update(&conn, 211, 1800); in ZTEST() 104 event_prepare(&conn); in ZTEST() 106 lt_rx(LL_LENGTH_REQ, &conn, &tx, &local_length_req); in ZTEST() 107 lt_rx_q_is_empty(&conn); in ZTEST() 110 event_tx_ack(&conn, tx); in ZTEST() [all …]
|
/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_chmu/src/ |
D | main.c | 47 static struct ll_conn conn; variable 51 test_setup(&conn); in chmu_setup() 54 static bool is_instant_reached(struct ll_conn *conn, uint16_t instant) in is_instant_reached() argument 56 return ((event_counter(conn) - instant) & 0xFFFF) <= 0x7FFF; in is_instant_reached() 73 memcpy(initial_chm, conn.lll.data_chan_map, sizeof(conn.lll.data_chan_map)); in ZTEST() 76 test_set_role(&conn, BT_HCI_ROLE_CENTRAL); in ZTEST() 79 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST() 81 err = ull_cp_chan_map_update(&conn, chm); in ZTEST() 85 event_prepare(&conn); in ZTEST() 88 lt_rx(LL_CHAN_MAP_UPDATE_IND, &conn, &tx, &chmu_ind); in ZTEST() [all …]
|
/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_conn_update/src/ |
D | main.c | 168 static struct ll_conn conn; variable 173 bool ull_handle_cpr_anchor_point_move(struct ll_conn *conn, uint16_t *offsets, uint8_t *status) in ull_handle_cpr_anchor_point_move() argument 180 static void test_unmask_feature_conn_param_req(struct ll_conn *conn) in test_unmask_feature_conn_param_req() argument 182 conn->llcp.fex.features_used &= ~BIT64(BT_LE_FEAT_BIT_CONN_PARAM_REQ); in test_unmask_feature_conn_param_req() 185 static bool test_get_feature_conn_param_req(struct ll_conn *conn) in test_get_feature_conn_param_req() argument 187 return (conn->llcp.fex.features_used & BIT64(BT_LE_FEAT_BIT_CONN_PARAM_REQ)); in test_get_feature_conn_param_req() 193 test_setup(&conn); in conn_update_setup() 201 struct lll_conn *lll = &conn.lll; in conn_update_setup() 205 conn.supervision_timeout = 1U; in conn_update_setup() 209 static bool is_instant_reached(struct ll_conn *conn, uint16_t instant) in is_instant_reached() argument [all …]
|
/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_phy_update/src/ |
D | main.c | 54 static struct ll_conn conn; variable 58 test_setup(&conn); in phy_setup() 61 conn.phy_pref_rx = PHY_1M | PHY_2M | PHY_CODED; in phy_setup() 62 conn.phy_pref_tx = PHY_1M | PHY_2M | PHY_CODED; in phy_setup() 63 conn.lll.phy_flags = PREFER_S2_CODING; in phy_setup() 64 conn.lll.phy_tx_time = PHY_1M; in phy_setup() 65 conn.lll.phy_rx = PHY_1M; in phy_setup() 66 conn.lll.phy_tx = PHY_1M; in phy_setup() 71 ull_dle_init(&conn, PHY_1M); in phy_setup() 73 conn.lll.dle.remote.max_tx_octets = PDU_DC_PAYLOAD_SIZE_MIN * 3; in phy_setup() [all …]
|
/Zephyr-Core-3.4.0/subsys/bluetooth/controller/ll_sw/ |
D | ull_llcp_local.c | 51 static struct proc_ctx *lr_dequeue(struct ll_conn *conn); 76 void llcp_lr_check_done(struct ll_conn *conn, struct proc_ctx *ctx) in llcp_lr_check_done() argument 81 ctx_header = llcp_lr_peek(conn); in llcp_lr_check_done() 84 lr_dequeue(conn); in llcp_lr_check_done() 122 static void lr_set_state(struct ll_conn *conn, enum lr_state state) in lr_set_state() argument 124 conn->llcp.local.state = state; in lr_set_state() 127 void llcp_lr_enqueue(struct ll_conn *conn, struct proc_ctx *ctx) in llcp_lr_enqueue() argument 135 sys_slist_append(&conn->llcp.local.pend_proc_list, &ctx->node); in llcp_lr_enqueue() 140 static struct proc_ctx *lr_dequeue(struct ll_conn *conn) in lr_dequeue() argument 150 ctx = (struct proc_ctx *)sys_slist_get(&conn->llcp.local.pend_proc_list); in lr_dequeue() [all …]
|
D | ull_llcp_remote.c | 52 static struct proc_ctx *rr_dequeue(struct ll_conn *conn); 113 void llcp_rr_check_done(struct ll_conn *conn, struct proc_ctx *ctx) in llcp_rr_check_done() argument 118 ctx_header = llcp_rr_peek(conn); in llcp_rr_check_done() 121 rr_dequeue(conn); in llcp_rr_check_done() 130 static void rr_set_state(struct ll_conn *conn, enum rr_state state) in rr_set_state() argument 132 conn->llcp.remote.state = state; in rr_set_state() 135 void llcp_rr_set_incompat(struct ll_conn *conn, enum proc_incompat incompat) in llcp_rr_set_incompat() argument 137 conn->llcp.remote.incompat = incompat; in llcp_rr_set_incompat() 140 void llcp_rr_set_paused_cmd(struct ll_conn *conn, enum llcp_proc proc) in llcp_rr_set_paused_cmd() argument 143 conn->llcp.remote.paused_cmd = proc; in llcp_rr_set_paused_cmd() [all …]
|
D | ull_llcp_features.h | 7 static inline void feature_unmask_features(struct ll_conn *conn, uint64_t ll_feat_mask) in feature_unmask_features() argument 9 conn->llcp.fex.features_used &= ~ll_feat_mask; in feature_unmask_features() 12 static inline bool feature_le_encryption(struct ll_conn *conn) in feature_le_encryption() argument 15 return (conn->llcp.fex.features_used & LL_FEAT_BIT_ENC) != 0; in feature_le_encryption() 21 static inline bool feature_conn_param_req(struct ll_conn *conn) in feature_conn_param_req() argument 24 return (conn->llcp.fex.features_used & LL_FEAT_BIT_CONN_PARAM_REQ) != 0; in feature_conn_param_req() 30 static inline bool feature_ext_rej_ind(struct ll_conn *conn) in feature_ext_rej_ind() argument 33 return (conn->llcp.fex.features_used & LL_FEAT_BIT_EXT_REJ_IND) != 0; in feature_ext_rej_ind() 39 static inline bool feature_periph_feat_req(struct ll_conn *conn) in feature_periph_feat_req() argument 42 return (conn->llcp.fex.features_used & LL_FEAT_BIT_PER_INIT_FEAT_XCHG) != 0; in feature_periph_feat_req() [all …]
|
D | ull_llcp.h | 21 void ull_llcp_init(struct ll_conn *conn); 26 void ull_cp_state_set(struct ll_conn *conn, uint8_t state); 28 void ull_cp_release_nodes(struct ll_conn *conn); 33 void ull_cp_update_tx_buffer_queue(struct ll_conn *conn); 38 void ull_cp_release_tx(struct ll_conn *conn, struct node_tx *tx); 46 int ull_cp_prt_elapse(struct ll_conn *conn, uint16_t elapsed_event, uint8_t *error_code); 48 void ull_cp_prt_reload_set(struct ll_conn *conn, uint32_t conn_intv); 53 void ull_cp_run(struct ll_conn *conn); 58 void ull_cp_tx_ack(struct ll_conn *conn, struct node_tx *tx); 63 void ull_cp_tx_ntf(struct ll_conn *conn); [all …]
|
D | ull_llcp_common.c | 106 static void lp_comm_ntf(struct ll_conn *conn, struct proc_ctx *ctx); 107 static void lp_comm_terminate_invalid_pdu(struct ll_conn *conn, struct proc_ctx *ctx); 143 static void lp_comm_tx(struct ll_conn *conn, struct proc_ctx *ctx) in lp_comm_tx() argument 149 tx = llcp_tx_alloc(conn, ctx); in lp_comm_tx() 163 llcp_pdu_encode_feature_req(conn, pdu); in lp_comm_tx() 191 llcp_pdu_encode_length_req(conn, pdu); in lp_comm_tx() 215 llcp_tx_enqueue(conn, tx); in lp_comm_tx() 220 llcp_lr_prt_restart(conn); in lp_comm_tx() 226 const uint32_t conn_interval_us = conn->lll.interval * CONN_INT_UNIT_US; in lp_comm_tx() 228 (conn->supervision_timeout * 10U * 1000U), in lp_comm_tx() [all …]
|
D | ull_llcp_enc.c | 145 static void enc_setup_lll(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t role) in enc_setup_lll() argument 150 ecb_encrypt(&ctx->data.enc.ltk[0], &ctx->data.enc.skd[0], NULL, &conn->lll.ccm_rx.key[0]); in enc_setup_lll() 153 memcpy(&conn->lll.ccm_tx.key[0], &conn->lll.ccm_rx.key[0], sizeof(conn->lll.ccm_tx.key)); in enc_setup_lll() 156 memcpy(&conn->lll.ccm_tx.iv[0], &conn->lll.ccm_rx.iv[0], sizeof(conn->lll.ccm_tx.iv)); in enc_setup_lll() 159 conn->lll.ccm_tx.counter = 0U; in enc_setup_lll() 160 conn->lll.ccm_rx.counter = 0U; in enc_setup_lll() 167 conn->lll.ccm_tx.direction = 0U; in enc_setup_lll() 168 conn->lll.ccm_rx.direction = 1U; in enc_setup_lll() 170 conn->lll.ccm_tx.direction = 1U; in enc_setup_lll() 171 conn->lll.ccm_rx.direction = 0U; in enc_setup_lll() [all …]
|
/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_sca_update/src/ |
D | main.c | 47 static struct ll_conn conn; variable 51 test_setup(&conn); in sca_setup() 92 test_set_role(&conn, BT_HCI_ROLE_CENTRAL); in ZTEST() 95 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST() 98 err = ull_cp_req_peer_sca(&conn); in ZTEST() 102 zassert_equal(feature_sca(&conn), true, "SCA Update Feature masked out"); in ZTEST() 105 event_prepare(&conn); in ZTEST() 108 lt_rx(LL_CLOCK_ACCURACY_REQ, &conn, &tx, &local_sca_req); in ZTEST() 109 lt_rx_q_is_empty(&conn); in ZTEST() 112 lt_tx(LL_CLOCK_ACCURACY_RSP, &conn, &remote_sca_rsp); in ZTEST() [all …]
|
/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_le_ping/src/ |
D | main.c | 45 static struct ll_conn conn; variable 49 test_setup(&conn); in le_ping_setup() 91 test_set_role(&conn, BT_HCI_ROLE_CENTRAL); in ZTEST() 94 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST() 97 err = ull_cp_le_ping(&conn); in ZTEST() 101 event_prepare(&conn); in ZTEST() 104 lt_rx(LL_LE_PING_REQ, &conn, &tx, &local_ping_req); in ZTEST() 105 lt_rx_q_is_empty(&conn); in ZTEST() 108 lt_tx(LL_LE_PING_RSP, &conn, &remote_ping_rsp); in ZTEST() 111 event_done(&conn); in ZTEST() [all …]
|
/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_collision/src/ |
D | main.c | 55 static struct ll_conn conn; variable 96 test_setup(&conn); in collision_setup() 99 conn.phy_pref_rx = PHY_1M | PHY_2M | PHY_CODED; in collision_setup() 100 conn.phy_pref_tx = PHY_1M | PHY_2M | PHY_CODED; in collision_setup() 101 conn.lll.phy_flags = PREFER_S2_CODING; in collision_setup() 102 conn.lll.phy_tx_time = PHY_1M; in collision_setup() 103 conn.lll.phy_rx = PHY_1M; in collision_setup() 104 conn.lll.phy_tx = PHY_1M; in collision_setup() 109 ull_dle_init(&conn, PHY_1M); in collision_setup() 111 conn.lll.dle.remote.max_tx_octets = PDU_DC_PAYLOAD_SIZE_MIN * 3; in collision_setup() [all …]
|
/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_encrypt/src/ |
D | main.c | 98 static struct ll_conn conn; variable 102 test_setup(&conn); in enc_setup() 105 conn.llcp.fex.valid = 1U; in enc_setup() 106 conn.llcp.fex.features_used |= LL_FEAT_BIT_EXT_REJ_IND; in enc_setup() 216 test_set_role(&conn, BT_HCI_ROLE_CENTRAL); in ZTEST() 219 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST() 222 CHECK_RX_PE_STATE(conn, RESUMED, UNENCRYPTED); /* Rx unenc. */ in ZTEST() 223 CHECK_TX_PE_STATE(conn, RESUMED, UNENCRYPTED); /* Tx unenc. */ in ZTEST() 226 err = ull_cp_encryption_start(&conn, rand, ediv, ltk); in ZTEST() 230 event_prepare(&conn); in ZTEST() [all …]
|
/Zephyr-Core-3.4.0/subsys/bluetooth/host/ |
D | conn.c | 68 static void conn_tx_destroy(struct bt_conn *conn, struct bt_conn_tx *tx) in conn_tx_destroy() argument 80 cb(conn, user_data, -ESHUTDOWN); in conn_tx_destroy() 93 static void notify_connected(struct bt_conn *conn); 123 static int bt_hci_connect_br_cancel(struct bt_conn *conn); 145 struct k_sem *bt_conn_get_pkts(struct bt_conn *conn) in bt_conn_get_pkts() argument 148 if (conn->type == BT_CONN_TYPE_BR || !bt_dev.le.acl_mtu) { in bt_conn_get_pkts() 157 if (conn->type == BT_CONN_TYPE_ISO) { in bt_conn_get_pkts() 209 static void tx_notify(struct bt_conn *conn) in tx_notify() argument 211 LOG_DBG("conn %p", conn); in tx_notify() 220 if (!sys_slist_is_empty(&conn->tx_complete)) { in tx_notify() [all …]
|
D | ssp.c | 61 static int pin_code_reply(struct bt_conn *conn, const char *pin, uint8_t len) in pin_code_reply() argument 75 bt_addr_copy(&cp->bdaddr, &conn->br.dst); in pin_code_reply() 82 int bt_conn_auth_pincode_entry(struct bt_conn *conn, const char *pin) in bt_conn_auth_pincode_entry() argument 90 if (conn->type != BT_CONN_TYPE_BR) { in bt_conn_auth_pincode_entry() 99 if (conn->required_sec_level == BT_SECURITY_L3 && len < 16) { in bt_conn_auth_pincode_entry() 100 LOG_WRN("PIN code for %s is not 16 bytes wide", bt_addr_str(&conn->br.dst)); in bt_conn_auth_pincode_entry() 105 if (!atomic_test_and_clear_bit(conn->flags, BT_CONN_USER)) { in bt_conn_auth_pincode_entry() 110 atomic_set_bit(conn->flags, BT_CONN_BR_LEGACY_SECURE); in bt_conn_auth_pincode_entry() 113 return pin_code_reply(conn, pin, len); in bt_conn_auth_pincode_entry() 116 static void pin_code_req(struct bt_conn *conn) in pin_code_req() argument [all …]
|
/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_cte_req/src/ |
D | main.c | 46 static struct ll_conn conn; variable 50 test_setup(&conn); in cte_req_setup() 53 conn.llcp.cte_req.is_enabled = 1U; in cte_req_setup() 61 memset(&conn.llcp.fex, 0, sizeof(conn.llcp.fex)); in fex_setup() 62 conn.llcp.fex.features_used = LL_FEAT; in fex_setup() 63 conn.llcp.fex.features_peer = LL_FEAT; in fex_setup() 65 conn.llcp.fex.valid = 1; in fex_setup() 104 test_set_role(&conn, BT_HCI_ROLE_PERIPHERAL); in ZTEST() 107 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST() 111 conn.llcp.cte_req.is_enabled = 1U; in ZTEST() [all …]
|
/Zephyr-Core-3.4.0/subsys/net/ip/ |
D | tcp.c | 60 #define TCP_RTO_MS (conn->rto) 75 static enum net_verdict tcp_in(struct tcp *conn, struct net_pkt *pkt); 77 static void tcp_out(struct tcp *conn, uint8_t flags); 81 size_t (*tcp_recv_cb)(struct tcp *conn, struct net_pkt *pkt) = NULL; 373 static void tcp_derive_rto(struct tcp *conn) in tcp_derive_rto() argument 389 conn->rto = (uint16_t)rto; in tcp_derive_rto() 391 ARG_UNUSED(conn); in tcp_derive_rto() 395 static void tcp_send_queue_flush(struct tcp *conn) in tcp_send_queue_flush() argument 399 k_work_cancel_delayable(&conn->send_timer); in tcp_send_queue_flush() 401 while ((pkt = tcp_slist(conn, &conn->send_queue, get, in tcp_send_queue_flush() [all …]
|
/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_version/src/ |
D | main.c | 46 static struct ll_conn conn; variable 50 test_setup(&conn); in version_setup() 91 test_set_role(&conn, BT_HCI_ROLE_CENTRAL); in ZTEST() 94 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST() 97 err = ull_cp_version_exchange(&conn); in ZTEST() 101 event_prepare(&conn); in ZTEST() 104 lt_rx(LL_VERSION_IND, &conn, &tx, &local_version_ind); in ZTEST() 105 lt_rx_q_is_empty(&conn); in ZTEST() 108 lt_tx(LL_VERSION_IND, &conn, &remote_version_ind); in ZTEST() 111 event_done(&conn); in ZTEST() [all …]
|
/Zephyr-Core-3.4.0/include/zephyr/bluetooth/audio/ |
D | mcc.h | 44 typedef void (*bt_mcc_discover_mcs_cb)(struct bt_conn *conn, int err); 55 typedef void (*bt_mcc_read_player_name_cb)(struct bt_conn *conn, int err, const char *name); 67 typedef void (*bt_mcc_read_icon_obj_id_cb)(struct bt_conn *conn, int err, uint64_t id); 79 typedef void (*bt_mcc_read_icon_url_cb)(struct bt_conn *conn, int err, const char *icon_url); 92 typedef void (*bt_mcc_track_changed_ntf_cb)(struct bt_conn *conn, int err); 104 typedef void (*bt_mcc_read_track_title_cb)(struct bt_conn *conn, int err, const char *title); 115 typedef void (*bt_mcc_read_track_duration_cb)(struct bt_conn *conn, int err, int32_t dur); 126 typedef void (*bt_mcc_read_track_position_cb)(struct bt_conn *conn, int err, int32_t pos); 137 typedef void (*bt_mcc_set_track_position_cb)(struct bt_conn *conn, int err, int32_t pos); 148 typedef void (*bt_mcc_read_playback_speed_cb)(struct bt_conn *conn, int err, int8_t speed); [all …]
|
/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_cis_create/src/ |
D | main.c | 45 static struct ll_conn conn; variable 49 test_setup(&conn); in cis_create_setup() 52 static bool is_instant_reached(struct ll_conn *conn, uint16_t instant) in is_instant_reached() argument 54 return ((event_counter(conn) - instant) & 0xFFFF) <= 0x7FFF; in is_instant_reached() 137 test_set_role(&conn, BT_HCI_ROLE_PERIPHERAL); in ZTEST() 140 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST() 143 event_prepare(&conn); in ZTEST() 146 lt_tx(LL_CIS_REQ, &conn, &remote_cis_req); in ZTEST() 149 event_done(&conn); in ZTEST() 159 ull_cp_cc_accept(&conn, 0U); in ZTEST() [all …]
|
/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_api/src/ |
D | main.c | 45 static struct ll_conn conn; variable 54 ull_tx_q_init(&conn.tx_q); in ZTEST() 56 ull_llcp_init(&conn); in ZTEST() 58 zassert_true(llcp_lr_is_disconnected(&conn)); in ZTEST() 59 zassert_true(llcp_rr_is_disconnected(&conn)); in ZTEST() 65 ull_tx_q_init(&conn.tx_q); in ZTEST() 66 ull_llcp_init(&conn); in ZTEST() 68 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST() 69 zassert_true(llcp_lr_is_idle(&conn)); in ZTEST() 70 zassert_true(llcp_rr_is_idle(&conn)); in ZTEST() [all …]
|
/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_feature_exchange/src/ |
D | main.c | 53 static struct ll_conn conn; variable 57 test_setup(&conn); in fex_setup() 108 test_set_role(&conn, BT_HCI_ROLE_CENTRAL); in ZTEST() 110 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST() 113 err = ull_cp_feature_exchange(&conn, 1U); in ZTEST() 116 event_prepare(&conn); in ZTEST() 118 lt_rx(LL_FEATURE_REQ, &conn, &tx, &local_feature_req); in ZTEST() 119 lt_rx_q_is_empty(&conn); in ZTEST() 122 lt_tx(LL_FEATURE_RSP, &conn, &remote_feature_rsp); in ZTEST() 124 event_done(&conn); in ZTEST() [all …]
|
/Zephyr-Core-3.4.0/tests/bluetooth/df/common/src/ |
D | bt_conn_common.c | 33 struct ll_conn *conn; in ut_bt_create_connection() local 35 conn = ll_conn_acquire(); in ut_bt_create_connection() 36 zassert_not_equal(conn, NULL, "Failed acquire ll_conn instance"); in ut_bt_create_connection() 38 conn->lll.latency = 0; in ut_bt_create_connection() 39 conn->lll.handle = ll_conn_handle_get(conn); in ut_bt_create_connection() 42 conn->lll.df_rx_cfg.is_initialized = 0U; in ut_bt_create_connection() 46 conn->llcp.cte_req.is_enabled = 0U; in ut_bt_create_connection() 48 conn->llcp.fex.features_used |= BIT(BT_LE_FEAT_BIT_CONN_CTE_REQ); in ut_bt_create_connection() 51 return conn->lll.handle; in ut_bt_create_connection() 56 struct ll_conn *conn; in ut_bt_destroy_connection() local [all …]
|
/Zephyr-Core-3.4.0/tests/bsim/bluetooth/host/gatt/settings/src/ |
D | client.c | 21 struct bt_conn *conn; in client_round_0() local 25 conn = connect_as_peripheral(); in client_round_0() 26 printk("connected: conn %p\n", conn); in client_round_0() 43 disconnect(conn); in client_round_0() 48 struct bt_conn *conn; in client_round_1() local 52 conn = connect_as_peripheral(); in client_round_1() 53 printk("connected: conn %p\n", conn); in client_round_1() 59 disconnect(conn); in client_round_1() 64 struct bt_conn *conn; in client_round_2() local 68 conn = connect_as_peripheral(); in client_round_2() [all …]
|