/* Builds and sends an HCILL command packet. These are very simple packets with only 1 cmd byte  */
static int send_hcill_cmd(u8 cmd, struct hci_uart *hu)
/* Builds and sends an HCILL command packet. These are very simple packets with only 1 cmd byte  */
static int send_hcill_cmd(u8 cmd, struct hci_uart *hu)
{
	int err = 0;
	struct sk_buff *skb = NULL;
	struct ll_struct *ll = hu->priv;
	struct hcill_cmd *hcill_packet;
	BT_DBG("hu %p cmd 0x%x", hu, cmd);
	skb = bt_skb_alloc(1, GFP_ATOMIC);
	if (!skb) {
		BT_ERR("cannot allocate memory for HCILL packet");
		err = -ENOMEM;
		goto out;
	}
	hcill_packet = (struct hcill_cmd *) skb_put(skb, 1);
	hcill_packet->cmd = cmd;
	skb->dev = (void *) hu->hdev;
	skb_queue_tail(&ll->txq, skb);
out:
	return err;
}