diff options
author | Ming Liu <ming.liu@toradex.com> | 2022-12-12 21:30:29 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2023-01-05 17:08:32 +0100 |
commit | 1a4618d03aa513d4ff4337828d607380de743ef6 (patch) | |
tree | 3ddd1242dd7a7c6c3f2a7cc8617f1939eeb606a8 | |
parent | ec6cd7c8e5e6548cacbb1e1b250a0f377b814ea3 (diff) |
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 <ming.liu@toradex.com>
(cherry picked from commit 3987d6249e2549bc036545b038b5c71c41a60336)
-rw-r--r-- | recipes-support/libusbgx/files/0001-libusbgx-Add-interface-name-for-NCM-Feature-Descript.patch | 52 | ||||
-rw-r--r-- | recipes-support/libusbgx/libusbgx_git.bb | 3 |
2 files changed, 54 insertions, 1 deletions
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 <ming.liu@toradex.com> +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 <stefan.agner@toradex.com> +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 <ming.liu@toradex.com> +--- + 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 \ " |