Lines Matching refs:alpha2
93 .alpha2[0] = '0',
94 .alpha2[1] = '0',
246 .alpha2 = "00",
369 bool is_world_regdom(const char *alpha2) in is_world_regdom() argument
371 if (!alpha2) in is_world_regdom()
373 return alpha2[0] == '0' && alpha2[1] == '0'; in is_world_regdom()
376 static bool is_alpha2_set(const char *alpha2) in is_alpha2_set() argument
378 if (!alpha2) in is_alpha2_set()
380 return alpha2[0] && alpha2[1]; in is_alpha2_set()
383 static bool is_unknown_alpha2(const char *alpha2) in is_unknown_alpha2() argument
385 if (!alpha2) in is_unknown_alpha2()
391 return alpha2[0] == '9' && alpha2[1] == '9'; in is_unknown_alpha2()
394 static bool is_intersected_alpha2(const char *alpha2) in is_intersected_alpha2() argument
396 if (!alpha2) in is_intersected_alpha2()
403 return alpha2[0] == '9' && alpha2[1] == '8'; in is_intersected_alpha2()
406 static bool is_an_alpha2(const char *alpha2) in is_an_alpha2() argument
408 if (!alpha2) in is_an_alpha2()
410 return isalpha(alpha2[0]) && isalpha(alpha2[1]); in is_an_alpha2()
420 static bool regdom_changes(const char *alpha2) in regdom_changes() argument
426 return !alpha2_equal(r->alpha2, alpha2); in regdom_changes()
565 static int call_crda(const char *alpha2) in call_crda() argument
572 alpha2[0], alpha2[1]); in call_crda()
579 if (!is_world_regdom((char *) alpha2)) in call_crda()
581 alpha2[0], alpha2[1]); in call_crda()
597 static inline int call_crda(const char *alpha2) in call_crda() argument
607 u8 alpha2[2]; member
858 country->alpha2[0], country->alpha2[1]); in set_wmm_rule()
904 int reg_query_regdb_wmm(char *alpha2, int freq, struct ieee80211_reg_rule *rule) in reg_query_regdb_wmm() argument
917 if (alpha2_equal(alpha2, country->alpha2)) in reg_query_regdb_wmm()
941 regdom->alpha2[0] = country->alpha2[0]; in regdb_query_country()
942 regdom->alpha2[1] = country->alpha2[1]; in regdb_query_country()
983 static int query_regdb(const char *alpha2) in query_regdb() argument
995 if (alpha2_equal(alpha2, country->alpha2)) in query_regdb()
1049 static int query_regdb_file(const char *alpha2) in query_regdb_file() argument
1056 return query_regdb(alpha2); in query_regdb_file()
1058 alpha2 = kmemdup(alpha2, 2, GFP_KERNEL); in query_regdb_file()
1059 if (!alpha2) in query_regdb_file()
1064 (void *)alpha2, regdb_fw_cb); in query_regdb_file()
1066 kfree(alpha2); in query_regdb_file()
1109 request->alpha2[0] = current_regdomain->alpha2[0]; in reg_reload_regdb()
1110 request->alpha2[1] = current_regdomain->alpha2[1]; in reg_reload_regdb()
1125 if (query_regdb_file(request->alpha2) == 0) in reg_query_database()
1128 if (call_crda(request->alpha2) == 0) in reg_query_database()
1134 bool reg_is_valid_request(const char *alpha2) in reg_is_valid_request() argument
1141 return alpha2_equal(lr->alpha2, alpha2); in reg_is_valid_request()
1556 rd->alpha2[0] = '9'; in regdom_intersect()
1557 rd->alpha2[1] = '8'; in regdom_intersect()
2092 !regdom_changes(pending_request->alpha2)) in reg_ignore_cell_hint()
2151 !is_world_regdom(lr->alpha2)) { in ignore_reg_update()
2169 if (is_world_regdom(cr->alpha2) || (wr && is_world_regdom(wr->alpha2))) in reg_is_world_roaming()
2731 regdom_changes(lr->alpha2)) in __reg_process_hint_user()
2734 if (!regdom_changes(user_request->alpha2)) in __reg_process_hint_user()
2765 user_alpha2[0] = user_request->alpha2[0]; in reg_process_hint_user()
2766 user_alpha2[1] = user_request->alpha2[1]; in reg_process_hint_user()
2779 if (regdom_changes(driver_request->alpha2)) in __reg_process_hint_driver()
2790 !regdom_changes(driver_request->alpha2)) in __reg_process_hint_driver()
2867 if (regdom_changes(country_ie_request->alpha2)) in __reg_process_hint_country_ie()
2875 if (unlikely(!is_an_alpha2(country_ie_request->alpha2))) in __reg_process_hint_country_ie()
2890 if (regdom_changes(country_ie_request->alpha2)) in __reg_process_hint_country_ie()
2895 if (regdom_changes(country_ie_request->alpha2)) in __reg_process_hint_country_ie()
3191 request.alpha2[0] = regd->alpha2[0]; in reg_process_self_managed_hint()
3192 request.alpha2[1] = regd->alpha2[1]; in reg_process_self_managed_hint()
3227 request->alpha2[0] = toupper(request->alpha2[0]); in queue_regulatory_request()
3228 request->alpha2[1] = toupper(request->alpha2[1]); in queue_regulatory_request()
3241 static int regulatory_hint_core(const char *alpha2) in regulatory_hint_core() argument
3249 request->alpha2[0] = alpha2[0]; in regulatory_hint_core()
3250 request->alpha2[1] = alpha2[1]; in regulatory_hint_core()
3260 int regulatory_hint_user(const char *alpha2, in regulatory_hint_user() argument
3265 if (WARN_ON(!alpha2)) in regulatory_hint_user()
3268 if (!is_world_regdom(alpha2) && !is_an_alpha2(alpha2)) in regulatory_hint_user()
3276 request->alpha2[0] = alpha2[0]; in regulatory_hint_user()
3277 request->alpha2[1] = alpha2[1]; in regulatory_hint_user()
3332 int regulatory_hint(struct wiphy *wiphy, const char *alpha2) in regulatory_hint() argument
3336 if (WARN_ON(!alpha2 || !wiphy)) in regulatory_hint()
3347 request->alpha2[0] = alpha2[0]; in regulatory_hint()
3348 request->alpha2[1] = alpha2[1]; in regulatory_hint()
3363 char alpha2[2]; in regulatory_hint_country_ie() local
3378 alpha2[0] = country_ie[0]; in regulatory_hint_country_ie()
3379 alpha2[1] = country_ie[1]; in regulatory_hint_country_ie()
3402 request->alpha2[0] = alpha2[0]; in regulatory_hint_country_ie()
3403 request->alpha2[1] = alpha2[1]; in regulatory_hint_country_ie()
3417 static void restore_alpha2(char *alpha2, bool reset_user) in restore_alpha2() argument
3420 alpha2[0] = '9'; in restore_alpha2()
3421 alpha2[1] = '7'; in restore_alpha2()
3439 alpha2[0] = ieee80211_regdom[0]; in restore_alpha2()
3440 alpha2[1] = ieee80211_regdom[1]; in restore_alpha2()
3445 alpha2[0] = user_alpha2[0]; in restore_alpha2()
3446 alpha2[1] = user_alpha2[1]; in restore_alpha2()
3451 alpha2[0] = ieee80211_regdom[0]; in restore_alpha2()
3452 alpha2[1] = ieee80211_regdom[1]; in restore_alpha2()
3495 char alpha2[2]; in restore_regulatory_settings() local
3516 restore_alpha2(alpha2, reset_user); in restore_regulatory_settings()
3542 world_alpha2[0] = cfg80211_world_regdom->alpha2[0]; in restore_regulatory_settings()
3543 world_alpha2[1] = cfg80211_world_regdom->alpha2[1]; in restore_regulatory_settings()
3552 if (cached && (!is_an_alpha2(alpha2) || in restore_regulatory_settings()
3560 if (is_an_alpha2(alpha2) && in restore_regulatory_settings()
3561 !regulatory_hint_user(alpha2, NL80211_USER_REG_HINT_USER)) { in restore_regulatory_settings()
3584 if (is_an_alpha2(alpha2)) in restore_regulatory_settings()
3585 regulatory_hint_user(alpha2, NL80211_USER_REG_HINT_USER); in restore_regulatory_settings()
3783 if (is_intersected_alpha2(rd->alpha2)) { in print_regdomain()
3795 } else if (is_world_regdom(rd->alpha2)) { in print_regdomain()
3798 if (is_unknown_alpha2(rd->alpha2)) in print_regdomain()
3803 rd->alpha2[0], rd->alpha2[1]); in print_regdomain()
3806 rd->alpha2[0], rd->alpha2[1]); in print_regdomain()
3816 pr_debug("Regulatory domain: %c%c\n", rd->alpha2[0], rd->alpha2[1]); in print_regdomain_info()
3822 if (!is_world_regdom(rd->alpha2)) in reg_set_rd_core()
3833 if (!regdom_changes(rd->alpha2)) in reg_set_rd_user()
3838 rd->alpha2[0], rd->alpha2[1]); in reg_set_rd_user()
3867 if (is_world_regdom(rd->alpha2)) in reg_set_rd_driver()
3870 if (!regdom_changes(rd->alpha2)) in reg_set_rd_driver()
3875 rd->alpha2[0], rd->alpha2[1]); in reg_set_rd_driver()
3928 if (!is_alpha2_set(rd->alpha2) && !is_an_alpha2(rd->alpha2) && in reg_set_rd_country_ie()
3929 !is_unknown_alpha2(rd->alpha2)) in reg_set_rd_country_ie()
3940 rd->alpha2[0], rd->alpha2[1]); in reg_set_rd_country_ie()
3971 if (!reg_is_valid_request(rd->alpha2)) { in set_regdom()
4049 rd->alpha2[0], rd->alpha2[1])) { in __regulatory_set_wiphy_regd()
4315 err = regulatory_hint_core(cfg80211_world_regdom->alpha2); in regulatory_init_db()