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

Commit 0d04de56 authored by Mayank Rana's avatar Mayank Rana
Browse files

f_gsi: Increase MBIM IN aggregation to 31KB



This change increases MBIM IN aggregation and related TRB buffer size
from 16KB to 31KB. With this aggregation change, DL throughput is
increased form 4.2 Gbps to 4.7 Gbps. Also reduced OUT buffer size from
31KB to 16 KB (i.e. as equal to size of OUT aggregation).

Change-Id: Ida6444536f27f385034fefc71e663d7b7ce5626f
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 7f7615a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3211,7 +3211,7 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f)
		gsi->d_port.in_aggr_size = GSI_IN_MBIM_AGGR_SIZE;
		gsi->d_port.in_aggr_size = GSI_IN_MBIM_AGGR_SIZE;
		info.in_req_buf_len = GSI_IN_MBIM_AGGR_SIZE;
		info.in_req_buf_len = GSI_IN_MBIM_AGGR_SIZE;
		info.in_req_num_buf = GSI_NUM_IN_BUFFERS;
		info.in_req_num_buf = GSI_NUM_IN_BUFFERS;
		gsi->d_port.out_aggr_size = GSI_OUT_AGGR_SIZE;
		gsi->d_port.out_aggr_size = GSI_OUT_MBIM_AGGR_SIZE;
		info.out_req_buf_len = GSI_OUT_MBIM_BUF_LEN;
		info.out_req_buf_len = GSI_OUT_MBIM_BUF_LEN;
		info.out_req_num_buf = GSI_NUM_OUT_BUFFERS;
		info.out_req_num_buf = GSI_NUM_OUT_BUFFERS;
		info.notify_buf_len = sizeof(struct usb_cdc_notification);
		info.notify_buf_len = sizeof(struct usb_cdc_notification);
+5 −3
Original line number Original line Diff line number Diff line
@@ -53,8 +53,9 @@
#define GSI_OUT_AGGR_SIZE 24576
#define GSI_OUT_AGGR_SIZE 24576


#define GSI_IN_RNDIS_AGGR_SIZE 16384
#define GSI_IN_RNDIS_AGGR_SIZE 16384
#define GSI_IN_MBIM_AGGR_SIZE 16384
#define GSI_IN_MBIM_AGGR_SIZE 31744
#define GSI_IN_RMNET_AGGR_SIZE 16384
#define GSI_IN_RMNET_AGGR_SIZE 16384
#define GSI_OUT_MBIM_AGGR_SIZE 16384
#define GSI_ECM_AGGR_SIZE 2048
#define GSI_ECM_AGGR_SIZE 2048


#define GSI_OUT_MBIM_BUF_LEN 16384
#define GSI_OUT_MBIM_BUF_LEN 16384
@@ -771,7 +772,8 @@ static struct usb_gadget_strings *rndis_gsi_strings[] = {
};
};


/* mbim device descriptors */
/* mbim device descriptors */
#define MBIM_NTB_DEFAULT_IN_SIZE	(0x4000)
#define MBIM_NTB_DEFAULT_IN_SIZE	GSI_IN_MBIM_AGGR_SIZE
#define MBIM_NTB_DEFAULT_OUT_SIZE	GSI_OUT_MBIM_AGGR_SIZE


static struct usb_cdc_ncm_ntb_parameters mbim_gsi_ntb_parameters = {
static struct usb_cdc_ncm_ntb_parameters mbim_gsi_ntb_parameters = {
	.wLength = sizeof(mbim_gsi_ntb_parameters),
	.wLength = sizeof(mbim_gsi_ntb_parameters),
@@ -781,7 +783,7 @@ static struct usb_cdc_ncm_ntb_parameters mbim_gsi_ntb_parameters = {
	.wNdpInPayloadRemainder = cpu_to_le16(0),
	.wNdpInPayloadRemainder = cpu_to_le16(0),
	.wNdpInAlignment = cpu_to_le16(4),
	.wNdpInAlignment = cpu_to_le16(4),


	.dwNtbOutMaxSize = cpu_to_le32(0x4000),
	.dwNtbOutMaxSize = cpu_to_le32(MBIM_NTB_DEFAULT_OUT_SIZE),
	.wNdpOutDivisor = cpu_to_le16(4),
	.wNdpOutDivisor = cpu_to_le16(4),
	.wNdpOutPayloadRemainder = cpu_to_le16(0),
	.wNdpOutPayloadRemainder = cpu_to_le16(0),
	.wNdpOutAlignment = cpu_to_le16(4),
	.wNdpOutAlignment = cpu_to_le16(4),