diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2015-10-20 23:25:42 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2015-10-21 07:30:53 +0300 |
commit | 98a63aaf245e2522b0ddd86f38fb83883344bcaf (patch) | |
tree | 1d84c744eb306d7918cfb6043962a4803020cefc /net/bluetooth | |
parent | aee61f7aa89bbfa48b91628291d8685aa61c970f (diff) |
Bluetooth: Introduce driver specific post init callback
Some drivers might have to restore certain settings after the init
procedure has been completed. This driver callback allows them to hook
into that stage. This callback is run just before the controller is
declared as powered up.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index ac5cb251f9fb..964fba4c96bf 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -1503,8 +1503,11 @@ static int hci_dev_do_open(struct hci_dev *hdev) if (!ret) { if (!hci_dev_test_flag(hdev, HCI_UNCONFIGURED) && - !hci_dev_test_flag(hdev, HCI_USER_CHANNEL)) + !hci_dev_test_flag(hdev, HCI_USER_CHANNEL)) { ret = __hci_init(hdev); + if (!ret && hdev->post_init) + ret = hdev->post_init(hdev); + } } /* If the HCI Reset command is clearing all diagnostic settings, |