From bb0321110a28910812001794fd20d81cfb115fbc Mon Sep 17 00:00:00 2001 From: evilphish Date: Sun, 19 Nov 2017 19:29:16 +0100 Subject: [PATCH 1/2] Fix compilation warnings about potentially uninitialized values --- os_dep/linux/ioctl_cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 20eec9a..03d57cc 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -4367,9 +4367,9 @@ static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wd _adapter *padapter= wiphy_to_adapter(wiphy); int channel; int control_freq; - int center_freq; + int center_freq=0; int center_freq2=0; - int width; + int width=0; int band; int bandWidth; int offset; From 449bbf60cd39393e30fce0aefe7e7672ea8040e7 Mon Sep 17 00:00:00 2001 From: evilphish Date: Sun, 19 Nov 2017 23:26:08 +0100 Subject: [PATCH 2/2] Fix if-else leading to premature disconnects --- os_dep/linux/ioctl_cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 03d57cc..3b96594 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -750,10 +750,10 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter) } check_bss: - if (!rtw_cfg80211_check_bss(padapter)){ + if (!rtw_cfg80211_check_bss(padapter)) RTW_PRINT(FUNC_ADPT_FMT" BSS not found !!\n", FUNC_ADPT_ARG(padapter)); - }else if (rtw_to_roam(padapter) > 0) { + if (rtw_to_roam(padapter) > 0) { #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE) struct wiphy *wiphy = pwdev->wiphy; struct ieee80211_channel *notify_channel;