/* Allocate buffer for HCI command and fill in opCode for the command.  */
static struct net_buf* hci_cmd_create(uint16_t opcode, uint8_t param_len)
/* Allocate buffer for HCI command and fill in opCode for the command.  */
static struct net_buf* hci_cmd_create(uint16_t opcode, uint8_t param_len)
{
	struct bt_hci_cmd_hdr *hdr;
	struct net_buf *buf;
	buf = bt_buf_get_tx(BT_BUF_CMD, K_FOREVER, NULL, 0);
	__ASSERT_NO_MSG(buf);
	hdr = net_buf_add(buf, sizeof(*hdr));
	hdr->opcode = sys_cpu_to_le16(opcode);
	hdr->param_len = param_len;
	return buf;
}