diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-06-20 21:37:55 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-06-20 21:37:55 +0200 |
commit | b31a76546c08f618e355bd12a7cc138c045374b7 (patch) | |
tree | bc1aba4774e8f4910253c1eb409de278178dfed5 /net/bluetooth/mgmt.c | |
parent | 4a77a932b9958ffd393581cd5350ca0ef39711de (diff) | |
parent | 45853507c9362b0bd606b37e8c7c7e7551caa78b (diff) | |
download | linux-stable-b31a76546c08f618e355bd12a7cc138c045374b7.tar.gz linux-stable-b31a76546c08f618e355bd12a7cc138c045374b7.tar.bz2 linux-stable-b31a76546c08f618e355bd12a7cc138c045374b7.zip |
Merge tag 'omap-for-v3.11/board-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/boards
From Tony Lindgren:
Minor board changes for v3.11 merge window. These are
tapering down finally as we're getting closer to making
omap2+ DT only.
* tag 'omap-for-v3.11/board-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: omap2plus_defconfig: enable USB_PHY and NOP_USB_XCEIV
ARM: OMAP1: nokia770: enable Tahvo
ARM: OMAP3EVM: Marking omap3_evm_display_init() with CONFIG_BROKEN
arm: omap: board-overo: reset GPIO for SMSC911x
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 35fef22703e9..f8ecbc70293d 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -2700,7 +2700,7 @@ static int start_discovery(struct sock *sk, struct hci_dev *hdev, break; case DISCOV_TYPE_LE: - if (!lmp_host_le_capable(hdev)) { + if (!test_bit(HCI_LE_ENABLED, &hdev->dev_flags)) { err = cmd_status(sk, hdev->id, MGMT_OP_START_DISCOVERY, MGMT_STATUS_NOT_SUPPORTED); mgmt_pending_remove(cmd); @@ -3418,6 +3418,27 @@ new_settings: return err; } +int mgmt_set_powered_failed(struct hci_dev *hdev, int err) +{ + struct pending_cmd *cmd; + u8 status; + + cmd = mgmt_pending_find(MGMT_OP_SET_POWERED, hdev); + if (!cmd) + return -ENOENT; + + if (err == -ERFKILL) + status = MGMT_STATUS_RFKILLED; + else + status = MGMT_STATUS_FAILED; + + err = cmd_status(cmd->sk, hdev->id, MGMT_OP_SET_POWERED, status); + + mgmt_pending_remove(cmd); + + return err; +} + int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable) { struct cmd_lookup match = { NULL, hdev }; |