Skip to content

Commit b513e08

Browse files
LeonCTkartben
authored andcommitted
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: Chen Tao <ct05342@163.com>
1 parent ecaa19b commit b513e08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/l2/wifi/wifi_mgmt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ static const struct wifi_mgmt_ops *const get_wifi_api(struct net_if *iface)
356356
const struct device *dev = net_if_get_device(iface);
357357
struct net_wifi_mgmt_offload *off_api;
358358

359-
if (dev == NULL) {
359+
if (dev == NULL || !net_if_is_wifi(iface)) {
360360
return NULL;
361361
}
362362

0 commit comments

Comments
 (0)