summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINSUN PYO <insun.pyo@samsung.com>2019-09-30 06:33:23 (GMT)
committerINSUN PYO <insun.pyo@samsung.com>2019-09-30 06:53:22 (GMT)
commit11808b2dc5071bc6744659321b23151103bc6c06 (patch)
tree4cbbf89e144788a3b5571cd94f2e505638c979b5
parent6a8841e932a0fbd45963d8b9c9f3db7aee1c184e (diff)
downloadlibdevice-node-11808b2dc5071bc6744659321b23151103bc6c06.zip
libdevice-node-11808b2dc5071bc6744659321b23151103bc6c06.tar.gz
libdevice-node-11808b2dc5071bc6744659321b23151103bc6c06.tar.bz2
To enable USB tethering, you must run the following two commands after configuring the USB endpoint. 1. /sbin/ifconfig usb0 192.168.129.3 up 2. /Sbin/route add -net 192.168.129.0 netmask 255.255.255.0 dev usb0 These commands are not directly executed by deviced, but are delegated to rndis.service. The reason is to use the already implemented structure (sdbd.service and mtp-response.service). The patch has been split into deviced and libdeivce-node. The rndis.service is in deviced, and the code to run rndis.service is in libdevice-node. Connected patch: "Support USB tethering" commit on deviced. Change-Id: If4f64310c28cd91f4d2864365127a088e977e26a
-rw-r--r--hw/usb_gadget.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/usb_gadget.h b/hw/usb_gadget.h
index 31e1a91..951bbd0 100644
--- a/hw/usb_gadget.h
+++ b/hw/usb_gadget.h
@@ -186,7 +186,6 @@ out:
}
DEFINE_SIMPLE_USB_FUNCTION(USB_FUNCTION_ACM, acm);
-DEFINE_SIMPLE_USB_FUNCTION(USB_FUNCTION_RNDIS, rndis);
DEFINE_SIMPLE_USB_FUNCTION(USB_FUNCTION_DIAG, diag);
DEFINE_SIMPLE_USB_FUNCTION(USB_FUNCTION_RMNET, rmnet);
DEFINE_SIMPLE_USB_FUNCTION(USB_FUNCTION_DM, dm);
@@ -257,6 +256,7 @@ out:
DEFINE_USB_FUNCTION_WITH_SERVICE(USB_FUNCTION_SDB, sdb, "sdbd");
DEFINE_USB_FUNCTION_WITH_SERVICE(USB_FUNCTION_MTP, mtp, "mtp-responder");
+DEFINE_USB_FUNCTION_WITH_SERVICE(USB_FUNCTION_RNDIS, rndis, "rndis");
#define MAKE_FUNC_AVAILABLE(_name, _vname) \
[FUNC_IDX_FROM_MASK(USB_FUNCTION_##_name)] = &_##_vname##_function
@@ -268,7 +268,7 @@ static struct usb_function *_available_funcs[] = {
MAKE_FUNC_WS_AVAILABLE(MTP, mtp),
MAKE_FUNC_AVAILABLE(ACM, acm),
MAKE_FUNC_WS_AVAILABLE(SDB, sdb),
- MAKE_FUNC_AVAILABLE(RNDIS, rndis),
+ MAKE_FUNC_WS_AVAILABLE(RNDIS, rndis),
MAKE_FUNC_AVAILABLE(DIAG, diag),
MAKE_FUNC_AVAILABLE(CONN_GADGET, conn_gadget),
MAKE_FUNC_AVAILABLE(DM, dm),