summaryrefslogtreecommitdiffstats
path: root/net/mac802154/tx.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-09-28 12:36:26 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-09-30 13:21:32 +0200
commitb40988c438c2405a177ae54ff4baa08c720c296f (patch)
tree255faa1cdb6a7398d61df143b563b42916998c69 /net/mac802154/tx.c
parentmac802154: add comments for llsec issues (diff)
downloadlinux-b40988c438c2405a177ae54ff4baa08c720c296f.tar.xz
linux-b40988c438c2405a177ae54ff4baa08c720c296f.zip
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>
Diffstat (limited to 'net/mac802154/tx.c')
-rw-r--r--net/mac802154/tx.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
index b205bbec7bdf..3827f359b336 100644
--- a/net/mac802154/tx.c
+++ b/net/mac802154/tx.c
@@ -71,17 +71,6 @@ ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
struct net_device *dev = skb->dev;
int ret;
- /* This check is for AF_PACKET RAW socket only, which doesn't
- * know about the FCS which is set here or by hardware. otherwise
- * it should not occur in any case!
- *
- * TODO: This should be handled in AF_PACKET and return -EMSGSIZE.
- */
- if (skb->len > IEEE802154_MTU - IEEE802154_FCS_LEN) {
- netdev_warn(dev, "Frame len above MTU limit. Dropped.\n");
- goto err_tx;
- }
-
if (!(local->hw.flags & IEEE802154_HW_TX_OMIT_CKSUM)) {
u16 crc = crc_ccitt(0, skb->data, skb->len);