From 50c131adfa0f5ea44b589188b72ca9b0dd3e9c3c Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Thu, 24 Nov 2011 14:52:02 +0200 Subject: [PATCH] --- yaml --- r: 278593 b: refs/heads/master c: 1e89cffb44a94e1937e5ec16125ae866dbba7b2e h: refs/heads/master i: 278591: 96f282be7e06aad94f494afe11a60642e44c6c9d v: v3 --- [refs] | 2 +- trunk/include/net/bluetooth/hci.h | 6 ++++++ trunk/include/net/bluetooth/hci_core.h | 2 ++ trunk/net/bluetooth/hci_event.c | 19 +++++++++++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ad2dcd425d26..c653b7776240 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4f957a76014fb63d193cd6c141bdd94aaff3a25e +refs/heads/master: 1e89cffb44a94e1937e5ec16125ae866dbba7b2e diff --git a/trunk/include/net/bluetooth/hci.h b/trunk/include/net/bluetooth/hci.h index 376c57420abe..ee83c36d35aa 100644 --- a/trunk/include/net/bluetooth/hci.h +++ b/trunk/include/net/bluetooth/hci.h @@ -677,6 +677,12 @@ struct hci_rp_read_local_oob_data { #define HCI_OP_READ_INQ_RSP_TX_POWER 0x0c58 +#define HCI_OP_READ_FLOW_CONTROL_MODE 0x0c66 +struct hci_rp_read_flow_control_mode { + __u8 status; + __u8 mode; +} __packed; + #define HCI_OP_WRITE_LE_HOST_SUPPORTED 0x0c6d struct hci_cp_write_le_host_supported { __u8 le; diff --git a/trunk/include/net/bluetooth/hci_core.h b/trunk/include/net/bluetooth/hci_core.h index e7b2e25397d7..44f130f6fb5e 100644 --- a/trunk/include/net/bluetooth/hci_core.h +++ b/trunk/include/net/bluetooth/hci_core.h @@ -170,6 +170,8 @@ struct hci_dev { __u32 amp_max_flush_to; __u32 amp_be_flush_to; + __u8 flow_ctl_mode; + unsigned int auto_accept_delay; unsigned long quirks; diff --git a/trunk/net/bluetooth/hci_event.c b/trunk/net/bluetooth/hci_event.c index 980da08e253e..ab4922831b9a 100644 --- a/trunk/net/bluetooth/hci_event.c +++ b/trunk/net/bluetooth/hci_event.c @@ -717,6 +717,21 @@ static void hci_cc_read_local_ext_features(struct hci_dev *hdev, hci_req_complete(hdev, HCI_OP_READ_LOCAL_EXT_FEATURES, rp->status); } +static void hci_cc_read_flow_control_mode(struct hci_dev *hdev, + struct sk_buff *skb) +{ + struct hci_rp_read_flow_control_mode *rp = (void *) skb->data; + + BT_DBG("%s status 0x%x", hdev->name, rp->status); + + if (rp->status) + return; + + hdev->flow_ctl_mode = rp->mode; + + hci_req_complete(hdev, HCI_OP_READ_FLOW_CONTROL_MODE, rp->status); +} + static void hci_cc_read_buffer_size(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_rp_read_buffer_size *rp = (void *) skb->data; @@ -1998,6 +2013,10 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk hci_cc_write_ca_timeout(hdev, skb); break; + case HCI_OP_READ_FLOW_CONTROL_MODE: + hci_cc_read_flow_control_mode(hdev, skb); + break; + case HCI_OP_READ_LOCAL_AMP_INFO: hci_cc_read_local_amp_info(hdev, skb); break;