aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 3b3ed0522fcf..b09c86b6996a 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1296,11 +1296,15 @@ static int set_ssp(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
1296{ 1296{
1297 struct mgmt_mode *cp = data; 1297 struct mgmt_mode *cp = data;
1298 struct pending_cmd *cmd; 1298 struct pending_cmd *cmd;
1299 u8 val; 1299 u8 val, status;
1300 int err; 1300 int err;
1301 1301
1302 BT_DBG("request for %s", hdev->name); 1302 BT_DBG("request for %s", hdev->name);
1303 1303
1304 status = mgmt_bredr_support(hdev);
1305 if (status)
1306 return cmd_status(sk, hdev->id, MGMT_OP_SET_SSP, status);
1307
1304 if (!lmp_ssp_capable(hdev)) 1308 if (!lmp_ssp_capable(hdev))
1305 return cmd_status(sk, hdev->id, MGMT_OP_SET_SSP, 1309 return cmd_status(sk, hdev->id, MGMT_OP_SET_SSP,
1306 MGMT_STATUS_NOT_SUPPORTED); 1310 MGMT_STATUS_NOT_SUPPORTED);