Lines Matching full:conn
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()
131 ull_cp_release_tx(&conn, tx); in ZTEST()
143 err = ull_cp_feature_exchange(&conn, 1U); in ZTEST()
146 event_prepare(&conn); in ZTEST()
148 lt_rx(LL_FEATURE_REQ, &conn, &tx, &local_feature_req); in ZTEST()
149 lt_rx_q_is_empty(&conn); in ZTEST()
152 lt_tx(LL_FEATURE_RSP, &conn, &remote_feature_rsp); in ZTEST()
154 event_done(&conn); in ZTEST()
161 ull_cp_release_tx(&conn, tx); in ZTEST()
167 zassert_equal(conn.lll.event_counter, feat_to_test + 1, "Wrong event-count %d\n", in ZTEST()
168 conn.lll.event_counter); in ZTEST()
207 test_set_role(&conn, BT_HCI_ROLE_CENTRAL); in ZTEST()
209 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST()
212 err = ull_cp_feature_exchange(&conn, 1U); in ZTEST()
215 event_prepare(&conn); in ZTEST()
217 lt_rx(LL_FEATURE_REQ, &conn, &tx, &local_feature_req); in ZTEST()
218 lt_rx_q_is_empty(&conn); in ZTEST()
221 lt_tx(LL_REJECT_IND, &conn, &reject_ind); in ZTEST()
223 event_done(&conn); in ZTEST()
226 ull_cp_release_tx(&conn, tx); in ZTEST()
229 zassert_equal(conn.llcp_terminate.reason_final, BT_HCI_ERR_LMP_PDU_NOT_ALLOWED, in ZTEST()
230 "Terminate reason %d", conn.llcp_terminate.reason_final); in ZTEST()
233 conn.llcp_terminate.reason_final = 0; in ZTEST()
241 test_set_role(&conn, BT_HCI_ROLE_CENTRAL); in ZTEST()
243 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST()
246 err = ull_cp_feature_exchange(&conn, 1U); in ZTEST()
249 event_prepare(&conn); in ZTEST()
251 lt_rx(LL_FEATURE_REQ, &conn, &tx, &local_feature_req); in ZTEST()
252 lt_rx_q_is_empty(&conn); in ZTEST()
255 lt_tx(LL_REJECT_EXT_IND, &conn, &reject_ext_ind); in ZTEST()
257 event_done(&conn); in ZTEST()
260 ull_cp_release_tx(&conn, tx); in ZTEST()
263 zassert_equal(conn.llcp_terminate.reason_final, BT_HCI_ERR_LMP_PDU_NOT_ALLOWED, in ZTEST()
264 "Terminate reason %d", conn.llcp_terminate.reason_final); in ZTEST()
277 test_set_role(&conn, BT_HCI_ROLE_CENTRAL); in ZTEST()
278 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST()
280 err = ull_cp_feature_exchange(&conn, 1U); in ZTEST()
283 err = ull_cp_feature_exchange(&conn, 1U); in ZTEST()
325 test_set_role(&conn, BT_HCI_ROLE_CENTRAL); in ZTEST()
327 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST()
333 event_prepare(&conn); in ZTEST()
335 lt_tx(LL_PERIPH_FEAT_XCHG, &conn, &remote_feature_req); in ZTEST()
337 event_done(&conn); in ZTEST()
339 event_prepare(&conn); in ZTEST()
341 lt_rx(LL_FEATURE_RSP, &conn, &tx, &local_feature_rsp); in ZTEST()
342 lt_rx_q_is_empty(&conn); in ZTEST()
344 event_done(&conn); in ZTEST()
348 ull_cp_release_tx(&conn, tx); in ZTEST()
350 zassert_equal(conn.lll.event_counter, CENTRAL_NR_OF_EVENTS * (feat_to_test), in ZTEST()
351 "Wrong event-count %d\n", conn.lll.event_counter); in ZTEST()
399 test_set_role(&conn, BT_HCI_ROLE_CENTRAL); in ZTEST()
400 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST()
408 err = ull_cp_feature_exchange(&conn, 1U); in ZTEST()
411 event_prepare(&conn); in ZTEST()
412 lt_tx(LL_PERIPH_FEAT_XCHG, &conn, &remote_feature_req); in ZTEST()
413 event_done(&conn); in ZTEST()
415 event_prepare(&conn); in ZTEST()
416 lt_rx(LL_FEATURE_REQ, &conn, &tx, &ut_feature_req); in ZTEST()
417 lt_tx(LL_FEATURE_RSP, &conn, &local_feature_rsp); in ZTEST()
418 event_done(&conn); in ZTEST()
420 ull_cp_release_tx(&conn, tx); in ZTEST()
422 event_prepare(&conn); in ZTEST()
423 lt_rx(LL_FEATURE_RSP, &conn, &tx, &local_feature_rsp); in ZTEST()
424 event_done(&conn); in ZTEST()
432 lt_rx_q_is_empty(&conn); in ZTEST()
434 ull_cp_release_tx(&conn, tx); in ZTEST()
438 zassert_equal(conn.lll.event_counter, CENTRAL_NR_OF_EVENTS * (feat_to_test), in ZTEST()
439 "Wrong event-count %d\n", conn.lll.event_counter); in ZTEST()
459 test_set_role(&conn, BT_HCI_ROLE_PERIPHERAL); in ZTEST()
461 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST()
464 err = ull_cp_feature_exchange(&conn, 1U); in ZTEST()
467 event_prepare(&conn); in ZTEST()
469 lt_rx(LL_PERIPH_FEAT_XCHG, &conn, &tx, &local_feature_req); in ZTEST()
470 lt_rx_q_is_empty(&conn); in ZTEST()
473 lt_tx(LL_FEATURE_RSP, &conn, &remote_feature_rsp); in ZTEST()
475 event_done(&conn); in ZTEST()
481 zassert_equal(conn.lll.event_counter, 1, "Wrong event-count %d\n", in ZTEST()
482 conn.lll.event_counter); in ZTEST()
503 test_set_role(&conn, BT_HCI_ROLE_PERIPHERAL); in ZTEST()
505 ull_cp_state_set(&conn, ULL_CP_CONNECTED); in ZTEST()
508 event_prepare(&conn); in ZTEST()
509 err = ull_cp_feature_exchange(&conn, 1U); in ZTEST()
511 event_done(&conn); in ZTEST()
513 event_prepare(&conn); in ZTEST()
516 lt_rx(LL_PERIPH_FEAT_XCHG, &conn, &tx, &local_feature_req); in ZTEST()
517 lt_rx_q_is_empty(&conn); in ZTEST()
521 lt_tx(LL_UNKNOWN_RSP, &conn, &unknown_rsp); in ZTEST()
523 event_done(&conn); in ZTEST()
527 zassert_equal(conn.lll.event_counter, 2, "Wrong event-count %d\n", in ZTEST()
528 conn.lll.event_counter); in ZTEST()