Loading system/bta/hearing_aid/hearing_aid.cc +1 −2 Original line number Diff line number Diff line Loading @@ -870,8 +870,7 @@ class HearingAidImpl : public HearingAid { uint16_t gap_handle = GAP_ConnOpen( "", service_id, false, &hearingDevice->address, psm, 514 /* MPS */, &cfg_info, nullptr, BTM_SEC_NONE /* TODO: request security ? */, L2CAP_FCR_LE_COC_MODE, HearingAidImpl::GapCallbackStatic, BT_TRANSPORT_LE); HearingAidImpl::GapCallbackStatic, BT_TRANSPORT_LE); if (gap_handle == GAP_INVALID_HANDLE) { LOG(ERROR) << "UNABLE TO GET gap_handle"; return; Loading system/bta/jv/bta_jv_act.cc +2 −10 Original line number Diff line number Diff line Loading @@ -874,15 +874,11 @@ void bta_jv_l2cap_connect(int32_t type, tBTA_SEC sec_mask, tBTA_JV_ROLE role, tBTA_JV_L2CAP_CBACK* p_cback, uint32_t l2cap_socket_id) { uint16_t handle = GAP_INVALID_HANDLE; uint8_t chan_mode_mask = GAP_FCR_CHAN_OPT_BASIC; tL2CAP_CFG_INFO cfg; memset(&cfg, 0, sizeof(tL2CAP_CFG_INFO)); if (cfg_param) { cfg = *cfg_param; if (cfg.fcr_present && cfg.fcr.mode == L2CAP_FCR_ERTM_MODE) { chan_mode_mask = GAP_FCR_CHAN_OPT_ERTM; } } /* We need to use this value for MTU to be able to handle cases where cfg is Loading @@ -902,7 +898,7 @@ void bta_jv_l2cap_connect(int32_t type, tBTA_SEC sec_mask, tBTA_JV_ROLE role, { uint16_t max_mps = 0xffff; // Let GAP_ConnOpen set the max_mps. handle = GAP_ConnOpen("", sec_id, 0, &peer_bd_addr, remote_psm, max_mps, &cfg, ertm_info.get(), sec_mask, chan_mode_mask, &cfg, ertm_info.get(), sec_mask, bta_jv_l2cap_client_cback, type); if (handle != GAP_INVALID_HANDLE) { evt_data.status = BTA_JV_SUCCESS; Loading Loading @@ -1023,15 +1019,11 @@ void bta_jv_l2cap_start_server(int32_t type, tBTA_SEC sec_mask, uint32_t l2cap_socket_id) { uint16_t handle; tBTA_JV_L2CAP_START evt_data; uint8_t chan_mode_mask = GAP_FCR_CHAN_OPT_BASIC; tL2CAP_CFG_INFO cfg; memset(&cfg, 0, sizeof(tL2CAP_CFG_INFO)); if (cfg_param) { cfg = *cfg_param; if (cfg.fcr_present && cfg.fcr.mode == L2CAP_FCR_ERTM_MODE) { chan_mode_mask = GAP_FCR_CHAN_OPT_ERTM; } } // FIX: MTU=0 means not present Loading @@ -1049,7 +1041,7 @@ void bta_jv_l2cap_start_server(int32_t type, tBTA_SEC sec_mask, if (0 == sec_id || ((type == BTA_JV_CONN_TYPE_L2CAP) && (!bta_jv_check_psm(local_psm))) || (handle = GAP_ConnOpen("JV L2CAP", sec_id, 1, nullptr, local_psm, max_mps, &cfg, ertm_info.get(), sec_mask, chan_mode_mask, &cfg, ertm_info.get(), sec_mask, bta_jv_l2cap_server_cback, type)) == GAP_INVALID_HANDLE) { bta_jv_free_sec_id(&sec_id); Loading system/stack/gap/gap_conn.cc +1 −2 Original line number Diff line number Diff line Loading @@ -161,8 +161,7 @@ uint16_t GAP_ConnOpen(const char* p_serv_name, uint8_t service_id, bool is_server, const RawAddress* p_rem_bda, uint16_t psm, uint16_t le_mps, tL2CAP_CFG_INFO* p_cfg, tL2CAP_ERTM_INFO* ertm_info, uint16_t security, uint8_t chan_mode_mask, tGAP_CONN_CALLBACK* p_cb, tBT_TRANSPORT transport) { tGAP_CONN_CALLBACK* p_cb, tBT_TRANSPORT transport) { tGAP_CCB* p_ccb; uint16_t cid; Loading system/stack/include/gap_api.h +1 −6 Original line number Diff line number Diff line Loading @@ -44,10 +44,6 @@ #define GAP_EVT_CONN_UNCONGESTED 0x0104 #define GAP_EVT_TX_EMPTY 0x0105 /* Values for 'chan_mode_mask' field */ /* GAP_ConnOpen() - optional channels to negotiate */ #define GAP_FCR_CHAN_OPT_BASIC L2CAP_FCR_CHAN_OPT_BASIC #define GAP_FCR_CHAN_OPT_ERTM L2CAP_FCR_CHAN_OPT_ERTM /*** used in connection variables and functions ***/ #define GAP_INVALID_HANDLE 0xFFFF Loading Loading @@ -125,8 +121,7 @@ extern uint16_t GAP_ConnOpen(const char* p_serv_name, uint8_t service_id, uint16_t psm, uint16_t le_mps, tL2CAP_CFG_INFO* p_cfg, tL2CAP_ERTM_INFO* ertm_info, uint16_t security, uint8_t chan_mode_mask, tGAP_CONN_CALLBACK* p_cb, tBT_TRANSPORT transport); tGAP_CONN_CALLBACK* p_cb, tBT_TRANSPORT transport); /******************************************************************************* * Loading Loading
system/bta/hearing_aid/hearing_aid.cc +1 −2 Original line number Diff line number Diff line Loading @@ -870,8 +870,7 @@ class HearingAidImpl : public HearingAid { uint16_t gap_handle = GAP_ConnOpen( "", service_id, false, &hearingDevice->address, psm, 514 /* MPS */, &cfg_info, nullptr, BTM_SEC_NONE /* TODO: request security ? */, L2CAP_FCR_LE_COC_MODE, HearingAidImpl::GapCallbackStatic, BT_TRANSPORT_LE); HearingAidImpl::GapCallbackStatic, BT_TRANSPORT_LE); if (gap_handle == GAP_INVALID_HANDLE) { LOG(ERROR) << "UNABLE TO GET gap_handle"; return; Loading
system/bta/jv/bta_jv_act.cc +2 −10 Original line number Diff line number Diff line Loading @@ -874,15 +874,11 @@ void bta_jv_l2cap_connect(int32_t type, tBTA_SEC sec_mask, tBTA_JV_ROLE role, tBTA_JV_L2CAP_CBACK* p_cback, uint32_t l2cap_socket_id) { uint16_t handle = GAP_INVALID_HANDLE; uint8_t chan_mode_mask = GAP_FCR_CHAN_OPT_BASIC; tL2CAP_CFG_INFO cfg; memset(&cfg, 0, sizeof(tL2CAP_CFG_INFO)); if (cfg_param) { cfg = *cfg_param; if (cfg.fcr_present && cfg.fcr.mode == L2CAP_FCR_ERTM_MODE) { chan_mode_mask = GAP_FCR_CHAN_OPT_ERTM; } } /* We need to use this value for MTU to be able to handle cases where cfg is Loading @@ -902,7 +898,7 @@ void bta_jv_l2cap_connect(int32_t type, tBTA_SEC sec_mask, tBTA_JV_ROLE role, { uint16_t max_mps = 0xffff; // Let GAP_ConnOpen set the max_mps. handle = GAP_ConnOpen("", sec_id, 0, &peer_bd_addr, remote_psm, max_mps, &cfg, ertm_info.get(), sec_mask, chan_mode_mask, &cfg, ertm_info.get(), sec_mask, bta_jv_l2cap_client_cback, type); if (handle != GAP_INVALID_HANDLE) { evt_data.status = BTA_JV_SUCCESS; Loading Loading @@ -1023,15 +1019,11 @@ void bta_jv_l2cap_start_server(int32_t type, tBTA_SEC sec_mask, uint32_t l2cap_socket_id) { uint16_t handle; tBTA_JV_L2CAP_START evt_data; uint8_t chan_mode_mask = GAP_FCR_CHAN_OPT_BASIC; tL2CAP_CFG_INFO cfg; memset(&cfg, 0, sizeof(tL2CAP_CFG_INFO)); if (cfg_param) { cfg = *cfg_param; if (cfg.fcr_present && cfg.fcr.mode == L2CAP_FCR_ERTM_MODE) { chan_mode_mask = GAP_FCR_CHAN_OPT_ERTM; } } // FIX: MTU=0 means not present Loading @@ -1049,7 +1041,7 @@ void bta_jv_l2cap_start_server(int32_t type, tBTA_SEC sec_mask, if (0 == sec_id || ((type == BTA_JV_CONN_TYPE_L2CAP) && (!bta_jv_check_psm(local_psm))) || (handle = GAP_ConnOpen("JV L2CAP", sec_id, 1, nullptr, local_psm, max_mps, &cfg, ertm_info.get(), sec_mask, chan_mode_mask, &cfg, ertm_info.get(), sec_mask, bta_jv_l2cap_server_cback, type)) == GAP_INVALID_HANDLE) { bta_jv_free_sec_id(&sec_id); Loading
system/stack/gap/gap_conn.cc +1 −2 Original line number Diff line number Diff line Loading @@ -161,8 +161,7 @@ uint16_t GAP_ConnOpen(const char* p_serv_name, uint8_t service_id, bool is_server, const RawAddress* p_rem_bda, uint16_t psm, uint16_t le_mps, tL2CAP_CFG_INFO* p_cfg, tL2CAP_ERTM_INFO* ertm_info, uint16_t security, uint8_t chan_mode_mask, tGAP_CONN_CALLBACK* p_cb, tBT_TRANSPORT transport) { tGAP_CONN_CALLBACK* p_cb, tBT_TRANSPORT transport) { tGAP_CCB* p_ccb; uint16_t cid; Loading
system/stack/include/gap_api.h +1 −6 Original line number Diff line number Diff line Loading @@ -44,10 +44,6 @@ #define GAP_EVT_CONN_UNCONGESTED 0x0104 #define GAP_EVT_TX_EMPTY 0x0105 /* Values for 'chan_mode_mask' field */ /* GAP_ConnOpen() - optional channels to negotiate */ #define GAP_FCR_CHAN_OPT_BASIC L2CAP_FCR_CHAN_OPT_BASIC #define GAP_FCR_CHAN_OPT_ERTM L2CAP_FCR_CHAN_OPT_ERTM /*** used in connection variables and functions ***/ #define GAP_INVALID_HANDLE 0xFFFF Loading Loading @@ -125,8 +121,7 @@ extern uint16_t GAP_ConnOpen(const char* p_serv_name, uint8_t service_id, uint16_t psm, uint16_t le_mps, tL2CAP_CFG_INFO* p_cfg, tL2CAP_ERTM_INFO* ertm_info, uint16_t security, uint8_t chan_mode_mask, tGAP_CONN_CALLBACK* p_cb, tBT_TRANSPORT transport); tGAP_CONN_CALLBACK* p_cb, tBT_TRANSPORT transport); /******************************************************************************* * Loading