Skip to content

Commit

Permalink
[nrf fromlist] wifi: Fix duplication
Browse files Browse the repository at this point in the history
Use a common set of events and then add specific ones as per the
configuration.

Upstream PR: zephyrproject-rtos/zephyr#67015

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
(cherry picked from commit 0646c56)
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
(cherry picked from commit c0ea30d)
  • Loading branch information
krish2718 authored and jfischer-no committed Feb 29, 2024
1 parent b8a072b commit 9ceed40
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions subsys/net/l2/wifi/wifi_shell.c
Expand Up @@ -29,19 +29,17 @@ LOG_MODULE_REGISTER(net_wifi_shell, LOG_LEVEL_INF);

#define WIFI_SHELL_MODULE "wifi"

#define WIFI_SHELL_MGMT_EVENTS_COMMON (NET_EVENT_WIFI_SCAN_DONE |\
NET_EVENT_WIFI_CONNECT_RESULT |\
NET_EVENT_WIFI_DISCONNECT_RESULT | \
NET_EVENT_WIFI_TWT |\
NET_EVENT_WIFI_RAW_SCAN_RESULT)

#ifdef CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS_ONLY
#define WIFI_SHELL_MGMT_EVENTS (NET_EVENT_WIFI_RAW_SCAN_RESULT | \
NET_EVENT_WIFI_SCAN_DONE | \
NET_EVENT_WIFI_CONNECT_RESULT | \
NET_EVENT_WIFI_DISCONNECT_RESULT | \
NET_EVENT_WIFI_TWT)
#define WIFI_SHELL_MGMT_EVENTS (WIFI_SHELL_MGMT_EVENTS_COMMON)
#else
#define WIFI_SHELL_MGMT_EVENTS (NET_EVENT_WIFI_SCAN_RESULT | \
NET_EVENT_WIFI_SCAN_DONE | \
NET_EVENT_WIFI_CONNECT_RESULT | \
NET_EVENT_WIFI_DISCONNECT_RESULT | \
NET_EVENT_WIFI_TWT | \
NET_EVENT_WIFI_RAW_SCAN_RESULT)
#define WIFI_SHELL_MGMT_EVENTS (WIFI_SHELL_MGMT_EVENTS_COMMON |\
NET_EVENT_WIFI_SCAN_RESULT)
#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS_ONLY */

static struct {
Expand Down

0 comments on commit 9ceed40

Please sign in to comment.