TSCH and CSMA: consistent seqno handling

This commit is contained in:
Simon Duquennoy 2017-06-26 19:19:49 +02:00
parent b5ece8b128
commit 08ac18b4e9
2 changed files with 3 additions and 2 deletions

View File

@ -483,7 +483,7 @@ csma_output_packet(mac_callback_t sent, void *ptr)
struct packet_queue *q;
struct neighbor_queue *n;
static uint8_t initialized = 0;
static uint16_t seqno;
static uint8_t seqno;
const linkaddr_t *addr = packetbuf_addr(PACKETBUF_ADDR_RECEIVER);
if(!initialized) {

View File

@ -142,7 +142,7 @@ struct tsch_asn_t tsch_current_asn;
* For PAN coordinator: 0 -- lower is better */
uint8_t tsch_join_priority;
/* The current TSCH sequence number, used for unicast data frames only */
static uint8_t tsch_packet_seqno = 0;
static uint8_t tsch_packet_seqno;
/* Current period for EB output */
static clock_time_t tsch_current_eb_period;
/* Current period for keepalive output */
@ -925,6 +925,7 @@ tsch_init(void)
nbr_table_register(sync_stats, NULL);
#endif /* TSCH_AUTOSELECT_TIME_SOURCE */
tsch_packet_seqno = random_rand();
tsch_is_initialized = 1;
#if TSCH_AUTOSTART