Commit b513e082 authored by Chen Tao's avatar Chen Tao Committed by Benjamin Cabé
Browse files

net: wifi: fix the bug by non-wifi network call

Added network type check to fix the system crash caused by non-wifi
network card calling wifi api interface

Company:BSH Crop
Signed-off-by: default avatarChen Tao <ct05342@163.com>
parent ecaa19b7
Loading
Loading
Loading
Loading
+1 −1
Changes for subsys/net/l2/wifi/wifi_mgmt.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -356,7 +356,7 @@ static const struct wifi_mgmt_ops *const get_wifi_api(struct net_if *iface)
	const struct device *dev = net_if_get_device(iface);
	struct net_wifi_mgmt_offload *off_api;

	if (dev == NULL) {
	if (dev == NULL || !net_if_is_wifi(iface)) {
		return NULL;
	}