/openbmc/linux/drivers/net/wireless/realtek/rtlwifi/ |
H A D | regd.c | 335 const struct ieee80211_regdomain *regd; in _rtl_regd_init_wiphy() local 342 regd = _rtl_regdomain_select(reg); in _rtl_regd_init_wiphy() 343 wiphy_apply_custom_regulatory(wiphy, regd); in _rtl_regd_init_wiphy() 393 rtlpriv->regd.country_code = in rtl_regd_init() 398 rtlpriv->efuse.channel_plan, rtlpriv->regd.country_code); in rtl_regd_init() 400 if (rtlpriv->regd.country_code >= COUNTRY_CODE_MAX) { in rtl_regd_init() 404 rtlpriv->regd.country_code = COUNTRY_CODE_WORLD_WIDE_13; in rtl_regd_init() 407 country = _rtl_regd_find_country(rtlpriv->regd.country_code); in rtl_regd_init() 410 rtlpriv->regd.alpha2[0] = country->iso_name[0]; in rtl_regd_init() 411 rtlpriv->regd.alpha2[1] = country->iso_name[1]; in rtl_regd_init() [all …]
|
H A D | Makefile | 11 regd.o \
|
/openbmc/linux/drivers/net/wireless/ath/ath12k/ |
H A D | reg.c | 33 const struct ieee80211_regdomain *regd; in ath12k_regdom_changes() local 35 regd = rcu_dereference_rtnl(ar->hw->wiphy->regd); in ath12k_regdom_changes() 40 if (!regd) in ath12k_regdom_changes() 43 return memcmp(regd->alpha2, alpha2, 2) != 0; in ath12k_regdom_changes() 202 struct ieee80211_regdomain *regd, *regd_copy = NULL; in ath12k_regd_update() local 218 regd = ab->default_regd[pdev_id]; in ath12k_regd_update() 222 regd = (struct ieee80211_regdomain *)&ath12k_world_regd; in ath12k_regd_update() 225 regd = ab->new_regd[pdev_id]; in ath12k_regd_update() 228 if (!regd) { in ath12k_regd_update() 234 regd_len = sizeof(*regd) + (regd->n_reg_rules * in ath12k_regd_update() [all …]
|
/openbmc/linux/drivers/net/wireless/ath/ath11k/ |
H A D | reg.c | 34 const struct ieee80211_regdomain *regd; in ath11k_regdom_changes() local 36 regd = rcu_dereference_rtnl(ar->hw->wiphy->regd); in ath11k_regdom_changes() 41 if (!regd) in ath11k_regdom_changes() 44 return memcmp(regd->alpha2, alpha2, 2) != 0; in ath11k_regdom_changes() 244 struct ieee80211_regdomain *regd, *regd_copy = NULL; in ath11k_regd_update() local 255 regd = ab->new_regd[pdev_id]; in ath11k_regd_update() 263 regd = ab->default_regd[pdev_id]; in ath11k_regd_update() 267 regd = (struct ieee80211_regdomain *)&ath11k_world_regd; in ath11k_regd_update() 271 if (!regd) { in ath11k_regd_update() 277 regd_len = sizeof(*regd) + (regd->n_reg_rules * in ath11k_regd_update() [all …]
|
/openbmc/linux/net/wireless/ |
H A D | reg.c | 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() 449 struct ieee80211_regdomain *regd; in reg_copy_regd() local 452 regd = kzalloc(struct_size(regd, reg_rules, src_regd->n_reg_rules), in reg_copy_regd() 454 if (!regd) in reg_copy_regd() 457 memcpy(regd, src_regd, sizeof(struct ieee80211_regdomain)); in reg_copy_regd() [all …]
|
/openbmc/linux/drivers/net/wireless/realtek/rtw88/ |
H A D | phy.c | 151 switch (rtwdev->regd.dfs_region) { in rtw_phy_adaptivity_set_mode() 1529 static void rtw_phy_set_tx_power_limit(struct rtw_dev *rtwdev, u8 regd, u8 band, in rtw_phy_set_tx_power_limit() argument 1541 if (regd >= RTW_REGD_MAX || bw >= RTW_CHANNEL_WIDTH_MAX || in rtw_phy_set_tx_power_limit() 1545 regd, band, bw, rs, ch_idx, pwr_limit); in rtw_phy_set_tx_power_limit() 1550 hal->tx_pwr_limit_2g[regd][bw][rs][ch_idx] = pwr_limit; in rtw_phy_set_tx_power_limit() 1555 hal->tx_pwr_limit_5g[regd][bw][rs][ch_idx] = pwr_limit; in rtw_phy_set_tx_power_limit() 1564 rtw_xref_5g_txpwr_lmt(struct rtw_dev *rtwdev, u8 regd, in rtw_xref_5g_txpwr_lmt() argument 1569 s8 lmt_ht = hal->tx_pwr_limit_5g[regd][bw][rs_ht][ch_idx]; in rtw_xref_5g_txpwr_lmt() 1570 s8 lmt_vht = hal->tx_pwr_limit_5g[regd][bw][rs_vht][ch_idx]; in rtw_xref_5g_txpwr_lmt() 1576 hal->tx_pwr_limit_5g[regd][bw][rs_ht][ch_idx] = lmt_vht; in rtw_xref_5g_txpwr_lmt() [all …]
|
H A D | regd.c | 19 const struct rtw_regd *__r = &__d->regd; \ 348 rtwdev->regd.state = RTW_REGD_STATE_PROGRAMMED; in rtw_regd_init() 357 rtwdev->regd.state = RTW_REGD_STATE_WORLDWIDE; in rtw_regd_init() 360 rtwdev->regd.regulatory = &rtw_reg_ww; in rtw_regd_init() 361 rtwdev->regd.dfs_region = NL80211_DFS_UNSET; in rtw_regd_init() 362 rtw_dbg_regd_dump(rtwdev, "regd init state %d: ", rtwdev->regd.state); in rtw_regd_init() 377 if (rtwdev->regd.state == RTW_REGD_STATE_PROGRAMMED) { in rtw_regd_hint() 456 return rtw_regd_handler[rtwdev->regd.state](rtwdev, next_regd, request); in rtw_regd_state_hdl() 472 rtwdev->regd.state, in rtw_regd_notifier() 480 rtwdev->regd.state, next_regd.state); in rtw_regd_notifier() [all …]
|
H A D | phy.h | 47 enum rtw_bandwidth bw, u8 channel, u8 regd); 69 u8 regd; member 156 u8 rate, u8 bw, u8 ch, u8 regd,
|
H A D | regd.h | 70 bool rtw_regd_has_alt(u8 regd, u8 *regd_alt);
|
H A D | debug.c | 633 static const char *rtw_get_regd_string(u8 regd) in rtw_get_regd_string() argument 635 switch (regd) { in rtw_get_regd_string() 657 u8 path, rate, bw, ch, regd; in rtw_debugfs_get_tx_pwr_tbl() local 663 regd = rtw_regd_get(rtwdev); in rtw_debugfs_get_tx_pwr_tbl() 667 seq_printf(m, "regulatory: %s\n", rtw_get_regd_string(regd)); in rtw_debugfs_get_tx_pwr_tbl() 687 ch, regd, &pwr_param); in rtw_debugfs_get_tx_pwr_tbl()
|
/openbmc/linux/drivers/net/wireless/intel/iwlwifi/mvm/ |
H A D | nvm.c | 547 struct ieee80211_regdomain *regd; in iwl_mvm_init_mcc() local 580 regd = iwl_mvm_get_current_regdomain(mvm, NULL); in iwl_mvm_init_mcc() 581 if (IS_ERR_OR_NULL(regd)) in iwl_mvm_init_mcc() 586 kfree(regd); in iwl_mvm_init_mcc() 587 regd = iwl_mvm_get_regdomain(mvm->hw->wiphy, mcc, in iwl_mvm_init_mcc() 589 if (IS_ERR_OR_NULL(regd)) in iwl_mvm_init_mcc() 593 retval = regulatory_set_wiphy_regd_sync(mvm->hw->wiphy, regd); in iwl_mvm_init_mcc() 594 kfree(regd); in iwl_mvm_init_mcc() 605 struct ieee80211_regdomain *regd; in iwl_mvm_rx_chub_update_mcc() local 626 regd = iwl_mvm_get_regdomain(mvm->hw->wiphy, mcc, src, NULL); in iwl_mvm_rx_chub_update_mcc() [all …]
|
H A D | mac80211.c | 108 struct ieee80211_regdomain *regd = NULL; in iwl_mvm_get_regdomain() local 136 regd = iwl_parse_nvm_mcc_info(mvm->trans->dev, mvm->cfg, in iwl_mvm_get_regdomain() 144 if (IS_ERR_OR_NULL(regd)) { in iwl_mvm_get_regdomain() 146 PTR_ERR_OR_ZERO(regd)); in iwl_mvm_get_regdomain() 151 regd->alpha2, regd->alpha2[0], regd->alpha2[1], src_id); in iwl_mvm_get_regdomain() 159 return regd; in iwl_mvm_get_regdomain() 165 struct ieee80211_regdomain *regd; in iwl_mvm_update_changed_regdom() local 170 regd = iwl_mvm_get_current_regdomain(mvm, &changed); in iwl_mvm_update_changed_regdom() 171 if (!IS_ERR_OR_NULL(regd)) { in iwl_mvm_update_changed_regdom() 174 regulatory_set_wiphy_regd(mvm->hw->wiphy, regd); in iwl_mvm_update_changed_regdom() [all …]
|
/openbmc/linux/drivers/staging/rtl8723bs/os_dep/ |
H A D | wifi_regd.c | 123 const struct ieee80211_regdomain *regd; in _rtw_regd_init_wiphy() local 131 regd = _rtw_regdomain_select(reg); in _rtw_regd_init_wiphy() 132 wiphy_apply_custom_regulatory(wiphy, regd); in _rtw_regd_init_wiphy()
|
/openbmc/linux/drivers/net/wireless/ath/ |
H A D | regd.c | 198 static inline bool is_wwr_sku(u16 regd) in is_wwr_sku() argument 200 return ((regd & COUNTRY_ERD_FLAG) != COUNTRY_ERD_FLAG) && in is_wwr_sku() 201 (((regd & WORLD_SKU_MASK) == WORLD_SKU_PREFIX) || in is_wwr_sku() 202 (regd == WORLD)); in is_wwr_sku() 640 const struct ieee80211_regdomain *regd; in ath_regd_init_wiphy() local 651 regd = ath_world_regdomain(reg); in ath_regd_init_wiphy() 659 regd = ath_default_world_regdomain(); in ath_regd_init_wiphy() 662 wiphy_apply_custom_regulatory(wiphy, regd); in ath_regd_init_wiphy()
|
H A D | Makefile | 16 regd.o \
|
/openbmc/linux/drivers/net/wireless/marvell/mwifiex/ |
H A D | sta_cmdresp.c | 1045 struct ieee80211_regdomain *regd; in mwifiex_create_custom_regdomain() local 1055 regd = kzalloc(struct_size(regd, reg_rules, num_chan), GFP_KERNEL); in mwifiex_create_custom_regdomain() 1056 if (!regd) in mwifiex_create_custom_regdomain() 1065 kfree(regd); in mwifiex_create_custom_regdomain() 1096 rule = ®d->reg_rules[valid_rules - 1]; in mwifiex_create_custom_regdomain() 1119 regd->n_reg_rules = valid_rules; in mwifiex_create_custom_regdomain() 1120 regd->alpha2[0] = '9'; in mwifiex_create_custom_regdomain() 1121 regd->alpha2[1] = '9'; in mwifiex_create_custom_regdomain() 1123 return regd; in mwifiex_create_custom_regdomain() 1133 struct ieee80211_regdomain *regd; in mwifiex_ret_chan_region_cfg() local [all …]
|
/openbmc/linux/drivers/net/wireless/realtek/rtw89/ |
H A D | regd.c | 272 static bool rtw89_regd_is_ww(const struct rtw89_regd *regd) in rtw89_regd_is_ww() argument 274 return regd == &rtw89_ww_regd; in rtw89_regd_is_ww() 414 rtwdev->regulatory.regd = chip_regd; in rtw89_regd_init() 420 rtwdev->regulatory.regd->alpha2); in rtw89_regd_init() 428 rtw89_debug_regd(rtwdev, rtwdev->regulatory.regd, in rtw89_regd_init() 437 rtwdev->regulatory.regd = rtw89_regd_find_reg_by_name(request->alpha2); in rtw89_regd_notifier_apply() 443 !rtw89_regd_is_ww(rtwdev->regulatory.regd)) in rtw89_regd_notifier_apply() 457 if (wiphy->regd) { in rtw89_regd_notifier() 463 rtw89_debug_regd(rtwdev, rtwdev->regulatory.regd, in rtw89_regd_notifier()
|
H A D | Makefile | 11 regd.o \
|
/openbmc/linux/drivers/net/wireless/broadcom/brcm80211/brcmsmac/ |
H A D | channel.c | 203 const struct brcms_regd *regd = NULL; in brcms_world_regd() local 208 regd = &cntry_locales[i]; in brcms_world_regd() 213 return regd; in brcms_world_regd() 310 const struct brcms_regd *regd) in brcms_c_set_country() argument 740 const struct brcms_regd *regd = wlc->cmi->world_regd; in brcms_c_regd_init() local 769 wiphy_apply_custom_regulatory(wlc->wiphy, regd->regdomain); in brcms_c_regd_init()
|
/openbmc/linux/drivers/net/wireless/intel/iwlwifi/ |
H A D | iwl-nvm-parse.c | 1625 struct ieee80211_regdomain *regd, *copy_rd; in iwl_parse_nvm_mcc_info() local 1659 regd = kzalloc(struct_size(regd, reg_rules, num_of_ch), GFP_KERNEL); in iwl_parse_nvm_mcc_info() 1660 if (!regd) in iwl_parse_nvm_mcc_info() 1664 regd->alpha2[0] = fw_mcc >> 8; in iwl_parse_nvm_mcc_info() 1665 regd->alpha2[1] = fw_mcc & 0xff; in iwl_parse_nvm_mcc_info() 1694 rule = ®d->reg_rules[valid_rules - 1]; in iwl_parse_nvm_mcc_info() 1723 reg_query_regdb_wmm(regd->alpha2, center_freq, rule); in iwl_parse_nvm_mcc_info() 1736 rule = ®d->reg_rules[valid_rules - 1]; in iwl_parse_nvm_mcc_info() 1745 regd->n_reg_rules = valid_rules; in iwl_parse_nvm_mcc_info() 1751 copy_rd = kmemdup(regd, struct_size(regd, reg_rules, valid_rules), in iwl_parse_nvm_mcc_info() [all …]
|
/openbmc/u-boot/drivers/dma/ |
H A D | keystone_nav.c | 102 u32 regd; in qm_push() local 105 regd = (u32)hd | ((sizeof(struct qm_host_desc) >> 4) - 1); in qm_push() 106 writel(regd, &qm_cfg->queue[qnum].ptr_size_thresh); in qm_push()
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/ |
H A D | eeprom.c | 213 struct property *regd = of_find_property(cur, "regdomain", NULL); in mt76_find_power_limits_node() local 215 if (!country && !regd) { in mt76_find_power_limits_node() 221 mt76_string_prop_find(regd, region_name)) { in mt76_find_power_limits_node()
|
/openbmc/linux/drivers/net/usb/ |
H A D | pegasus.c | 175 static int __mii_op(pegasus_t *p, __u8 phy, __u8 indx, __u16 *regd, __u8 cmd) in __mii_op() argument 183 *t = cpu_to_le16(*regd); in __mii_op() 203 *regd = le16_to_cpu(regdi); in __mii_op() 212 static int read_mii_word(pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 *regd) in read_mii_word() argument 214 return __mii_op(pegasus, phy, indx, regd, PHY_READ); in read_mii_word() 218 static int write_mii_word(pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 *regd) in write_mii_word() argument 220 return __mii_op(pegasus, phy, indx, regd, PHY_WRITE); in write_mii_word()
|
/openbmc/linux/drivers/video/fbdev/sis/ |
H A D | sis_main.c | 5125 u32 rega, regb, regd; in sisfb_post_xgi() local 5323 pci_read_config_dword(mypdev, 0x94, ®d); in sisfb_post_xgi() 5324 regd &= 0xfffffeff; in sisfb_post_xgi() 5325 pci_write_config_dword(mypdev, 0x94, regd); in sisfb_post_xgi() 5346 regd = bios[0x90 + 3] | (bios[0x90 + 4] << 8); in sisfb_post_xgi() 5347 if( (!(v1 & 0x02)) && (v2 & 0x30) && (regd < 0xcf) ) in sisfb_post_xgi() 5372 pci_read_config_dword(pdev, 0x50, ®d); in sisfb_post_xgi() 5373 regd = (regd >> 20) & 0x0f; in sisfb_post_xgi() 5374 if(regd == 1) { in sisfb_post_xgi() 5440 regd = le32_to_cpu(((u32 *)ptr)[regb]); in sisfb_post_xgi() [all …]
|
/openbmc/linux/drivers/net/ethernet/8390/ |
H A D | ne2k-pci.c | 265 int regd; in ne2k_pci_init_one() local 268 regd = inb(ioaddr + 0x0d); in ne2k_pci_init_one() 276 outb(regd, ioaddr + 0x0d); in ne2k_pci_init_one()
|