• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include "stack/acl/acl.h"
18 #include "types/raw_address.h"
19 
Reset()20 void tACL_CONN::Reset() {
21   remote_version_received = false;
22   memset(peer_le_features, 0, sizeof(peer_le_features));
23   peer_le_features_valid = false;
24   memset(peer_lmp_feature_pages, 0, sizeof(peer_lmp_feature_pages));
25   memset(peer_lmp_feature_valid, 0, sizeof(peer_lmp_feature_valid));
26   active_remote_addr = RawAddress::kEmpty;
27   remote_addr = RawAddress::kEmpty;
28   link_up_issued = false;
29   transport = BT_TRANSPORT_AUTO;
30   flush_timeout_in_ticks = 0;
31   hci_handle = 0;
32   link_super_tout = 0;
33   pkt_types_mask = 0;
34   active_remote_addr_type = BLE_ADDR_PUBLIC;
35   disconnect_reason = 0;
36   encrypt_state_ = BTM_ACL_ENCRYPT_STATE_IDLE;
37   is_encrypted = false;
38   link_role = HCI_ROLE_CENTRAL;
39   switch_role_failed_attempts = 0;
40   memset(&remote_version_info, 0, sizeof(remote_version_info));
41   rs_disc_pending = BTM_SEC_RS_NOT_PENDING;
42   switch_role_state_ = BTM_ACL_SWKEY_STATE_IDLE;
43   sca = 0;
44 }
45