summaryrefslogtreecommitdiffstats
path: root/stack/l2cap
diff options
context:
space:
mode:
authorMattias Agren <magren@broadcom.com>2012-04-25 12:12:11 +0200
committerMatthew Xie <mattx@google.com>2012-07-14 11:19:18 -0700
commitbc5b4b2e7c7d923a861039d3ca5d9a7492a5f328 (patch)
treef09e3cc18cc5c7e128d47a8cd034e81c14bc9154 /stack/l2cap
parent8100af272c43a887d28663dd64c02c97e9da4a74 (diff)
downloadexternal_bluetooth_bluedroid-bc5b4b2e7c7d923a861039d3ca5d9a7492a5f328.zip
external_bluetooth_bluedroid-bc5b4b2e7c7d923a861039d3ca5d9a7492a5f328.tar.gz
external_bluetooth_bluedroid-bc5b4b2e7c7d923a861039d3ca5d9a7492a5f328.tar.bz2
Enabled acl link priority control to ensure robust a2dp streaming
during inquiry scanning etc Change-Id: Iadcd9242dac707a6db857bc9f2ab89e59499764b
Diffstat (limited to 'stack/l2cap')
-rwxr-xr-x[-rw-r--r--]stack/l2cap/l2c_utils.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/stack/l2cap/l2c_utils.c b/stack/l2cap/l2c_utils.c
index 0c1fb60..80d092e 100644..100755
--- a/stack/l2cap/l2c_utils.c
+++ b/stack/l2cap/l2c_utils.c
@@ -2336,14 +2336,15 @@ BOOLEAN l2cu_lcb_disconnecting (void)
** Returns TRUE if a valid channel, else FALSE
**
*******************************************************************************/
+
BOOLEAN l2cu_set_acl_priority (BD_ADDR bd_addr, UINT8 priority, BOOLEAN reset_after_rs)
{
tL2C_LCB *p_lcb;
-#ifdef BRCM_VS
UINT8 *pp;
UINT8 command[HCI_BRCM_ACL_PRIORITY_PARAM_SIZE];
UINT8 vs_param;
-#endif
+
+ APPL_TRACE_EVENT1("SET ACL PRIORITY %d", priority);
/* Find the link control block for the acl channel */
if ((p_lcb = l2cu_find_lcb_by_bd_addr(bd_addr)) == NULL)
@@ -2352,23 +2353,21 @@ BOOLEAN l2cu_set_acl_priority (BD_ADDR bd_addr, UINT8 priority, BOOLEAN reset_af
return (FALSE);
}
-#ifdef BRCM_VS
if (BTM_IS_BRCM_CONTROLLER())
{
/* Called from above L2CAP through API; send VSC if changed */
if ((!reset_after_rs && (priority != p_lcb->acl_priority)) ||
-
/* Called because of a master/slave role switch; if high resend VSC */
( reset_after_rs && p_lcb->acl_priority == L2CAP_PRIORITY_HIGH))
{
pp = command;
- vs_param = (priority == L2CAP_PRIORITY_HIGH) ? HCI_BRCM_ACL_PRIORITY_HIGH : HCI_BRCM_ACL_PRIORITY_LOW;
+ vs_param = (priority == L2CAP_PRIORITY_HIGH) ? HCI_BRCM_ACL_PRIORITY_HIGH : HCI_BRCM_ACL_PRIORITY_LOW;
- UINT16_TO_STREAM (pp, p_lcb->handle);
- UINT8_TO_STREAM (pp, vs_param);
+ UINT16_TO_STREAM (pp, p_lcb->handle);
+ UINT8_TO_STREAM (pp, vs_param);
- BTM_VendorSpecificCommand (HCI_BRCM_SET_ACL_PRIORITY, HCI_BRCM_ACL_PRIORITY_PARAM_SIZE, command, NULL);
+ BTM_VendorSpecificCommand (HCI_BRCM_SET_ACL_PRIORITY, HCI_BRCM_ACL_PRIORITY_PARAM_SIZE, command, NULL);
/* Adjust lmp buffer allocation for this channel if priority changed */
if (p_lcb->acl_priority != priority)
@@ -2378,7 +2377,6 @@ BOOLEAN l2cu_set_acl_priority (BD_ADDR bd_addr, UINT8 priority, BOOLEAN reset_af
}
}
}
-#endif
return(TRUE);
}