summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKausik Sinnaswamy <kausik@broadcom.com>2012-09-21 15:58:40 +0530
committerMatthew Xie <mattx@google.com>2012-09-21 15:02:36 -0700
commit0fdeb593e27922d90da480ef8db95537f9c36c6e (patch)
treec1f685fd8c43709973f747bc82e7310c6d84cfed
parent751c3ccf7c79a717c4f812c613f8911c1b7dee0b (diff)
downloadexternal_bluetooth_bluedroid-0fdeb593e27922d90da480ef8db95537f9c36c6e.zip
external_bluetooth_bluedroid-0fdeb593e27922d90da480ef8db95537f9c36c6e.tar.gz
external_bluetooth_bluedroid-0fdeb593e27922d90da480ef8db95537f9c36c6e.tar.bz2
Move default COD macro BTA_DM_COD to bt_target.h
This can be over-ridden on the various platforms via the respective bdroid_buildcfg.h. Default value chosen is for MAJOR_PHONE and MINOR_SMARTPHONE. bug 7176584 Change-Id: Ie553e082273b63e871aad5cda9816b16345fd9e2
-rw-r--r--bta/dm/bta_dm_cfg.c13
-rw-r--r--include/bt_target.h13
-rw-r--r--stack/btm/btm_devctl.c5
3 files changed, 15 insertions, 16 deletions
diff --git a/bta/dm/bta_dm_cfg.c b/bta/dm/bta_dm_cfg.c
index f09f3bf..5e26909 100644
--- a/bta/dm/bta_dm_cfg.c
+++ b/bta/dm/bta_dm_cfg.c
@@ -28,19 +28,6 @@
#include "bta_api.h"
#include "bta_dm_int.h"
-#ifndef BTA_DM_COD
-
-/*
- * major : COD_MAJOR_PHONE
- * minor : COD_MINOR_SMART_PHONE
- * svc : None, will be set as each profile registers
- *
- */
-
-#define BTA_DM_COD {0x52, BTM_COD_MAJOR_PHONE, BTM_COD_MINOR_SMART_PHONE}
-#endif
-
-
#ifndef BTA_DM_LINK_POLICY_SETTINGS
#define BTA_DM_LINK_POLICY_SETTINGS (HCI_ENABLE_MASTER_SLAVE_SWITCH | HCI_ENABLE_HOLD_MODE | HCI_ENABLE_SNIFF_MODE | HCI_ENABLE_PARK_MODE)
#endif
diff --git a/include/bt_target.h b/include/bt_target.h
index 9b48e17..68c8417 100644
--- a/include/bt_target.h
+++ b/include/bt_target.h
@@ -1031,9 +1031,16 @@ and USER_HW_DISABLE_API macros */
#define BTM_AFTER_RESET_TIMEOUT 0
#endif
-/* The default class of device. */
-#ifndef BTM_INIT_CLASS_OF_DEVICE
-#define BTM_INIT_CLASS_OF_DEVICE "\x00\x1F\x00"
+/* Default class of device
+* {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
+*
+* SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
+* MAJOR_CLASS:0x02 - PHONE
+* MINOR_CLASS:0x0C - SMART_PHONE
+*
+*/
+#ifndef BTA_DM_COD
+#define BTA_DM_COD {0x5A, 0x02, 0x0C}
#endif
/* The number of SCO links. */
diff --git a/stack/btm/btm_devctl.c b/stack/btm/btm_devctl.c
index 3715072..f0fc437 100644
--- a/stack/btm/btm_devctl.c
+++ b/stack/btm/btm_devctl.c
@@ -63,6 +63,11 @@ extern BOOLEAN BTA_PRM_CHECK_FW_VER(UINT8 *p);
/* L O C A L D A T A D E F I N I T I O N S */
/********************************************************************************/
+/* The default class of device. */
+#ifndef BTM_INIT_CLASS_OF_DEVICE
+#define BTM_INIT_CLASS_OF_DEVICE "\x00\x1F\x00"
+#endif
+
#ifndef BTM_DEV_RESET_TIMEOUT
#define BTM_DEV_RESET_TIMEOUT 4
#endif