Lines Matching refs:opcode
121 uint16_t opcode; member
309 struct net_buf *bt_hci_cmd_create(uint16_t opcode, uint8_t param_len) in bt_hci_cmd_create() argument
314 LOG_DBG("opcode 0x%04x param_len %u", opcode, param_len); in bt_hci_cmd_create()
329 cmd(buf)->opcode = opcode; in bt_hci_cmd_create()
334 hdr->opcode = sys_cpu_to_le16(opcode); in bt_hci_cmd_create()
340 int bt_hci_cmd_send(uint16_t opcode, struct net_buf *buf) in bt_hci_cmd_send() argument
343 buf = bt_hci_cmd_create(opcode, 0); in bt_hci_cmd_send()
349 LOG_DBG("opcode 0x%04x len %u", opcode, buf->len); in bt_hci_cmd_send()
354 if (opcode == BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS) { in bt_hci_cmd_send()
373 int bt_hci_cmd_send_sync(uint16_t opcode, struct net_buf *buf, in bt_hci_cmd_send_sync() argument
381 buf = bt_hci_cmd_create(opcode, 0); in bt_hci_cmd_send_sync()
393 LOG_DBG("buf %p opcode 0x%04x len %u", buf, opcode, buf->len); in bt_hci_cmd_send_sync()
430 BT_ASSERT_MSG(success, "command opcode 0x%04x timeout", opcode); in bt_hci_cmd_send_sync()
438 opcode, err); in bt_hci_cmd_send_sync()
442 LOG_WRN("opcode 0x%04x status 0x%02x %s", opcode, in bt_hci_cmd_send_sync()
460 LOG_DBG("rsp %p opcode 0x%04x len %u", buf, opcode, buf->len); in bt_hci_cmd_send_sync()
2411 static void hci_cmd_done(uint16_t opcode, uint8_t status, struct net_buf *evt_buf) in hci_cmd_done() argument
2416 LOG_DBG("opcode 0x%04x status 0x%02x %s buf %p", opcode, in hci_cmd_done()
2422 if (opcode == 0) { in hci_cmd_done()
2430 LOG_ERR("No command sent for cmd complete 0x%04x", opcode); in hci_cmd_done()
2434 if (cmd(buf)->opcode != opcode) { in hci_cmd_done()
2435 LOG_ERR("OpCode 0x%04x completed instead of expected 0x%04x", opcode, in hci_cmd_done()
2436 cmd(buf)->opcode); in hci_cmd_done()
2475 uint16_t opcode; in hci_cmd_complete() local
2479 opcode = sys_le16_to_cpu(evt->opcode); in hci_cmd_complete()
2481 LOG_DBG("opcode 0x%04x", opcode); in hci_cmd_complete()
2491 if (opcode == BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS) { in hci_cmd_complete()
2497 hci_cmd_done(opcode, status, buf); in hci_cmd_complete()
2509 uint16_t opcode; in hci_cmd_status() local
2513 opcode = sys_le16_to_cpu(evt->opcode); in hci_cmd_status()
2516 LOG_DBG("opcode 0x%04x", opcode); in hci_cmd_status()
2518 hci_cmd_done(opcode, evt->status, buf); in hci_cmd_status()
3058 LOG_DBG("Sending command 0x%04x (buf %p) to driver", cmd(buf)->opcode, buf); in hci_core_send_cmd()
3064 hci_cmd_done(cmd(buf)->opcode, BT_HCI_ERR_UNSPECIFIED, buf); in hci_core_send_cmd()