OSDN Git Service

Remove some < BT 2.1 code & repeated init
authorZach Johnson <zachoverflow@google.com>
Wed, 1 Oct 2014 02:38:44 +0000 (19:38 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Mon, 16 Mar 2015 23:51:35 +0000 (16:51 -0700)
Simple pairing is already enabled and the BLE event mask
is already set by this point.

stack/btm/btm_sec.c

index a570ff4..aa06e41 100644 (file)
@@ -2897,27 +2897,13 @@ void btm_sec_device_down (void)
 *******************************************************************************/
 void btm_sec_dev_reset (void)
 {
-#if (BTM_PRE_LISBON_INCLUDED == TRUE)
-    if (btm_cb.security_mode == BTM_SEC_MODE_LINK)
-    {
-        btsnd_hcic_write_auth_enable (TRUE);
-        btsnd_hcic_write_encr_mode (HCI_ENCRYPT_MODE_POINT_TO_POINT);
-    }
-#endif
-#if (BTM_PRE_LISBON_INCLUDED == TRUE)
-    else
-#endif
-        /* btm_sec_dev_reset() is only called from btm_decode_ext_features_page(...)
-         * right now. */
-        if (HCI_SIMPLE_PAIRING_SUPPORTED(btm_cb.devcb.local_lmp_features[HCI_EXT_FEATURES_PAGE_0]))
+    /* btm_sec_dev_reset() is only called from btm_decode_ext_features_page(...)
+     * right now. */
+    if (HCI_SIMPLE_PAIRING_SUPPORTED(btm_cb.devcb.local_lmp_features[HCI_EXT_FEATURES_PAGE_0]))
     {
-        btsnd_hcic_write_simple_pairing_mode(HCI_SP_MODE_ENABLED);
 #if BLE_INCLUDED == TRUE
         btsnd_hcic_set_event_mask(LOCAL_BR_EDR_CONTROLLER_ID,
                                   (UINT8 *)HCI_DUMO_EVENT_MASK_EXT);
-
-        btsnd_hcic_ble_set_evt_mask((UINT8 *)HCI_BLE_EVENT_MASK_DEF);
-
 #else
         btsnd_hcic_set_event_mask(LOCAL_BR_EDR_CONTROLLER_ID,
                                   (UINT8 *)HCI_LISBON_EVENT_MASK_EXT);