Skip to content

Commit

Permalink
Bluetooth: mgmt: Fix EIR toggling with SSP
Browse files Browse the repository at this point in the history
This patch fixes setting the EIR properly when the SSP flag has been set
when powered off (in such a case there is no pending Set_SSP command).

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Johan Hedberg committed Feb 23, 2012
1 parent 6bf0e46 commit 5fc6ebb
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -3437,14 +3437,13 @@ int mgmt_ssp_enable_complete(struct hci_dev *hdev, u8 enable, u8 status)
if (changed)
err = new_settings(hdev, 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);
}
if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags))
update_eir(hdev);
else
clear_eir(hdev);

return err;
}
Expand Down

0 comments on commit 5fc6ebb

Please sign in to comment.