• Home
  • Raw
  • Download

Lines Matching refs:conn

108 static void btpan_cleanup_conn(btpan_conn_t* conn);
237 btpan_conn_t* conn = btpan_find_conn_addr(*bd_addr); in btif_in_pan_generic_evt() local
240 asrt(conn != NULL); in btif_in_pan_generic_evt()
241 if (conn) { in btif_in_pan_generic_evt()
242 btpan_conn_local_role = bta_role_to_btpan(conn->local_role); in btif_in_pan_generic_evt()
243 btpan_remote_role = bta_role_to_btpan(conn->remote_role); in btif_in_pan_generic_evt()
245 BT_STATUS_SUCCESS, &conn->peer, in btif_in_pan_generic_evt()
256 btpan_conn_t* conn = btpan_find_conn_addr(*bd_addr); in btpan_disconnect() local
257 if (conn && conn->handle >= 0) { in btpan_disconnect()
262 BTA_PanClose(conn->handle); in btpan_disconnect()
458 static void btpan_open_conn(btpan_conn_t* conn, tBTA_PAN* p_data) { in btpan_open_conn() argument
462 conn); in btpan_open_conn()
464 if (conn == NULL) in btpan_open_conn()
465 conn = btpan_new_conn(p_data->open.handle, p_data->open.bd_addr, in btpan_open_conn()
467 if (conn) { in btpan_open_conn()
471 btpan_cb.tap_fd, btpan_cb.open_count, conn->handle, p_data->open.handle, in btpan_open_conn()
472 conn->local_role, conn->remote_role); in btpan_open_conn()
475 conn->handle = p_data->open.handle; in btpan_open_conn()
483 conn->state = PAN_STATE_OPEN; in btpan_open_conn()
488 static void btpan_close_conn(btpan_conn_t* conn) { in btpan_close_conn() argument
489 BTIF_TRACE_API("btpan_close_conn: %p", conn); in btpan_close_conn()
491 if (conn && conn->state == PAN_STATE_OPEN) { in btpan_close_conn()
494 conn->state = PAN_STATE_CLOSE; in btpan_close_conn()
507 static void btpan_cleanup_conn(btpan_conn_t* conn) { in btpan_cleanup_conn() argument
508 if (conn) { in btpan_cleanup_conn()
509 conn->handle = -1; in btpan_cleanup_conn()
510 conn->state = -1; in btpan_cleanup_conn()
511 memset(&conn->peer, 0, sizeof(conn->peer)); in btpan_cleanup_conn()
512 memset(&conn->eth_addr, 0, sizeof(conn->eth_addr)); in btpan_cleanup_conn()
513 conn->local_role = conn->remote_role = 0; in btpan_cleanup_conn()
596 btpan_conn_t* conn; in bta_pan_callback_transfer() local
600 conn = btpan_find_conn_addr(p_data->opening.bd_addr); in bta_pan_callback_transfer()
602 asrt(conn != NULL); in bta_pan_callback_transfer()
603 if (conn) { in bta_pan_callback_transfer()
604 conn->handle = p_data->opening.handle; in bta_pan_callback_transfer()
605 int btpan_conn_local_role = bta_role_to_btpan(conn->local_role); in bta_pan_callback_transfer()
606 int btpan_remote_role = bta_role_to_btpan(conn->remote_role); in bta_pan_callback_transfer()
617 btpan_conn_t* conn = btpan_find_conn_handle(p_data->open.handle); in bta_pan_callback_transfer() local
624 btpan_open_conn(conn, p_data); in bta_pan_callback_transfer()
628 btpan_cleanup_conn(conn); in bta_pan_callback_transfer()
643 btpan_conn_t* conn = btpan_find_conn_handle(p_data->close.handle); in bta_pan_callback_transfer() local
644 btpan_close_conn(conn); in bta_pan_callback_transfer()
646 if (conn && conn->handle >= 0) { in bta_pan_callback_transfer()
647 int btpan_conn_local_role = bta_role_to_btpan(conn->local_role); in bta_pan_callback_transfer()
648 int btpan_remote_role = bta_role_to_btpan(conn->remote_role); in bta_pan_callback_transfer()
650 &conn->peer, btpan_conn_local_role, in bta_pan_callback_transfer()
652 btpan_cleanup_conn(conn); in bta_pan_callback_transfer()