Skip to content

Commit e655c0e

Browse files
JordanYatesjhedberg
authored andcommitted
net: ip: conn_mgr_connectivity usage calls
Add interface usage notifications to the `NET_NATIVE` code paths. Signed-off-by: Jordan Yates <jordan@embeint.com>
1 parent b92a43d commit e655c0e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

subsys/net/ip/net_core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ LOG_MODULE_REGISTER(net_core, CONFIG_NET_CORE_LOG_LEVEL);
2323
#include <string.h>
2424
#include <errno.h>
2525

26+
#include <zephyr/net/conn_mgr_connectivity.h>
2627
#include <zephyr/net/ipv4_autoconf.h>
2728
#include <zephyr/net/net_if.h>
2829
#include <zephyr/net/net_mgmt.h>
@@ -471,6 +472,7 @@ static void net_rx(struct net_if *iface, struct net_pkt *pkt)
471472
NET_DBG("Received pkt %p len %zu", pkt, pkt_len);
472473

473474
net_stats_update_bytes_recv(iface, pkt_len);
475+
conn_mgr_if_used(iface);
474476

475477
if (IS_ENABLED(CONFIG_NET_LOOPBACK)) {
476478
#ifdef CONFIG_NET_L2_DUMMY

subsys/net/ip/net_if.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ LOG_MODULE_REGISTER(net_if, CONFIG_NET_IF_LOG_LEVEL);
1515
#include <zephyr/internal/syscall_handler.h>
1616
#include <stdlib.h>
1717
#include <string.h>
18+
#include <zephyr/net/conn_mgr_connectivity.h>
1819
#include <zephyr/net/igmp.h>
1920
#include <zephyr/net/ipv4_autoconf.h>
2021
#include <zephyr/net/mld.h>
@@ -310,6 +311,7 @@ static bool net_if_tx(struct net_if *iface, struct net_pkt *pkt)
310311
net_pkt_unref(pkt);
311312
} else {
312313
net_stats_update_bytes_sent(iface, status);
314+
conn_mgr_if_used(iface);
313315
}
314316

315317
if (context) {

0 commit comments

Comments
 (0)