Support iw reg set

This commit is contained in:
Rin Cat
2020-10-23 20:06:35 -04:00
parent a33122f8c0
commit 3a6f393add
3 changed files with 9 additions and 3 deletions

View File

@@ -877,6 +877,7 @@ exit:
#endif /* CONFIG_CUSTOMIZED_COUNTRY_CHPLAN_MAP or RTW_DEF_MODULE_REGULATORY_CERT */
static const struct country_chplan country_chplan_map[] = {
COUNTRY_CHPLAN_ENT("00", 0x7F, 1, 0x000), /* Unspecified */
COUNTRY_CHPLAN_ENT("AD", 0x26, 1, 0x000), /* Andorra */
COUNTRY_CHPLAN_ENT("AE", 0x35, 1, 0xFFB), /* United Arab Emirates */
COUNTRY_CHPLAN_ENT("AF", 0x42, 1, 0x000), /* Afghanistan */

View File

@@ -2328,9 +2328,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;