Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix intel driver probe #445

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions bumble/drivers/intel.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@ def __init__(self, host):
self.host = host

@classmethod
async def for_host(cls, host, force=False): # type: ignore
return cls(host)
async def for_host(cls, host): # type: ignore
# Only instantiate this driver if explicitly selected
if host.hci_metadata.get("driver") == "intel":
return cls(host)

return None

async def init_controller(self):
self.host.ready = True
Expand Down
2 changes: 1 addition & 1 deletion bumble/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def controller(self) -> Optional[TransportSink]:
def controller(self, controller) -> None:
self.set_packet_sink(controller)
if controller:
controller.set_packet_sink(self)
self.set_packet_source(controller)

def set_packet_sink(self, sink: Optional[TransportSink]) -> None:
self.hci_sink = sink
Expand Down
2 changes: 1 addition & 1 deletion docs/mkdocs/src/drivers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ used with particular HCI controller.
When the transport for an HCI controller is instantiated from a transport name,
a driver may also be forced by specifying ``driver=<driver-name>`` in the optional
metadata portion of the transport name. For example,
``usb:[driver=-rtk]0`` indicates that the ``rtk`` driver should be used with the
``usb:[driver=rtk]0`` indicates that the ``rtk`` driver should be used with the
first USB device, even if a normal probe would not have selected it based on the
USB vendor ID and product ID.

Expand Down
Loading