summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 11:54:25 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 11:54:25 -0700
commit0e496b8e84410c96d1ffc86f0b37b0328a4234da (patch)
treed8a2aeeaee03eb4f305ba4dc5ab9395c4ee31321 /net/bluetooth/mgmt.c
parent214da6728acac285cac0e8e9b6c4c13838b8e1b0 (diff)
parent7d132055814ef17a6c7b69f342244c410a5e000f (diff)
downloadop-kernel-dev-0e496b8e84410c96d1ffc86f0b37b0328a4234da.zip
op-kernel-dev-0e496b8e84410c96d1ffc86f0b37b0328a4234da.tar.gz
Merge 3.10-rc6 into char-misc-next
We want the fixes in here.
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 35fef22..f8ecbc7 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 };
OpenPOWER on IntegriCloud