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

Commit 3db03437 authored by Zach Johnson's avatar Zach Johnson Committed by Gerrit Code Review
Browse files

Merge changes If1f09f06,Ic49bbdf4,I40d30944

* changes:
  Remove BTIF_DM_CB_CREATE_BOND, it's never used
  Remove unused lines from bte_main
  l2c_link_send_to_lower always returns true
parents 636e846f 68f40697
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -127,7 +127,6 @@ enum {
  /* add here */

  BTIF_DM_CB_START = BTIF_SIG_CB_START(BTIF_DM),
  BTIF_DM_CB_DISCOVERY_STARTED, /* Discovery has started */
  BTIF_DM_CB_CREATE_BOND,       /* Create bond */
  BTIF_DM_CB_REMOVE_BOND,       /*Remove bond */
  BTIF_DM_CB_HID_REMOTE_NAME,   /* Remote name callback for HID device */
+0 −5
Original line number Diff line number Diff line
@@ -2005,11 +2005,6 @@ static void btif_dm_upstreams_evt(uint16_t event, char* p_param) {
static void btif_dm_generic_evt(uint16_t event, char* p_param) {
  BTIF_TRACE_EVENT("%s: event=%d", __func__, event);
  switch (event) {
    case BTIF_DM_CB_DISCOVERY_STARTED: {
      HAL_CBACK(bt_hal_cbacks, discovery_state_changed_cb,
                BT_DISCOVERY_STARTED);
    } break;

    case BTIF_DM_CB_CREATE_BOND: {
      pairing_cb.timeout_retries = NUM_TIMEOUT_RETRIES;
      btif_dm_create_bond_cb_t* create_bond_cb =
+0 −18
Original line number Diff line number Diff line
@@ -43,24 +43,6 @@
#include "shim/shim.h"
#include "stack_config.h"

/*******************************************************************************
 *  Constants & Macros
 ******************************************************************************/

/* Run-time configuration file for BLE*/
#ifndef BTE_BLE_STACK_CONF_FILE
// TODO(armansito): Find a better way than searching by a hardcoded path.
#if defined(OS_GENERIC)
#define BTE_BLE_STACK_CONF_FILE "ble_stack.conf"
#else  // !defined(OS_GENERIC)
#define BTE_BLE_STACK_CONF_FILE "/etc/bluetooth/ble_stack.conf"
#endif  // defined(OS_GENERIC)
#endif  // BT_BLE_STACK_CONF_FILE

/******************************************************************************
 *  Variables
 *****************************************************************************/

/*******************************************************************************
 *  Static variables
 ******************************************************************************/
+4 −8
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@
#include "osi/include/osi.h"
#include "stack/include/acl_api.h"

static bool l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
                                   tL2C_TX_COMPLETE_CB_INFO* p_cbi);

/*******************************************************************************
@@ -976,7 +976,7 @@ void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, tL2C_CCB* p_ccb, BT_HDR* p_buf) {

      p_buf = (BT_HDR*)list_front(p_lcb->link_xmit_data_q);
      list_remove(p_lcb->link_xmit_data_q, p_buf);
      if (!l2c_link_send_to_lower(p_lcb, p_buf, NULL)) break;
      l2c_link_send_to_lower(p_lcb, p_buf, NULL);
    }

    if (!single_write) {
@@ -990,7 +990,7 @@ void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, tL2C_CCB* p_ccb, BT_HDR* p_buf) {
        p_buf = l2cu_get_next_buffer_to_send(p_lcb, &cbi);
        if (p_buf == NULL) break;

        if (!l2c_link_send_to_lower(p_lcb, p_buf, &cbi)) break;
        l2c_link_send_to_lower(p_lcb, p_buf, &cbi);
      }
    }

@@ -1023,10 +1023,8 @@ void l2c_OnHciModeChangeSendPendingPackets(RawAddress remote) {
 *
 * Description      This function queues the buffer for HCI transmission
 *
 * Returns          true for success, false for fail
 *
 ******************************************************************************/
static bool l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
                                   tL2C_TX_COMPLETE_CB_INFO* p_cbi) {
  uint16_t num_segs;
  uint16_t xmit_window, acl_data_size;
@@ -1118,8 +1116,6 @@ static bool l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
#endif

  if (p_cbi) l2cu_tx_complete(p_cbi);

  return true;
}

/*******************************************************************************