Bluetooth: Get MWS transport configuration of the controller
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 23 Jul 2014 17:24:57 +0000 (19:24 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 23 Jul 2014 17:34:08 +0000 (20:34 +0300)
If the Bluetooth controller supports Get MWS Transport Layer
Configuration command, then issue it during initialization.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/hci.h
net/bluetooth/hci_core.c

index 5d30919eaba94ffb3c9a6ffe8757b3b24635582c..e3fd926df13f4863e6d7621b737bb205a35c74ff 100644 (file)
@@ -1172,6 +1172,8 @@ struct hci_rp_write_remote_amp_assoc {
        __u8     phy_handle;
 } __packed;
 
+#define HCI_OP_GET_MWS_TRANSPORT_CONFIG        0x140c
+
 #define HCI_OP_ENABLE_DUT_MODE         0x1803
 
 #define HCI_OP_WRITE_SSP_DEBUG_MODE    0x1804
index f3e14103b76be31d31e7be7cff6c431478a7d1bd..078f1ecbc058281dcb81e9433f1b351f3647283f 100644 (file)
@@ -1690,6 +1690,10 @@ static void hci_init4_req(struct hci_request *req, unsigned long opt)
        if (hdev->commands[29] & 0x20)
                hci_req_add(req, HCI_OP_READ_LOCAL_CODECS, 0, NULL);
 
+       /* Get MWS transport configuration if the HCI command is supported */
+       if (hdev->commands[30] & 0x08)
+               hci_req_add(req, HCI_OP_GET_MWS_TRANSPORT_CONFIG, 0, NULL);
+
        /* Check for Synchronization Train support */
        if (lmp_sync_train_capable(hdev))
                hci_req_add(req, HCI_OP_READ_SYNC_TRAIN_PARAMS, 0, NULL);