l2cap: trigger information requests on connect if ENABLE_L2CAP_INFORMATION_REQUESTS_ON_CONNECT

This commit is contained in:
Matthias Ringwald 2022-02-11 11:08:35 +01:00
parent d5f71a7e3a
commit f6fafc2484
2 changed files with 10 additions and 0 deletions

View File

@ -2575,6 +2575,14 @@ static void l2cap_handle_connection_success_for_addr(bd_addr_t address, hci_con_
l2cap_handle_connection_complete(handle, channel);
}
}
#ifdef ENABLE_L2CAP_INFORMATION_REQUESTS_ON_CONNECT
// trigger query of extended features and fixed channels right away (instead of later)
hci_connection_t * hci_connection = hci_connection_for_handle(handle);
btstack_assert(hci_connection != NULL);
hci_connection->l2cap_state.information_state = L2CAP_INFORMATION_STATE_W2_SEND_EXTENDED_FEATURE_REQUEST;
#endif
// process
l2cap_run();
}

View File

@ -63,6 +63,8 @@
#define ENABLE_A2DP_SOURCE_EXPLICIT_CONFIG
/// Allow defer of LINK Key Reply
#define ENABLE_EXPLICIT_LINK_KEY_REPLY
// Trigger L2CAP Information Requests to get supported fixed channels
#define ENABLE_L2CAP_INFORMATION_REQUESTS_ON_CONNECT
#define ENABLE_HFP_WIDE_BAND_SPEECH
#define ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE