From 4d896a9145a9b251e67ac4e47e5ce1bc31ba92f3 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sun, 29 Jul 2018 18:12:29 +0200 Subject: [PATCH] Fix compilation error under kernel v3.13 --- dkms.conf | 2 +- os_dep/linux/wifi_regd.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dkms.conf b/dkms.conf index fe09b6b..2e47ecd 100644 --- a/dkms.conf +++ b/dkms.conf @@ -1,5 +1,5 @@ PACKAGE_NAME="realtek-rtl88xxau" -PACKAGE_VERSION="5.2.20.2~20180724" +PACKAGE_VERSION="5.2.20.2~20180730" BUILT_MODULE_NAME[0]="8812au" PROCS_NUM=`nproc` [ $PROCS_NUM -gt 16 ] && PROCS_NUM=16 diff --git a/os_dep/linux/wifi_regd.c b/os_dep/linux/wifi_regd.c index 796d27b..03a6fff 100644 --- a/os_dep/linux/wifi_regd.c +++ b/os_dep/linux/wifi_regd.c @@ -334,8 +334,13 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy) if (ch) ch->flags &= ~(IEEE80211_CHAN_DISABLED|IEEE80211_CHAN_NO_HT40PLUS| IEEE80211_CHAN_NO_HT40MINUS|IEEE80211_CHAN_NO_80MHZ| - IEEE80211_CHAN_NO_160MHZ); - //ch->flags = IEEE80211_CHAN_DISABLED; + IEEE80211_CHAN_NO_160MHZ| +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)) + IEEE80211_CHAN_NO_IBSS|IEEE80211_CHAN_PASSIVE_SCAN); +#else + IEEE80211_CHAN_NO_IR); +#endif + //ch->flags = IEEE80211_CHAN_DISABLED; } } }