mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 18:51:21 +02:00
wifi: ath12k: add parsing of phy bitmap for reg rules
Certain regulatory domains could put restrictions on phy mode operation. For example, in a few countries HE/EHT Operation is not allowed. For such countries, firmware indicates this via phy bitmap in each reg rule. Currently, there is no logic to parse this info and then pass it on to the cfg80211/regulatory. Add parsing of this phy bitmap from the regulatory channel change event and then accordingly map it to cfg80211/regulatory flags and pass it on to it. While at it, correct typo in debug print: s/dsf/dfs. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20231004092818.25130-1-quic_adisi@quicinc.com
This commit is contained in:
parent
534c2dd809
commit
29ea0d4091
|
|
@ -314,6 +314,19 @@ static u32 ath12k_map_fw_reg_flags(u16 reg_flags)
|
|||
return flags;
|
||||
}
|
||||
|
||||
static u32 ath12k_map_fw_phy_flags(u32 phy_flags)
|
||||
{
|
||||
u32 flags = 0;
|
||||
|
||||
if (phy_flags & ATH12K_REG_PHY_BITMAP_NO11AX)
|
||||
flags |= NL80211_RRF_NO_HE;
|
||||
|
||||
if (phy_flags & ATH12K_REG_PHY_BITMAP_NO11BE)
|
||||
flags |= NL80211_RRF_NO_EHT;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
static bool
|
||||
ath12k_reg_can_intersect(struct ieee80211_reg_rule *rule1,
|
||||
struct ieee80211_reg_rule *rule2)
|
||||
|
|
@ -638,6 +651,7 @@ ath12k_reg_build_regd(struct ath12k_base *ab,
|
|||
}
|
||||
|
||||
flags |= ath12k_map_fw_reg_flags(reg_rule->flags);
|
||||
flags |= ath12k_map_fw_phy_flags(reg_info->phybitmap);
|
||||
|
||||
ath12k_reg_update_rule(tmp_regd->reg_rules + i,
|
||||
reg_rule->start_freq,
|
||||
|
|
|
|||
|
|
@ -83,6 +83,12 @@ struct ath12k_reg_info {
|
|||
[WMI_REG_CURRENT_MAX_AP_TYPE][WMI_REG_MAX_CLIENT_TYPE];
|
||||
};
|
||||
|
||||
/* Phy bitmaps */
|
||||
enum ath12k_reg_phy_bitmap {
|
||||
ATH12K_REG_PHY_BITMAP_NO11AX = BIT(5),
|
||||
ATH12K_REG_PHY_BITMAP_NO11BE = BIT(6),
|
||||
};
|
||||
|
||||
void ath12k_reg_init(struct ath12k *ar);
|
||||
void ath12k_reg_free(struct ath12k_base *ab);
|
||||
void ath12k_regd_update_work(struct work_struct *work);
|
||||
|
|
|
|||
|
|
@ -4611,10 +4611,11 @@ static int ath12k_pull_reg_chan_list_ext_update_ev(struct ath12k_base *ab,
|
|||
}
|
||||
|
||||
ath12k_dbg(ab, ATH12K_DBG_WMI,
|
||||
"%s:cc_ext %s dsf %d BW: min_2g %d max_2g %d min_5g %d max_5g %d",
|
||||
"%s:cc_ext %s dfs %d BW: min_2g %d max_2g %d min_5g %d max_5g %d phy_bitmap 0x%x",
|
||||
__func__, reg_info->alpha2, reg_info->dfs_region,
|
||||
reg_info->min_bw_2g, reg_info->max_bw_2g,
|
||||
reg_info->min_bw_5g, reg_info->max_bw_5g);
|
||||
reg_info->min_bw_5g, reg_info->max_bw_5g,
|
||||
reg_info->phybitmap);
|
||||
|
||||
ath12k_dbg(ab, ATH12K_DBG_WMI,
|
||||
"num_2g_reg_rules %d num_5g_reg_rules %d",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user