fix: select usable HCI adapter in BT_ON_OFF#429
Merged
bhargav0610 merged 2 commits intoqualcomm-linux:mainfrom Apr 28, 2026
Merged
fix: select usable HCI adapter in BT_ON_OFF#429bhargav0610 merged 2 commits intoqualcomm-linux:mainfrom
bhargav0610 merged 2 commits intoqualcomm-linux:mainfrom
Conversation
Add Bluetooth helper functions to identify usable HCI adapters based on UP/RUNNING state and a valid non-zero BD address. The new helpers log all available HCI candidates and prefer controllers that are already usable, avoiding DOWN or uninitialized adapters such as UART hci0 with 00:00:00:00:00:00 when another valid controller is available. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Update BT_ON_OFF adapter selection to prefer an UP/RUNNING controller with a valid BD address when BT_ADAPTER is not explicitly provided. This fixes platforms with multiple HCI devices where hci0 may be DOWN or uninitialized while another adapter, such as USB hci1, is valid and usable. The test now logs adapter candidates for CI debug and avoids incorrectly skipping when a usable controller exists. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Sreenivas8523
approved these changes
Apr 28, 2026
Sreenivas8523
left a comment
There was a problem hiding this comment.
Fix looks correct and resolves the multi-HCI adapter selection issue. Approving.
Sreenivas8523
approved these changes
Apr 28, 2026
Sreenivas8523
left a comment
There was a problem hiding this comment.
Fix resolves the multi-HCI adapter selection issue. Approving.
bhargav0610
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #427
This PR fixes BT_ON_OFF adapter selection on platforms with multiple HCI controllers.
Issue:
Changes:
Expected result: