OSDN Git Service

Remove unused fixed channel related stuff
authorHansong Zhang <hsz@google.com>
Thu, 27 Aug 2020 22:39:35 +0000 (15:39 -0700)
committerHansong Zhang <hsz@google.com>
Thu, 27 Aug 2020 22:39:35 +0000 (15:39 -0700)
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ibd41658323bfdf0e3ddd7803587e43a7105edc7d

bta/include/bta_jv_api.h
btif/src/btif_sock_l2cap.cc

index 358e260..4b2aae6 100644 (file)
@@ -142,8 +142,6 @@ typedef uint8_t tBTA_JV_CONN_STATE;
   21 /* L2CAP connection congestion status changed */
 #define BTA_JV_L2CAP_READ_EVT 22  /* the result for BTA_JvL2capRead */
 #define BTA_JV_L2CAP_WRITE_EVT 24 /* the result for BTA_JvL2capWrite*/
-#define BTA_JV_L2CAP_WRITE_FIXED_EVT \
-  25 /* the result for BTA_JvL2capWriteFixed */
 
 /* events received by tBTA_JV_RFCOMM_CBACK */
 #define BTA_JV_RFCOMM_OPEN_EVT                                                \
@@ -247,16 +245,6 @@ typedef struct {
   bool cong;             /* congestion status */
 } tBTA_JV_L2CAP_WRITE;
 
-/* data associated with BTA_JV_L2CAP_WRITE_FIXED_EVT */
-typedef struct {
-  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
-  uint16_t channel;      /* The connection channel */
-  RawAddress addr;       /* The peer address */
-  uint32_t req_id;       /* The req_id in the associated BTA_JvL2capWrite() */
-  uint16_t len;          /* The length of the data written. */
-  bool cong;             /* congestion status */
-} tBTA_JV_L2CAP_WRITE_FIXED;
-
 /* data associated with BTA_JV_RFCOMM_OPEN_EVT */
 typedef struct {
   tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
@@ -360,7 +348,6 @@ typedef union {
                                                 BTA_JV_RFCOMM_DATA_IND_EVT */
   tBTA_JV_LE_DATA_IND le_data_ind;           /* BTA_JV_L2CAP_LE_DATA_IND_EVT */
   tBTA_JV_L2CAP_LE_OPEN l2c_le_open;         /* BTA_JV_L2CAP_OPEN_EVT */
-  tBTA_JV_L2CAP_WRITE_FIXED l2c_write_fixed; /* BTA_JV_L2CAP_WRITE_FIXED_EVT */
 } tBTA_JV;
 
 /* JAVA DM Interface callback */
index f0485e7..fce910e 100644 (file)
@@ -59,7 +59,7 @@ typedef struct l2cap_socket {
   int app_uid;                // The UID of the app who requested this socket
   int handle;                 // handle from lower layers
   unsigned security;          // security flags
-  int channel;                // channel (fixed_chan) or PSM (!fixed_chan)
+  int channel;                // PSM
   int our_fd;                 // fd from our side
   int app_fd;                 // fd from app's side
 
@@ -659,11 +659,6 @@ static void btsock_l2cap_cbk(tBTA_JV_EVT event, tBTA_JV* p_data,
       on_l2cap_write_done(p_data->l2c_write.len, l2cap_socket_id);
       break;
 
-    case BTA_JV_L2CAP_WRITE_FIXED_EVT:
-      DVLOG(2) << "BTA_JV_L2CAP_WRITE_FIXED_EVT: id: " << l2cap_socket_id;
-      on_l2cap_write_done(p_data->l2c_write.len, l2cap_socket_id);
-      break;
-
     case BTA_JV_L2CAP_CONG_EVT:
       on_l2cap_outgoing_congest(&p_data->l2c_cong, l2cap_socket_id);
       break;