summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/ieee802154.h11
-rw-r--r--include/net/6lowpan.h8
-rw-r--r--include/net/mac802154.h8
3 files changed, 19 insertions, 8 deletions
diff --git a/include/linux/ieee802154.h b/include/linux/ieee802154.h
index db01492814d3..205ce4e1ac32 100644
--- a/include/linux/ieee802154.h
+++ b/include/linux/ieee802154.h
@@ -31,6 +31,17 @@
#define IEEE802154_ACK_PSDU_LEN 5
#define IEEE802154_MIN_PSDU_LEN 9
#define IEEE802154_FCS_LEN 2
+#define IEEE802154_MAX_AUTH_TAG_LEN 16
+
+/* General MAC frame format:
+ * 2 bytes: Frame Control
+ * 1 byte: Sequence Number
+ * 20 bytes: Addressing fields
+ * 14 bytes: Auxiliary Security Header
+ */
+#define IEEE802154_MAX_HEADER_LEN (2 + 1 + 20 + 14)
+#define IEEE802154_MIN_HEADER_LEN (IEEE802154_ACK_PSDU_LEN - \
+ IEEE802154_FCS_LEN)
#define IEEE802154_PAN_ID_BROADCAST 0xffff
#define IEEE802154_ADDR_SHORT_BROADCAST 0xffff
diff --git a/include/net/6lowpan.h b/include/net/6lowpan.h
index eeae5eb58754..c17f556644fc 100644
--- a/include/net/6lowpan.h
+++ b/include/net/6lowpan.h
@@ -61,6 +61,14 @@
#define UIP_PROTO_UDP 17 /* ipv6 next header value for UDP */
#define UIP_FRAGH_LEN 8 /* ipv6 fragment header size */
+#define LOWPAN_NHC_MAX_ID_LEN 1
+/* Max IPHC Header len without IPv6 hdr specific inline data.
+ * Useful for getting the "extra" bytes we need at worst case compression.
+ *
+ * LOWPAN_IPHC + CID + LOWPAN_NHC_MAX_ID_LEN
+ */
+#define LOWPAN_IPHC_MAX_HEADER_LEN (2 + 1 + LOWPAN_NHC_MAX_ID_LEN)
+
/*
* ipv6 address based on mac
* second bit-flip (Universe/Local) is done according RFC2464
diff --git a/include/net/mac802154.h b/include/net/mac802154.h
index 32bd7c0467d4..2c478501ad14 100644
--- a/include/net/mac802154.h
+++ b/include/net/mac802154.h
@@ -23,14 +23,6 @@
#include <net/cfg802154.h>
-/* General MAC frame format:
- * 2 bytes: Frame Control
- * 1 byte: Sequence Number
- * 20 bytes: Addressing fields
- * 14 bytes: Auxiliary Security Header
- */
-#define MAC802154_FRAME_HARD_HEADER_LEN (2 + 1 + 20 + 14)
-
/**
* enum ieee802154_hw_addr_filt_flags - hardware address filtering flags
*