Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_packages_modules_Bluetooth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid
platform_packages_modules_Bluetooth
Commits
55fb3fb6
Commit
55fb3fb6
authored
3 years ago
by
Treehugger Robot
Committed by
Gerrit Code Review
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Add SupportsBlePrivacy for gd privacy policy"
parents
6d6de6ed
d8a6cea4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
system/gd/hci/acl_manager/le_impl.h
+6
-1
6 additions, 1 deletion
system/gd/hci/acl_manager/le_impl.h
system/gd/hci/le_address_manager.cc
+9
-0
9 additions, 0 deletions
system/gd/hci/le_address_manager.cc
system/gd/hci/le_address_manager.h
+4
-1
4 additions, 1 deletion
system/gd/hci/le_address_manager.h
with
19 additions
and
2 deletions
system/gd/hci/acl_manager/le_impl.h
+
6
−
1
View file @
55fb3fb6
...
...
@@ -636,7 +636,12 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
std
::
chrono
::
milliseconds
minimum_rotation_time
,
std
::
chrono
::
milliseconds
maximum_rotation_time
)
{
le_address_manager_
->
SetPrivacyPolicyForInitiatorAddress
(
address_policy
,
fixed_address
,
rotation_irk
,
minimum_rotation_time
,
maximum_rotation_time
);
address_policy
,
fixed_address
,
rotation_irk
,
controller_
->
SupportsBlePrivacy
(),
minimum_rotation_time
,
maximum_rotation_time
);
}
// TODO(jpawlowski): remove once we have config file abstraction in cert tests
...
...
This diff is collapsed.
Click to expand it.
system/gd/hci/le_address_manager.cc
+
9
−
0
View file @
55fb3fb6
...
...
@@ -48,12 +48,14 @@ void LeAddressManager::SetPrivacyPolicyForInitiatorAddress(
AddressPolicy
address_policy
,
AddressWithType
fixed_address
,
crypto_toolbox
::
Octet16
rotation_irk
,
bool
supports_ble_privacy
,
std
::
chrono
::
milliseconds
minimum_rotation_time
,
std
::
chrono
::
milliseconds
maximum_rotation_time
)
{
ASSERT
(
address_policy_
==
AddressPolicy
::
POLICY_NOT_SET
);
ASSERT
(
address_policy
!=
AddressPolicy
::
POLICY_NOT_SET
);
ASSERT_LOG
(
registered_clients_
.
empty
(),
"Policy must be set before clients are registered."
);
address_policy_
=
address_policy
;
supports_ble_privacy_
=
supports_ble_privacy
;
LOG_INFO
(
"SetPrivacyPolicyForInitiatorAddress with policy %d"
,
address_policy
);
switch
(
address_policy_
)
{
...
...
@@ -391,6 +393,13 @@ void LeAddressManager::AddDeviceToResolvingList(
Command
command
=
{
CommandType
::
ADD_DEVICE_TO_RESOLVING_LIST
,
std
::
move
(
packet_builder
)};
cached_commands_
.
push
(
std
::
move
(
command
));
if
(
supports_ble_privacy_
)
{
auto
packet_builder
=
hci
::
LeSetPrivacyModeBuilder
::
Create
(
peer_identity_address_type
,
peer_identity_address
,
PrivacyMode
::
DEVICE
);
Command
command
=
{
CommandType
::
LE_SET_PRIVACY_MODE
,
std
::
move
(
packet_builder
)};
cached_commands_
.
push
(
std
::
move
(
command
));
}
// Enable Address resolution
auto
enable_builder
=
hci
::
LeSetAddressResolutionEnableBuilder
::
Create
(
hci
::
Enable
::
ENABLED
);
Command
enable
=
{
CommandType
::
SET_ADDRESS_RESOLUTION_ENABLE
,
std
::
move
(
enable_builder
)};
...
...
This diff is collapsed.
Click to expand it.
system/gd/hci/le_address_manager.h
+
4
−
1
View file @
55fb3fb6
...
...
@@ -57,6 +57,7 @@ class LeAddressManager {
AddressPolicy
address_policy
,
AddressWithType
fixed_address
,
crypto_toolbox
::
Octet16
rotation_irk
,
bool
supports_ble_privacy
,
std
::
chrono
::
milliseconds
minimum_rotation_time
,
std
::
chrono
::
milliseconds
maximum_rotation_time
);
// TODO(jpawlowski): remove once we have config file abstraction in cert tests
...
...
@@ -105,7 +106,8 @@ class LeAddressManager {
ADD_DEVICE_TO_RESOLVING_LIST
,
REMOVE_DEVICE_FROM_RESOLVING_LIST
,
CLEAR_RESOLVING_LIST
,
SET_ADDRESS_RESOLUTION_ENABLE
SET_ADDRESS_RESOLUTION_ENABLE
,
LE_SET_PRIVACY_MODE
};
struct
Command
{
...
...
@@ -144,6 +146,7 @@ class LeAddressManager {
uint8_t
connect_list_size_
;
uint8_t
resolving_list_size_
;
std
::
queue
<
Command
>
cached_commands_
;
bool
supports_ble_privacy_
{
false
};
};
}
// namespace hci
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment