]> git.baikalelectronics.ru Git - kernel.git/commit
ieee802154: change mtu size behaviour
authorAlexander Aring <alex.aring@gmail.com>
Mon, 28 Sep 2015 10:36:26 +0000 (12:36 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 30 Sep 2015 11:21:32 +0000 (13:21 +0200)
commit886e3c70a0c49a3d5b1b150f3a34a10b2ea8fa69
tree255faa1cdb6a7398d61df143b563b42916998c69
parent2a4a1a9688ee3f45236f44a1682f7f3e909370a2
ieee802154: change mtu size behaviour

This patch changes the mtu size of 802.15.4 interfaces. The current
setting is the meaning of the maximum transport unit with mac header,
which is 127 bytes according 802.15.4. The linux meaning of the mtu size
field is the maximum payload of a mac frame. Like in ethernet, which is
1500 bytes.

We have dynamic length of mac frames in 802.15.4, this is why we assume
the minimum header length which is hard_header_len. This contains fc and
sequence fields. These can evaluated by driver layer without additional
checks. We currently don't support to set the FCS from userspace, so we
need to subtract this from mtu size as well.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/ieee802154/socket.c
net/mac802154/iface.c
net/mac802154/tx.c