summaryrefslogtreecommitdiff
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-10-24 21:09:52 (GMT)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-11-01 22:26:59 (GMT)
commit6b4b73ee75bd65c4a47b1a323cb7c5180a6d2ea7 (patch)
treea93ce2470fab84aa4be06caacdae092a3224d500 /net/bluetooth/mgmt.c
parent5ed8eb2f6b5710c09bd1adb40aa795a424e21143 (diff)
downloadlinux-fsl-qoriq-6b4b73ee75bd65c4a47b1a323cb7c5180a6d2ea7.tar.xz
Bluetooth: Fix sending unnecessary HCI_Write_SSP_Mode command
This patch fixes sending an unnecessary HCI_Write_SSP_Mode command if the command has already been sent as part of the default HCI init sequence. 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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 585654b..9017287 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2913,7 +2913,8 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)
mgmt_pending_foreach(MGMT_OP_SET_POWERED, hdev, settings_rsp, &match);
if (powered) {
- if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags)) {
+ if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags) &&
+ !lmp_host_ssp_capable(hdev)) {
u8 ssp = 1;
hci_send_cmd(hdev, HCI_OP_WRITE_SSP_MODE, 1, &ssp);