Commit a4d57234 authored by Mariusz Skamra's avatar Mariusz Skamra Committed by Anas Nashif
Browse files

Bluetooth: Don't mask ECDH related events if CONFIG_BT_ECC disabled

It is related to b904ad38.
This fixes checking ECDH related events in event mask.
If ECDH support is disabled in host, there is no need to check
if those are supported in the controller.

Signed-off-by: default avatarMariusz Skamra <mariusz.skamra@codecoup.pl>
parent 734ee4e5
Loading
Loading
Loading
Loading
+2 −1
Changes for subsys/bluetooth/host/hci_core.c: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -3802,7 +3802,8 @@ static int le_set_event_mask(void)
	 * If "LE Read Local P-256 Public Key" and "LE Generate DH Key" are
	 * supported we need to enable events generated by those commands.
	 */
	if ((bt_dev.supported_commands[34] & 0x02) &&
	if (IS_ENABLED(CONFIG_BT_ECC) &&
	    (bt_dev.supported_commands[34] & 0x02) &&
	    (bt_dev.supported_commands[34] & 0x04)) {
		mask |= BT_EVT_MASK_LE_P256_PUBLIC_KEY_COMPLETE;
		mask |= BT_EVT_MASK_LE_GENERATE_DHKEY_COMPLETE;