diff options
author | Sudha Bheemanna <b.sudha@samsung.com> | 2016-09-07 16:47:58 +0530 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2024-11-12 13:03:11 +0900 |
commit | 7b383fb6ad9b5040f64386e5584323ba6efcdb62 (patch) | |
tree | 3ba001f3409e93b61b92e94586ca157c433b3104 /net | |
parent | cae60bde656072dfd72670a0b53aa51cd38c8e46 (diff) | |
download | linux-rpi-7b383fb6ad9b5040f64386e5584323ba6efcdb62.tar.gz linux-rpi-7b383fb6ad9b5040f64386e5584323ba6efcdb62.tar.bz2 linux-rpi-7b383fb6ad9b5040f64386e5584323ba6efcdb62.zip |
Bluetooth: Add H/W TX timeout error MGMT event
This patch sends the H/W TX timeout error MGMT event if HCI command
timeout occurs after sending HCI commands.
Change-Id: If1da7ae0633d9b99c76c982810d65ee2e466fc9e
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_core.c | 11 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 6275cd97f160..7efb29362b73 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -174,6 +174,13 @@ void hci_le_discovery_set_state(struct hci_dev *hdev, int state) hdev->le_discovery.state = state; } + +static void hci_tx_timeout_error_evt(struct hci_dev *hdev) +{ + BT_ERR("%s H/W TX Timeout error", hdev->name); + + mgmt_tx_timeout_error(hdev); +} #endif void hci_inquiry_cache_flush(struct hci_dev *hdev) @@ -1499,6 +1506,10 @@ static void hci_cmd_timeout(struct work_struct *work) if (hdev->cmd_timeout) hdev->cmd_timeout(hdev); +#ifdef TIZEN_BT + hci_tx_timeout_error_evt(hdev); +#endif + atomic_set(&hdev->cmd_cnt, 1); queue_work(hdev->workqueue, &hdev->cmd_work); } diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index fb5b9d459707..beeb5eb0bfa9 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -8791,6 +8791,11 @@ void mgmt_hardware_error(struct hci_dev *hdev, u8 err_code) ev.error_code = err_code; mgmt_event(MGMT_EV_HARDWARE_ERROR, hdev, &ev, sizeof(ev), NULL); } + +void mgmt_tx_timeout_error(struct hci_dev *hdev) +{ + mgmt_event(MGMT_EV_TX_TIMEOUT_ERROR, hdev, NULL, 0, NULL); +} #endif /* TIZEN_BT */ static bool ltk_is_valid(struct mgmt_ltk_info *key) |