Skip to content

Commit 2455a3e

Browse files
finikorgGustavo F. Padovan
authored andcommitted
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>
1 parent e61ef49 commit 2455a3e

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎include/net/bluetooth/hci.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ enum {
280280
#define HCI_ERROR_LOCAL_HOST_TERM 0x16
281281
#define HCI_ERROR_PAIRING_NOT_ALLOWED 0x18
282282

283+
/* Flow control modes */
284+
#define HCI_FLOW_CTL_MODE_PACKET_BASED 0x00
285+
#define HCI_FLOW_CTL_MODE_BLOCK_BASED 0x01
286+
283287
/* ----- HCI Commands ---- */
284288
#define HCI_OP_NOP 0x0000
285289

‎net/bluetooth/hci_core.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ static void bredr_init(struct hci_dev *hdev)
199199
__le16 param;
200200
__u8 flt_type;
201201

202+
hdev->flow_ctl_mode = HCI_FLOW_CTL_MODE_PACKET_BASED;
203+
202204
/* Mandatory initialization */
203205

204206
/* Reset */
@@ -245,6 +247,8 @@ static void bredr_init(struct hci_dev *hdev)
245247

246248
static void amp_init(struct hci_dev *hdev)
247249
{
250+
hdev->flow_ctl_mode = HCI_FLOW_CTL_MODE_BLOCK_BASED;
251+
248252
/* Reset */
249253
hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL);
250254

0 commit comments

Comments
 (0)