diff options
author | Sudha Bheemanna <b.sudha@samsung.com> | 2016-09-07 15:42:22 +0530 |
---|---|---|
committer | Amit Purwar <amit.purwar@samsung.com> | 2019-06-27 17:20:56 +0530 |
commit | 4eba792a3433ff0b39afa00fe40cd948beab6182 (patch) | |
tree | 30cd4d7bf65ff14732fa57e98aad96d779aa31b2 /net | |
parent | 90d3f0dce7fb1ba148d0bf3bf3f34db5f7c99c4d (diff) | |
download | linux-rpi3-4eba792a3433ff0b39afa00fe40cd948beab6182.tar.gz linux-rpi3-4eba792a3433ff0b39afa00fe40cd948beab6182.tar.bz2 linux-rpi3-4eba792a3433ff0b39afa00fe40cd948beab6182.zip |
Bluetooth: Add hardware error MGMT event
Add code to handle hardware error MGMT event.
Change-Id: I5875ea2aeae7aba95c1f8e15b456704dc6bcdee4
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_event.c | 5 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 77f1d107d95b..457849ac3a5a 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -3574,6 +3574,11 @@ static void hci_hardware_error_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_hardware_error *ev = (void *) skb->data; +#ifdef TIZEN_BT + hci_dev_lock(hdev); + mgmt_hardware_error(hdev, ev->code); + hci_dev_unlock(hdev); +#endif hdev->hw_error_code = ev->code; queue_work(hdev->req_workqueue, &hdev->error_reset); diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index afadd7c90e91..6481015b6553 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -6743,6 +6743,14 @@ static int le_set_scan_params(struct sock *sk, struct hci_dev *hdev, return err; } + +void mgmt_hardware_error(struct hci_dev *hdev, u8 err_code) +{ + struct mgmt_ev_hardware_error ev; + + ev.error_code = err_code; + mgmt_event(MGMT_EV_HARDWARE_ERROR, hdev, &ev, sizeof(ev), NULL); +} #endif /* TIZEN_BT */ static bool ltk_is_valid(struct mgmt_ltk_info *key) |