CHROMIUM: Bluetooth: Ignore global Connectable setting for broadcast adv

Existing logic enforces a "connectable" advertisement if the global
Connectable setting is active, even if the advertisement requested was
non-connectable. This can cause a case where the client requires a
random address, but kernel will ignore that request. This patch removes
the check for the global setting, to ensure we provide a random address
if the client did not specify Connectability in their advertisement
request.

Specifically, this seems to break bluetooth discovery on Atlas, as
Nearby immediately requests an advertisement on login. The global
Connectable setting makes this advertisement public (not good), and then
future discovery requests fail because the random address update is
skipped since adv is enabled.

Change was tested by verifying Nearby startup flow, and ensuring
both the scanning and advertising steps succeed on atlas.

BUG=b:175069101
TEST=Test Nearby startup flow on atlas

Signed-off-by: Daniel Winkler <danielwinkler@google.com>

Change-Id: I0b9f8e1f8be0af88ae381baa1da89cfa6d79e7d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2580304
Reviewed-by: Alain Michaud <alainm@chromium.org>
Commit-Queue: Daniel Winkler <danielwinkler@google.com>
Tested-by: Daniel Winkler <danielwinkler@google.com>
(cherry picked from commit dd7dd46978b5b0da354919a5f3e8884a2c817876)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2584187
1 file changed