From b9df378af3451eabdc96134b2fddb0bc49277bc3 Mon Sep 17 00:00:00 2001 From: fariouche Date: Sun, 16 Sep 2018 18:08:48 +0200 Subject: [PATCH] added regd flag to disable radar detection set default ht capab to 3 to enable 5GHz RX-STBC --- Makefile | 6 +++++- dkms.conf | 2 +- os_dep/linux/ioctl_cfg80211.c | 4 ++-- os_dep/linux/os_intfs.c | 2 +- os_dep/linux/wifi_regd.c | 3 ++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 0e9822e..3fd1c22 100755 --- a/Makefile +++ b/Makefile @@ -104,7 +104,7 @@ CONFIG_AP_WOWLAN = n ######### Notify SDIO Host Keep Power During Syspend ########## CONFIG_RTW_SDIO_PM_KEEP_POWER = y ###################### MP HW TX MODE FOR VHT ####################### -CONFIG_MP_VHT_HW_TX_MODE = n +CONFIG_MP_VHT_HW_TX_MODE = y ###################### Platform Related ####################### CONFIG_PLATFORM_I386_PC = y CONFIG_PLATFORM_ANDROID_X86 = n @@ -172,6 +172,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/dkms.conf b/dkms.conf index df0846a..5c3322b 100644 --- a/dkms.conf +++ b/dkms.conf @@ -1,5 +1,5 @@ PACKAGE_NAME="realtek-rtl88xxau" -PACKAGE_VERSION="5.2.20.2~20180829" +PACKAGE_VERSION="5.2.20.2~20180812" CLEAN="'make' clean" BUILT_MODULE_NAME[0]=88XXau PROCS_NUM=`nproc` diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 7701150..2145892 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -8880,12 +8880,12 @@ static void rtw_cfg80211_init_ht_capab_ex(_adapter *padapter case RF_2T2R: case RF_1T2R: - ht_cap->cap |= IEEE80211_HT_CAP_RX_STBC_1R;/* Only one spatial-stream STBC RX is supported */ + ht_cap->cap |= IEEE80211_HT_CAP_RX_STBC_2R;/* Only one spatial-stream STBC RX is supported */ break; case RF_3T3R: case RF_3T4R: case RF_4T4R: - ht_cap->cap |= IEEE80211_HT_CAP_RX_STBC_1R;/* Only one spatial-stream STBC RX is supported */ + ht_cap->cap |= IEEE80211_HT_CAP_RX_STBC_3R;/* Only one spatial-stream STBC RX is supported */ break; default: RTW_INFO("[warning] rf_type %d is not expected\n", rf_type); diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 7dc6ab5..3ac8635 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -174,7 +174,7 @@ int rtw_bw_mode = CONFIG_RTW_CUSTOMIZE_BWMODE; int rtw_bw_mode = 0x21; #endif int rtw_ampdu_enable = 1;/* for enable tx_ampdu , */ /* 0: disable, 0x1:enable */ -int rtw_rx_stbc = 1;/* 0: disable, bit(0):enable 2.4g, bit(1):enable 5g, default is set to enable 2.4GHZ for IOT issue with bufflao's AP at 5GHZ */ +int rtw_rx_stbc = 3;/* 0: disable, bit(0):enable 2.4g, bit(1):enable 5g, default is set to enable 2.4GHZ for IOT issue with bufflao's AP at 5GHZ */ #if (defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8822B)) && defined(CONFIG_PCI_HCI) int rtw_rx_ampdu_amsdu = 2;/* 0: disabled, 1:enabled, 2:auto . There is an IOT issu with DLINK DIR-629 when the flag turn on */ #else diff --git a/os_dep/linux/wifi_regd.c b/os_dep/linux/wifi_regd.c index c710b25..e1751ce 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 */