Kaynağa Gözat

qcacld-3.0: Get puncture bitmap and set it to des chan

Get puncture bitmap from regdomain api, then set it to des_chan
of mlme, which is finally set to FW.

Change-Id: I1ae2f3093e6fd8d755c3b2804655598795cbd244
CRs-Fixed: 3114181
Bing Sun 3 yıl önce
ebeveyn
işleme
146bc84dc4
1 değiştirilmiş dosya ile 24 ekleme ve 0 silme
  1. 24 0
      core/mac/src/pe/lim/lim_utils.c

+ 24 - 0
core/mac/src/pe/lim/lim_utils.c

@@ -9927,6 +9927,26 @@ QDF_STATUS lim_set_ch_phy_mode(struct wlan_objmgr_vdev *vdev, uint8_t dot11mode)
 	return QDF_STATUS_SUCCESS;
 }
 
+/**
+ * lim_update_des_chan_puncture() - set puncture_bitmap of des_chan
+ * @des_chan: pointer to wlan_channel
+ * @ch_params: pointer to ch_params
+ *
+ * Return: void
+ */
+#ifdef WLAN_FEATURE_11BE
+static void lim_update_des_chan_puncture(struct wlan_channel *des_chan,
+					 struct ch_params *ch_params)
+{
+	des_chan->puncture_bitmap = ch_params->reg_punc_bitmap;
+}
+#else
+static void lim_update_des_chan_puncture(struct wlan_channel *des_chan,
+					 struct ch_params *ch_params)
+{
+}
+#endif
+
 QDF_STATUS lim_pre_vdev_start(struct mac_context *mac,
 			      struct vdev_mlme_obj *mlme_obj,
 			      struct pe_session *session)
@@ -9959,6 +9979,9 @@ QDF_STATUS lim_pre_vdev_start(struct mac_context *mac,
 			sec_chan_freq = session->curr_op_freq - 20;
 	}
 
+	if (IS_DOT11_MODE_EHT(session->dot11mode))
+		wlan_reg_set_create_punc_bitmap(&ch_params, true);
+
 	wlan_reg_set_channel_params_for_freq(mac->pdev, session->curr_op_freq,
 					     sec_chan_freq, &ch_params);
 
@@ -9987,6 +10010,7 @@ QDF_STATUS lim_pre_vdev_start(struct mac_context *mac,
 	des_chan->ch_freq_seg1 = ch_params.center_freq_seg0;
 	des_chan->ch_freq_seg2 = ch_params.center_freq_seg1;
 	des_chan->ch_ieee = wlan_reg_freq_to_chan(mac->pdev, des_chan->ch_freq);
+	lim_update_des_chan_puncture(des_chan, &ch_params);
 	session->ch_width = ch_params.ch_width;
 	session->ch_center_freq_seg0 = ch_params.center_freq_seg0;
 	session->ch_center_freq_seg1 = ch_params.center_freq_seg1;