Skip to contentSkip to conversation

Bluetooth: Don't advertise high speed support without SSP

PATCH Applied Marcel Holtmann 2 participants 2 messages Oct 11, 2013

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Don't advertise high speed support without SSP

It is not allowed to enable high speed support when Secure Simple Pairing is not available or disabled.

However the support for high speed gets advertised on a controller that does not even support Secure Simple Pairing. Since there is no way to enable high speed support on such a controller, do not even advertise its support.

---
 net/bluetooth/mgmt.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
net/bluetooth/mgmt.c +5 -4
index f57ec19..aa59490 100644
@@ -363,9 +363,6 @@ static u32 get_supported_settings(struct hci_dev *hdev)
 	settings |= MGMT_SETTING_POWERED;
 	settings |= MGMT_SETTING_PAIRABLE;
 
-	if (lmp_ssp_capable(hdev))
-		settings |= MGMT_SETTING_SSP;
-
 	if (lmp_bredr_capable(hdev)) {
 		settings |= MGMT_SETTING_CONNECTABLE;
 		if (hdev->hci_ver >= BLUETOOTH_VER_1_2)
@@ -373,7 +370,11 @@ static u32 get_supported_settings(struct hci_dev *hdev)
 		settings |= MGMT_SETTING_DISCOVERABLE;
 		settings |= MGMT_SETTING_BREDR;
 		settings |= MGMT_SETTING_LINK_SECURITY;
-		settings |= MGMT_SETTING_HS;
+
+		if (lmp_ssp_capable(hdev)) {
+			settings |= MGMT_SETTING_SSP;
+			settings |= MGMT_SETTING_HS;
+		}
 	}
 
 	if (lmp_le_capable(hdev)) {
Signature · 1 line
1.8.3.1
#1 lore raw

Hi Marcel,

Quoted 8 lines · Marcel Holtmann

It is not allowed to enable high speed support when Secure Simple Pairing is not available or disabled.

However the support for high speed gets advertised on a controller that does not even support Secure Simple Pairing. Since there is no way to enable high speed support on such a controller, do not even advertise its support.

Quoted 4 lines
---
 net/bluetooth/mgmt.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Applied to bluetooth-next. Thanks.

Johan