From 1a4618d03aa513d4ff4337828d607380de743ef6 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Mon, 12 Dec 2022 21:30:29 +0100 Subject: libusbgx: Add interface name for NCM Feature Descriptors Add interface name support for NCM Feature Descriptors to libusbgx, patch has been sent to libusbgx upstream: https://github.com/linux-usb-gadgets/libusbgx/pull/73 This is needed to let NCM work on Windows systems, update git revision to the latest master branch to be able to apply the patch. Related-to: ELB-4923 Signed-off-by: Ming Liu (cherry picked from commit 3987d6249e2549bc036545b038b5c71c41a60336) --- ...d-interface-name-for-NCM-Feature-Descript.patch | 52 ++++++++++++++++++++++ recipes-support/libusbgx/libusbgx_git.bb | 3 +- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 recipes-support/libusbgx/files/0001-libusbgx-Add-interface-name-for-NCM-Feature-Descript.patch diff --git a/recipes-support/libusbgx/files/0001-libusbgx-Add-interface-name-for-NCM-Feature-Descript.patch b/recipes-support/libusbgx/files/0001-libusbgx-Add-interface-name-for-NCM-Feature-Descript.patch new file mode 100644 index 0000000..9f01f33 --- /dev/null +++ b/recipes-support/libusbgx/files/0001-libusbgx-Add-interface-name-for-NCM-Feature-Descript.patch @@ -0,0 +1,52 @@ +From 4f3f2ad08e6ca132bd1dd388e02b57223bf4219d Mon Sep 17 00:00:00 2001 +From: Ming Liu +Date: Sun, 11 Dec 2022 14:11:49 +0100 +Subject: [PATCH] libusbgx: Add interface name for NCM Feature Descriptors + +In commit: abf422bffca4a4767e7e242c44910dbf5ef7094f +[ +Author: Stefan Agner +Date: Tue Jan 24 14:22:25 2017 -0800 + + libusbgx: Add interface name for Feature Descriptors + + This adds interface name required for "Feature Descriptors". If + specified, we can assume that a Feature Descriptor with the + interface name of the specified string is understood by the + kernel (e.g. interface.rndis). +] + +it only added Feature Descriptors for RNDIS, NCM also needs that, or +else it could not be recognized by Windows systems. + +Add Feature Descriptors interface name for NCM. + +Upstream-Status: Submitted [https://github.com/linux-usb-gadgets/libusbgx/pull/73] + +Signed-off-by: Ming Liu +--- + src/function/ether.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/function/ether.c b/src/function/ether.c +index b1fe1d2..a9eaf33 100644 +--- a/src/function/ether.c ++++ b/src/function/ether.c +@@ -184,8 +184,14 @@ struct usbg_function_type usbg_f_type_subset = { + ETHER_FUNCTION_OPTS + }; + ++static char *ncm_os_desc_ifnames[] = { ++ "ncm", ++ NULL ++}; ++ + struct usbg_function_type usbg_f_type_ncm = { + .name = "ncm", ++ .os_desc_iname = ncm_os_desc_ifnames, + ETHER_FUNCTION_OPTS + }; + +-- +2.25.1 + diff --git a/recipes-support/libusbgx/libusbgx_git.bb b/recipes-support/libusbgx/libusbgx_git.bb index 5d58563..b7c248a 100644 --- a/recipes-support/libusbgx/libusbgx_git.bb +++ b/recipes-support/libusbgx/libusbgx_git.bb @@ -11,10 +11,11 @@ DEPENDS = "libconfig" EXTRA_OECONF = "--includedir=${includedir}/usbgx" PV = "0.2.0+git${SRCPV}" -SRCREV = "060784424609d5a4e3bce8355f788c93f09802a5" +SRCREV = "36e71e1e1ea9fb18d4765d0376329dcde90c8c91" SRCBRANCH = "master" SRC_URI = " \ git://github.com/libusbgx/libusbgx.git;branch=${SRCBRANCH};protocol=https \ + file://0001-libusbgx-Add-interface-name-for-NCM-Feature-Descript.patch \ file://usbg.service \ file://g1.schema.in \ " -- cgit v1.2.3