summaryrefslogtreecommitdiff
path: root/drivers/firewire/net.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2016-10-23 16:30:56 +0200
committerDavid S. Miller <davem@davemloft.net>2016-10-26 17:28:50 -0400
commit89ab88b01bacc5bfc338693da3925504757e7844 (patch)
treed3a5aab2ebd79cf5cd8bf8d575548e2a4e50e4cb /drivers/firewire/net.c
parent5d48f00d836a628c695c6e3f96881d73641f6a2f (diff)
firewire: net: set initial MTU = 1500 unconditionally, fix IPv6 on some CardBus cards
firewire-net, like the older eth1394 driver, reduced the initial MTU to less than 1500 octets if the local link layer controller's asynchronous packet reception limit was lower. This is bogus, since this reception limit does not have anything to do with the transmission limit. Neither did this reduction affect the TX path positively, nor could it prevent link fragmentation at the RX path. Many FireWire CardBus cards have a max_rec of 9, causing an initial MTU of 1024 - 16 = 1008. RFC 2734 and RFC 3146 allow a minimum max_rec = 8, which would result in an initial MTU of 512 - 16 = 496. On such cards, IPv6 could only be employed if the MTU was manually increased to 1280 or more, i.e. IPv6 would not work without intervention from userland. We now always initialize the MTU to 1500, which is the default according to RFC 2734 and RFC 3146. On a VIA VT6316 based CardBus card which was affected by this, changing the MTU from 1008 to 1500 also increases TX bandwidth by 6 %. RX remains unaffected. CC: netdev@vger.kernel.org CC: linux1394-devel@lists.sourceforge.net CC: Jarod Wilson <jarod@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/firewire/net.c')
-rw-r--r--drivers/firewire/net.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
index 99379542b263..03715e7d9d92 100644
--- a/drivers/firewire/net.c
+++ b/drivers/firewire/net.c
@@ -1463,13 +1463,7 @@ static int fwnet_probe(struct fw_unit *unit,
goto out;
dev->local_fifo = dev->handler.offset;
- /*
- * Use the RFC 2734 default 1500 octets or the maximum payload
- * as initial MTU
- */
- net->mtu = min(1500U,
- (1U << (card->max_receive + 1))
- - RFC2374_FRAG_HDR_SIZE - IEEE1394_GASP_HDR_SIZE);
+ net->mtu = 1500U;
net->min_mtu = ETH_MIN_MTU;
net->max_mtu = ETH_MAX_MTU;