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
19 #include "types/raw_address.h"
20
Reset()21 void tACL_CONN::Reset() {
22 remote_version_received = false;
23 memset(peer_le_features, 0, sizeof(peer_le_features));
24 peer_le_features_valid = false;
25 memset(peer_lmp_feature_pages, 0, sizeof(peer_lmp_feature_pages));
26 memset(peer_lmp_feature_valid, 0, sizeof(peer_lmp_feature_valid));
27 active_remote_addr = RawAddress::kEmpty;
28 remote_addr = RawAddress::kEmpty;
29 link_up_issued = false;
30 transport = BT_TRANSPORT_AUTO;
31 flush_timeout_in_ticks = 0;
32 hci_handle = 0;
33 link_super_tout = 0;
34 pkt_types_mask = 0;
35 active_remote_addr_type = BLE_ADDR_PUBLIC;
36 disconnect_reason = 0;
37 encrypt_state_ = BTM_ACL_ENCRYPT_STATE_IDLE;
38 is_encrypted = false;
39 link_role = HCI_ROLE_CENTRAL;
40 switch_role_failed_attempts = 0;
41 memset(&remote_version_info, 0, sizeof(remote_version_info));
42 rs_disc_pending = BTM_SEC_RS_NOT_PENDING;
43 switch_role_state_ = BTM_ACL_SWKEY_STATE_IDLE;
44 sca = 0;
45 }
46