net: zperf: Simplify shell initialization

Instead of calling zperf shell initialization routine on the first
command execution, initialize it during system boot, along with other
zperf submodules.

Remove redundant IP address configuration on an interface. The default
configuration relies on NET_CONFIG module, so there's no need to set the
address manually in zperf.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2022-11-30 16:41:36 +01:00 committed by Carles Cufí
commit d27ace4012
3 changed files with 29 additions and 68 deletions

View file

@ -8,6 +8,7 @@
#include <zephyr/net/socket.h>
#include "zperf_internal.h"
#include "zperf_session.h"
LOG_MODULE_DECLARE(net_zperf, CONFIG_NET_ZPERF_LOG_LEVEL);
@ -117,6 +118,9 @@ static int zperf_init(const struct device *unused)
zperf_udp_receiver_init();
zperf_tcp_receiver_init();
zperf_session_init();
zperf_shell_init();
return 0;
}