Link-stats: use new nbr table API
This commit is contained in:
parent
f18a4fdd7b
commit
bddf8207ed
2 changed files with 4 additions and 3 deletions
|
@ -143,7 +143,7 @@ link_stats_packet_sent(const linkaddr_t *lladdr, int status, int numtx)
|
|||
stats = nbr_table_get_from_lladdr(link_stats, lladdr);
|
||||
if(stats == NULL) {
|
||||
/* Add the neighbor */
|
||||
stats = nbr_table_add_lladdr(link_stats, lladdr);
|
||||
stats = nbr_table_add_lladdr(link_stats, lladdr, NBR_TABLE_REASON_LINK_STATS, NULL);
|
||||
if(stats != NULL) {
|
||||
stats->etx = LINK_STATS_INIT_ETX(stats);
|
||||
} else {
|
||||
|
@ -175,7 +175,7 @@ link_stats_input_callback(const linkaddr_t *lladdr)
|
|||
stats = nbr_table_get_from_lladdr(link_stats, lladdr);
|
||||
if(stats == NULL) {
|
||||
/* Add the neighbor */
|
||||
stats = nbr_table_add_lladdr(link_stats, lladdr);
|
||||
stats = nbr_table_add_lladdr(link_stats, lladdr, NBR_TABLE_REASON_LINK_STATS, NULL);
|
||||
if(stats != NULL) {
|
||||
/* Initialize */
|
||||
stats->rssi = packet_rssi;
|
||||
|
|
|
@ -83,7 +83,8 @@ typedef enum {
|
|||
NBR_TABLE_REASON_ROUTE,
|
||||
NBR_TABLE_REASON_IPV6_ND,
|
||||
NBR_TABLE_REASON_MAC,
|
||||
NBR_TABLE_REASON_LLSEC
|
||||
NBR_TABLE_REASON_LLSEC,
|
||||
NBR_TABLE_REASON_LINK_STATS,
|
||||
} nbr_table_reason_t;
|
||||
|
||||
/** \name Neighbor tables: register and loop through table elements */
|
||||
|
|
Loading…
Reference in a new issue