diff --git a/Makefile b/Makefile index ee6f4e6..dad5057 100644 --- a/Makefile +++ b/Makefile @@ -90,6 +90,7 @@ CONFIG_IP_R_MONITOR = n #arp VOQ and high rate # user priority mapping rule : tos, dscp CONFIG_RTW_UP_MAPPING_RULE = tos CONFIG_RTW_MBO = n +CONFIG_RTW_IOCTL_SET_COUNTRY = y ########################## Android ########################### # CONFIG_RTW_ANDROID - 0: no Android, 4/5/6/7/8/9/10/11 : Android version CONFIG_RTW_ANDROID = 0 @@ -1329,6 +1330,10 @@ EXTRA_CFLAGS += -DCONFIG_RTW_MBO -DCONFIG_RTW_80211K -DCONFIG_RTW_WNM -DCONFIG_R EXTRA_CFLAGS += -DCONFIG_RTW_80211R endif +ifeq ($(CONFIG_RTW_IOCTL_SET_COUNTRY), y) +EXTRA_CFLAGS += -DCONFIG_RTW_IOCTL_SET_COUNTRY +endif + ifeq ($(CONFIG_PLATFORM_I386_PC), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 7bcc6f4..f9d755f 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -1933,9 +1933,9 @@ inline u8 rtw_set_chplan_cmd(_adapter *adapter, int flags, u8 chplan, u8 swconfi inline u8 rtw_set_country_cmd(_adapter *adapter, int flags, const char *country_code, u8 swconfig) { const struct country_chplan *ent; - - if (is_alpha(country_code[0]) == _FALSE - || is_alpha(country_code[1]) == _FALSE + if ((is_alpha(country_code[0]) == _FALSE + || is_alpha(country_code[1]) == _FALSE) + && (strncmp(country_code, "00", 2) != 0) ) { RTW_PRINT("%s input country_code is not alpha2\n", __func__); return _FAIL;