From 6f741834f5d81565942f5ac0ba6b03bb28fb3d7c Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Thu, 27 Aug 2020 15:39:35 -0700 Subject: [PATCH] Remove unused fixed channel related stuff Bug: 159815595 Tag: #refactor Test: compile & verify basic functions working Change-Id: Ibd41658323bfdf0e3ddd7803587e43a7105edc7d --- bta/include/bta_jv_api.h | 13 ------------- btif/src/btif_sock_l2cap.cc | 7 +------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/bta/include/bta_jv_api.h b/bta/include/bta_jv_api.h index 358e260f1..4b2aae61d 100644 --- a/bta/include/bta_jv_api.h +++ b/bta/include/bta_jv_api.h @@ -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 */ diff --git a/btif/src/btif_sock_l2cap.cc b/btif/src/btif_sock_l2cap.cc index f0485e75a..fce910ec6 100644 --- a/btif/src/btif_sock_l2cap.cc +++ b/btif/src/btif_sock_l2cap.cc @@ -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; -- 2.11.0