mac802154: check on len instead mac_len
authorAlexander Aring <alex.aring@gmail.com>
Mon, 28 Sep 2015 17:59:48 +0000 (19:59 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 30 Sep 2015 11:22:11 +0000 (13:22 +0200)
commit5f2ebb3b59c81a461ffd4921d12e9f6e09c32945
tree0f5c026f7d0b0b476a2ae3cdba6643a1b8801098
parentb40988c438c2405a177ae54ff4baa08c720c296f
mac802154: check on len instead mac_len

This patch change the length check to len instead of mac_len for
checking if the frame control field is available to dereference.
We need to change it because I saw issues with af_packet raw sockets
and the mrf24j40 which calls this functionality. The raw socket
functionality doesn't set the mac_len but resets the skb_mac_header to
skb->data which is still correct. The issue occur at mrf24j40 only,
because the driver need to evaluate the fc fields.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/mac802154.h