summaryrefslogtreecommitdiffstats
path: root/vnd/include
diff options
context:
space:
mode:
authorPrerepa Viswanadham <dham@google.com>2014-08-07 11:38:06 -0700
committerPrerepa Viswanadham <dham@google.com>2014-08-07 19:42:40 +0000
commit16fe0822ccd3eb6f66d3afd9965d25a0a0cb4c30 (patch)
treeb20efa4c13a0e22a53792908c7411371efafcc96 /vnd/include
parent845961f2f710e5fdf1c08c0c1ccc1368eeb0f6c0 (diff)
downloadandroid_system_bt-16fe0822ccd3eb6f66d3afd9965d25a0a0cb4c30.tar.gz
android_system_bt-16fe0822ccd3eb6f66d3afd9965d25a0a0cb4c30.tar.bz2
android_system_bt-16fe0822ccd3eb6f66d3afd9965d25a0a0cb4c30.zip
Use run time parameters to control LE features
Use values read from controller to enable and control LE features such as multi advertising, RPA offload, maximum irk size etc bug 15393216 Change-Id: I193e2b9a0dc61b86f667e986803571440e390160
Diffstat (limited to 'vnd/include')
-rw-r--r--vnd/include/bta_vendor_api.h59
-rw-r--r--vnd/include/vendor_ble.h21
2 files changed, 10 insertions, 70 deletions
diff --git a/vnd/include/bta_vendor_api.h b/vnd/include/bta_vendor_api.h
deleted file mode 100644
index 9ff5d30d0..000000000
--- a/vnd/include/bta_vendor_api.h
+++ /dev/null
@@ -1,59 +0,0 @@
-
-/******************************************************************************
- *
- * Copyright (C) 2003-2014 Broadcom Corporation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- ******************************************************************************/
-
-/*****************************************************************************
-**
-** Name: bta_vendor_api.h
-**
-** Description: VENDOR custom Ble API Bluetooth application definitions
-**
-*****************************************************************************/
-#ifndef BTA_VENDOR_API_H
-#define BTA_VENDOR_API_H
-
-#include "bta_api.h"
-#include "bta_sys.h"
-#include "vendor_api.h"
-
-
-
-
-#if (BLE_INCLUDED == TRUE && BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE)
-
-/*******************************************************************************
-**
-** Function BTA_BrcmInit
-**
-** Description This function initializes Broadcom specific VS handler in BTA
-**
-** Returns void
-**
-*******************************************************************************/
-BTA_API extern void BTA_BrcmInit (void);
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
-
diff --git a/vnd/include/vendor_ble.h b/vnd/include/vendor_ble.h
index bd4aa3307..6207c8426 100644
--- a/vnd/include/vendor_ble.h
+++ b/vnd/include/vendor_ble.h
@@ -61,10 +61,7 @@
#define BTM_BLE_PF_SRVC_DATA_PATTERN_BIT BTM_BLE_PF_BIT_TO_MASK(BTM_BLE_PF_SRVC_DATA_PATTERN)
typedef UINT8 tBTM_BLE_PF_SEL_MASK;
-
-#ifndef BTM_CS_IRK_LIST_MAX
-#define BTM_CS_IRK_LIST_MAX 0x20
-#endif
+#define BTM_BLE_MAX_FILTER_COUNTER (BTM_BLE_MAX_ADDR_FILTER + 1) /* per device filter + one generic filter indexed by 0 */
#define BTM_CS_IRK_LIST_INVALID 0xff
@@ -79,9 +76,9 @@ typedef struct
typedef struct
{
- BD_ADDR irk_q[BTM_CS_IRK_LIST_MAX];
- BD_ADDR irk_q_random_pseudo[BTM_CS_IRK_LIST_MAX];
- UINT8 irk_q_action[BTM_CS_IRK_LIST_MAX];
+ BD_ADDR *irk_q;
+ BD_ADDR *irk_q_random_pseudo;
+ UINT8 *irk_q_action;
UINT8 q_next;
UINT8 q_pending;
} tBTM_BLE_IRK_Q;
@@ -92,14 +89,13 @@ typedef struct
BOOLEAN enable;
UINT8 op_type;
- tBTM_BLE_PF_COUNT addr_filter_count[BTM_BLE_MAX_FILTER_COUNTER]; /* per BDA filter indexed by tBTM_BLE_PF_COND_TYPE */
tBLE_BD_ADDR cur_filter_target;
UINT8 irk_list_size;
UINT8 irk_avail_size;
- tBTM_BLE_IRK_ENTRY irk_list[BTM_CS_IRK_LIST_MAX];
+ tBTM_BLE_IRK_ENTRY *irk_list;
tBTM_BLE_IRK_Q irk_pend_q;
-
+ UINT8 max_filter_supported;
tBTM_BLE_PF_CMPL_CBACK *p_scan_pf_cback;
}tBTM_BLE_VENDOR_CB;
@@ -122,8 +118,11 @@ extern BOOLEAN btm_ble_vendor_irk_list_load_dev(tBTM_SEC_DEV_REC *p_dev_rec);
extern void btm_ble_vendor_irk_list_remove_dev(tBTM_SEC_DEV_REC *p_dev_rec);
extern tBTM_STATUS btm_ble_enable_vendor_feature (BOOLEAN enable, UINT32 feature_bit);
-extern void btm_ble_vendor_init(void);
+extern void btm_ble_vendor_init(UINT8 max_irk_list_sz);
+extern void btm_ble_vendor_cleanup(void);
extern BOOLEAN btm_ble_vendor_write_device_wl_attribute (tBLE_ADDR_TYPE addr_type, BD_ADDR bd_addr, UINT8 attribute);
+extern tBTM_STATUS btm_ble_vendor_enable_irk_feature(BOOLEAN enable);
+
#ifdef __cplusplus
}
#endif