From 3f6cc0256f80c228a2e4147483e8639af89cd44b Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Wed, 5 Jul 2017 17:43:00 +0200 Subject: [PATCH] Renaming FRAME802154_IEEE802154E_2012 to FRAME802154_IEEE802154_2015 --- core/net/mac/framer/frame802154.c | 4 ++-- core/net/mac/framer/frame802154.h | 2 +- core/net/mac/framer/framer-802154.c | 2 +- core/net/mac/tsch/tsch-packet.c | 6 +++--- core/net/mac/tsch/tsch.c | 6 +++--- examples/ipv6/rpl-simple/project-conf.h | 2 +- examples/ipv6/rpl-tsch/project-conf.h | 2 +- examples/platform-specific/jn516x/rpl/common-conf.h | 2 +- examples/platform-specific/jn516x/tsch/common-conf.h | 2 +- .../13-ieee802154/code-flush-nbr-queue/project-conf.h | 2 +- regression-tests/13-ieee802154/code/project-tsch-conf.h | 2 +- regression-tests/13-ieee802154/code/test-panid-handling.c | 2 +- regression-tests/13-ieee802154/code/test-tsch-packet.c | 4 ++-- 13 files changed, 19 insertions(+), 19 deletions(-) diff --git a/core/net/mac/framer/frame802154.c b/core/net/mac/framer/frame802154.c index 5a92a3e94..90a4ae9a1 100644 --- a/core/net/mac/framer/frame802154.c +++ b/core/net/mac/framer/frame802154.c @@ -145,7 +145,7 @@ frame802154_has_panid(frame802154_fcf_t *fcf, int *has_src_pan_id, int *has_dest return; } - if(fcf->frame_version == FRAME802154_IEEE802154E_2012) { + if(fcf->frame_version == FRAME802154_IEEE802154_2015) { /* * IEEE 802.15.4-2015 * Table 7-2, PAN ID Compression value for frame version 0b10 @@ -302,7 +302,7 @@ field_len(frame802154_t *p, field_length_t *flen) /* IEEE802.15.4e changes the meaning of PAN ID Compression (see Table 2a). * In this case, we leave the decision whether to compress PAN ID or not * up to the caller. */ - if(p->fcf.frame_version < FRAME802154_IEEE802154E_2012) { + if(p->fcf.frame_version < FRAME802154_IEEE802154_2015) { /* Set PAN ID compression bit if src pan id matches dest pan id. */ if((p->fcf.dest_addr_mode & 3) && (p->fcf.src_addr_mode & 3) && p->src_pid == p->dest_pid) { diff --git a/core/net/mac/framer/frame802154.h b/core/net/mac/framer/frame802154.h index 2ff067a26..64289522e 100644 --- a/core/net/mac/framer/frame802154.h +++ b/core/net/mac/framer/frame802154.h @@ -111,7 +111,7 @@ #define FRAME802154_IEEE802154_2003 (0x00) #define FRAME802154_IEEE802154_2006 (0x01) -#define FRAME802154_IEEE802154E_2012 (0x02) +#define FRAME802154_IEEE802154_2015 (0x02) #define FRAME802154_SECURITY_LEVEL_NONE (0) #define FRAME802154_SECURITY_LEVEL_MIC_32 (1) diff --git a/core/net/mac/framer/framer-802154.c b/core/net/mac/framer/framer-802154.c index e674a71ef..dab21bda8 100644 --- a/core/net/mac/framer/framer-802154.c +++ b/core/net/mac/framer/framer-802154.c @@ -81,7 +81,7 @@ create_frame(int type, int do_create) if(packetbuf_holds_broadcast()) { params.fcf.ack_required = 0; /* Suppress seqno on broadcast if supported (frame v2 or more) */ - params.fcf.sequence_number_suppression = FRAME802154_VERSION >= FRAME802154_IEEE802154E_2012; + params.fcf.sequence_number_suppression = FRAME802154_VERSION >= FRAME802154_IEEE802154_2015; } else { params.fcf.ack_required = packetbuf_attr(PACKETBUF_ATTR_MAC_ACK); params.fcf.sequence_number_suppression = FRAME802154_SUPPR_SEQNO; diff --git a/core/net/mac/tsch/tsch-packet.c b/core/net/mac/tsch/tsch-packet.c index eb4f897a8..b1fbd23cc 100644 --- a/core/net/mac/tsch/tsch-packet.c +++ b/core/net/mac/tsch/tsch-packet.c @@ -69,7 +69,7 @@ tsch_packet_create_eack(uint8_t *buf, int buf_size, memset(&p, 0, sizeof(p)); p.fcf.frame_type = FRAME802154_ACKFRAME; - p.fcf.frame_version = FRAME802154_IEEE802154E_2012; + p.fcf.frame_version = FRAME802154_IEEE802154_2015; p.fcf.ie_list_present = 1; /* Compression unset. According to IEEE802.15.4e-2012: * - if no address is present: elide PAN ID @@ -201,7 +201,7 @@ tsch_packet_create_eb(uint8_t *buf, int buf_size, memset(&p, 0, sizeof(p)); p.fcf.frame_type = FRAME802154_BEACONFRAME; p.fcf.ie_list_present = 1; - p.fcf.frame_version = FRAME802154_IEEE802154E_2012; + p.fcf.frame_version = FRAME802154_IEEE802154_2015; p.fcf.src_addr_mode = LINKADDR_SIZE > 2 ? FRAME802154_LONGADDRMODE : FRAME802154_SHORTADDRMODE; p.fcf.dest_addr_mode = FRAME802154_SHORTADDRMODE; p.fcf.sequence_number_suppression = 1; @@ -356,7 +356,7 @@ tsch_packet_parse_eb(const uint8_t *buf, int buf_size, return 0; } - if(frame->fcf.frame_version < FRAME802154_IEEE802154E_2012 + if(frame->fcf.frame_version < FRAME802154_IEEE802154_2015 || frame->fcf.frame_type != FRAME802154_BEACONFRAME) { LOG_INFO("! parse_eb: frame is not a valid TSCH beacon. Frame version %u, type %u, FCF %02x %02x\n", frame->fcf.frame_version, frame->fcf.frame_type, buf[0], buf[1]); diff --git a/core/net/mac/tsch/tsch.c b/core/net/mac/tsch/tsch.c index 97a7bad38..567c88af4 100644 --- a/core/net/mac/tsch/tsch.c +++ b/core/net/mac/tsch/tsch.c @@ -62,8 +62,8 @@ #include "net/mac/tsch/tsch-rpl.h" #endif /* UIP_CONF_IPV6_RPL */ -#if FRAME802154_VERSION < FRAME802154_IEEE802154E_2012 -#error TSCH: FRAME802154_VERSION must be at least FRAME802154_IEEE802154E_2012 +#if FRAME802154_VERSION < FRAME802154_IEEE802154_2015 +#error TSCH: FRAME802154_VERSION must be at least FRAME802154_IEEE802154_2015 #endif /* Log configuration */ @@ -421,7 +421,7 @@ tsch_rx_process_pending() uint8_t ret = frame802154_parse(current_input->payload, current_input->len, &frame); int is_data = ret && frame.fcf.frame_type == FRAME802154_DATAFRAME; int is_eb = ret - && frame.fcf.frame_version == FRAME802154_IEEE802154E_2012 + && frame.fcf.frame_version == FRAME802154_IEEE802154_2015 && frame.fcf.frame_type == FRAME802154_BEACONFRAME; if(is_data) { diff --git a/examples/ipv6/rpl-simple/project-conf.h b/examples/ipv6/rpl-simple/project-conf.h index 0f2550579..e5a716528 100644 --- a/examples/ipv6/rpl-simple/project-conf.h +++ b/examples/ipv6/rpl-simple/project-conf.h @@ -69,7 +69,7 @@ /* IEEE802.15.4 frame version */ #undef FRAME802154_CONF_VERSION -#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154E_2012 +#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154_2015 /* TSCH and RPL callbacks */ #define RPL_CALLBACK_PARENT_SWITCH tsch_rpl_callback_parent_switch diff --git a/examples/ipv6/rpl-tsch/project-conf.h b/examples/ipv6/rpl-tsch/project-conf.h index acff65be5..67e8bbf46 100644 --- a/examples/ipv6/rpl-tsch/project-conf.h +++ b/examples/ipv6/rpl-tsch/project-conf.h @@ -64,7 +64,7 @@ /* IEEE802.15.4 frame version */ #undef FRAME802154_CONF_VERSION -#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154E_2012 +#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154_2015 /* TSCH and RPL callbacks */ #define RPL_CALLBACK_PARENT_SWITCH tsch_rpl_callback_parent_switch diff --git a/examples/platform-specific/jn516x/rpl/common-conf.h b/examples/platform-specific/jn516x/rpl/common-conf.h index d79345eb9..010dcd7ab 100644 --- a/examples/platform-specific/jn516x/rpl/common-conf.h +++ b/examples/platform-specific/jn516x/rpl/common-conf.h @@ -60,7 +60,7 @@ /* IEEE802.15.4 frame version */ #undef FRAME802154_CONF_VERSION -#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154E_2012 +#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154_2015 /* TSCH and RPL callbacks */ #define RPL_CALLBACK_PARENT_SWITCH tsch_rpl_callback_parent_switch diff --git a/examples/platform-specific/jn516x/tsch/common-conf.h b/examples/platform-specific/jn516x/tsch/common-conf.h index 385fa1d03..f67023e65 100644 --- a/examples/platform-specific/jn516x/tsch/common-conf.h +++ b/examples/platform-specific/jn516x/tsch/common-conf.h @@ -140,7 +140,7 @@ #if WITH_TSCH #undef FRAME802154_CONF_VERSION -#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154E_2012 +#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154_2015 /* Contiki netstack: MAC */ #undef NETSTACK_CONF_MAC diff --git a/regression-tests/13-ieee802154/code-flush-nbr-queue/project-conf.h b/regression-tests/13-ieee802154/code-flush-nbr-queue/project-conf.h index 851f93f3b..12cbc174d 100644 --- a/regression-tests/13-ieee802154/code-flush-nbr-queue/project-conf.h +++ b/regression-tests/13-ieee802154/code-flush-nbr-queue/project-conf.h @@ -49,7 +49,7 @@ #define NETSTACK_CONF_MAC tschmac_driver #undef FRAME802154_CONF_VERSION -#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154E_2012 +#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154_2015 #if CONTIKI_TARGET_COOJA #define COOJA_CONF_SIMULATE_TURNAROUND 0 diff --git a/regression-tests/13-ieee802154/code/project-tsch-conf.h b/regression-tests/13-ieee802154/code/project-tsch-conf.h index ae994d6ca..fb49d006b 100644 --- a/regression-tests/13-ieee802154/code/project-tsch-conf.h +++ b/regression-tests/13-ieee802154/code/project-tsch-conf.h @@ -33,7 +33,7 @@ #define _PROJECT_TSCH_CONF_H #undef FRAME802154_CONF_VERSION -#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154E_2012 +#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154_2015 #undef NETSTACK_CONF_MAC #define NETSTACK_CONF_MAC tschmac_driver diff --git a/regression-tests/13-ieee802154/code/test-panid-handling.c b/regression-tests/13-ieee802154/code/test-panid-handling.c index 9c938fe7a..dd9b73304 100644 --- a/regression-tests/13-ieee802154/code/test-panid-handling.c +++ b/regression-tests/13-ieee802154/code/test-panid-handling.c @@ -181,7 +181,7 @@ setup_frame802154_2006_fcf(const panid_test_def *t, frame802154_fcf_t *fcf) static void setup_frame802154_2015_fcf(const panid_test_def *t, frame802154_fcf_t *fcf) { - fcf->frame_version = FRAME802154_IEEE802154E_2012; + fcf->frame_version = FRAME802154_IEEE802154_2015; setup_addr_mode(t->dest_addr_mode, &fcf->dest_addr_mode); setup_addr_mode(t->src_addr_mode, &fcf->src_addr_mode); diff --git a/regression-tests/13-ieee802154/code/test-tsch-packet.c b/regression-tests/13-ieee802154/code/test-tsch-packet.c index b50a617eb..136405315 100644 --- a/regression-tests/13-ieee802154/code/test-tsch-packet.c +++ b/regression-tests/13-ieee802154/code/test-tsch-packet.c @@ -230,7 +230,7 @@ test_parse_eb(const eb_test_vector_t *v) #endif if(frame.fcf.frame_type != FRAME802154_BEACONFRAME || - frame.fcf.frame_version != FRAME802154_IEEE802154E_2012) { + frame.fcf.frame_version != FRAME802154_IEEE802154_2015) { return FAILURE; } @@ -315,7 +315,7 @@ test_parse_eack(const eack_test_vector_t *v) #endif if(frame.fcf.frame_type != FRAME802154_ACKFRAME || - frame.fcf.frame_version != FRAME802154_IEEE802154E_2012) { + frame.fcf.frame_version != FRAME802154_IEEE802154_2015) { return FAILURE; }