Browse Source

qcacld-3.0: Fix wrong MLO 2 GHz link CCFS1 in response to get_channel

With Change-Id: Iad3704d391058675e7d4ff6ffc419f74efa0c658,
wlan_reg_set_channel_params_for_pwrmode is removed for mlo get_channel,
2 GHz link CCFS may not filled correctly in ht/vht/he OP, wrong CCFS
is passed to kernel, regulatory check failed, disconnect will happen.

To fix it, add back wlan_reg_set_channel_params_for_pwrmode to
calculate CCFS0/CCFS1 correctly by primary freq and channel width.

Change-Id: Ie2467bccaa2998646428dd4e03173911dcc312cd
CRs-Fixed: 3734198
Jianmin Zhu 1 year ago
parent
commit
437854987b
1 changed files with 10 additions and 0 deletions
  1. 10 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 10 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -28752,6 +28752,7 @@ wlan_hdd_cfg80211_get_channel_sta(struct wiphy *wiphy,
 	bool is_legacy_phymode = false;
 	struct wlan_channel chan_info;
 	int ret = 0;
+	struct ch_params ch_params = {0};
 
 	if (!hdd_cm_is_vdev_associated(adapter->deflink)) {
 		hdd_debug("vdev not associated");
@@ -28772,6 +28773,15 @@ wlan_hdd_cfg80211_get_channel_sta(struct wiphy *wiphy,
 		ret = mlo_mgr_get_per_link_chan_info(vdev, link_id, &chan_info);
 		if (ret != 0)
 			goto release;
+
+		ch_params.ch_width = chan_info.ch_width;
+		ch_params.center_freq_seg1 = chan_info.ch_cfreq2;
+		wlan_reg_set_channel_params_for_pwrmode(hdd_ctx->pdev,
+							chan_info.ch_freq, 0,
+							&ch_params,
+							REG_CURRENT_PWR_MODE);
+		chan_info.ch_cfreq1 = ch_params.mhz_freq_seg0;
+		chan_info.ch_cfreq2 = ch_params.mhz_freq_seg1;
 	} else {
 		ret = wlan_hdd_cfg80211_get_vdev_chan_info(hdd_ctx, vdev,
 							   link_id,