Lines Matching refs:regd
150 return rcu_dereference_check(wiphy->regd, in get_wiphy_regdom()
173 const struct ieee80211_regdomain *regd = NULL; in reg_get_dfs_region() local
178 regd = get_cfg80211_regdom(); in reg_get_dfs_region()
179 dfs_region = regd->dfs_region; in reg_get_dfs_region()
193 if (wiphy_regd->dfs_region == regd->dfs_region) in reg_get_dfs_region()
199 reg_dfs_region_str(regd->dfs_region)); in reg_get_dfs_region()
450 struct ieee80211_regdomain *regd; in reg_copy_regd() local
453 regd = kzalloc(struct_size(regd, reg_rules, src_regd->n_reg_rules), in reg_copy_regd()
455 if (!regd) in reg_copy_regd()
458 memcpy(regd, src_regd, sizeof(struct ieee80211_regdomain)); in reg_copy_regd()
461 memcpy(®d->reg_rules[i], &src_regd->reg_rules[i], in reg_copy_regd()
464 return regd; in reg_copy_regd()
1153 wiphy->regd) in reg_get_regdomain()
1598 const struct ieee80211_regdomain *regd, u32 bw) in freq_reg_info_regd() argument
1604 if (!regd) in freq_reg_info_regd()
1607 for (i = 0; i < regd->n_reg_rules; i++) { in freq_reg_info_regd()
1611 rr = ®d->reg_rules[i]; in freq_reg_info_regd()
1637 const struct ieee80211_regdomain *regd = reg_get_regdomain(wiphy); in __freq_reg_info() local
1644 reg_rule = freq_reg_info_regd(center_freq, regd, bw); in __freq_reg_info()
1679 static uint32_t reg_rule_to_chan_bw_flags(const struct ieee80211_regdomain *regd, in reg_rule_to_chan_bw_flags() argument
1693 max_bandwidth_khz = reg_get_max_bandwidth(regd, reg_rule); in reg_rule_to_chan_bw_flags()
1771 const struct ieee80211_regdomain *regd; in handle_channel_single_rule() local
1773 regd = reg_get_regdomain(wiphy); in handle_channel_single_rule()
1776 bw_flags = reg_rule_to_chan_bw_flags(regd, reg_rule, chan); in handle_channel_single_rule()
1848 const struct ieee80211_regdomain *regd; in handle_channel_adjacent_rules() local
1850 regd = reg_get_regdomain(wiphy); in handle_channel_adjacent_rules()
1854 bw_flags1 = reg_rule_to_chan_bw_flags(regd, rrule1, chan); in handle_channel_adjacent_rules()
1855 bw_flags2 = reg_rule_to_chan_bw_flags(regd, rrule2, chan); in handle_channel_adjacent_rules()
2125 if (wiphy_strict_alpha2_regd(wiphy) && !wiphy->regd && in ignore_reg_update()
2257 const struct ieee80211_regdomain *regd; in reg_process_ht_flags_channel() local
2280 regd = get_wiphy_regdom(wiphy); in reg_process_ht_flags_channel()
2281 if (regd) { in reg_process_ht_flags_channel()
2284 regd, MHZ_TO_KHZ(20)); in reg_process_ht_flags_channel()
2529 const struct ieee80211_regdomain *regd, in handle_channel_custom() argument
2539 reg_rule = freq_reg_info_regd(center_freq_khz, regd, bw); in handle_channel_custom()
2557 bw_flags = reg_rule_to_chan_bw_flags(regd, reg_rule, chan); in handle_channel_custom()
2586 const struct ieee80211_regdomain *regd) in handle_band_custom() argument
2599 handle_channel_custom(wiphy, &sband->channels[i], regd, in handle_band_custom()
2605 const struct ieee80211_regdomain *regd) in wiphy_apply_custom_regulatory() argument
2618 handle_band_custom(wiphy, wiphy->bands[band], regd); in wiphy_apply_custom_regulatory()
2627 new_regd = reg_copy_regd(regd); in wiphy_apply_custom_regulatory()
2635 rcu_assign_pointer(wiphy->regd, new_regd); in wiphy_apply_custom_regulatory()
2784 const struct ieee80211_regdomain *regd, *tmp; in reg_process_hint_driver() local
2796 regd = reg_copy_regd(get_cfg80211_regdom()); in reg_process_hint_driver()
2797 if (IS_ERR(regd)) in reg_process_hint_driver()
2803 rcu_assign_pointer(wiphy->regd, regd); in reg_process_hint_driver()
2930 wiphy1_regd = rcu_dereference(wiphy1->regd); in reg_dfs_domain_same()
2934 wiphy2_regd = rcu_dereference(wiphy2->regd); in reg_dfs_domain_same()
3140 const struct ieee80211_regdomain *regd; in reg_process_self_managed_hint() local
3148 regd = rdev->requested_regd; in reg_process_self_managed_hint()
3152 if (!regd) in reg_process_self_managed_hint()
3156 rcu_assign_pointer(wiphy->regd, regd); in reg_process_self_managed_hint()
3160 handle_band_custom(wiphy, wiphy->bands[band], regd); in reg_process_self_managed_hint()
3165 request.alpha2[0] = regd->alpha2[0]; in reg_process_self_managed_hint()
3166 request.alpha2[1] = regd->alpha2[1]; in reg_process_self_managed_hint()
3840 const struct ieee80211_regdomain *regd; in reg_set_rd_driver() local
3865 if (request_wiphy->regd) { in reg_set_rd_driver()
3870 regd = reg_copy_regd(rd); in reg_set_rd_driver()
3871 if (IS_ERR(regd)) { in reg_set_rd_driver()
3873 return PTR_ERR(regd); in reg_set_rd_driver()
3876 rcu_assign_pointer(request_wiphy->regd, regd); in reg_set_rd_driver()
3892 rcu_assign_pointer(request_wiphy->regd, rd); in reg_set_rd_driver()
4015 const struct ieee80211_regdomain *regd; in __regulatory_set_wiphy_regd() local
4033 regd = reg_copy_regd(rd); in __regulatory_set_wiphy_regd()
4034 if (IS_ERR(regd)) in __regulatory_set_wiphy_regd()
4035 return PTR_ERR(regd); in __regulatory_set_wiphy_regd()
4041 rdev->requested_regd = regd; in __regulatory_set_wiphy_regd()
4116 RCU_INIT_POINTER(wiphy->regd, NULL); in wiphy_regulatory_deregister()
4181 const struct ieee80211_regdomain *regd = NULL; in regulatory_pre_cac_allowed() local
4187 regd = rcu_dereference(cfg80211_regdomain); in regulatory_pre_cac_allowed()
4188 wiphy_regd = rcu_dereference(wiphy->regd); in regulatory_pre_cac_allowed()
4190 if (regd->dfs_region == NL80211_DFS_ETSI) in regulatory_pre_cac_allowed()
4198 if (regd->dfs_region == wiphy_regd->dfs_region && in regulatory_pre_cac_allowed()