diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2013-03-15 18:07:07 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-03-18 13:02:07 -0400 |
commit | 05cbf29f84f2cf17554b58a3ab4a0ac46d52eca6 (patch) | |
tree | fc6912ce2d2f64e9b8fe8d5d3a980243137da879 /net/bluetooth/mgmt.c | |
parent | 1a47aee85f8a0803b879abb2e331d6354eb975ac (diff) |
Bluetooth: Fix error response for simultaneous fast connectable commands
If there's another pending mgmt_set_fast_connectable command we should
return a "busy" error response.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 34caf30584c2..e89938e0233c 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -2953,6 +2953,12 @@ static int set_fast_connectable(struct sock *sk, struct hci_dev *hdev, | |||
2953 | 2953 | ||
2954 | hci_dev_lock(hdev); | 2954 | hci_dev_lock(hdev); |
2955 | 2955 | ||
2956 | if (mgmt_pending_find(MGMT_OP_SET_FAST_CONNECTABLE, hdev)) { | ||
2957 | err = cmd_status(sk, hdev->id, MGMT_OP_SET_FAST_CONNECTABLE, | ||
2958 | MGMT_STATUS_BUSY); | ||
2959 | goto unlock; | ||
2960 | } | ||
2961 | |||
2956 | if (cp->val) { | 2962 | if (cp->val) { |
2957 | type = PAGE_SCAN_TYPE_INTERLACED; | 2963 | type = PAGE_SCAN_TYPE_INTERLACED; |
2958 | 2964 | ||