diff options
author | Maxim Devaev <[email protected]> | 2022-01-06 02:32:10 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-01-06 02:32:10 +0300 |
commit | 9f44a120a76172c2caa8cce8158c4c53345c1bcd (patch) | |
tree | aab61daa09ae244792e0ab83d1e1cd85cc280336 /kvmd | |
parent | c97f509a8ed81ffbdb590e100308bf38e2ac649e (diff) |
bump bcdDevice only for rndis
Diffstat (limited to 'kvmd')
-rw-r--r-- | kvmd/apps/otg/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kvmd/apps/otg/__init__.py b/kvmd/apps/otg/__init__.py index f47f4ea8..55076ff9 100644 --- a/kvmd/apps/otg/__init__.py +++ b/kvmd/apps/otg/__init__.py @@ -188,7 +188,10 @@ def _cmd_start(config: Section) -> None: # pylint: disable=too-many-statements # bcdDevaev should be incremented any time there are breaking changes # to this script so that the host OS sees it as a new device # and re-enumerates everything rather than relying on cached values. - _write(join(gadget_path, "bcdDevice"), "0x0101") + if config.otg.devices.ethernet.enabled and config.otg.devices.ethernet.driver == "rndis": + _write(join(gadget_path, "bcdDevice"), "0x0101") + else: + _write(join(gadget_path, "bcdDevice"), "0x0100") _write(join(gadget_path, "bcdUSB"), f"0x{config.otg.usb_version:04X}") lang_path = join(gadget_path, "strings/0x409") |