Lines Matching defs:hci
82 static int hci;
241 hci = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
242 if (hci == -1)
322 close(hci);
384 * basic HCI request wrapper with error check
399 if (bt_devreq(hci, &req, 10) == -1)
437 if (ioctl(hci, cmd, &btr) == -1)
447 if (bind(hci, (struct sockaddr *)&sa, sizeof(sa)) < 0)
450 if (connect(hci, (struct sockaddr *)&sa, sizeof(sa)) < 0)
470 if (ioctl(hci, SIOCSBTFLAGS, &btr) < 0)
481 if (ioctl(hci, SIOCSBTFLAGS, &btr) < 0)
488 if (ioctl(hci, SIOCGBTINFO, &btr) < 0)
499 if (ioctl(hci, SIOCSBTFLAGS, &btr) < 0)
516 if (ioctl(hci, SIOCSBTPOLICY, &btr) < 0)
522 if (ioctl(hci, SIOCSBTPTYPE, &btr) < 0)
591 if (ioctl(hci, SIOCSBTSCOMTU, &btr) < 0)
744 if (ioctl(hci, SIOCGBTFEAT, &btr) < 0)
762 if (ioctl(hci, SIOCGBTSTATS, &btr) < 0)
765 if (ioctl(hci, SIOCZBTSTATS, &btr) < 0)