Skip to content

Commit fd25c8b

Browse files
committed
net: wifi: Allow mgmt interface to compile if not offloaded
Even if we do not have wifi network offloading enabled, allow the application to be compiled just fine. This allows easier testing of the application even if the board does not support wifi offloading. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 011b930 commit fd25c8b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

include/net/net_if.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,13 @@ static inline struct net_offload *net_if_offload(struct net_if *iface)
545545
{
546546
return iface->if_dev->offload;
547547
}
548+
#else
549+
static inline bool net_if_is_ip_offloaded(struct net_if *iface)
550+
{
551+
ARG_UNUSED(iface);
552+
553+
return false;
554+
}
548555
#endif
549556

550557
/**

include/net/wifi_mgmt.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ struct wifi_status {
9292
int status;
9393
};
9494

95-
#ifdef CONFIG_WIFI_OFFLOAD
96-
9795
#include <net/net_if.h>
9896

9997
typedef void (*scan_result_cb_t)(struct net_if *iface, int status,
@@ -118,6 +116,8 @@ struct net_wifi_mgmt_offload {
118116
int (*disconnect)(struct device *dev);
119117
};
120118

119+
#ifdef CONFIG_WIFI_OFFLOAD
120+
121121
void wifi_mgmt_raise_connect_result_event(struct net_if *iface, int status);
122122
void wifi_mgmt_raise_disconnect_result_event(struct net_if *iface, int status);
123123

0 commit comments

Comments
 (0)