From 29d1cdde8b77f5fd83580148c4491eb4a6207f5e Mon Sep 17 00:00:00 2001 From: 5kft <5kft@users.noreply.github.com> Date: Sun, 9 Aug 2020 06:57:22 -0700 Subject: [PATCH] bugfix: initialize cfg80211_chan_def structure to zero to fix nl80211_send_chandef kernel trap --- os_dep/linux/ioctl_cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index feb651e..8ea6d3b 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -447,7 +447,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8 ret = _SUCCESS; #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) - struct cfg80211_chan_def chdef; + struct cfg80211_chan_def chdef = {}; ret = rtw_chbw_to_cfg80211_chan_def(wiphy, &chdef, ch, bw, offset, ht); if (ret != _SUCCESS)