summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSudha Bheemanna <b.sudha@samsung.com>2016-09-07 15:42:22 +0530
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:53:12 +0900
commit306f1007f8a89344498dcbb13b46dce88297aac1 (patch)
treed3e88668395a5733e0b7ff57fb1325c318a010c1 /net
parent7cb5b609d373322f3c73689cd5459869196d7c11 (diff)
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>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_event.c5
-rw-r--r--net/bluetooth/mgmt.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index f8113e1a6727..e9e832b799a3 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3269,6 +3269,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 26611808699c..757754c3219f 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -7163,6 +7163,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)