diff options
| author | Maksim Krasnyanskiy <maxk@qualcomm.com> | 2002-10-13 18:36:42 -0700 |
|---|---|---|
| committer | Maksim Krasnyanskiy <maxk@qualcomm.com> | 2002-10-13 18:36:42 -0700 |
| commit | 4c9eb495b27f5939dc0a9ed4ed30200e91d960e5 (patch) | |
| tree | 5277468c2638e4285b83a3630098ad302eda8c00 | |
| parent | 63d902f71914cbbbedc5745bc48a1c23b4e5e2ba (diff) | |
Support for suspend/resume interface for the HCI devices.
| -rw-r--r-- | include/net/bluetooth/hci.h | 2 | ||||
| -rw-r--r-- | include/net/bluetooth/hci_core.h | 2 | ||||
| -rw-r--r-- | net/bluetooth/hci_core.c | 16 | ||||
| -rw-r--r-- | net/bluetooth/syms.c | 3 |
4 files changed, 23 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index d67d9721e091..a8832055d170 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -39,6 +39,8 @@ #define HCI_DEV_UNREG 2 #define HCI_DEV_UP 3 #define HCI_DEV_DOWN 4 +#define HCI_DEV_SUSPEND 5 +#define HCI_DEV_RESUME 6 /* HCI device types */ #define HCI_VHCI 0 diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 1740cde1287d..adf5558f660a 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -302,6 +302,8 @@ struct hci_dev *hci_dev_get(int index); struct hci_dev *hci_get_route(bdaddr_t *src, bdaddr_t *dst); int hci_register_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_close(__u16 dev); int hci_dev_reset(__u16 dev); diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index f013113f34ec..1ad3339ed38d 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -863,6 +863,22 @@ int hci_unregister_dev(struct hci_dev *hdev) 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 */ int hci_recv_frame(struct sk_buff *skb) { diff --git a/net/bluetooth/syms.c b/net/bluetooth/syms.c index a1d3c0e6d384..779d82130924 100644 --- a/net/bluetooth/syms.c +++ b/net/bluetooth/syms.c @@ -44,6 +44,9 @@ /* HCI Core */ EXPORT_SYMBOL(hci_register_dev); EXPORT_SYMBOL(hci_unregister_dev); +EXPORT_SYMBOL(hci_suspend_dev); +EXPORT_SYMBOL(hci_resume_dev); + EXPORT_SYMBOL(hci_register_proto); EXPORT_SYMBOL(hci_unregister_proto); |
