aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-09-27 10:26:08 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-09-27 16:10:18 -0400
commit8e2a0d92c56ec6955526a8b60838c9b00f70540d (patch)
treea8a8796ad17d8450a82e16c7ecc82d2a42f9cf0e /net/bluetooth/hci_event.c
parentf97268fccdd4e76462195216fcab621b8d4a6cd1 (diff)
Bluetooth: AMP: Use HCI cmd to Read AMP Info
When receiving A2MP Get Info Request execute Read Local AMP Info HCI command to AMP controller with function to be executed upon receiving command complete event. Function will handle A2MP Get Info Response. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 2022b43c7353..eb45774165f4 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -30,6 +30,7 @@
30#include <net/bluetooth/bluetooth.h> 30#include <net/bluetooth/bluetooth.h>
31#include <net/bluetooth/hci_core.h> 31#include <net/bluetooth/hci_core.h>
32#include <net/bluetooth/mgmt.h> 32#include <net/bluetooth/mgmt.h>
33#include <net/bluetooth/a2mp.h>
33 34
34/* Handle HCI Event packets */ 35/* Handle HCI Event packets */
35 36
@@ -846,7 +847,7 @@ static void hci_cc_read_local_amp_info(struct hci_dev *hdev,
846 BT_DBG("%s status 0x%2.2x", hdev->name, rp->status); 847 BT_DBG("%s status 0x%2.2x", hdev->name, rp->status);
847 848
848 if (rp->status) 849 if (rp->status)
849 return; 850 goto a2mp_rsp;
850 851
851 hdev->amp_status = rp->amp_status; 852 hdev->amp_status = rp->amp_status;
852 hdev->amp_total_bw = __le32_to_cpu(rp->total_bw); 853 hdev->amp_total_bw = __le32_to_cpu(rp->total_bw);
@@ -860,6 +861,9 @@ static void hci_cc_read_local_amp_info(struct hci_dev *hdev,
860 hdev->amp_max_flush_to = __le32_to_cpu(rp->max_flush_to); 861 hdev->amp_max_flush_to = __le32_to_cpu(rp->max_flush_to);
861 862
862 hci_req_complete(hdev, HCI_OP_READ_LOCAL_AMP_INFO, rp->status); 863 hci_req_complete(hdev, HCI_OP_READ_LOCAL_AMP_INFO, rp->status);
864
865a2mp_rsp:
866 a2mp_send_getinfo_rsp(hdev);
863} 867}
864 868
865static void hci_cc_delete_stored_link_key(struct hci_dev *hdev, 869static void hci_cc_delete_stored_link_key(struct hci_dev *hdev,