From a7c7437bbffe133f9192b9ca82b5b4e1f6d9835a Mon Sep 17 00:00:00 2001 From: Hemant Gupta Date: Wed, 12 Apr 2017 23:56:15 +0530 Subject: [PATCH] AVRCP 1.6: Limit GetFolderItemResponse Usecase: 1) Connect from AVRCP Controller supporting browsing having low L2CAP MTU eg 672. 2) Request for get folder items with large request items, response for which will exceed MTU size. Expected Result: As per AVRCP 1.6 Spec, section 29.20 pg 178, response should be limited to number of completed get folder items that can fit in single AVCTP Browsing channel MTU even if the completed items are less than actually requested by AVRCP Controller. Observation: DUT responding with Internal Error. Root Cause: When there is no space to fill complete Get Folder Item response within MTU size, DUT was returning error. Fix: Send max completed items which can fit in single MTU packet. Test: Checked if the remote device can receive the truncated response and get folder items succeeds when remote device reissues get folder item request with updated start list count. Frequency: 5/5 Bug: 37304477 Change-Id: I1963f97075382fc8333038e3efffaf61a9d84a28 --- stack/avrc/avrc_bld_tg.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/stack/avrc/avrc_bld_tg.cc b/stack/avrc/avrc_bld_tg.cc index 21f313327..f96a5d388 100644 --- a/stack/avrc/avrc_bld_tg.cc +++ b/stack/avrc/avrc_bld_tg.cc @@ -1078,12 +1078,6 @@ static tAVRC_STS avrc_bld_get_folder_items_rsp(tAVRC_GET_ITEMS_RSP* p_rsp, UINT16_TO_BE_STREAM(p_len, len); p_pkt->len = (p_data - p_start); - if (p_rsp->item_count != xx) { - p_rsp->item_count = xx; - AVRC_TRACE_DEBUG("xx value = 0x%02X", xx); - if (status == AVRC_STS_NO_ERROR) status = AVRC_STS_INTERNAL_ERR; - } - return status; } -- 2.11.0