Permalink
Browse files

Set MTU for RNDIS interface to 1428

The MTU setting of RNDIS inerface has been broken since ICS.
The patch writes the mtu value on the rndis0 interface after gagets
functions were enabled and before sys.usb.state property is updated.

Bug:5847206
Change-Id: Ib44e41b07d9859a13875ddd964ce5068cde7b0e2
  • Loading branch information...
1 parent ff83fc7 commit a1e9682355bec91ac7fc000ece01e055e546c896 @kazuhiroondo kazuhiroondo committed with benoitgoby Jan 11, 2012
Showing with 4 additions and 8 deletions.
  1. +0 −8 init.stingray.rc
  2. +4 −0 init.stingray.usb.rc
View
@@ -321,14 +321,6 @@ on property:ro.bootmode=bp-tools
start gadget-qbp-modem
start wrigley-diag
start logcatd-blan
- # MTU for USB tethering
- # TODO: Need a dynamic way to configure appropriate MTU
- write /sys/class/net/usb0/mtu 1428
-
-on property:ro.bootmode=unknown
- # MTU for USB tethering
- # TODO: Need a dynamic way to configure appropriate MTU
- write /sys/class/net/usb0/mtu 1428
service wlan_prod /system/bin/insmod /system/lib/modules/bcm4329.ko "firmware_path=/vendor/firmware/fw_bcm4329.bin nvram_path=/system/etc/wifi/bcm4329.cal"
group wifi mot_tcmd system
View
@@ -30,6 +30,7 @@ on property:sys.usb.config=rndis
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/bDeviceClass 224
write /sys/class/android_usb/android0/enable 1
+ write /sys/class/net/rndis0/mtu 1428
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=rndis,adb
@@ -40,6 +41,7 @@ on property:sys.usb.config=rndis,adb
write /sys/class/android_usb/android0/bDeviceClass 224
write /sys/class/android_usb/android0/enable 1
start adbd
+ write /sys/class/net/rndis0/mtu 1428
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=ptp
@@ -106,6 +108,7 @@ on property:sys.usb.config=rndis,acm,usbnet
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/f_acm/instances 3
write /sys/class/android_usb/android0/enable 1
+ write /sys/class/net/rndis0/mtu 1428
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=rndis,acm,usbnet,adb
@@ -116,5 +119,6 @@ on property:sys.usb.config=rndis,acm,usbnet,adb
write /sys/class/android_usb/f_acm/instances 3
write /sys/class/android_usb/android0/enable 1
start adbd
+ write /sys/class/net/rndis0/mtu 1428
setprop sys.usb.state $sys.usb.config

0 comments on commit a1e9682

Please sign in to comment.