diff options
author | mfunkey <[email protected]> | 2022-01-20 07:44:46 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-20 09:44:46 +0300 |
commit | ba1f66db9ca0073730533bff79c6df80b9321a42 (patch) | |
tree | c8e3ef1487b8ab93458daf742097a3dc52582b05 /kvmd/apps/otgnet | |
parent | 3ab43edeb962e95402ab0e18c553665ffd6117f0 (diff) |
RNDIS Version 5 for Windows XP, automatic driver load on Windows using ncm (#77)
* rndis version 5 implementation for windows xp
* make windows pick the ncm usb ethernet driver automatically
Diffstat (limited to 'kvmd/apps/otgnet')
-rw-r--r-- | kvmd/apps/otgnet/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kvmd/apps/otgnet/__init__.py b/kvmd/apps/otgnet/__init__.py index c87ad125..eeb9073a 100644 --- a/kvmd/apps/otgnet/__init__.py +++ b/kvmd/apps/otgnet/__init__.py @@ -173,10 +173,13 @@ class _Service: # pylint: disable=too-many-instance-attributes def __find_iface(self) -> str: logger = get_logger() + drv = self.__driver + if self.__driver == "rndis5": + drv = "rndis" path = env.SYSFS_PREFIX + os.path.join( "/sys/kernel/config/usb_gadget", self.__gadget, - f"functions/{self.__driver}.usb0/ifname", + f"functions/{drv}.usb0/ifname", ) logger.info("Using OTG gadget %r ...", self.__gadget) with open(path) as iface_file: |