mirror of
https://github.com/linux-usb-gadgets/libusbgx.git
synced 2025-07-23 20:55:05 +03:00
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). Signed-off-by: Stefan Agner <stefan.agner@toradex.com> [Allow multiple os_desc ifaces per funciton] Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
This commit is contained in:
parent
47526ac2a6
commit
abf422bffc
2 changed files with 9 additions and 0 deletions
|
@ -52,6 +52,9 @@ struct usbg_function_type
|
||||||
/* Name of this function type */
|
/* Name of this function type */
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
|
/* OS Descriptor interface name */
|
||||||
|
char **os_desc_iname;
|
||||||
|
|
||||||
/* Called to allocate instance of function */
|
/* Called to allocate instance of function */
|
||||||
int (*alloc_inst)(struct usbg_function_type *, usbg_function_type,
|
int (*alloc_inst)(struct usbg_function_type *, usbg_function_type,
|
||||||
const char *, const char *, usbg_gadget *,
|
const char *, const char *, usbg_gadget *,
|
||||||
|
|
|
@ -191,8 +191,14 @@ struct usbg_function_type usbg_f_type_eem = {
|
||||||
ETHER_FUNCTION_OPTS
|
ETHER_FUNCTION_OPTS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static char *rndis_os_desc_ifnames[] = {
|
||||||
|
"rndis",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
struct usbg_function_type usbg_f_type_rndis = {
|
struct usbg_function_type usbg_f_type_rndis = {
|
||||||
.name = "rndis",
|
.name = "rndis",
|
||||||
|
.os_desc_iname = rndis_os_desc_ifnames,
|
||||||
ETHER_FUNCTION_OPTS
|
ETHER_FUNCTION_OPTS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue