From: anitha3x Date: Tue, 16 Oct 2018 08:52:07 +0000 (+0530) Subject: A work around fix for incorrect controller response. X-Git-Tag: android-x86-9.0-r1~11 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6613e8524dfbbc2fb98b4c0ba822cc42a9afee33;p=android-x86%2Fsystem-bt.git A work around fix for incorrect controller response. Reason: The controller did not send correct response for read remote extended features for "page 1" request. Since lmp extended features ssp was not true, the sm4 was not enabled. Therefore host did not initiate authentication request. When L2CAP AVDTP connection was established, the controller returned disconnect complete with authentication failed reason. Fix: Provided a retry of read remote extended features request from host, when response for 'page 1' was incorrect. This enabled authentication from host and hence L2CAP AVDTP connection was successful. Revert the changes, once contoller fix is available Tracked-On: OAM-69566 Signed-off-by: anitha3x --- diff --git a/stack/btm/btm_acl.cc b/stack/btm/btm_acl.cc index ee2530ac2..c59ec2bce 100644 --- a/stack/btm/btm_acl.cc +++ b/stack/btm/btm_acl.cc @@ -936,9 +936,16 @@ void btm_process_remote_ext_features(tACL_CONN* p_acl_cb, BTM_TRACE_ERROR("%s: page=%d unexpected", __func__, page_idx); break; } - memcpy(p_dev_rec->feature_pages[page_idx], - p_acl_cb->peer_lmp_feature_pages[page_idx], - HCI_FEATURE_BYTES_PER_PAGE); + if ((page_idx == 1) && !HCI_SSP_HOST_SUPPORTED( + p_acl_cb->peer_lmp_feature_pages[page_idx])) { + BTM_TRACE_ERROR("Not received response for Page 1, retry"); + btm_read_remote_ext_features(handle, page_idx); + return; + } else { + memcpy(p_dev_rec->feature_pages[page_idx], + p_acl_cb->peer_lmp_feature_pages[page_idx], + HCI_FEATURE_BYTES_PER_PAGE); + } } if (!(p_dev_rec->sec_flags & BTM_SEC_NAME_KNOWN) ||