From 24585a51d26a6a6f2d823e2cb15d1954219df732 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Mon, 2 Jul 2018 19:32:58 +0200 Subject: [PATCH] Added switch to turn ON/OFF regdomain settings --- Makefile | 9 +++++++++ os_dep/linux/wifi_regd.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 27387ae..9b1df35 100755 --- a/Makefile +++ b/Makefile @@ -69,6 +69,11 @@ CONFIG_REDUCE_TX_CPU_LOADING = n CONFIG_BR_EXT = y CONFIG_TDLS = n CONFIG_WIFI_MONITOR = y +# If you are setting up AP (e.g. by hostapd) in 802.11ac mode, you may have to choose 'y' below. +# Otherwise some channels may be flagged 'NO-IR' (i.e. Passive scanning) by the driver. +# Please check your country's regulatory domain first, +# to see whether active scanning is permitted by law/regulations on the desired channels. +CONFIG_DISABLE_REGD_C=y CONFIG_MCC_MODE = n CONFIG_APPEND_VENDOR_IE_ENABLE = n CONFIG_RTW_NAPI = y @@ -160,6 +165,10 @@ CONFIG_DRVEXT_MODULE = n export TopDIR ?= $(shell pwd) ########### COMMON ################################# +ifeq ($(CONFIG_DISABLE_REGD_C), y) +EXTRA_CFLAGS += -DCONFIG_DISABLE_REGD_C +endif + ifeq ($(CONFIG_GSPI_HCI), y) HCI_NAME = gspi endif diff --git a/os_dep/linux/wifi_regd.c b/os_dep/linux/wifi_regd.c index 1edbcae..73025cc 100644 --- a/os_dep/linux/wifi_regd.c +++ b/os_dep/linux/wifi_regd.c @@ -529,6 +529,7 @@ static struct country_code_to_enum_rd *_rtw_regd_find_country(u16 countrycode) int rtw_regd_init(_adapter *padapter) { +#ifndef CONFIG_DISABLE_REGD_C struct wiphy *wiphy = padapter->rtw_wdev->wiphy; #if 0 @@ -547,7 +548,7 @@ int rtw_regd_init(_adapter *padapter) #endif _rtw_regd_init_wiphy(NULL, wiphy); - +#endif return 0; } #endif /* CONFIG_IOCTL_CFG80211 */