Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a799a397 authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa
Browse files

USB: qc_rndis: Fix aggregation parameters settings issue



Currently driver does read max Transfer size from RNDIS_MSG_INIT
control message, when received from Host, but it is wrongly being
decoded due to wrong offset used. This leads dl_aggregation size set to
0 instead of required rndis_dl_aggr_size. Hence fix this by incrementing
tmp pointer for requestID to use correct offset to read max Transfer
size and set DL aggregation size correctly.

Also pass maxpkt_per_xfer as zero to rndis_qc_bind_config_vendor() so that
UL aggregation buffer size will be set to aggregation of 15 packets. This
helps in improving througput numbers.

Change-Id: Icc7506b57d26f82e6bf81f9d7dc1515cfbae6c82
Signed-off-by: default avatarVijayavardhan Vennapusa <vvreddy@codeaurora.org>
parent 110e102f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1257,7 +1257,7 @@ usb_function *rndis_qc_bind_config_vendor(struct usb_function_instance *fi,

static struct usb_function *qcrndis_alloc(struct usb_function_instance *fi)
{
	return rndis_qc_bind_config_vendor(fi, 0, NULL, 1, 0);
	return rndis_qc_bind_config_vendor(fi, 0, NULL, 0, 0);
}

static int rndis_qc_open_dev(struct inode *ip, struct file *fp)
+1 −0
Original line number Diff line number Diff line
@@ -816,6 +816,7 @@ int rndis_msg_parser(struct rndis_params *params, u8 *buf)
	case RNDIS_MSG_INIT:
		pr_debug("%s: RNDIS_MSG_INIT\n",
			__func__);
		tmp++; /* to get RequestID */
		major = get_unaligned_le32(tmp++);
		minor = get_unaligned_le32(tmp++);
		max_transfer_size = get_unaligned_le32(tmp++);