TSCH and CSMA: consistent seqno handling
This commit is contained in:
parent
b5ece8b128
commit
08ac18b4e9
@ -483,7 +483,7 @@ csma_output_packet(mac_callback_t sent, void *ptr)
|
|||||||
struct packet_queue *q;
|
struct packet_queue *q;
|
||||||
struct neighbor_queue *n;
|
struct neighbor_queue *n;
|
||||||
static uint8_t initialized = 0;
|
static uint8_t initialized = 0;
|
||||||
static uint16_t seqno;
|
static uint8_t seqno;
|
||||||
const linkaddr_t *addr = packetbuf_addr(PACKETBUF_ADDR_RECEIVER);
|
const linkaddr_t *addr = packetbuf_addr(PACKETBUF_ADDR_RECEIVER);
|
||||||
|
|
||||||
if(!initialized) {
|
if(!initialized) {
|
||||||
|
@ -142,7 +142,7 @@ struct tsch_asn_t tsch_current_asn;
|
|||||||
* For PAN coordinator: 0 -- lower is better */
|
* For PAN coordinator: 0 -- lower is better */
|
||||||
uint8_t tsch_join_priority;
|
uint8_t tsch_join_priority;
|
||||||
/* The current TSCH sequence number, used for unicast data frames only */
|
/* 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 */
|
/* Current period for EB output */
|
||||||
static clock_time_t tsch_current_eb_period;
|
static clock_time_t tsch_current_eb_period;
|
||||||
/* Current period for keepalive output */
|
/* Current period for keepalive output */
|
||||||
@ -925,6 +925,7 @@ tsch_init(void)
|
|||||||
nbr_table_register(sync_stats, NULL);
|
nbr_table_register(sync_stats, NULL);
|
||||||
#endif /* TSCH_AUTOSELECT_TIME_SOURCE */
|
#endif /* TSCH_AUTOSELECT_TIME_SOURCE */
|
||||||
|
|
||||||
|
tsch_packet_seqno = random_rand();
|
||||||
tsch_is_initialized = 1;
|
tsch_is_initialized = 1;
|
||||||
|
|
||||||
#if TSCH_AUTOSTART
|
#if TSCH_AUTOSTART
|
||||||
|
Loading…
Reference in New Issue
Block a user