Re: [PATCH 2/2] usb: gadget: ncm: Add support to update wMaxSegmentSize via configfs

From: Greg Kroah-Hartman
Date: Mon Oct 09 2023 - 13:54:10 EST


On Mon, Oct 09, 2023 at 09:02:32PM +0530, Krishna Kurapati PSSNV wrote:
>
>
> On 10/9/2023 8:38 PM, Greg Kroah-Hartman wrote:
> > On Mon, Oct 09, 2023 at 07:50:05PM +0530, Krishna Kurapati wrote:
> > > Currently the NCM driver restricts wMaxSegmentSize that indicates
> > > the datagram size coming from network layer to 1514.
> >
> > I don't see that restriction in the existing driver, where does that
> > happen?
>
> Hi Greg,
>
> In the ecm_desc, the following line restricts the value:
>
> .wMaxSegmentSize = cpu_to_le16(ETH_FRAME_LEN),

Ok, so is that 1514? I don't know as I don't know what ETH_FRAM_LEN is.

So how about saying something to the affect of "the max segment size is
currently limited to the ethernet frame length of the kernel which
happens to be 1514 at this point in time."

thanks,

greg k-h