/* * rtw_set_country - * @adapter: pointer to _adapter structure * @country_code: string of country code * * Return _SUCCESS or _FAIL */ int rtw_set_country(_adapter *adapter, const char *country_code) { int channel_plan = RT_CHANNEL_DOMAIN_FCC; //TODO: should have a table to match country code and RT_CHANNEL_DOMAIN //TODO: should consider 2-character and 3-character counter code if(0 == strcmp(country_code, "US")) channel_plan = RT_CHANNEL_DOMAIN_FCC; else if(0 == strcmp(country_code, "EU")) channel_plan = RT_CHANNEL_DOMAIN_ETSI; else if(0 == strcmp(country_code, "JP")) channel_plan = RT_CHANNEL_DOMAIN_MKK; else DBG_871X("%s unknown country_code:%s\n", __FUNCTION__, country_code); return rtw_set_channel_plan(adapter, channel_plan); }
/* * rtw_set_country - * @adapter: pointer to _adapter structure * @country_code: string of country code * * Return _SUCCESS or _FAIL */ int rtw_set_country(_adapter *adapter, const char *country_code) { int channel_plan = RT_CHANNEL_DOMAIN_WORLD_WIDE_5G; DBG_88E("%s country_code:%s\n", __func__, country_code); /* TODO: should have a table to match country code and RT_CHANNEL_DOMAIN */ /* TODO: should consider 2-character and 3-character country code */ if (0 == strcmp(country_code, "US")) channel_plan = RT_CHANNEL_DOMAIN_FCC; else if (0 == strcmp(country_code, "EU")) channel_plan = RT_CHANNEL_DOMAIN_ETSI; else if (0 == strcmp(country_code, "JP")) channel_plan = RT_CHANNEL_DOMAIN_MKK; else if (0 == strcmp(country_code, "CN")) channel_plan = RT_CHANNEL_DOMAIN_CHINA; else DBG_88E("%s unknown country_code:%s\n", __func__, country_code); return rtw_set_channel_plan(adapter, channel_plan); }