Lines Matching refs:dev_id
60 static int dev_info(int s, int dev_id, long arg)
62 struct hci_dev_info di = { dev_id: dev_id };
114 static int conn_list(int s, int dev_id, long arg)
121 if (id != -1 && dev_id != id)
128 cl->dev_id = dev_id;
152 static int find_conn(int s, int dev_id, long arg)
162 cl->dev_id = dev_id;
417 static void cmd_dev(int dev_id, int argc, char **argv)
453 static void cmd_inq(int dev_id, int argc, char **argv)
503 num_rsp = hci_inquiry(dev_id, length, num_rsp, lap, &info, flags);
542 static void cmd_scan(int dev_id, int argc, char **argv)
617 if (dev_id < 0) {
618 dev_id = hci_get_route(NULL);
619 if (dev_id < 0) {
625 if (hci_devinfo(dev_id, &di) < 0) {
631 num_rsp = hci_inquiry(dev_id, length, num_rsp, lap, &info, flags);
637 dd = hci_open_dev(dev_id);
812 static void cmd_name(int dev_id, int argc, char **argv)
829 if (dev_id < 0) {
830 dev_id = hci_get_route(&bdaddr);
831 if (dev_id < 0) {
837 dd = hci_open_dev(dev_id);
860 static void cmd_info(int dev_id, int argc, char **argv)
882 if (dev_id < 0)
883 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
885 if (dev_id < 0)
886 dev_id = hci_get_route(&bdaddr);
888 if (dev_id < 0) {
893 if (hci_devinfo(dev_id, &di) < 0) {
900 dd = hci_open_dev(dev_id);
1000 static void cmd_spinq(int dev_id, int argc, char **argv)
1016 if (dev_id < 0)
1017 dev_id = hci_get_route(NULL);
1019 dd = hci_open_dev(dev_id);
1057 static void cmd_epinq(int dev_id, int argc, char **argv)
1070 if (dev_id < 0)
1071 dev_id = hci_get_route(NULL);
1073 dd = hci_open_dev(dev_id);
1101 static void cmd_cmd(int dev_id, int argc, char **argv)
1119 if (dev_id < 0)
1120 dev_id = hci_get_route(NULL);
1133 dd = hci_open_dev(dev_id);
1183 static void cmd_con(int dev_id, int argc, char **argv)
1198 hci_for_each_dev(HCI_UP, conn_list, dev_id);
1217 static void cmd_cc(int dev_id, int argc, char **argv)
1247 if (dev_id < 0) {
1248 dev_id = hci_get_route(&bdaddr);
1249 if (dev_id < 0) {
1255 dd = hci_open_dev(dev_id);
1279 static void cmd_dc(int dev_id, int argc, char **argv)
1298 if (dev_id < 0) {
1299 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
1300 if (dev_id < 0) {
1306 dd = hci_open_dev(dev_id);
1345 static void cmd_sr(int dev_id, int argc, char **argv)
1373 if (dev_id < 0) {
1374 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
1375 if (dev_id < 0) {
1381 dd = hci_open_dev(dev_id);
1406 static void cmd_rssi(int dev_id, int argc, char **argv)
1424 if (dev_id < 0) {
1425 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
1426 if (dev_id < 0) {
1432 dd = hci_open_dev(dev_id);
1474 static void cmd_lq(int dev_id, int argc, char **argv)
1492 if (dev_id < 0) {
1493 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
1494 if (dev_id < 0) {
1500 dd = hci_open_dev(dev_id);
1542 static void cmd_tpl(int dev_id, int argc, char **argv)
1562 if (dev_id < 0) {
1563 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
1564 if (dev_id < 0) {
1570 dd = hci_open_dev(dev_id);
1613 dev_id, int argc, char **argv)
1632 if (dev_id < 0) {
1633 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
1634 if (dev_id < 0) {
1640 dd = hci_open_dev(dev_id);
1691 static void cmd_cpt(int dev_id, int argc, char **argv)
1713 if (dev_id < 0) {
1714 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
1715 if (dev_id < 0) {
1721 dd = hci_open_dev(dev_id);
1773 static void cmd_lp(int dev_id, int argc, char **argv)
1791 if (dev_id < 0) {
1792 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
1793 if (dev_id < 0) {
1799 dd = hci_open_dev(dev_id);
1866 static void cmd_lst(int dev_id, int argc, char **argv)
1884 if (dev_id < 0) {
1885 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
1886 if (dev_id < 0) {
1892 dd = hci_open_dev(dev_id);
1951 static void cmd_auth(int dev_id, int argc, char **argv)
1968 if (dev_id < 0) {
1969 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
1970 if (dev_id < 0) {
1976 dd = hci_open_dev(dev_id);
2016 static void cmd_enc(int dev_id, int argc, char **argv)
2034 if (dev_id < 0) {
2035 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
2036 if (dev_id < 0) {
2042 dd = hci_open_dev(dev_id);
2084 static void cmd_key(int dev_id, int argc, char **argv)
2101 if (dev_id < 0) {
2102 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
2103 if (dev_id < 0) {
2109 dd = hci_open_dev(dev_id);
2149 static void cmd_clkoff(int dev_id, int argc, char **argv)
2167 if (dev_id < 0) {
2168 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
2169 if (dev_id < 0) {
2175 dd = hci_open_dev(dev_id);
2217 static void cmd_clock(int dev_id, int argc, char **argv)
2240 if (dev_id < 0 && !bacmp(&bdaddr, BDADDR_ANY))
2241 dev_id = hci_get_route(NULL);
2243 if (dev_id < 0) {
2244 dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
2245 if (dev_id < 0) {
2251 dd = hci_open_dev(dev_id);
2424 static void cmd_lescan(int dev_id, int argc, char **argv)
2458 if (dev_id < 0)
2459 dev_id = hci_get_route(NULL);
2461 dd = hci_open_dev(dev_id);
2509 static void cmd_lecc(int dev_id, int argc, char **argv)
2535 if (dev_id < 0)
2536 dev_id = hci_get_route(NULL);
2538 dd = hci_open_dev(dev_id);
2582 static void cmd_lewladd(int dev_id, int argc, char **argv)
2601 if (dev_id < 0)
2602 dev_id = hci_get_route(NULL);
2604 dd = hci_open_dev(dev_id);
2632 static void cmd_lewlrm(int dev_id, int argc, char **argv)
2647 if (dev_id < 0)
2648 dev_id = hci_get_route(NULL);
2650 dd = hci_open_dev(dev_id);
2678 static void cmd_lewlsz(int dev_id, int argc, char **argv)
2693 if (dev_id < 0)
2694 dev_id = hci_get_route(NULL);
2696 dd = hci_open_dev(dev_id);
2724 static void cmd_lewlclr(int dev_id, int argc, char **argv)
2738 if (dev_id < 0)
2739 dev_id = hci_get_route(NULL);
2741 dd = hci_open_dev(dev_id);
2767 static void cmd_ledc(int dev_id, int argc, char **argv)
2782 if (dev_id < 0)
2783 dev_id = hci_get_route(NULL);
2785 dd = hci_open_dev(dev_id);
2826 static void cmd_lecup(int dev_id, int argc, char **argv)
2870 if (dev_id < 0)
2871 dev_id = hci_get_route(NULL);
2873 dd = hci_open_dev(dev_id);
2891 void (*func)(int dev_id, int argc, char **argv);
2956 int opt, i, dev_id = -1;
2962 dev_id = hci_devid(optarg);
2963 if (dev_id < 0) {
2985 if (dev_id != -1 && hci_devba(dev_id, &ba) < 0) {
2995 command[i].func(dev_id, argc, argv);