Commit 4c9eb495 authored by Maksim Krasnyanskiy's avatar Maksim Krasnyanskiy

Support for suspend/resume interface for the HCI devices.

parent 63d902f7
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#define HCI_DEV_UNREG 2 #define HCI_DEV_UNREG 2
#define HCI_DEV_UP 3 #define HCI_DEV_UP 3
#define HCI_DEV_DOWN 4 #define HCI_DEV_DOWN 4
#define HCI_DEV_SUSPEND 5
#define HCI_DEV_RESUME 6
/* HCI device types */ /* HCI device types */
#define HCI_VHCI 0 #define HCI_VHCI 0
......
...@@ -302,6 +302,8 @@ struct hci_dev *hci_dev_get(int index); ...@@ -302,6 +302,8 @@ struct hci_dev *hci_dev_get(int index);
struct hci_dev *hci_get_route(bdaddr_t *src, bdaddr_t *dst); struct hci_dev *hci_get_route(bdaddr_t *src, bdaddr_t *dst);
int hci_register_dev(struct hci_dev *hdev); int hci_register_dev(struct hci_dev *hdev);
int hci_unregister_dev(struct hci_dev *hdev); int hci_unregister_dev(struct hci_dev *hdev);
int hci_suspend_dev(struct hci_dev *hdev);
int hci_resume_dev(struct hci_dev *hdev);
int hci_dev_open(__u16 dev); int hci_dev_open(__u16 dev);
int hci_dev_close(__u16 dev); int hci_dev_close(__u16 dev);
int hci_dev_reset(__u16 dev); int hci_dev_reset(__u16 dev);
......
...@@ -863,6 +863,22 @@ int hci_unregister_dev(struct hci_dev *hdev) ...@@ -863,6 +863,22 @@ int hci_unregister_dev(struct hci_dev *hdev)
return 0; return 0;
} }
/* Suspend HCI device */
int hci_suspend_dev(struct hci_dev *hdev)
{
hci_notify(hdev, HCI_DEV_SUSPEND);
hci_run_hotplug(hdev->name, "suspend");
return 0;
}
/* Resume HCI device */
int hci_resume_dev(struct hci_dev *hdev)
{
hci_notify(hdev, HCI_DEV_RESUME);
hci_run_hotplug(hdev->name, "resume");
return 0;
}
/* Receive frame from HCI drivers */ /* Receive frame from HCI drivers */
int hci_recv_frame(struct sk_buff *skb) int hci_recv_frame(struct sk_buff *skb)
{ {
......
...@@ -44,6 +44,9 @@ ...@@ -44,6 +44,9 @@
/* HCI Core */ /* HCI Core */
EXPORT_SYMBOL(hci_register_dev); EXPORT_SYMBOL(hci_register_dev);
EXPORT_SYMBOL(hci_unregister_dev); EXPORT_SYMBOL(hci_unregister_dev);
EXPORT_SYMBOL(hci_suspend_dev);
EXPORT_SYMBOL(hci_resume_dev);
EXPORT_SYMBOL(hci_register_proto); EXPORT_SYMBOL(hci_register_proto);
EXPORT_SYMBOL(hci_unregister_proto); EXPORT_SYMBOL(hci_unregister_proto);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment