aqc111: fix endianness issue in aqc111_change_mtu
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>
This commit is contained in:
parent
873017af77
commit
b8b277525e
1 changed files with 2 additions and 0 deletions
|
@ -453,6 +453,8 @@ static int aqc111_change_mtu(struct net_device *net, int new_mtu)
|
||||||
reg16 = 0x1420;
|
reg16 = 0x1420;
|
||||||
else if (dev->net->mtu <= 16334)
|
else if (dev->net->mtu <= 16334)
|
||||||
reg16 = 0x1A20;
|
reg16 = 0x1A20;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
|
||||||
aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_PAUSE_WATERLVL_LOW,
|
aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_PAUSE_WATERLVL_LOW,
|
||||||
2, ®16);
|
2, ®16);
|
||||||
|
|
Loading…
Add table
Reference in a new issue