summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Eisenbach <eisenbach@google.com>2016-02-04 13:19:32 -0800
committerThe Android Automerger <android-build@google.com>2016-03-01 15:27:05 -0800
commit388db89341c81cf97cd2d39d60fc86539e460b71 (patch)
treeabc40503fdeed89744c03f1a1bed553856715408
parent04e4c5498beb89f54251dbbda6c83622372bd979 (diff)
downloadandroid_system_bt-388db89341c81cf97cd2d39d60fc86539e460b71.tar.gz
android_system_bt-388db89341c81cf97cd2d39d60fc86539e460b71.tar.bz2
android_system_bt-388db89341c81cf97cd2d39d60fc86539e460b71.zip
DO NOT MERGE Remove Porsche car-kit pairing workaround
Bug: 26551752 Change-Id: I14c5e3fcda0849874c8a94e48aeb7d09585617e1
-rw-r--r--include/bt_target.h4
-rw-r--r--stack/btm/btm_int.h5
-rw-r--r--stack/btm/btm_sec.c46
3 files changed, 2 insertions, 53 deletions
diff --git a/include/bt_target.h b/include/bt_target.h
index f712d2c1a..16605c6df 100644
--- a/include/bt_target.h
+++ b/include/bt_target.h
@@ -132,10 +132,6 @@
#define BTA_AV_RET_TOUT 15
#endif
-#ifndef PORCHE_PAIRING_CONFLICT
-#define PORCHE_PAIRING_CONFLICT TRUE
-#endif
-
#ifndef BTA_AV_CO_CP_SCMS_T
#define BTA_AV_CO_CP_SCMS_T FALSE
#endif
diff --git a/stack/btm/btm_int.h b/stack/btm/btm_int.h
index 65f0895d7..7f3eff645 100644
--- a/stack/btm/btm_int.h
+++ b/stack/btm/btm_int.h
@@ -853,11 +853,6 @@ typedef struct
BOOLEAN security_mode_changed; /* mode changed during bonding */
BOOLEAN pin_type_changed; /* pin type changed during bonding */
BOOLEAN sec_req_pending; /* TRUE if a request is pending */
-// btla-specific ++
-#ifdef PORCHE_PAIRING_CONFLICT
- UINT8 pin_code_len_saved; /* for legacy devices */
-#endif
-// btla-specific --
UINT8 pin_code_len; /* for legacy devices */
PIN_CODE pin_code; /* for legacy devices */
diff --git a/stack/btm/btm_sec.c b/stack/btm/btm_sec.c
index 68e9a8e4d..c8b1de708 100644
--- a/stack/btm/btm_sec.c
+++ b/stack/btm/btm_sec.c
@@ -953,13 +953,6 @@ void BTM_PINCodeReply (BD_ADDR bd_addr, UINT8 res, UINT8 pin_len, UINT8 *p_pin,
btm_sec_change_pairing_state (BTM_PAIR_STATE_WAIT_AUTH_COMPLETE);
btm_cb.acl_disc_reason = HCI_SUCCESS;
-#ifdef PORCHE_PAIRING_CONFLICT
- BTM_TRACE_EVENT("BTM_PINCodeReply(): Saving pin_len: %d btm_cb.pin_code_len: %d", pin_len, btm_cb.pin_code_len);
- /* if this was not pre-fetched, save the PIN */
- if (btm_cb.pin_code_len == 0)
- memcpy (btm_cb.pin_code, p_pin, pin_len);
- btm_cb.pin_code_len_saved = pin_len;
-#endif
btsnd_hcic_pin_code_req_reply (bd_addr, pin_len, p_pin);
}
@@ -5190,10 +5183,6 @@ void btm_sec_pin_code_request (UINT8 *p_bda)
tBTM_SEC_DEV_REC *p_dev_rec;
tBTM_CB *p_cb = &btm_cb;
-#ifdef PORCHE_PAIRING_CONFLICT
- UINT8 default_pin_code_len = 4;
- PIN_CODE default_pin_code = {0x30, 0x30, 0x30, 0x30};
-#endif
BTM_TRACE_EVENT ("btm_sec_pin_code_request() State: %s, BDA:%04x%08x",
btm_pair_state_descr(btm_cb.pairing_state),
(p_bda[0]<<8)+p_bda[1], (p_bda[2]<<24)+(p_bda[3]<<16)+(p_bda[4]<<8)+p_bda[5] );
@@ -5203,41 +5192,15 @@ void btm_sec_pin_code_request (UINT8 *p_bda)
if ( (memcmp (p_bda, btm_cb.pairing_bda, BD_ADDR_LEN) == 0) &&
(btm_cb.pairing_state == BTM_PAIR_STATE_WAIT_AUTH_COMPLETE) )
{
- /* fake this out - porshe carkit issue - */
-// btm_cb.pairing_state = BTM_PAIR_STATE_IDLE;
- if(! btm_cb.pin_code_len_saved)
- {
- btsnd_hcic_pin_code_neg_reply (p_bda);
- return;
- }
- else
- {
- btsnd_hcic_pin_code_req_reply (p_bda, btm_cb.pin_code_len_saved, p_cb->pin_code);
- return;
- }
+ btsnd_hcic_pin_code_neg_reply (p_bda);
+ return;
}
else if ((btm_cb.pairing_state != BTM_PAIR_STATE_WAIT_PIN_REQ)
|| memcmp (p_bda, btm_cb.pairing_bda, BD_ADDR_LEN) != 0)
{
BTM_TRACE_WARNING ("btm_sec_pin_code_request() rejected - state: %s",
btm_pair_state_descr(btm_cb.pairing_state));
-
-#ifdef PORCHE_PAIRING_CONFLICT
- /* reply pin code again due to counter in_rand when local initiates pairing */
- BTM_TRACE_EVENT ("btm_sec_pin_code_request from remote dev. for local initiated pairing");
- if(! btm_cb.pin_code_len_saved)
- {
- btm_sec_change_pairing_state (BTM_PAIR_STATE_WAIT_AUTH_COMPLETE);
- btsnd_hcic_pin_code_req_reply (p_bda, default_pin_code_len, default_pin_code);
- }
- else
- {
- btm_sec_change_pairing_state (BTM_PAIR_STATE_WAIT_AUTH_COMPLETE);
- btsnd_hcic_pin_code_req_reply (p_bda, btm_cb.pin_code_len_saved, p_cb->pin_code);
- }
-#else
btsnd_hcic_pin_code_neg_reply (p_bda);
-#endif
return;
}
}
@@ -5274,10 +5237,6 @@ void btm_sec_pin_code_request (UINT8 *p_bda)
BTM_TRACE_EVENT ("btm_sec_pin_code_request bonding sending reply");
btsnd_hcic_pin_code_req_reply (p_bda, btm_cb.pin_code_len, p_cb->pin_code);
-#ifdef PORCHE_PAIRING_CONFLICT
- btm_cb.pin_code_len_saved = btm_cb.pin_code_len;
-#endif
-
/* Mark that we forwarded received from the user PIN code */
btm_cb.pin_code_len = 0;
@@ -5308,7 +5267,6 @@ void btm_sec_pin_code_request (UINT8 *p_bda)
/* Notify upper layer of PIN request and start expiration timer */
else
{
- btm_cb.pin_code_len_saved = 0;
btm_sec_change_pairing_state (BTM_PAIR_STATE_WAIT_LOCAL_PIN);
/* Pin code request can not come at the same time as connection request */
memcpy (p_cb->connecting_bda, p_bda, BD_ADDR_LEN);