net: cdc_ncm: respect operator preferred MTU reported by MBIM
According to "Universal Serial Bus Communications Class Subclass Specification for Mobile Broadband Interface Model, Revision 1.0, Errata-1" published by USB-IF, the wMTU field of the MBIM extended functional descriptor indicates the operator preferred MTU for IP data streams. This patch modifies cdc_ncm_setup to ensure that the MTU value set on the usbnet device does not exceed the operator preferred MTU indicated by wMTU if the MBIM device exposes a MBIM extended functional descriptor. Signed-off-by: Ben Chan <benchan@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
bfe9b3f8c5
commit
259fef033f
@@ -93,6 +93,7 @@ struct cdc_ncm_ctx {
|
||||
|
||||
const struct usb_cdc_ncm_desc *func_desc;
|
||||
const struct usb_cdc_mbim_desc *mbim_desc;
|
||||
const struct usb_cdc_mbim_extended_desc *mbim_extended_desc;
|
||||
const struct usb_cdc_ether_desc *ether_desc;
|
||||
|
||||
struct usb_interface *control;
|
||||
|
Reference in New Issue
Block a user