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

Commit ea124c79 authored by Chris Manton's avatar Chris Manton
Browse files

Add declaration btm_sco_chk_pend_unpark

And fix types

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I1b4b978d8aae1f0122189c5d7be3abb395a70b9e
parent 4a000ae5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -46,7 +46,15 @@
#include "osi/include/log.h"
#include "osi/include/osi.h"
#include "stack/include/acl_api.h"
#include "stack/include/btm_api_types.h"
#include "stack/include/btm_status.h"
#include "stack/include/l2cap_hci_link_interface.h"
#include "types/raw_address.h"

void l2c_OnHciModeChangeSendPendingPackets(RawAddress remote);
void btm_sco_chk_pend_unpark(tHCI_STATUS status, uint16_t handle);

extern tBTM_CB btm_cb;

struct StackAclBtmPm {
  tBTM_STATUS btm_pm_snd_md_req(tACL_CONN& p_acl, uint8_t pm_id, int link_ind,
+0 −1
Original line number Diff line number Diff line
@@ -91,7 +91,6 @@ extern void btm_acl_process_sca_cmpl_pkt(uint8_t len, uint8_t* data);
 *******************************************
*/
extern void btm_sco_init(void);
extern void btm_sco_chk_pend_unpark(uint8_t hci_status, uint16_t hci_handle);
extern void btm_sco_acl_removed(const RawAddress* bda);
extern void btm_route_sco_data(BT_HDR* p_msg);

+1 −1
Original line number Diff line number Diff line
@@ -481,7 +481,7 @@ tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig,
 * Returns          void
 *
 ******************************************************************************/
void btm_sco_chk_pend_unpark(uint8_t hci_status, uint16_t hci_handle) {
void btm_sco_chk_pend_unpark(tHCI_STATUS hci_status, uint16_t hci_handle) {
  tSCO_CONN* p = &btm_cb.sco_cb.sco_db[0];
  for (uint16_t xx = 0; xx < BTM_MAX_SCO_LINKS; xx++, p++) {
    uint16_t acl_handle =
+4 −4
Original line number Diff line number Diff line
@@ -1472,7 +1472,7 @@ static void btu_hcif_hdl_command_status(uint16_t opcode, uint8_t status,
      if (status != HCI_SUCCESS) {
        // Allow SCO initiation to continue if waiting for change mode event
        STREAM_TO_UINT16(handle, p_cmd);
        btm_sco_chk_pend_unpark(status, handle);
        btm_sco_chk_pend_unpark(static_cast<tHCI_STATUS>(status), handle);
      }
      FALLTHROUGH_INTENDED; /* FALLTHROUGH */
    case HCI_HOLD_MODE:
@@ -1581,9 +1581,9 @@ static void btu_hcif_mode_change_evt(uint8_t* p) {
  STREAM_TO_UINT16(handle, p);
  STREAM_TO_UINT8(current_mode, p);
  STREAM_TO_UINT16(interval, p);
  btm_sco_chk_pend_unpark(status, handle);
  btm_pm_proc_mode_change(status, handle, static_cast<tHCI_MODE>(current_mode),
                          interval);
  btm_sco_chk_pend_unpark(static_cast<tHCI_STATUS>(status), handle);
  btm_pm_proc_mode_change(static_cast<tHCI_STATUS>(status), handle,
                          static_cast<tHCI_MODE>(current_mode), interval);

#if (HID_DEV_INCLUDED == TRUE && HID_DEV_PM_INCLUDED == TRUE)
  hidd_pm_proc_mode_change(status, current_mode, interval);
+2 −1
Original line number Diff line number Diff line
@@ -27,7 +27,8 @@ extern void btm_esco_proc_conn_chg(uint8_t status, uint16_t handle,
                                   uint8_t tx_interval, uint8_t retrans_window,
                                   uint16_t rx_pkt_len, uint16_t tx_pkt_len);
extern bool btm_is_sco_active(uint16_t handle);
extern void btm_sco_chk_pend_unpark(uint8_t hci_status, uint16_t hci_handle);
extern void btm_sco_chk_pend_unpark(tHCI_STATUS hci_status,
                                    uint16_t hci_handle);
extern void btm_sco_conn_req(const RawAddress& bda, DEV_CLASS dev_class,
                             uint8_t link_type);
extern void btm_sco_connected(uint8_t hci_status, const RawAddress* bda,