Support iw reg set

This commit is contained in:
Rin Cat 2020-10-23 20:06:35 -04:00 committed by Rin Cat (鈴猫)
parent 14b0ec64b5
commit 1dad7c3b66
No known key found for this signature in database
GPG Key ID: 40DCF18E97150795
2 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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;