[PATCH 3/5] Bluetooth: hci_intel: Add status parameter to inject_cmd_complete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add possibility to pass a status/error code to the injected command
complete event.

Signed-off-by: Loic Poulain <loic.poulain@xxxxxxxxx>
---
 drivers/bluetooth/hci_intel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c
index 2dcf9b0..98beacb 100644
--- a/drivers/bluetooth/hci_intel.c
+++ b/drivers/bluetooth/hci_intel.c
@@ -447,7 +447,7 @@ static int intel_flush(struct hci_uart *hu)
 	return 0;
 }
 
-static int inject_cmd_complete(struct hci_dev *hdev, __u16 opcode)
+static int inject_cmd_complete(struct hci_dev *hdev, __u16 opcode, __u8 status)
 {
 	struct sk_buff *skb;
 	struct hci_event_hdr *hdr;
@@ -465,7 +465,7 @@ static int inject_cmd_complete(struct hci_dev *hdev, __u16 opcode)
 	evt->ncmd = 0x01;
 	evt->opcode = cpu_to_le16(opcode);
 
-	*skb_put(skb, 1) = 0x00;
+	*skb_put(skb, 1) = status;
 
 	hci_skb_pkt_type(skb) = HCI_EVENT_PKT;
 
@@ -1150,7 +1150,7 @@ static struct sk_buff *intel_dequeue(struct hci_uart *hu)
 		 * control working inject that event here.
 		 */
 		if (opcode == 0xfc01)
-			inject_cmd_complete(hu->hdev, opcode);
+			inject_cmd_complete(hu->hdev, opcode, 0x00);
 	}
 
 	/* Prepend skb with frame type */
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux