--- zzzz-none-000/linux-3.10.107/drivers/net/usb/rndis_host.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/net/usb/rndis_host.c 2021-02-04 17:41:59.000000000 +0000 @@ -13,11 +13,9 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * along with this program; if not, see . */ #include -#include #include #include #include @@ -383,6 +381,21 @@ net->mtu = dev->hard_mtu - net->hard_header_len; } +/* == 20160222 AVM/VGJ - CHANGESET: FIX for buggy ZTE Modems: Adjust Rx Buffer Size == */ +#if 1 + if (tmp > dev->rx_urb_size) { + dev->rx_urb_size = 4096; + while (tmp > dev->rx_urb_size) { + dev->rx_urb_size += 4096; + if (dev->rx_urb_size >= (4*4096)) { + break; + } + } + dev_warn(&intf->dev, + "dev needs rx_urb_size %d, adjusting to %d\n", tmp, dev->rx_urb_size); + } +#endif + /* REVISIT: peripheral "alignment" request is ignored ... */ dev_dbg(&intf->dev, "hard mtu %u (%u from dev), rx buflen %Zu, align %d\n",