Loading system/hci/src/btsnoop.cc +1 −1 Original line number Diff line number Diff line Loading @@ -315,7 +315,7 @@ static void whitelist_rfc_dlci(uint16_t local_cid, uint8_t dlci) { std::lock_guard lock(filter_list_mutex); tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(nullptr, local_cid); filter_list[p_ccb->p_lcb->handle].addRfcDlci(dlci); filter_list[p_ccb->p_lcb->Handle()].addRfcDlci(dlci); } static void add_rfc_l2c_channel(uint16_t conn_handle, uint16_t local_cid, Loading system/stack/l2cap/l2c_api.cc +1 −1 Original line number Diff line number Diff line Loading @@ -1792,7 +1792,7 @@ uint16_t L2CA_FlushChannel(uint16_t lcid, uint16_t num_to_flush) { if (controller->supports_non_flushable_pb() && (BTM_GetNumScoLinks() == 0)) { /* The only packet type defined - 0 - Automatically-Flushable Only */ btsnd_hcic_enhanced_flush(p_lcb->handle, 0); btsnd_hcic_enhanced_flush(p_lcb->Handle(), 0); } } Loading system/stack/l2cap/l2c_ble.cc +5 −5 Original line number Diff line number Diff line Loading @@ -297,7 +297,7 @@ void l2cble_conn_comp(uint16_t handle, uint8_t role, const RawAddress& bda, if (role == HCI_ROLE_MASTER) alarm_cancel(p_lcb->l2c_lcb_timer); /* Save the handle */ p_lcb->handle = handle; p_lcb->SetHandle(handle); /* Connected OK. Change state to connected, we were scanning so we are master */ Loading Loading @@ -384,7 +384,7 @@ static void l2cble_start_conn_update(tL2C_LCB* p_lcb) { p_lcb->remote_bd_addr)) #endif ) { btsnd_hcic_ble_upd_ll_conn_params(p_lcb->handle, min_conn_int, btsnd_hcic_ble_upd_ll_conn_params(p_lcb->Handle(), min_conn_int, max_conn_int, slave_latency, supervision_tout, 0, 0); p_lcb->conn_update_mask |= L2C_BLE_UPDATE_PENDING; Loading @@ -407,7 +407,7 @@ static void l2cble_start_conn_update(tL2C_LCB* p_lcb) { p_lcb->remote_bd_addr)) #endif ) { btsnd_hcic_ble_upd_ll_conn_params(p_lcb->handle, p_lcb->min_interval, btsnd_hcic_ble_upd_ll_conn_params(p_lcb->Handle(), p_lcb->min_interval, p_lcb->max_interval, p_lcb->latency, p_lcb->timeout, p_lcb->min_ce_len, p_lcb->max_ce_len); Loading Loading @@ -1317,7 +1317,7 @@ void l2cble_use_preferred_conn_params(const RawAddress& bda) { BTM_TRACE_DEBUG( "%s: HANDLE=%d min_conn_int=%d max_conn_int=%d slave_latency=%d " "supervision_tout=%d", __func__, p_lcb->handle, p_dev_rec->conn_params.min_conn_int, __func__, p_lcb->Handle(), p_dev_rec->conn_params.min_conn_int, p_dev_rec->conn_params.max_conn_int, p_dev_rec->conn_params.slave_latency, p_dev_rec->conn_params.supervision_tout); Loading @@ -1328,7 +1328,7 @@ void l2cble_use_preferred_conn_params(const RawAddress& bda) { p_lcb->latency = p_dev_rec->conn_params.slave_latency; btsnd_hcic_ble_upd_ll_conn_params( p_lcb->handle, p_dev_rec->conn_params.min_conn_int, p_lcb->Handle(), p_dev_rec->conn_params.min_conn_int, p_dev_rec->conn_params.max_conn_int, p_dev_rec->conn_params.slave_latency, p_dev_rec->conn_params.supervision_tout, 0, 0); Loading system/stack/l2cap/l2c_csm.cc +8 −8 Original line number Diff line number Diff line Loading @@ -161,8 +161,8 @@ static void l2c_csm_closed(tL2C_CCB* p_ccb, uint16_t event, void* p_data) { } else { p_ccb->chnl_state = CST_ORIG_W4_SEC_COMP; btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, p_ccb->p_lcb->handle, true, &l2c_link_sec_comp, p_ccb); p_ccb->p_rcb->psm, p_ccb->p_lcb->Handle(), true, &l2c_link_sec_comp, p_ccb); } break; Loading Loading @@ -195,7 +195,7 @@ static void l2c_csm_closed(tL2C_CCB* p_ccb, uint16_t event, void* p_data) { /* If sec access does not result in started SEC_COM or COMP_NEG are * already processed */ if (btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, p_ccb->p_lcb->handle, p_ccb->p_rcb->psm, p_ccb->p_lcb->Handle(), true, &l2c_link_sec_comp, p_ccb) == BTM_CMD_STARTED) { p_ccb->chnl_state = CST_ORIG_W4_SEC_COMP; Loading Loading @@ -264,7 +264,7 @@ static void l2c_csm_closed(tL2C_CCB* p_ccb, uint16_t event, void* p_data) { p_ccb->chnl_state = CST_TERM_W4_SEC_COMP; if (btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, p_ccb->p_lcb->handle, p_ccb->p_rcb->psm, p_ccb->p_lcb->Handle(), false, &l2c_link_sec_comp, p_ccb) == BTM_CMD_STARTED) { /* started the security process, tell the peer to set a longer timer Loading Loading @@ -332,8 +332,8 @@ static void l2c_csm_orig_w4_sec_comp(tL2C_CCB* p_ccb, uint16_t event, false, &l2c_link_sec_comp2, p_ccb); } else { btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, p_ccb->p_lcb->handle, true, &l2c_link_sec_comp, p_ccb); p_ccb->p_rcb->psm, p_ccb->p_lcb->Handle(), true, &l2c_link_sec_comp, p_ccb); } break; Loading Loading @@ -489,8 +489,8 @@ static void l2c_csm_term_w4_sec_comp(tL2C_CCB* p_ccb, uint16_t event, case L2CEVT_SEC_RE_SEND_CMD: /* BTM has enough info to proceed */ btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, p_ccb->p_lcb->handle, false, &l2c_link_sec_comp, p_ccb); p_ccb->p_lcb->Handle(), false, &l2c_link_sec_comp, p_ccb); break; } } Loading system/stack/l2cap/l2c_int.h +13 −3 Original line number Diff line number Diff line Loading @@ -203,9 +203,7 @@ typedef struct { tL2CAP_APPL_INFO api; } tL2C_RCB; #ifndef L2CAP_CBB_DEFAULT_DATA_RATE_BUFF_QUOTA #define L2CAP_CBB_DEFAULT_DATA_RATE_BUFF_QUOTA 100 #endif typedef void(tL2CAP_SEC_CBACK)(const RawAddress& bd_addr, tBT_TRANSPORT trasnport, void* p_ref_data, Loading Loading @@ -334,7 +332,19 @@ typedef struct t_l2c_linkcb { tL2C_LINK_STATE link_state; alarm_t* l2c_lcb_timer; /* Timer entry for timeout evt */ uint16_t handle; /* The handle used with LM */ private: uint16_t handle_; /* The handle used with LM */ friend void l2cble_conn_comp(uint16_t handle, uint8_t role, const RawAddress& bda, tBLE_ADDR_TYPE type, uint16_t conn_interval, uint16_t conn_latency, uint16_t conn_timeout); friend void l2c_link_hci_conn_comp(uint8_t status, uint16_t handle, const RawAddress& p_bda); void SetHandle(uint16_t handle) { handle_ = handle; } public: uint16_t Handle() const { return handle_; } void InvalidateHandle() { handle_ = HCI_INVALID_HANDLE; } tL2C_CCB_Q ccb_queue; /* Queue of CCBs on this LCB */ Loading Loading
system/hci/src/btsnoop.cc +1 −1 Original line number Diff line number Diff line Loading @@ -315,7 +315,7 @@ static void whitelist_rfc_dlci(uint16_t local_cid, uint8_t dlci) { std::lock_guard lock(filter_list_mutex); tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(nullptr, local_cid); filter_list[p_ccb->p_lcb->handle].addRfcDlci(dlci); filter_list[p_ccb->p_lcb->Handle()].addRfcDlci(dlci); } static void add_rfc_l2c_channel(uint16_t conn_handle, uint16_t local_cid, Loading
system/stack/l2cap/l2c_api.cc +1 −1 Original line number Diff line number Diff line Loading @@ -1792,7 +1792,7 @@ uint16_t L2CA_FlushChannel(uint16_t lcid, uint16_t num_to_flush) { if (controller->supports_non_flushable_pb() && (BTM_GetNumScoLinks() == 0)) { /* The only packet type defined - 0 - Automatically-Flushable Only */ btsnd_hcic_enhanced_flush(p_lcb->handle, 0); btsnd_hcic_enhanced_flush(p_lcb->Handle(), 0); } } Loading
system/stack/l2cap/l2c_ble.cc +5 −5 Original line number Diff line number Diff line Loading @@ -297,7 +297,7 @@ void l2cble_conn_comp(uint16_t handle, uint8_t role, const RawAddress& bda, if (role == HCI_ROLE_MASTER) alarm_cancel(p_lcb->l2c_lcb_timer); /* Save the handle */ p_lcb->handle = handle; p_lcb->SetHandle(handle); /* Connected OK. Change state to connected, we were scanning so we are master */ Loading Loading @@ -384,7 +384,7 @@ static void l2cble_start_conn_update(tL2C_LCB* p_lcb) { p_lcb->remote_bd_addr)) #endif ) { btsnd_hcic_ble_upd_ll_conn_params(p_lcb->handle, min_conn_int, btsnd_hcic_ble_upd_ll_conn_params(p_lcb->Handle(), min_conn_int, max_conn_int, slave_latency, supervision_tout, 0, 0); p_lcb->conn_update_mask |= L2C_BLE_UPDATE_PENDING; Loading @@ -407,7 +407,7 @@ static void l2cble_start_conn_update(tL2C_LCB* p_lcb) { p_lcb->remote_bd_addr)) #endif ) { btsnd_hcic_ble_upd_ll_conn_params(p_lcb->handle, p_lcb->min_interval, btsnd_hcic_ble_upd_ll_conn_params(p_lcb->Handle(), p_lcb->min_interval, p_lcb->max_interval, p_lcb->latency, p_lcb->timeout, p_lcb->min_ce_len, p_lcb->max_ce_len); Loading Loading @@ -1317,7 +1317,7 @@ void l2cble_use_preferred_conn_params(const RawAddress& bda) { BTM_TRACE_DEBUG( "%s: HANDLE=%d min_conn_int=%d max_conn_int=%d slave_latency=%d " "supervision_tout=%d", __func__, p_lcb->handle, p_dev_rec->conn_params.min_conn_int, __func__, p_lcb->Handle(), p_dev_rec->conn_params.min_conn_int, p_dev_rec->conn_params.max_conn_int, p_dev_rec->conn_params.slave_latency, p_dev_rec->conn_params.supervision_tout); Loading @@ -1328,7 +1328,7 @@ void l2cble_use_preferred_conn_params(const RawAddress& bda) { p_lcb->latency = p_dev_rec->conn_params.slave_latency; btsnd_hcic_ble_upd_ll_conn_params( p_lcb->handle, p_dev_rec->conn_params.min_conn_int, p_lcb->Handle(), p_dev_rec->conn_params.min_conn_int, p_dev_rec->conn_params.max_conn_int, p_dev_rec->conn_params.slave_latency, p_dev_rec->conn_params.supervision_tout, 0, 0); Loading
system/stack/l2cap/l2c_csm.cc +8 −8 Original line number Diff line number Diff line Loading @@ -161,8 +161,8 @@ static void l2c_csm_closed(tL2C_CCB* p_ccb, uint16_t event, void* p_data) { } else { p_ccb->chnl_state = CST_ORIG_W4_SEC_COMP; btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, p_ccb->p_lcb->handle, true, &l2c_link_sec_comp, p_ccb); p_ccb->p_rcb->psm, p_ccb->p_lcb->Handle(), true, &l2c_link_sec_comp, p_ccb); } break; Loading Loading @@ -195,7 +195,7 @@ static void l2c_csm_closed(tL2C_CCB* p_ccb, uint16_t event, void* p_data) { /* If sec access does not result in started SEC_COM or COMP_NEG are * already processed */ if (btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, p_ccb->p_lcb->handle, p_ccb->p_rcb->psm, p_ccb->p_lcb->Handle(), true, &l2c_link_sec_comp, p_ccb) == BTM_CMD_STARTED) { p_ccb->chnl_state = CST_ORIG_W4_SEC_COMP; Loading Loading @@ -264,7 +264,7 @@ static void l2c_csm_closed(tL2C_CCB* p_ccb, uint16_t event, void* p_data) { p_ccb->chnl_state = CST_TERM_W4_SEC_COMP; if (btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, p_ccb->p_lcb->handle, p_ccb->p_rcb->psm, p_ccb->p_lcb->Handle(), false, &l2c_link_sec_comp, p_ccb) == BTM_CMD_STARTED) { /* started the security process, tell the peer to set a longer timer Loading Loading @@ -332,8 +332,8 @@ static void l2c_csm_orig_w4_sec_comp(tL2C_CCB* p_ccb, uint16_t event, false, &l2c_link_sec_comp2, p_ccb); } else { btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, p_ccb->p_lcb->handle, true, &l2c_link_sec_comp, p_ccb); p_ccb->p_rcb->psm, p_ccb->p_lcb->Handle(), true, &l2c_link_sec_comp, p_ccb); } break; Loading Loading @@ -489,8 +489,8 @@ static void l2c_csm_term_w4_sec_comp(tL2C_CCB* p_ccb, uint16_t event, case L2CEVT_SEC_RE_SEND_CMD: /* BTM has enough info to proceed */ btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, p_ccb->p_lcb->handle, false, &l2c_link_sec_comp, p_ccb); p_ccb->p_lcb->Handle(), false, &l2c_link_sec_comp, p_ccb); break; } } Loading
system/stack/l2cap/l2c_int.h +13 −3 Original line number Diff line number Diff line Loading @@ -203,9 +203,7 @@ typedef struct { tL2CAP_APPL_INFO api; } tL2C_RCB; #ifndef L2CAP_CBB_DEFAULT_DATA_RATE_BUFF_QUOTA #define L2CAP_CBB_DEFAULT_DATA_RATE_BUFF_QUOTA 100 #endif typedef void(tL2CAP_SEC_CBACK)(const RawAddress& bd_addr, tBT_TRANSPORT trasnport, void* p_ref_data, Loading Loading @@ -334,7 +332,19 @@ typedef struct t_l2c_linkcb { tL2C_LINK_STATE link_state; alarm_t* l2c_lcb_timer; /* Timer entry for timeout evt */ uint16_t handle; /* The handle used with LM */ private: uint16_t handle_; /* The handle used with LM */ friend void l2cble_conn_comp(uint16_t handle, uint8_t role, const RawAddress& bda, tBLE_ADDR_TYPE type, uint16_t conn_interval, uint16_t conn_latency, uint16_t conn_timeout); friend void l2c_link_hci_conn_comp(uint8_t status, uint16_t handle, const RawAddress& p_bda); void SetHandle(uint16_t handle) { handle_ = handle; } public: uint16_t Handle() const { return handle_; } void InvalidateHandle() { handle_ = HCI_INVALID_HANDLE; } tL2C_CCB_Q ccb_queue; /* Queue of CCBs on this LCB */ Loading