Bluetooth: Initialize default flow control mode
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Mon, 19 Dec 2011 14:31:28 +0000 (16:31 +0200)
committerGustavo F. Padovan <padovan@profusion.mobi>
Tue, 20 Dec 2011 18:59:30 +0000 (16:59 -0200)
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
include/net/bluetooth/hci.h
net/bluetooth/hci_core.c

index 2e48d32..66b2639 100644 (file)
@@ -280,6 +280,10 @@ enum {
 #define HCI_ERROR_LOCAL_HOST_TERM      0x16
 #define HCI_ERROR_PAIRING_NOT_ALLOWED  0x18
 
+/* Flow control modes */
+#define HCI_FLOW_CTL_MODE_PACKET_BASED 0x00
+#define HCI_FLOW_CTL_MODE_BLOCK_BASED  0x01
+
 /* -----  HCI Commands ---- */
 #define HCI_OP_NOP                     0x0000
 
index bb089e3..884eb85 100644 (file)
@@ -199,6 +199,8 @@ static void bredr_init(struct hci_dev *hdev)
        __le16 param;
        __u8 flt_type;
 
+       hdev->flow_ctl_mode = HCI_FLOW_CTL_MODE_PACKET_BASED;
+
        /* Mandatory initialization */
 
        /* Reset */
@@ -245,6 +247,8 @@ static void bredr_init(struct hci_dev *hdev)
 
 static void amp_init(struct hci_dev *hdev)
 {
+       hdev->flow_ctl_mode = HCI_FLOW_CTL_MODE_BLOCK_BASED;
+
        /* Reset */
        hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL);