0

I am trying to configure Android Kernel (msm-4.4)to have USB-CDC Ethernet Support in order to implement USB tethering in the low level. What I want to do is to migrate what's done in the following link to Android: https://developer.ridgerun.com/wiki/index.php/How_to_use_USB_device_networking

The following are already enabled in the .config:

CONFIG_USB=y
CONFIG_SND_USB=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_GADGET=y
CONFIG_USB_CONFIGFS_UEVENT=y

However, when I add the following

CONFIG_USB_ETH=y
CONFIG_USB_ETH_EEM=y

Resulting .config has CONFIG_USB_CONFIGFS_UEVENT disabled:

CONFIG_USB_ETH=y
# CONFIG_USB_CONFIGFS_UEVENT is not set

which results in kernel compilation errors:

In function 'gadgets_make':
error: 'gadget_index' undeclared (first use in this function)
  gadget_index++;
  ^
note: each undeclared identifier is reported only once for each function it appears in
In function 'gadgets_drop':
error: 'struct gadget_info' has no member named 'dev'
  if (gi->dev) {
        ^

When I try to compile CONFIG_USB_ETH as a module, kernel compilation succeeds, but the resulting .config don't have it as enabled:

# CONFIG_USB_ETH is not set

I want to understand why something bizarre like this happens. I searched through the entire Android source code and couldn't find which triggers this blocking behavior.

Please have a look at the following Kconfigs if you require:

https://github.com/android-linux-stable/msm-4.4/blob/5a05099fd7feedfa07a75720669caf5f374810d4/drivers/usb/gadget/legacy/Kconfig

https://github.com/android-linux-stable/msm-4.4/blob/5a05099fd7feedfa07a75720669caf5f374810d4/drivers/usb/gadget/legacy/Kconfig

Any guidance to identify this problem is much appreciated.

mozcelikors
  • 2,582
  • 8
  • 43
  • 77

1 Answers1

0

You should use CONFIG_USB_NET_CDC_EEM=y instead of CONFIG_USB_ETH=y.

CONFIG_USB_ETH is not compatible with CONFIG_USB_CONFIGFS_UEVENT

michelle
  • 46
  • 3