moto_f_usbnet: increase usbnet transport speed

Enlarge USB MTU and tx/rx bulk size to 10 times
of its original size.

The kernel version may not support member max_mtu
in net_device so remove the code to set the max_mtu
to avoid compile issue on some kernel version.

Change-Id: I2756a7153e9211e2560d0efa186466095a17d271
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1371702
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianhong Wang <wangjhn@motorola.com>
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Yonghua Yan 2019-06-15 23:11:34 +08:00
commit 359208a01a

View file

@ -49,10 +49,10 @@
#define USBNET_SET_HOST_IP 0x07
/* Linux Network Interface */
#define USB_MTU 1536
#define MAX_BULK_TX_REQ_NUM 8
#define MAX_BULK_RX_REQ_NUM 8
#define MAX_INTR_RX_REQ_NUM 8
#define USB_MTU 15360
#define MAX_BULK_TX_REQ_NUM 80
#define MAX_BULK_RX_REQ_NUM 80
#define MAX_INTR_RX_REQ_NUM 80
#define INTERFACE_STRING_INDEX 0
struct usbnet_context {
@ -967,6 +967,7 @@ static struct usb_function_instance *usbnet_alloc_inst(void)
return ERR_PTR(-ENOMEM);
}
net_dev->mtu = 15000;
ret = register_netdev(net_dev);
if (ret) {
pr_err("%s: register_netdev error\n", __func__);