diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index a187f08113ec..66954b495e8d 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -150,7 +150,7 @@ static u32 cdc_ncm_check_rx_max(struct usbnet *dev, u32 new_rx) /* clamp new_rx to sane values */ min = USB_CDC_NCM_NTB_MIN_IN_SIZE; - max = min_t(u32, CDC_NCM_NTB_MAX_SIZE_RX, le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize)); + max = min_t(u32, 131072, le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize)); /* dwNtbInMaxSize spec violation? Use MIN size for both limits */ if (max < min) { @@ -612,7 +612,7 @@ static int cdc_ncm_setup(struct usbnet *dev) /* be conservative when selecting intial buffer size to * increase the number of hosts this will work for */ - def_rx = min_t(u32, CDC_NCM_NTB_DEF_SIZE_RX, + def_rx = min_t(u32, 131072, le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize)); def_tx = min_t(u32, CDC_NCM_NTB_DEF_SIZE_TX, le32_to_cpu(ctx->ncm_parm.dwNtbOutMaxSize));