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

Commit cb30980b authored by Myles Watson's avatar Myles Watson
Browse files

make btm_process_cancel_complete static

Bug: 322230000
Test: mma -j32
Flag: EXEMPT, no logical change
Change-Id: I1a29874e1d831ad03200f5fd09393c34943d75cc
parent 0ce440c4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -252,6 +252,7 @@ void SendRemoteNameRequest(const RawAddress& raw_address) {
  btsnd_hcic_rmt_name_req(raw_address, HCI_PAGE_SCAN_REP_MODE_R1,
                          HCI_MANDATARY_PAGE_SCAN_MODE, 0);
}
static void btm_process_cancel_complete(tHCI_STATUS status, uint8_t mode);
/*******************************************************************************
 *
 * Function         BTM_SetDiscoverability
@@ -1608,7 +1609,7 @@ void btm_process_inq_complete(tHCI_STATUS status, uint8_t mode) {
 * Returns          void
 *
 ******************************************************************************/
void btm_process_cancel_complete(tHCI_STATUS status, uint8_t mode) {
static void btm_process_cancel_complete(tHCI_STATUS status, uint8_t mode) {
  BTIF_dm_report_inquiry_status_change(
      tBTM_INQUIRY_STATE::BTM_INQUIRY_CANCELLED);
  btm_process_inq_complete(status, mode);
+0 −4
Original line number Diff line number Diff line
@@ -970,10 +970,6 @@ static void btu_hcif_esco_connection_chg_evt(uint8_t* p) {
static void btu_hcif_hdl_command_complete(uint16_t opcode, uint8_t* p,
                                          uint16_t evt_len) {
  switch (opcode) {
    case HCI_INQUIRY_CANCEL:
      /* Tell inquiry processing that we are done */
      btm_process_cancel_complete(HCI_SUCCESS, BTM_BR_INQUIRY_MASK);
      break;
    case HCI_SET_EVENT_FILTER:
      break;

+0 −17
Original line number Diff line number Diff line
@@ -48,10 +48,6 @@
#define HCIC_INQ_INQ_LAP_OFF 0
#define HCIC_INQ_DUR_OFF 3
#define HCIC_INQ_RSP_CNT_OFF 4
/* Inquiry */

/* Inquiry Cancel */
#define HCIC_PARAM_SIZE_INQ_CANCEL 0

/* Periodic Inquiry Mode */
#define HCIC_PARAM_SIZE_PER_INQ_MODE 9
@@ -482,18 +478,6 @@
#define HCIC_PARAM_SIZE_BLE_RC_PARAM_REQ_REPLY 14
#define HCIC_PARAM_SIZE_BLE_RC_PARAM_REQ_NEG_REPLY 3

static void btsnd_hcic_inq_cancel(void) {
  BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
  uint8_t* pp = (uint8_t*)(p + 1);

  p->len = HCIC_PREAMBLE_SIZE + HCIC_PARAM_SIZE_INQ_CANCEL;
  p->offset = 0;
  UINT16_TO_STREAM(pp, HCI_INQUIRY_CANCEL);
  UINT8_TO_STREAM(pp, HCIC_PARAM_SIZE_INQ_CANCEL);

  btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
}

static void btsnd_hcic_disconnect(uint16_t handle, uint8_t reason) {
  BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
  uint8_t* pp = (uint8_t*)(p + 1);
@@ -1672,7 +1656,6 @@ void btsnd_hcic_configure_data_path(hci_data_direction_t data_path_direction,

namespace bluetooth::legacy::hci {
class InterfaceImpl : public Interface {
  void InquiryCancel() const override { btsnd_hcic_inq_cancel(); }
  void Disconnect(uint16_t handle, uint8_t reason) const override {
    btsnd_hcic_disconnect(handle, reason);
  }
+0 −2
Original line number Diff line number Diff line
@@ -302,8 +302,6 @@ bool acl_peer_supports_ble_connection_subrating(const RawAddress& remote_bda);
bool acl_peer_supports_ble_connection_subrating_host(
    const RawAddress& remote_bda);

void btm_process_cancel_complete(uint8_t status, uint8_t mode);

uint8_t btm_handle_to_acl_index(uint16_t hci_handle);

tHCI_REASON btm_get_acl_disc_reason_code(void);
+0 −1
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ enum hci_data_direction_t {
namespace bluetooth::legacy::hci {
class Interface {
 public:
  virtual void InquiryCancel() const = 0;
  virtual void Disconnect(uint16_t handle, uint8_t reason) const = 0;
  virtual void ChangeConnectionPacketType(uint16_t handle,
                                          uint16_t packet_types) const = 0;
Loading