Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291029
b: refs/heads/master
c: 6c8f12c
h: refs/heads/master
i:
  291027: 4171738
v: v3
  • Loading branch information
Johan Hedberg committed Feb 23, 2012
1 parent bbcbb06 commit 734e4ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97e0bdeb93cc9bd014c21d5400af4fa7f2fe2f91
refs/heads/master: 6c8f12c143fe83485afa530320e6f70dfc1aad54
12 changes: 6 additions & 6 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,12 @@ static int set_ssp(struct sock *sk, u16 index, void *data, u16 len)

hci_dev_lock(hdev);

if (!(hdev->features[6] & LMP_SIMPLE_PAIR)) {
err = cmd_status(sk, index, MGMT_OP_SET_SSP,
MGMT_STATUS_NOT_SUPPORTED);
goto failed;
}

val = !!cp->val;

if (!hdev_is_powered(hdev)) {
Expand All @@ -1161,12 +1167,6 @@ static int set_ssp(struct sock *sk, u16 index, void *data, u16 len)
goto failed;
}

if (!(hdev->features[6] & LMP_SIMPLE_PAIR)) {
err = cmd_status(sk, index, MGMT_OP_SET_SSP,
MGMT_STATUS_NOT_SUPPORTED);
goto failed;
}

if (mgmt_pending_find(MGMT_OP_SET_SSP, hdev)) {
err = cmd_status(sk, index, MGMT_OP_SET_SSP, MGMT_STATUS_BUSY);
goto failed;
Expand Down

0 comments on commit 734e4ca

Please sign in to comment.