net: ieee802154: Integrate MAC Command frames handling

Now we can handle incoming MAC command frames.
Association result ONLY for now.

Change-Id: Ib54b1757185ed079fe6914fa7939347020e006d9
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2016-10-19 17:08:09 +02:00
commit df4fa6557e

View file

@ -247,14 +247,12 @@ static enum net_verdict ieee802154_recv(struct net_if *iface,
return NET_DROP;
}
/**
* We do not support other frames than Beacon ar Data for now
*/
if (mpdu.mhr.fs->fc.frame_type != IEEE802154_FRAME_TYPE_DATA) {
NET_DBG("Unsupported frame type found");
return NET_DROP;
if (mpdu.mhr.fs->fc.frame_type == IEEE802154_FRAME_TYPE_MAC_COMMAND) {
return ieee802154_handle_mac_command(iface, &mpdu);
}
/* At this point the frame has to be a DATA one */
ieee802154_acknowledge(iface, &mpdu);
net_nbuf_set_ll_reserve(buf, mpdu.payload - (void *)net_nbuf_ll(buf));