MakeUniquePacket(data, len)) *
len;
}
+
+void bluetooth::shim::L2CA_SwitchRoleToCentral(const RawAddress& addr) {
+ bluetooth::shim::GetAclManager()->SwitchRole(ToGdAddress(addr),
+ bluetooth::hci::Role::CENTRAL);
+}
// Indicated by shim stack manager that GD L2cap is enabled but Security is not
void L2CA_UseLegacySecurityModule();
+void L2CA_SwitchRoleToCentral(const RawAddress& addr);
} // namespace shim
} // namespace bluetooth
#include "include/l2cap_hci_link_interface.h"
#include "main/shim/acl_api.h"
#include "main/shim/btm_api.h"
+#include "main/shim/l2c_api.h"
#include "main/shim/shim.h"
#include "osi/include/log.h"
#include "stack/acl/acl.h"
*
******************************************************************************/
tBTM_STATUS BTM_SwitchRoleToCentral(const RawAddress& remote_bd_addr) {
+ if (bluetooth::shim::is_gd_l2cap_enabled()) {
+ bluetooth::shim::L2CA_SwitchRoleToCentral(remote_bd_addr);
+ return BTM_SUCCESS;
+ }
if (!controller_get_interface()->supports_central_peripheral_role_switch()) {
LOG_INFO("Local controller does not support role switching");
return BTM_MODE_UNSUPPORTED;