diff options
author | Alan Ott <alan@signal11.us> | 2012-11-29 15:55:44 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-30 12:19:24 -0500 |
commit | b333b7e6ec210412be49d1dc67b62d4e565a0cd6 (patch) | |
tree | 142069aef7a65d4844da5684789eac8a72f2736e /net/ieee802154 | |
parent | fed2c6fd1ffb7b24e55159eb40a5a7330be656c8 (diff) | |
download | linux-3.10-b333b7e6ec210412be49d1dc67b62d4e565a0cd6.tar.gz linux-3.10-b333b7e6ec210412be49d1dc67b62d4e565a0cd6.tar.bz2 linux-3.10-b333b7e6ec210412be49d1dc67b62d4e565a0cd6.zip |
6lowpan: consider checksum bytes in fragmentation threshold
Change the threshold for framentation of a lowpan packet from
using the MTU size to now use the MTU size minus the checksum length,
which is added by the hardware. For IEEE 802.15.4, this effectively
changes it from 127 bytes to 125 bytes.
Signed-off-by: Alan Ott <alan@signal11.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/6lowpan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index 6d42c17af96..f651da60f16 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -1047,7 +1047,8 @@ static netdev_tx_t lowpan_xmit(struct sk_buff *skb, struct net_device *dev) goto error; } - if (skb->len <= IEEE802154_MTU) { + /* Send directly if less than the MTU minus the 2 checksum bytes. */ + if (skb->len <= IEEE802154_MTU - IEEE802154_MFR_SIZE) { err = dev_queue_xmit(skb); goto out; } |