From: Hansong Zhang Date: Thu, 24 Sep 2020 23:16:33 +0000 (-0700) Subject: We always send default flush timeout X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=31903b6da7db60b93bdbc48a369c06d1ad1bcfe8;p=android-x86%2Fsystem-bt.git We always send default flush timeout When we send out config request, we always use flush timeout 0xffff (infinity), which is the default value. We don't need to include this value in config request. Bug: 159815595 Tag: #refactor Test: compile & verify basic functions working Change-Id: Ic06f1e7e39ccbce2ec85c6126d30e179d5971837 --- diff --git a/internal_include/bt_target.h b/internal_include/bt_target.h index bf04fbdab..1cd08df08 100644 --- a/internal_include/bt_target.h +++ b/internal_include/bt_target.h @@ -1039,10 +1039,6 @@ #define HID_DEV_MTU_SIZE 512 #endif -#ifndef HID_DEV_FLUSH_TO -#define HID_DEV_FLUSH_TO 0xffff -#endif - /************************************************************************* * Definitions for Both HID-Host & Device */ @@ -1073,10 +1069,6 @@ #define HID_HOST_MTU 640 #endif -#ifndef HID_HOST_FLUSH_TO -#define HID_HOST_FLUSH_TO 0xffff -#endif - #ifndef HID_HOST_MAX_CONN_RETRY #define HID_HOST_MAX_CONN_RETRY 1 #endif diff --git a/stack/avdt/avdt_l2c.cc b/stack/avdt/avdt_l2c.cc index df094cce0..d7b132ddb 100644 --- a/stack/avdt/avdt_l2c.cc +++ b/stack/avdt/avdt_l2c.cc @@ -98,8 +98,6 @@ static void avdt_sec_check_complete_term(const RawAddress* bd_addr, memset(&cfg, 0, sizeof(tL2CAP_CFG_INFO)); cfg.mtu_present = true; cfg.mtu = kSignalMtu; - cfg.flush_to_present = true; - cfg.flush_to = L2CAP_DEFAULT_FLUSH_TO; L2CA_ConfigReq(p_tbl->lcid, &cfg); } else { L2CA_ConnectRsp(*bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_SECURITY_BLOCK, @@ -139,8 +137,6 @@ static void avdt_sec_check_complete_orig(const RawAddress* bd_addr, memset(&cfg, 0, sizeof(tL2CAP_CFG_INFO)); cfg.mtu_present = true; cfg.mtu = kSignalMtu; - cfg.flush_to_present = true; - cfg.flush_to = L2CAP_DEFAULT_FLUSH_TO; L2CA_ConfigReq(p_tbl->lcid, &cfg); } else { avdt_l2c_disconnect(p_tbl->lcid); @@ -247,8 +243,6 @@ void avdt_l2c_connect_ind_cback(const RawAddress& bd_addr, uint16_t lcid, memset(&cfg, 0, sizeof(tL2CAP_CFG_INFO)); cfg.mtu_present = true; cfg.mtu = p_tbl->my_mtu; - cfg.flush_to_present = true; - cfg.flush_to = L2CAP_DEFAULT_FLUSH_TO; L2CA_ConfigReq(lcid, &cfg); } } @@ -285,8 +279,6 @@ void avdt_l2c_connect_cfm_cback(uint16_t lcid, uint16_t result) { memset(&cfg, 0, sizeof(tL2CAP_CFG_INFO)); cfg.mtu_present = true; cfg.mtu = p_tbl->my_mtu; - cfg.flush_to_present = true; - cfg.flush_to = L2CAP_DEFAULT_FLUSH_TO; L2CA_ConfigReq(lcid, &cfg); } else { p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx); diff --git a/stack/bnep/bnep_int.h b/stack/bnep/bnep_int.h index b7f0ceb7d..8c0abb265 100644 --- a/stack/bnep/bnep_int.h +++ b/stack/bnep/bnep_int.h @@ -98,8 +98,6 @@ #define BNEP_IFLOW_LATENCY 0 #define BNEP_IFLOW_DELAY_VARIATION 0 -#define BNEP_FLUSH_TO 0xFFFF - #define BNEP_MAX_RETRANSMITS 3 /* Define the BNEP Connection Control Block diff --git a/stack/bnep/bnep_main.cc b/stack/bnep/bnep_main.cc index 4edbd3519..ae6cfe682 100644 --- a/stack/bnep/bnep_main.cc +++ b/stack/bnep/bnep_main.cc @@ -81,8 +81,6 @@ tBNEP_RESULT bnep_register_with_l2cap(void) { bnep_cb.l2cap_my_cfg.mtu_present = true; bnep_cb.l2cap_my_cfg.mtu = BNEP_MTU_SIZE; - bnep_cb.l2cap_my_cfg.flush_to_present = true; - bnep_cb.l2cap_my_cfg.flush_to = BNEP_FLUSH_TO; bnep_cb.reg_info.pL2CA_ConnectInd_Cb = bnep_connect_ind; bnep_cb.reg_info.pL2CA_ConnectCfm_Cb = bnep_connect_cfm; diff --git a/stack/hid/hidd_conn.cc b/stack/hid/hidd_conn.cc index 361f984f3..ac2d2e00d 100644 --- a/stack/hid/hidd_conn.cc +++ b/stack/hid/hidd_conn.cc @@ -737,14 +737,9 @@ tHID_STATUS hidd_conn_reg(void) { hd_cb.l2cap_cfg.mtu_present = TRUE; hd_cb.l2cap_cfg.mtu = HID_DEV_MTU_SIZE; - hd_cb.l2cap_cfg.flush_to_present = TRUE; - hd_cb.l2cap_cfg.flush_to = HID_DEV_FLUSH_TO; - memset(&hd_cb.l2cap_intr_cfg, 0, sizeof(tL2CAP_CFG_INFO)); hd_cb.l2cap_intr_cfg.mtu_present = TRUE; hd_cb.l2cap_intr_cfg.mtu = HID_DEV_MTU_SIZE; - hd_cb.l2cap_intr_cfg.flush_to_present = TRUE; - hd_cb.l2cap_intr_cfg.flush_to = HID_DEV_FLUSH_TO; if (!L2CA_Register2(HID_PSM_CONTROL, dev_reg_info, false /* enable_snoop */, nullptr, hd_cb.l2cap_cfg.mtu, diff --git a/stack/hid/hidh_conn.cc b/stack/hid/hidh_conn.cc index 7ca56b764..cf0fdb12a 100644 --- a/stack/hid/hidh_conn.cc +++ b/stack/hid/hidh_conn.cc @@ -89,8 +89,6 @@ tHID_STATUS hidh_conn_reg(void) { hh_cb.l2cap_cfg.mtu_present = true; hh_cb.l2cap_cfg.mtu = HID_HOST_MTU; - hh_cb.l2cap_cfg.flush_to_present = true; - hh_cb.l2cap_cfg.flush_to = HID_HOST_FLUSH_TO; /* Now, register with L2CAP */ if (!L2CA_Register2(HID_PSM_INTERRUPT, hst_reg_info, false /* enable_snoop */,