diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2015-02-10 08:49:41 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-02-13 23:19:58 -0500 |
commit | a715d11e453c37822eca675a4445c1ce4ea7297e (patch) | |
tree | f3815c87526f8f121143fe83acf2bdcd0fabdbe7 | |
parent | 855e7e7174bade3f2b63077a81eea5aab525dbf6 (diff) |
Bluetooth: btmrvl: support SCO routing to host interface
A vendor specific command is sent to firmware during
initialization to enable this feature.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | drivers/bluetooth/btmrvl_drv.h | 1 | ||||
-rw-r--r-- | drivers/bluetooth/btmrvl_main.c | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h index e75f8ee2512c..086f0ec89580 100644 --- a/drivers/bluetooth/btmrvl_drv.h +++ b/drivers/bluetooth/btmrvl_drv.h | |||
@@ -111,6 +111,7 @@ struct btmrvl_private { | |||
111 | 111 | ||
112 | /* Vendor specific Bluetooth commands */ | 112 | /* Vendor specific Bluetooth commands */ |
113 | #define BT_CMD_PSCAN_WIN_REPORT_ENABLE 0xFC03 | 113 | #define BT_CMD_PSCAN_WIN_REPORT_ENABLE 0xFC03 |
114 | #define BT_CMD_ROUTE_SCO_TO_HOST 0xFC1D | ||
114 | #define BT_CMD_SET_BDADDR 0xFC22 | 115 | #define BT_CMD_SET_BDADDR 0xFC22 |
115 | #define BT_CMD_AUTO_SLEEP_MODE 0xFC23 | 116 | #define BT_CMD_AUTO_SLEEP_MODE 0xFC23 |
116 | #define BT_CMD_HOST_SLEEP_CONFIG 0xFC59 | 117 | #define BT_CMD_HOST_SLEEP_CONFIG 0xFC59 |
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index 413597789c61..de05deb444ce 100644 --- a/drivers/bluetooth/btmrvl_main.c +++ b/drivers/bluetooth/btmrvl_main.c | |||
@@ -230,6 +230,18 @@ int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, u8 subcmd) | |||
230 | } | 230 | } |
231 | EXPORT_SYMBOL_GPL(btmrvl_send_module_cfg_cmd); | 231 | EXPORT_SYMBOL_GPL(btmrvl_send_module_cfg_cmd); |
232 | 232 | ||
233 | static int btmrvl_enable_sco_routing_to_host(struct btmrvl_private *priv) | ||
234 | { | ||
235 | int ret; | ||
236 | u8 subcmd = 0; | ||
237 | |||
238 | ret = btmrvl_send_sync_cmd(priv, BT_CMD_ROUTE_SCO_TO_HOST, &subcmd, 1); | ||
239 | if (ret) | ||
240 | BT_ERR("BT_CMD_ROUTE_SCO_TO_HOST command failed: %#x", ret); | ||
241 | |||
242 | return ret; | ||
243 | } | ||
244 | |||
233 | int btmrvl_pscan_window_reporting(struct btmrvl_private *priv, u8 subcmd) | 245 | int btmrvl_pscan_window_reporting(struct btmrvl_private *priv, u8 subcmd) |
234 | { | 246 | { |
235 | struct btmrvl_sdio_card *card = priv->btmrvl_dev.card; | 247 | struct btmrvl_sdio_card *card = priv->btmrvl_dev.card; |
@@ -558,6 +570,8 @@ static int btmrvl_setup(struct hci_dev *hdev) | |||
558 | 570 | ||
559 | btmrvl_check_device_tree(priv); | 571 | btmrvl_check_device_tree(priv); |
560 | 572 | ||
573 | btmrvl_enable_sco_routing_to_host(priv); | ||
574 | |||
561 | btmrvl_pscan_window_reporting(priv, 0x01); | 575 | btmrvl_pscan_window_reporting(priv, 0x01); |
562 | 576 | ||
563 | priv->btmrvl_dev.psmode = 1; | 577 | priv->btmrvl_dev.psmode = 1; |