Loading system/stack/acl/btm_pm.cc +5 −2 Original line number Diff line number Diff line Loading @@ -146,8 +146,11 @@ tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const RawAddress& remote_bda, int acl_ind = btm_pm_find_acl_ind(remote_bda); if (acl_ind == MAX_L2CAP_LINKS) { LOG_ERROR("addr %s is unknown", remote_bda.ToString().c_str()); return (BTM_UNKNOWN_ADDR); if (btm_pm_is_le_link(remote_bda)) { return BTM_MODE_UNSUPPORTED; } LOG_ERROR("br_edr acl addr %s is unknown", remote_bda.ToString().c_str()); return BTM_UNKNOWN_ADDR; } // per ACL link Loading system/stack/gatt/gatt_attr.cc +12 −5 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ #include "gatt_api.h" #include "gatt_int.h" #include "osi/include/log.h" #include "osi/include/osi.h" using base::StringPrintf; Loading Loading @@ -459,12 +460,18 @@ static void gatt_disc_res_cback(uint16_t conn_id, tGATT_DISC_TYPE disc_type, static void gatt_disc_cmpl_cback(uint16_t conn_id, tGATT_DISC_TYPE disc_type, tGATT_STATUS status) { tGATT_PROFILE_CLCB* p_clcb = gatt_profile_find_clcb_by_conn_id(conn_id); if (p_clcb == NULL) { LOG_WARN("Unable to find gatt profile after discovery complete"); return; } if (p_clcb == NULL) return; if (status != GATT_SUCCESS || p_clcb->ccc_result == 0) { LOG(WARNING) << __func__ << ": Unable to register for service changed indication"; if (status != GATT_SUCCESS) { LOG_WARN("Gatt discovery completed with errors status:%u", status); return; } if (p_clcb->ccc_result == 0) { LOG_WARN("Gatt discovery completed but connection was idle id:%hu", conn_id); return; } Loading system/stack/sdp/sdp_discovery.cc +4 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include "hcimsgs.h" #include "l2cdefs.h" #include "log/log.h" #include "osi/include/log.h" #include "sdp_api.h" #include "sdpint.h" Loading Loading @@ -629,9 +630,8 @@ static void process_service_search_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply, /*******************************************************************/ #if (SDP_RAW_DATA_INCLUDED == TRUE) SDP_TRACE_WARNING("process_service_search_attr_rsp"); if (!sdp_copy_raw_data(p_ccb, true)) { SDP_TRACE_ERROR("sdp_copy_raw_data failed"); LOG_ERROR("sdp_copy_raw_data failed"); sdp_disconnect(p_ccb, SDP_ILLEGAL_PARAMETER); return; } Loading @@ -643,12 +643,12 @@ static void process_service_search_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply, type = *p++; if ((type >> 3) != DATA_ELE_SEQ_DESC_TYPE) { SDP_TRACE_WARNING("SDP - Wrong type: 0x%02x in attr_rsp", type); LOG_WARN("Wrong element in attr_rsp type:0x%02x", type); return; } p = sdpu_get_len_from_type(p, p + p_ccb->list_len, type, &seq_len); if (p == NULL || (p + seq_len) > (p + p_ccb->list_len)) { SDP_TRACE_WARNING("%s: bad length", __func__); LOG_WARN("Illegal search attribute length"); sdp_disconnect(p_ccb, SDP_ILLEGAL_PARAMETER); return; } Loading system/stack/smp/smp_act.cc +9 −15 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ static void smp_update_key_mask(tSMP_CB* p_cb, uint8_t key_type, bool recv) { void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { tSMP_EVT_DATA cb_data; tSMP_STATUS callback_rc; SMP_TRACE_DEBUG("%s p_cb->cb_evt=%d", __func__, p_cb->cb_evt); if (p_cb->p_callback && p_cb->cb_evt != 0) { switch (p_cb->cb_evt) { case SMP_IO_CAP_REQ_EVT: Loading @@ -106,7 +105,7 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { cb_data.io_req.max_key_size = SMP_MAX_ENC_KEY_SIZE; cb_data.io_req.init_keys = p_cb->local_i_key; cb_data.io_req.resp_keys = p_cb->local_r_key; SMP_TRACE_WARNING("io_cap = %d", cb_data.io_req.io_cap); LOG_DEBUG("Notify app io_cap = %hhu", cb_data.io_req.io_cap); break; case SMP_NC_REQ_EVT: Loading Loading @@ -135,9 +134,6 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { callback_rc = (*p_cb->p_callback)(p_cb->cb_evt, p_cb->pairing_bda, &cb_data); SMP_TRACE_DEBUG("%s: callback_rc=%d p_cb->cb_evt=%d", __func__, callback_rc, p_cb->cb_evt); if (callback_rc == SMP_SUCCESS) { switch (p_cb->cb_evt) { case SMP_IO_CAP_REQ_EVT: Loading @@ -149,14 +145,14 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { p_cb->local_r_key = cb_data.io_req.resp_keys; if (!(p_cb->loc_auth_req & SMP_AUTH_BOND)) { SMP_TRACE_WARNING("Non bonding: No keys will be exchanged"); LOG_INFO("Non bonding: No keys will be exchanged"); p_cb->local_i_key = 0; p_cb->local_r_key = 0; } SMP_TRACE_WARNING( "rcvd auth_req: 0x%02x, io_cap: %d " "loc_oob_flag: %d loc_enc_size: %d, " LOG_DEBUG( "Remote request IO capabilities precondition auth_req: 0x%02x," " io_cap: %d loc_oob_flag: %d loc_enc_size: %d, " "local_i_key: 0x%02x, local_r_key: 0x%02x", p_cb->loc_auth_req, p_cb->local_io_capability, p_cb->loc_oob_flag, p_cb->loc_enc_size, p_cb->local_i_key, p_cb->local_r_key); Loading @@ -183,8 +179,9 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { p_cb->loc_auth_req &= ~SMP_H7_SUPPORT_BIT; } SMP_TRACE_WARNING( "set auth_req: 0x%02x, local_i_key: 0x%02x, local_r_key: 0x%02x", LOG_DEBUG( "Remote request IO capabilities postcondition auth_req: 0x%02x," " local_i_key: 0x%02x, local_r_key: 0x%02x", p_cb->loc_auth_req, p_cb->local_i_key, p_cb->local_r_key); smp_sm_event(p_cb, SMP_IO_RSP_EVT, NULL); Loading @@ -199,7 +196,7 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { p_cb->local_i_key &= ~SMP_SEC_KEY_TYPE_LK; p_cb->local_r_key &= ~SMP_SEC_KEY_TYPE_LK; SMP_TRACE_WARNING( LOG_DEBUG( "for SMP over BR max_key_size: 0x%02x, local_i_key: 0x%02x, " "local_r_key: 0x%02x, p_cb->loc_auth_req: 0x%02x", p_cb->loc_enc_size, p_cb->local_i_key, p_cb->local_r_key, Loading @@ -215,8 +212,6 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { p_cb->discard_sec_req = false; smp_sm_event(p_cb, SMP_DISCARD_SEC_REQ_EVT, NULL); } SMP_TRACE_DEBUG("%s: return", __func__); } /******************************************************************************* Loading Loading @@ -377,7 +372,6 @@ void smp_send_id_info(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { (p_cb->loc_auth_req & SMP_AUTH_BOND)) btm_sec_save_le_key(p_cb->pairing_bda, BTM_LE_KEY_LID, &le_key, true); SMP_TRACE_WARNING("%s", __func__); smp_key_distribution_by_transport(p_cb, NULL); } Loading Loading
system/stack/acl/btm_pm.cc +5 −2 Original line number Diff line number Diff line Loading @@ -146,8 +146,11 @@ tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const RawAddress& remote_bda, int acl_ind = btm_pm_find_acl_ind(remote_bda); if (acl_ind == MAX_L2CAP_LINKS) { LOG_ERROR("addr %s is unknown", remote_bda.ToString().c_str()); return (BTM_UNKNOWN_ADDR); if (btm_pm_is_le_link(remote_bda)) { return BTM_MODE_UNSUPPORTED; } LOG_ERROR("br_edr acl addr %s is unknown", remote_bda.ToString().c_str()); return BTM_UNKNOWN_ADDR; } // per ACL link Loading
system/stack/gatt/gatt_attr.cc +12 −5 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ #include "gatt_api.h" #include "gatt_int.h" #include "osi/include/log.h" #include "osi/include/osi.h" using base::StringPrintf; Loading Loading @@ -459,12 +460,18 @@ static void gatt_disc_res_cback(uint16_t conn_id, tGATT_DISC_TYPE disc_type, static void gatt_disc_cmpl_cback(uint16_t conn_id, tGATT_DISC_TYPE disc_type, tGATT_STATUS status) { tGATT_PROFILE_CLCB* p_clcb = gatt_profile_find_clcb_by_conn_id(conn_id); if (p_clcb == NULL) { LOG_WARN("Unable to find gatt profile after discovery complete"); return; } if (p_clcb == NULL) return; if (status != GATT_SUCCESS || p_clcb->ccc_result == 0) { LOG(WARNING) << __func__ << ": Unable to register for service changed indication"; if (status != GATT_SUCCESS) { LOG_WARN("Gatt discovery completed with errors status:%u", status); return; } if (p_clcb->ccc_result == 0) { LOG_WARN("Gatt discovery completed but connection was idle id:%hu", conn_id); return; } Loading
system/stack/sdp/sdp_discovery.cc +4 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include "hcimsgs.h" #include "l2cdefs.h" #include "log/log.h" #include "osi/include/log.h" #include "sdp_api.h" #include "sdpint.h" Loading Loading @@ -629,9 +630,8 @@ static void process_service_search_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply, /*******************************************************************/ #if (SDP_RAW_DATA_INCLUDED == TRUE) SDP_TRACE_WARNING("process_service_search_attr_rsp"); if (!sdp_copy_raw_data(p_ccb, true)) { SDP_TRACE_ERROR("sdp_copy_raw_data failed"); LOG_ERROR("sdp_copy_raw_data failed"); sdp_disconnect(p_ccb, SDP_ILLEGAL_PARAMETER); return; } Loading @@ -643,12 +643,12 @@ static void process_service_search_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply, type = *p++; if ((type >> 3) != DATA_ELE_SEQ_DESC_TYPE) { SDP_TRACE_WARNING("SDP - Wrong type: 0x%02x in attr_rsp", type); LOG_WARN("Wrong element in attr_rsp type:0x%02x", type); return; } p = sdpu_get_len_from_type(p, p + p_ccb->list_len, type, &seq_len); if (p == NULL || (p + seq_len) > (p + p_ccb->list_len)) { SDP_TRACE_WARNING("%s: bad length", __func__); LOG_WARN("Illegal search attribute length"); sdp_disconnect(p_ccb, SDP_ILLEGAL_PARAMETER); return; } Loading
system/stack/smp/smp_act.cc +9 −15 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ static void smp_update_key_mask(tSMP_CB* p_cb, uint8_t key_type, bool recv) { void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { tSMP_EVT_DATA cb_data; tSMP_STATUS callback_rc; SMP_TRACE_DEBUG("%s p_cb->cb_evt=%d", __func__, p_cb->cb_evt); if (p_cb->p_callback && p_cb->cb_evt != 0) { switch (p_cb->cb_evt) { case SMP_IO_CAP_REQ_EVT: Loading @@ -106,7 +105,7 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { cb_data.io_req.max_key_size = SMP_MAX_ENC_KEY_SIZE; cb_data.io_req.init_keys = p_cb->local_i_key; cb_data.io_req.resp_keys = p_cb->local_r_key; SMP_TRACE_WARNING("io_cap = %d", cb_data.io_req.io_cap); LOG_DEBUG("Notify app io_cap = %hhu", cb_data.io_req.io_cap); break; case SMP_NC_REQ_EVT: Loading Loading @@ -135,9 +134,6 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { callback_rc = (*p_cb->p_callback)(p_cb->cb_evt, p_cb->pairing_bda, &cb_data); SMP_TRACE_DEBUG("%s: callback_rc=%d p_cb->cb_evt=%d", __func__, callback_rc, p_cb->cb_evt); if (callback_rc == SMP_SUCCESS) { switch (p_cb->cb_evt) { case SMP_IO_CAP_REQ_EVT: Loading @@ -149,14 +145,14 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { p_cb->local_r_key = cb_data.io_req.resp_keys; if (!(p_cb->loc_auth_req & SMP_AUTH_BOND)) { SMP_TRACE_WARNING("Non bonding: No keys will be exchanged"); LOG_INFO("Non bonding: No keys will be exchanged"); p_cb->local_i_key = 0; p_cb->local_r_key = 0; } SMP_TRACE_WARNING( "rcvd auth_req: 0x%02x, io_cap: %d " "loc_oob_flag: %d loc_enc_size: %d, " LOG_DEBUG( "Remote request IO capabilities precondition auth_req: 0x%02x," " io_cap: %d loc_oob_flag: %d loc_enc_size: %d, " "local_i_key: 0x%02x, local_r_key: 0x%02x", p_cb->loc_auth_req, p_cb->local_io_capability, p_cb->loc_oob_flag, p_cb->loc_enc_size, p_cb->local_i_key, p_cb->local_r_key); Loading @@ -183,8 +179,9 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { p_cb->loc_auth_req &= ~SMP_H7_SUPPORT_BIT; } SMP_TRACE_WARNING( "set auth_req: 0x%02x, local_i_key: 0x%02x, local_r_key: 0x%02x", LOG_DEBUG( "Remote request IO capabilities postcondition auth_req: 0x%02x," " local_i_key: 0x%02x, local_r_key: 0x%02x", p_cb->loc_auth_req, p_cb->local_i_key, p_cb->local_r_key); smp_sm_event(p_cb, SMP_IO_RSP_EVT, NULL); Loading @@ -199,7 +196,7 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { p_cb->local_i_key &= ~SMP_SEC_KEY_TYPE_LK; p_cb->local_r_key &= ~SMP_SEC_KEY_TYPE_LK; SMP_TRACE_WARNING( LOG_DEBUG( "for SMP over BR max_key_size: 0x%02x, local_i_key: 0x%02x, " "local_r_key: 0x%02x, p_cb->loc_auth_req: 0x%02x", p_cb->loc_enc_size, p_cb->local_i_key, p_cb->local_r_key, Loading @@ -215,8 +212,6 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { p_cb->discard_sec_req = false; smp_sm_event(p_cb, SMP_DISCARD_SEC_REQ_EVT, NULL); } SMP_TRACE_DEBUG("%s: return", __func__); } /******************************************************************************* Loading Loading @@ -377,7 +372,6 @@ void smp_send_id_info(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { (p_cb->loc_auth_req & SMP_AUTH_BOND)) btm_sec_save_le_key(p_cb->pairing_bda, BTM_LE_KEY_LID, &le_key, true); SMP_TRACE_WARNING("%s", __func__); smp_key_distribution_by_transport(p_cb, NULL); } Loading