Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290998
b: refs/heads/master
c: cacaf52
h: refs/heads/master
v: v3
  • Loading branch information
Johan Hedberg committed Feb 20, 2012
1 parent 2a1b3c0 commit f3f710b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 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: 1e16357480fdeaeff7c5572f1afba7835473fcb6
refs/heads/master: cacaf52f51697f832a26e8fdaa7b8e85785085da
20 changes: 19 additions & 1 deletion trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -3250,6 +3250,18 @@ int mgmt_auth_enable_complete(struct hci_dev *hdev, u8 status)
return err;
}

static int clear_eir(struct hci_dev *hdev)
{
struct hci_cp_write_eir cp;

if (!(hdev->features[6] & LMP_EXT_INQ))
return 0;

memset(&cp, 0, sizeof(cp));

return hci_send_cmd(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp);
}

int mgmt_ssp_enable_complete(struct hci_dev *hdev, u8 status)
{
struct cmd_lookup match = { NULL, hdev };
Expand All @@ -3268,9 +3280,15 @@ int mgmt_ssp_enable_complete(struct hci_dev *hdev, u8 status)
ev = cpu_to_le32(get_current_settings(hdev));
err = mgmt_event(MGMT_EV_NEW_SETTINGS, hdev, &ev, sizeof(ev), match.sk);

if (match.sk)
if (match.sk) {
sock_put(match.sk);

if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags))
update_eir(hdev);
else
clear_eir(hdev);
}

return err;
}

Expand Down

0 comments on commit f3f710b

Please sign in to comment.