@@ -6998,6 +6998,8 @@ ath11k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
struct ath11k_vif *arvif = (void *)vif->drv_priv;
int ret;
struct peer_create_params param;
+ struct cur_regulatory_info *reg_info;
+ enum ieee80211_ap_reg_power power_type;
mutex_lock(&ar->conf_mutex);
@@ -7005,6 +7007,17 @@ ath11k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
"mac chanctx assign ptr %pK vdev_id %i\n",
ctx, arvif->vdev_id);
+ if (ar->supports_6ghz && ctx->def.chan->band == NL80211_BAND_6GHZ &&
+ arvif->vdev_type == WMI_VDEV_TYPE_STA) {
+ reg_info = &ab->reg_info_store[ar->pdev_idx];
+ power_type = vif->bss_conf.power_type;
+ ath11k_dbg(ab, ATH11K_DBG_MAC, "mac chanctx power type %d\n",
+ power_type);
+ if (power_type == IEEE80211_REG_UNSET_AP)
+ power_type = IEEE80211_REG_LPI_AP;
+ ath11k_reg_handle_chan_list(ab, reg_info, power_type);
+ }
+
/* for QCA6390 bss peer must be created before vdev_start */
if (ab->hw_params.vdev_start_delay &&
arvif->vdev_type != WMI_VDEV_TYPE_AP &&
When station connect to AP on 6 GHz band, it need switch the regulatory rules according to the regulatory info subfield in HE operation element. Swith to the power type of AP for station mode. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Wen Gong <quic_wgong@quicinc.com> --- drivers/net/wireless/ath/ath11k/mac.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)