Lines Matching refs:alpha2
91 .alpha2[0] = '0',
92 .alpha2[1] = '0',
244 .alpha2 = "00",
367 bool is_world_regdom(const char *alpha2) in is_world_regdom() argument
369 if (!alpha2) in is_world_regdom()
371 return alpha2[0] == '0' && alpha2[1] == '0'; in is_world_regdom()
374 static bool is_alpha2_set(const char *alpha2) in is_alpha2_set() argument
376 if (!alpha2) in is_alpha2_set()
378 return alpha2[0] && alpha2[1]; in is_alpha2_set()
381 static bool is_unknown_alpha2(const char *alpha2) in is_unknown_alpha2() argument
383 if (!alpha2) in is_unknown_alpha2()
389 return alpha2[0] == '9' && alpha2[1] == '9'; in is_unknown_alpha2()
392 static bool is_intersected_alpha2(const char *alpha2) in is_intersected_alpha2() argument
394 if (!alpha2) in is_intersected_alpha2()
401 return alpha2[0] == '9' && alpha2[1] == '8'; in is_intersected_alpha2()
404 static bool is_an_alpha2(const char *alpha2) in is_an_alpha2() argument
406 if (!alpha2) in is_an_alpha2()
408 return isalpha(alpha2[0]) && isalpha(alpha2[1]); in is_an_alpha2()
418 static bool regdom_changes(const char *alpha2) in regdom_changes() argument
424 return !alpha2_equal(r->alpha2, alpha2); in regdom_changes()
563 static int call_crda(const char *alpha2) in call_crda() argument
570 alpha2[0], alpha2[1]); in call_crda()
577 if (!is_world_regdom((char *) alpha2)) in call_crda()
579 alpha2[0], alpha2[1]); in call_crda()
595 static inline int call_crda(const char *alpha2) in call_crda() argument
605 u8 alpha2[2]; member
892 country->alpha2[0], country->alpha2[1]); in set_wmm_rule()
938 int reg_query_regdb_wmm(char *alpha2, int freq, struct ieee80211_reg_rule *rule) in reg_query_regdb_wmm() argument
951 if (alpha2_equal(alpha2, country->alpha2)) in reg_query_regdb_wmm()
975 regdom->alpha2[0] = country->alpha2[0]; in regdb_query_country()
976 regdom->alpha2[1] = country->alpha2[1]; in regdb_query_country()
1017 static int query_regdb(const char *alpha2) in query_regdb() argument
1029 if (alpha2_equal(alpha2, country->alpha2)) in query_regdb()
1081 static int query_regdb_file(const char *alpha2) in query_regdb_file() argument
1086 return query_regdb(alpha2); in query_regdb_file()
1088 alpha2 = kmemdup(alpha2, 2, GFP_KERNEL); in query_regdb_file()
1089 if (!alpha2) in query_regdb_file()
1094 (void *)alpha2, regdb_fw_cb); in query_regdb_file()
1135 request->alpha2[0] = current_regdomain->alpha2[0]; in reg_reload_regdb()
1136 request->alpha2[1] = current_regdomain->alpha2[1]; in reg_reload_regdb()
1151 if (query_regdb_file(request->alpha2) == 0) in reg_query_database()
1154 if (call_crda(request->alpha2) == 0) in reg_query_database()
1160 bool reg_is_valid_request(const char *alpha2) in reg_is_valid_request() argument
1167 return alpha2_equal(lr->alpha2, alpha2); in reg_is_valid_request()
1579 rd->alpha2[0] = '9'; in regdom_intersect()
1580 rd->alpha2[1] = '8'; in regdom_intersect()
2087 !regdom_changes(pending_request->alpha2)) in reg_ignore_cell_hint()
2146 !is_world_regdom(lr->alpha2)) { in ignore_reg_update()
2164 if (is_world_regdom(cr->alpha2) || (wr && is_world_regdom(wr->alpha2))) in reg_is_world_roaming()
2696 regdom_changes(lr->alpha2)) in __reg_process_hint_user()
2699 if (!regdom_changes(user_request->alpha2)) in __reg_process_hint_user()
2727 user_alpha2[0] = user_request->alpha2[0]; in reg_process_hint_user()
2728 user_alpha2[1] = user_request->alpha2[1]; in reg_process_hint_user()
2741 if (regdom_changes(driver_request->alpha2)) in __reg_process_hint_driver()
2752 !regdom_changes(driver_request->alpha2)) in __reg_process_hint_driver()
2829 if (regdom_changes(country_ie_request->alpha2)) in __reg_process_hint_country_ie()
2837 if (unlikely(!is_an_alpha2(country_ie_request->alpha2))) in __reg_process_hint_country_ie()
2852 if (regdom_changes(country_ie_request->alpha2)) in __reg_process_hint_country_ie()
2857 if (regdom_changes(country_ie_request->alpha2)) in __reg_process_hint_country_ie()
3153 request.alpha2[0] = regd->alpha2[0]; in reg_process_self_managed_hint()
3154 request.alpha2[1] = regd->alpha2[1]; in reg_process_self_managed_hint()
3186 request->alpha2[0] = toupper(request->alpha2[0]); in queue_regulatory_request()
3187 request->alpha2[1] = toupper(request->alpha2[1]); in queue_regulatory_request()
3200 static int regulatory_hint_core(const char *alpha2) in regulatory_hint_core() argument
3208 request->alpha2[0] = alpha2[0]; in regulatory_hint_core()
3209 request->alpha2[1] = alpha2[1]; in regulatory_hint_core()
3219 int regulatory_hint_user(const char *alpha2, in regulatory_hint_user() argument
3224 if (WARN_ON(!alpha2)) in regulatory_hint_user()
3227 if (!is_world_regdom(alpha2) && !is_an_alpha2(alpha2)) in regulatory_hint_user()
3235 request->alpha2[0] = alpha2[0]; in regulatory_hint_user()
3236 request->alpha2[1] = alpha2[1]; in regulatory_hint_user()
3293 int regulatory_hint(struct wiphy *wiphy, const char *alpha2) in regulatory_hint() argument
3297 if (WARN_ON(!alpha2 || !wiphy)) in regulatory_hint()
3308 request->alpha2[0] = alpha2[0]; in regulatory_hint()
3309 request->alpha2[1] = alpha2[1]; in regulatory_hint()
3324 char alpha2[2]; in regulatory_hint_country_ie() local
3339 alpha2[0] = country_ie[0]; in regulatory_hint_country_ie()
3340 alpha2[1] = country_ie[1]; in regulatory_hint_country_ie()
3363 request->alpha2[0] = alpha2[0]; in regulatory_hint_country_ie()
3364 request->alpha2[1] = alpha2[1]; in regulatory_hint_country_ie()
3378 static void restore_alpha2(char *alpha2, bool reset_user) in restore_alpha2() argument
3381 alpha2[0] = '9'; in restore_alpha2()
3382 alpha2[1] = '7'; in restore_alpha2()
3400 alpha2[0] = ieee80211_regdom[0]; in restore_alpha2()
3401 alpha2[1] = ieee80211_regdom[1]; in restore_alpha2()
3406 alpha2[0] = user_alpha2[0]; in restore_alpha2()
3407 alpha2[1] = user_alpha2[1]; in restore_alpha2()
3412 alpha2[0] = ieee80211_regdom[0]; in restore_alpha2()
3413 alpha2[1] = ieee80211_regdom[1]; in restore_alpha2()
3456 char alpha2[2]; in restore_regulatory_settings() local
3477 restore_alpha2(alpha2, reset_user); in restore_regulatory_settings()
3503 world_alpha2[0] = cfg80211_world_regdom->alpha2[0]; in restore_regulatory_settings()
3504 world_alpha2[1] = cfg80211_world_regdom->alpha2[1]; in restore_regulatory_settings()
3513 if (cached && (!is_an_alpha2(alpha2) || in restore_regulatory_settings()
3521 if (is_an_alpha2(alpha2) && in restore_regulatory_settings()
3522 !regulatory_hint_user(alpha2, NL80211_USER_REG_HINT_USER)) { in restore_regulatory_settings()
3545 if (is_an_alpha2(alpha2)) in restore_regulatory_settings()
3546 regulatory_hint_user(alpha2, NL80211_USER_REG_HINT_USER); in restore_regulatory_settings()
3746 if (is_intersected_alpha2(rd->alpha2)) { in print_regdomain()
3758 } else if (is_world_regdom(rd->alpha2)) { in print_regdomain()
3761 if (is_unknown_alpha2(rd->alpha2)) in print_regdomain()
3766 rd->alpha2[0], rd->alpha2[1]); in print_regdomain()
3769 rd->alpha2[0], rd->alpha2[1]); in print_regdomain()
3779 pr_debug("Regulatory domain: %c%c\n", rd->alpha2[0], rd->alpha2[1]); in print_regdomain_info()
3785 if (!is_world_regdom(rd->alpha2)) in reg_set_rd_core()
3796 if (!regdom_changes(rd->alpha2)) in reg_set_rd_user()
3801 rd->alpha2[0], rd->alpha2[1]); in reg_set_rd_user()
3830 if (is_world_regdom(rd->alpha2)) in reg_set_rd_driver()
3833 if (!regdom_changes(rd->alpha2)) in reg_set_rd_driver()
3838 rd->alpha2[0], rd->alpha2[1]); in reg_set_rd_driver()
3892 if (!is_alpha2_set(rd->alpha2) && !is_an_alpha2(rd->alpha2) && in reg_set_rd_country_ie()
3893 !is_unknown_alpha2(rd->alpha2)) in reg_set_rd_country_ie()
3904 rd->alpha2[0], rd->alpha2[1]); in reg_set_rd_country_ie()
3935 if (!reg_is_valid_request(rd->alpha2)) { in set_regdom()
4013 rd->alpha2[0], rd->alpha2[1])) { in __regulatory_set_wiphy_regd()
4265 err = regulatory_hint_core(cfg80211_world_regdom->alpha2); in regulatory_init_db()