Lines Matching refs:cp

48 	ng_hci_inquiry_cp	 cp;  in hci_inquiry()  local
52 cp.lap[2] = 0x9e; in hci_inquiry()
53 cp.lap[1] = 0x8b; in hci_inquiry()
54 cp.lap[0] = 0x33; in hci_inquiry()
55 cp.inquiry_length = 5; in hci_inquiry()
56 cp.num_responses = 8; in hci_inquiry()
65 cp.num_responses = (n0 & 0xff); in hci_inquiry()
72 cp.inquiry_length = (n0 & 0xff); in hci_inquiry()
79 cp.lap[0] = (n0 & 0xff); in hci_inquiry()
80 cp.lap[1] = (n1 & 0xff); in hci_inquiry()
81 cp.lap[2] = (n2 & 0xff); in hci_inquiry()
94 NG_HCI_OCF_INQUIRY), (char const *) &cp, sizeof(cp), in hci_inquiry()
102 timeout = cp.inquiry_length * 1.28 + 1; in hci_inquiry()
175 ng_hci_create_con_cp cp; in hci_create_connection() local
179 memset(&cp, 0, sizeof(cp)); in hci_create_connection()
180 cp.pkt_type = htole16( NG_HCI_PKT_DM1 | NG_HCI_PKT_DH1 | in hci_create_connection()
183 cp.page_scan_rep_mode = NG_HCI_SCAN_REP_MODE0; in hci_create_connection()
184 cp.page_scan_mode = NG_HCI_MANDATORY_PAGE_SCAN_MODE; in hci_create_connection()
185 cp.clock_offset = 0; in hci_create_connection()
186 cp.accept_role_switch = 1; in hci_create_connection()
195 cp.accept_role_switch = n0 ? 1 : 0; in hci_create_connection()
202 cp.clock_offset = (n0 & 0xffff); in hci_create_connection()
203 cp.clock_offset = htole16(cp.clock_offset); in hci_create_connection()
210 cp.page_scan_mode = (n0 & 0xff); in hci_create_connection()
217 cp.page_scan_rep_mode = (n0 & 0xff); in hci_create_connection()
230 cp.pkt_type = (n0 & 0xffff); in hci_create_connection()
231 cp.pkt_type = htole16(cp.pkt_type); in hci_create_connection()
235 if (!bt_aton(argv[0], &cp.bdaddr)) { in hci_create_connection()
241 memcpy(&cp.bdaddr, he->h_addr, sizeof(cp.bdaddr)); in hci_create_connection()
253 (char const *) &cp, sizeof(cp), b, &n0) == ERROR) in hci_create_connection()
296 ng_hci_discon_cp cp; in hci_disconnect() local
300 memset(&cp, 0, sizeof(cp)); in hci_disconnect()
301 cp.reason = 0x13; in hci_disconnect()
310 cp.reason = (uint8_t) (n & 0xff); in hci_disconnect()
317 cp.con_handle = (uint16_t) (n & 0x0fff); in hci_disconnect()
318 cp.con_handle = htole16(cp.con_handle); in hci_disconnect()
329 (char const *) &cp, sizeof(cp), b, &n) == ERROR) in hci_disconnect()
370 ng_hci_add_sco_con_cp cp; in hci_add_sco_connection() local
374 memset(&cp, 0, sizeof(cp)); in hci_add_sco_connection()
375 cp.pkt_type = htole16(NG_HCI_PKT_HV1 | NG_HCI_PKT_HV2 | NG_HCI_PKT_HV3); in hci_add_sco_connection()
388 cp.pkt_type = (uint16_t) (n & 0x0fff); in hci_add_sco_connection()
389 cp.pkt_type = htole16(cp.pkt_type); in hci_add_sco_connection()
396 cp.con_handle = (uint16_t) (n & 0x0fff); in hci_add_sco_connection()
397 cp.con_handle = htole16(cp.con_handle); in hci_add_sco_connection()
408 (char const *) &cp, sizeof(cp), b, &n) == ERROR) in hci_add_sco_connection()
451 ng_hci_change_con_pkt_type_cp cp; in hci_change_connection_packet_type() local
460 cp.con_handle = (uint16_t) (n & 0x0fff); in hci_change_connection_packet_type()
461 cp.con_handle = htole16(cp.con_handle); in hci_change_connection_packet_type()
467 cp.pkt_type = (uint16_t) (n & 0xffff); in hci_change_connection_packet_type()
468 cp.pkt_type = htole16(cp.pkt_type); in hci_change_connection_packet_type()
479 (char const *) &cp, sizeof(cp), b, &n) == ERROR) in hci_change_connection_packet_type()
521 ng_hci_remote_name_req_cp cp; in hci_remote_name_request() local
524 memset(&cp, 0, sizeof(cp)); in hci_remote_name_request()
525 cp.page_scan_rep_mode = NG_HCI_SCAN_REP_MODE0; in hci_remote_name_request()
526 cp.page_scan_mode = NG_HCI_MANDATORY_PAGE_SCAN_MODE; in hci_remote_name_request()
535 cp.clock_offset = (n0 & 0xffff); in hci_remote_name_request()
536 cp.clock_offset = htole16(cp.clock_offset); in hci_remote_name_request()
543 cp.page_scan_mode = (n0 & 0xff); in hci_remote_name_request()
550 cp.page_scan_rep_mode = (n0 & 0xff); in hci_remote_name_request()
554 if (!bt_aton(argv[0], &cp.bdaddr)) { in hci_remote_name_request()
560 memcpy(&cp.bdaddr, he->h_addr, sizeof(cp.bdaddr)); in hci_remote_name_request()
572 (char const *) &cp, sizeof(cp), b, &n0) == ERROR) in hci_remote_name_request()
612 ng_hci_read_remote_features_cp cp; in hci_read_remote_supported_features() local
623 cp.con_handle = (n & 0x0fff); in hci_read_remote_supported_features()
624 cp.con_handle = htole16(cp.con_handle); in hci_read_remote_supported_features()
635 (char const *) &cp, sizeof(cp), b, &n) == ERROR) in hci_read_remote_supported_features()
681 ng_hci_read_remote_ver_info_cp cp; in hci_read_remote_version_information() local
691 cp.con_handle = (n & 0x0fff); in hci_read_remote_version_information()
692 cp.con_handle = htole16(cp.con_handle); in hci_read_remote_version_information()
703 (char const *) &cp, sizeof(cp), b, &n) == ERROR) in hci_read_remote_version_information()
753 ng_hci_read_clock_offset_cp cp; in hci_read_clock_offset() local
763 cp.con_handle = (n & 0x0fff); in hci_read_clock_offset()
764 cp.con_handle = htole16(cp.con_handle); in hci_read_clock_offset()
775 (char const *) &cp, sizeof(cp), b, &n) == ERROR) in hci_read_clock_offset()