Просмотр исходного кода

qcacmn: Add non-6g definitions of regulatory API

The API reg_get_ch_state_based_on_nol_flag() is a common API and in its
definition it calls the API
wlan_reg_get_5g_bonded_channel_state_for_pwrmode() which is defined for
the 6G specific macro CONFIG_REG_6G_PWRMODE. For non-6G callers, this
function is not defined and will lead to implicit declaration compilation
error.

Add a non-6G version of the API
wlan_reg_get_5g_bonded_channel_state_for_pwrmode() so that, it can be
called in reg_get_ch_state_based_on_nol_flag() even for non-6G PFs.

Change-Id: I810af65c7580f9a5dbfb2df25530dd95261e2a80
CRs-Fixed: 3161629
Vignesh U 3 лет назад
Родитель
Сommit
07a565b1a1
1 измененных файлов с 22 добавлено и 1 удалено
  1. 22 1
      umac/regulatory/dispatcher/src/wlan_reg_services_api.c

+ 22 - 1
umac/regulatory/dispatcher/src/wlan_reg_services_api.c

@@ -1180,10 +1180,31 @@ wlan_reg_get_5g_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev,
 	return reg_get_5g_bonded_channel_state_for_pwrmode(pdev, freq, &params,
 							   in_6g_pwr_type);
 }
+#else
+enum channel_state
+wlan_reg_get_5g_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev,
+						 qdf_freq_t freq,
+						 enum phy_ch_width bw,
+						 enum supported_6g_pwr_types
+						 in_6g_pwr_type)
+{
+	struct ch_params params = {0};
 
-qdf_export_symbol(wlan_reg_get_5g_bonded_channel_state_for_pwrmode);
+	if (reg_is_ch_width_320(bw)) {
+		const struct bonded_channel_freq *bonded_ch_ptr_ptr = NULL;
+
+		return reg_get_5g_bonded_channel_for_freq(pdev, freq, bw,
+							  &bonded_ch_ptr_ptr);
+	}
+
+	params.ch_width = bw;
+
+	return reg_get_5g_bonded_channel_state_for_freq(pdev, freq, &params);
+}
 #endif
 
+qdf_export_symbol(wlan_reg_get_5g_bonded_channel_state_for_pwrmode);
+
 enum channel_state
 wlan_reg_get_2g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
 					      qdf_freq_t freq,