Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e3dbb84 authored by Chris Manton's avatar Chris Manton
Browse files

stack:: Use proper type tHCI_ROLE

Bug: 345571077
Test: m .
Flag: EXEMPT, Mechanical Refactor

Change-Id: Ie6ff7d11dd287ca90014e36d32ed223c60839291
parent d8a2b627
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -21,16 +21,17 @@

#include "stack/include/hci_error_code.h"
#include "types/ble_address_with_type.h"
#include "types/hci_role.h"
#include "types/raw_address.h"

// This header contains functions for HCI-LinkManagement to invoke

bool l2c_link_hci_disc_comp(uint16_t handle, tHCI_REASON reason);

void l2c_link_role_changed(const RawAddress* bd_addr, uint8_t new_role,
void l2c_link_role_changed(const RawAddress* bd_addr, tHCI_ROLE role,
                           tHCI_STATUS hci_status);

bool l2cble_conn_comp(uint16_t handle, uint8_t role, const RawAddress& bda,
bool l2cble_conn_comp(uint16_t handle, tHCI_ROLE role, const RawAddress& bda,
                      tBLE_ADDR_TYPE type, uint16_t conn_interval,
                      uint16_t conn_latency, uint16_t conn_timeout);

+1 −1
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ void l2cble_notify_le_connection(const RawAddress& bda) {

/** This function is called when an HCI Connection Complete event is received.
 */
bool l2cble_conn_comp(uint16_t handle, uint8_t role, const RawAddress& bda,
bool l2cble_conn_comp(uint16_t handle, tHCI_ROLE role, const RawAddress& bda,
                      tBLE_ADDR_TYPE /* type */, uint16_t conn_interval,
                      uint16_t conn_latency, uint16_t conn_timeout) {
  // role == HCI_ROLE_CENTRAL => scanner completed connection
+1 −1
Original line number Diff line number Diff line
@@ -726,7 +726,7 @@ void l2c_link_init(const uint16_t acl_buffer_count_classic) {
 * Returns          void
 *
 ******************************************************************************/
void l2c_link_role_changed(const RawAddress* bd_addr, uint8_t new_role,
void l2c_link_role_changed(const RawAddress* bd_addr, tHCI_ROLE new_role,
                           tHCI_STATUS hci_status) {
  /* Make sure not called from HCI Command Status (bd_addr and new_role are
   * invalid) */
+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ void l2cble_notify_le_connection(const RawAddress& bda) {
  inc_func_call_count(__func__);
  test::mock::stack_l2cap_ble::l2cble_notify_le_connection(bda);
}
bool l2cble_conn_comp(uint16_t handle, uint8_t role, const RawAddress& bda,
bool l2cble_conn_comp(uint16_t handle, tHCI_ROLE role, const RawAddress& bda,
                      tBLE_ADDR_TYPE type, uint16_t conn_interval,
                      uint16_t conn_latency, uint16_t conn_timeout) {
  inc_func_call_count(__func__);
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ void l2c_link_init(const uint16_t /* acl_buffer_count_classic */) {
  inc_func_call_count(__func__);
}
void l2c_link_role_changed(const RawAddress* /* bd_addr */,
                           uint8_t /* new_role */,
                           tHCI_ROLE /* new_role */,
                           tHCI_STATUS /* hci_status */) {
  inc_func_call_count(__func__);
}