l2cap: set BR/EDR Security Manager (bit 7) in Fixed Channels Info only if BR/EDR Secure Connections are possible

This commit is contained in:
Matthias Ringwald 2022-02-25 11:37:37 +01:00
parent eaf85bc852
commit 50c8d5ddec

View File

@ -1909,8 +1909,10 @@ static void l2cap_run_signaling_response(void) {
// L2CAP Signaling Channel (bit 1) + Connectionless reception (bit 2)
map[0] = (1 << 1) | (1 << 2);
#if defined(ENABLE_BLE) || defined (ENABLE_EXPLICIT_BR_EDR_SECURITY_MANAGER)
// BR/EDR Security Manager (bit 7)
map[0] |= (1 << 7);
// BR/EDR Security Manager (bit 7) if BR/EDR Secure Connections possible
if (gap_secure_connections_active()){
map[0] |= (1 << 7);
}
#endif
l2cap_send_classic_signaling_packet(handle, INFORMATION_RESPONSE, sig_id, info_type, 0,
sizeof(map), &map);