OSDN Git Service

p_nocp_cb is never set
authorHansong Zhang <hsz@google.com>
Thu, 27 Aug 2020 23:04:04 +0000 (16:04 -0700)
committerHansong Zhang <hsz@google.com>
Thu, 27 Aug 2020 23:04:04 +0000 (16:04 -0700)
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iad8d115f4f84a48b1bbe47edcc84c2fd834dc0c3

stack/l2cap/l2c_int.h
stack/l2cap/l2c_link.cc

index b49a2b0..4da0785 100644 (file)
@@ -390,9 +390,7 @@ typedef struct t_l2c_linkcb {
 
   uint8_t peer_chnl_mask[L2CAP_FIXED_CHNL_ARRAY_SIZE];
 
-  uint16_t idle_timeout_sv; /* Save current Idle timeout */
   uint8_t acl_priority;     /* L2C_PRIORITY_NORMAL or L2C_PRIORITY_HIGH */
-  tL2CA_NOCP_CB* p_nocp_cb; /* Num Cmpl pkts callback */
 
   tL2C_CCB* p_fixed_ccbs[L2CAP_NUM_FIXED_CHNLS];
 
index e646c7c..04461b7 100644 (file)
@@ -1150,13 +1150,6 @@ void l2c_link_process_num_completed_pkts(uint8_t* p, uint8_t evt_len) {
 
     p_lcb = l2cu_find_lcb_by_handle(handle);
 
-    /* Callback for number of completed packet event    */
-    /* Originally designed for [3DSG]                   */
-    if ((p_lcb != NULL) && (p_lcb->p_nocp_cb)) {
-      L2CAP_TRACE_DEBUG("L2CAP - calling NoCP callback");
-      (*p_lcb->p_nocp_cb)(p_lcb->remote_bd_addr);
-    }
-
     if (p_lcb) {
       if (p_lcb && (p_lcb->transport == BT_TRANSPORT_LE))
         l2cb.controller_le_xmit_window += num_sent;