From 4df82b5911c0e380d8b308958f158c3e7b365467 Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Mon, 31 Mar 2014 14:41:44 -0700 Subject: Bluetooth: btmrvl: indicate pscan scheduling instant in a debug event A vendor specific command is sent to firmware during initialization to enable this feature. This command is for SD8897 only. Signed-off-by: Bing Zhao Signed-off-by: Marcel Holtmann --- drivers/bluetooth/btmrvl_main.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'drivers/bluetooth/btmrvl_main.c') diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index e9dbddb0b8f1..d35f2e189a6d 100644 --- a/drivers/bluetooth/btmrvl_main.c +++ b/drivers/bluetooth/btmrvl_main.c @@ -214,6 +214,23 @@ int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, u8 subcmd) } EXPORT_SYMBOL_GPL(btmrvl_send_module_cfg_cmd); +int btmrvl_pscan_window_reporting(struct btmrvl_private *priv, u8 subcmd) +{ + struct btmrvl_sdio_card *card = priv->btmrvl_dev.card; + int ret; + + if (!card->support_pscan_win_report) + return 0; + + ret = btmrvl_send_sync_cmd(priv, BT_CMD_PSCAN_WIN_REPORT_ENABLE, + &subcmd, 1); + if (ret) + BT_ERR("PSCAN_WIN_REPORT_ENABLE command failed: %#x", ret); + + return ret; +} +EXPORT_SYMBOL_GPL(btmrvl_pscan_window_reporting); + int btmrvl_send_hscfg_cmd(struct btmrvl_private *priv) { int ret; @@ -489,6 +506,8 @@ static int btmrvl_setup(struct hci_dev *hdev) btmrvl_cal_data_dt(priv); + btmrvl_pscan_window_reporting(priv, 0x01); + priv->btmrvl_dev.psmode = 1; btmrvl_enable_ps(priv); -- cgit v1.2.3