diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2011-12-19 09:31:28 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-12-20 13:59:30 -0500 |
commit | 2455a3ea0c0235fe3c32b67649ff7db3fb892d90 (patch) | |
tree | eb4ed610b82a81bdf4d45a8fdaa914c37ae2e989 | |
parent | e61ef49966777defa84b04159ea23cdeb2c7cd4c (diff) |
Bluetooth: Initialize default flow control mode
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>
-rw-r--r-- | include/net/bluetooth/hci.h | 4 | ||||
-rw-r--r-- | net/bluetooth/hci_core.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 2e48d326e365..66b26399a1ca 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -280,6 +280,10 @@ enum { | |||
280 | #define HCI_ERROR_LOCAL_HOST_TERM 0x16 | 280 | #define HCI_ERROR_LOCAL_HOST_TERM 0x16 |
281 | #define HCI_ERROR_PAIRING_NOT_ALLOWED 0x18 | 281 | #define HCI_ERROR_PAIRING_NOT_ALLOWED 0x18 |
282 | 282 | ||
283 | /* Flow control modes */ | ||
284 | #define HCI_FLOW_CTL_MODE_PACKET_BASED 0x00 | ||
285 | #define HCI_FLOW_CTL_MODE_BLOCK_BASED 0x01 | ||
286 | |||
283 | /* ----- HCI Commands ---- */ | 287 | /* ----- HCI Commands ---- */ |
284 | #define HCI_OP_NOP 0x0000 | 288 | #define HCI_OP_NOP 0x0000 |
285 | 289 | ||
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index bb089e3bccef..884eb85a136a 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -199,6 +199,8 @@ static void bredr_init(struct hci_dev *hdev) | |||
199 | __le16 param; | 199 | __le16 param; |
200 | __u8 flt_type; | 200 | __u8 flt_type; |
201 | 201 | ||
202 | hdev->flow_ctl_mode = HCI_FLOW_CTL_MODE_PACKET_BASED; | ||
203 | |||
202 | /* Mandatory initialization */ | 204 | /* Mandatory initialization */ |
203 | 205 | ||
204 | /* Reset */ | 206 | /* Reset */ |
@@ -245,6 +247,8 @@ static void bredr_init(struct hci_dev *hdev) | |||
245 | 247 | ||
246 | static void amp_init(struct hci_dev *hdev) | 248 | static void amp_init(struct hci_dev *hdev) |
247 | { | 249 | { |
250 | hdev->flow_ctl_mode = HCI_FLOW_CTL_MODE_BLOCK_BASED; | ||
251 | |||
248 | /* Reset */ | 252 | /* Reset */ |
249 | hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); | 253 | hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); |
250 | 254 | ||