• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/netgraph/bluetooth/hci/

Lines Matching defs:con

255 	ng_hci_unit_con_p	con = NULL, winner = NULL;
269 LIST_FOREACH(con, &unit->con_list, next) {
270 reallink_type = (con->link_type == NG_HCI_LINK_SCO)?
275 if (NG_BT_ITEMQ_LEN(&con->conq) == 0)
278 if (con->pending < min_pending) {
279 winner = con;
280 min_pending = con->pending;
351 sync_con_queue(ng_hci_unit_p unit, ng_hci_unit_con_p con, int completed)
358 hook = (con->link_type != NG_HCI_LINK_SCO)? unit->acl : unit->sco;
368 state->con_handle = con->con_handle;
472 ng_hci_unit_con_p con = NULL;
486 * 1) con->link_type == link_type
487 * 2) con->state == NG_HCI_CON_W4_CONN_COMPLETE
488 * 3) con->bdaddr == ep->address
490 LIST_FOREACH(con, &unit->con_list, next)
491 if (con->link_type == link_type &&
492 con->state == NG_HCI_CON_W4_CONN_COMPLETE &&
493 bcmp(&con->bdaddr, &ep->address, sizeof(bdaddr_t)) == 0)
513 if (con == NULL) {
517 con = ng_hci_new_con(unit, link_type);
518 if (con == NULL) {
523 con->state = NG_HCI_CON_W4_LP_CON_RSP;
524 ng_hci_con_timeout(con);
526 bcopy(&ep->address, &con->bdaddr, sizeof(con->bdaddr));
527 error = ng_hci_lp_con_ind(con, uclass);
529 ng_hci_con_untimeout(con);
530 ng_hci_free_con(con);
534 } else if ((error = ng_hci_con_untimeout(con)) != 0)
542 con->con_handle = NG_HCI_CON_HANDLE(le16toh(ep->handle));
543 con->encryption_mode = NG_HCI_ENCRYPTION_MODE_NONE;
545 ng_hci_lp_con_cfm(con, ep->status);
549 ng_hci_free_con(con);
551 con->state = NG_HCI_CON_OPEN;
676 ng_hci_unit_con_p con = NULL;
688 * 1) con->link_type == ep->link_type
689 * 2) con->state == NG_HCI_CON_W4_CONN_COMPLETE
690 * 3) con->bdaddr == ep->bdaddr
693 LIST_FOREACH(con, &unit->con_list, next)
694 if (con->link_type == ep->link_type &&
695 con->state == NG_HCI_CON_W4_CONN_COMPLETE &&
696 bcmp(&con->bdaddr, &ep->bdaddr, sizeof(bdaddr_t)) == 0)
715 if (con == NULL) {
719 con = ng_hci_new_con(unit, ep->link_type);
720 if (con == NULL) {
725 bcopy(&ep->bdaddr, &con->bdaddr, sizeof(con->bdaddr));
726 } else if ((error = ng_hci_con_untimeout(con)) != 0)
734 con->con_handle = NG_HCI_CON_HANDLE(le16toh(ep->con_handle));
735 con->encryption_mode = ep->encryption_mode;
737 ng_hci_lp_con_cfm(con, ep->status);
741 ng_hci_free_con(con);
743 con->state = NG_HCI_CON_OPEN;
802 ng_hci_unit_con_p con = NULL;
814 * 1) con->link_type == ep->link_type
816 * 2) con->state == NG_HCI_CON_W4_LP_CON_RSP ||
817 * con->state == NG_HCI_CON_W4_CONN_COMPL
819 * 3) con->bdaddr == ep->bdaddr
853 LIST_FOREACH(con, &unit->con_list, next)
854 if (con->link_type == ep->link_type &&
855 (con->state == NG_HCI_CON_W4_LP_CON_RSP ||
856 con->state == NG_HCI_CON_W4_CONN_COMPLETE) &&
857 bcmp(&con->bdaddr, &ep->bdaddr, sizeof(bdaddr_t)) == 0)
860 if (con == NULL) {
861 con = ng_hci_new_con(unit, ep->link_type);
862 if (con != NULL) {
863 bcopy(&ep->bdaddr, &con->bdaddr, sizeof(con->bdaddr));
865 con->state = NG_HCI_CON_W4_LP_CON_RSP;
866 ng_hci_con_timeout(con);
868 error = ng_hci_lp_con_ind(con, ep->uclass);
870 ng_hci_con_untimeout(con);
871 ng_hci_free_con(con);
887 ng_hci_unit_con_p con = NULL;
906 con = ng_hci_con_by_handle(unit, h);
907 if (con != NULL) {
908 error = ng_hci_lp_discon_ind(con, ep->reason);
911 if (con->flags & NG_HCI_CON_TIMEOUT_PENDING)
912 ng_hci_con_untimeout(con);
914 ng_hci_free_con(con);
933 ng_hci_unit_con_p con = NULL;
943 con = ng_hci_con_by_handle(unit, h);
946 if (con == NULL) {
951 } else if (con->link_type == NG_HCI_LINK_SCO) {
955 con->link_type);
959 con->encryption_mode = NG_HCI_ENCRYPTION_MODE_P2P;
961 con->encryption_mode = NG_HCI_ENCRYPTION_MODE_NONE;
968 ng_hci_lp_enc_change(con, con->encryption_mode);
980 ng_hci_unit_con_p con = NULL;
994 con = ng_hci_con_by_handle(unit, h);
995 if (con == NULL) {
1004 n = ng_hci_get_neighbor(unit, &con->bdaddr, NG_HCI_LINK_ACL);
1012 bcopy(&con->bdaddr, &n->bdaddr, sizeof(n->bdaddr));
1033 ng_hci_unit_con_p con = NULL;
1045 con = ng_hci_con_by_handle(unit, h);
1046 if (con == NULL) {
1051 } else if (con->link_type != NG_HCI_LINK_ACL) {
1054 __func__, NG_NODE_NAME(unit->node), con->link_type, h);
1056 } else if (con->state != NG_HCI_CON_OPEN) {
1060 con->state, h);
1063 error = ng_hci_lp_qos_cfm(con, ep->status);
1088 ng_hci_unit_con_p con = NULL;
1098 con = ng_hci_con_by_bdaddr(unit, &ep->bdaddr, NG_HCI_LINK_ACL);
1099 if (con != NULL)
1100 con->role = ep->role;
1125 ng_hci_unit_con_p con = NULL;
1147 con = ng_hci_con_by_handle(unit, h);
1148 if (con != NULL) {
1149 con->pending -= p;
1150 if (con->pending < 0) {
1154 con->con_handle, con->pending, p);
1156 con->pending = 0;
1160 if (con->link_type != NG_HCI_LINK_SCO)
1183 ng_hci_unit_con_p con = NULL;
1195 con = ng_hci_con_by_handle(unit, h);
1196 if (con == NULL) {
1201 } else if (con->link_type != NG_HCI_LINK_ACL) {
1205 con->link_type);
1208 con->mode = ep->unit_mode;
1238 ng_hci_unit_con_p con = NULL;
1251 con = ng_hci_con_by_handle(unit, h);
1252 if (con == NULL) {
1261 n = ng_hci_get_neighbor(unit, &con->bdaddr, NG_HCI_LINK_ACL);
1269 bcopy(&con->bdaddr, &n->bdaddr, sizeof(n->bdaddr));
1290 ng_hci_unit_con_p con = NULL;
1302 con = ng_hci_con_by_handle(unit, h);
1303 if (con == NULL) {
1308 } else if (con->link_type != NG_HCI_LINK_ACL) {
1311 __func__, NG_NODE_NAME(unit->node), con->link_type);
1313 } else if (con->state != NG_HCI_CON_OPEN) {
1316 __func__, NG_NODE_NAME(unit->node), con->state, h);
1319 error = ng_hci_lp_qos_ind(con);