]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
aqc111: fix endianness issue in aqc111_change_mtu
authorOliver Neukum <oneukum@suse.com>
Thu, 9 May 2019 09:08:16 +0000 (11:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 May 2019 16:35:40 +0000 (09:35 -0700)
If the MTU is large enough, the first write to the device
is just repeated. On BE architectures, however, the first
word of the command will be swapped a second time and garbage
will be written. Avoid that.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/aqc111.c

index aff995be2a318796a832e19c5c3c3e3cfc5c9efd..408df2d335e3a648d46e1f00626761c510b741d9 100644 (file)
@@ -453,6 +453,8 @@ static int aqc111_change_mtu(struct net_device *net, int new_mtu)
                reg16 = 0x1420;
        else if (dev->net->mtu <= 16334)
                reg16 = 0x1A20;
+       else
+               return 0;
 
        aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_PAUSE_WATERLVL_LOW,
                           2, &reg16);