Kaynağa Gözat

qcacmn: Avoid compilation error when 6G disabled

Currently definition of wlan_reg_get_power_string is
present for 6G only which may cause compilation issue
when 6G is disabled.

Fix is to add definition of wlan_reg_get_power_string
for both 6g enable and disable case to avoid any compilation
issue.

Change-Id: Iaad8f16543306e6ac09e76546062fae554124c1e
CRs-Fixed: 3150997
Sheenam Monga 3 yıl önce
ebeveyn
işleme
b17d8fc57f

+ 15 - 16
umac/regulatory/core/src/reg_build_chan_list.c

@@ -3428,22 +3428,6 @@ QDF_STATUS reg_process_master_chan_list_ext(
 	return QDF_STATUS_SUCCESS;
 }
 
-#ifdef CONFIG_REG_CLIENT
-const char *reg_get_power_string(enum reg_6g_ap_type power_type)
-{
-	switch (power_type) {
-	case REG_INDOOR_AP:
-		return "LP";
-	case REG_STANDARD_POWER_AP:
-		return "SP";
-	case REG_VERY_LOW_POWER_AP:
-		return "VLP";
-	default:
-		return "INVALID";
-	}
-}
-#endif
-
 QDF_STATUS reg_get_6g_ap_master_chan_list(struct wlan_objmgr_pdev *pdev,
 					  enum reg_6g_ap_type ap_pwr_type,
 					  struct regulatory_channel *chan_list)
@@ -4117,6 +4101,21 @@ reg_process_afc_event(struct afc_regulatory_info *afc_info)
 	}
 }
 #endif /* CONFIG_AFC_SUPPORT */
+#ifdef CONFIG_REG_CLIENT
+const char *reg_get_power_string(enum reg_6g_ap_type power_type)
+{
+	switch (power_type) {
+	case REG_INDOOR_AP:
+		return "LP";
+	case REG_STANDARD_POWER_AP:
+		return "SP";
+	case REG_VERY_LOW_POWER_AP:
+		return "VLP";
+	default:
+		return "INVALID";
+	}
+}
+#endif
 #endif /* CONFIG_BAND_6GHZ */
 
 QDF_STATUS reg_process_master_chan_list(

+ 6 - 0
umac/regulatory/dispatcher/inc/wlan_reg_services_api.h

@@ -384,6 +384,12 @@ QDF_STATUS wlan_reg_get_superchan_entry(
 	*p_sup_chan_entry = NULL;
 	return QDF_STATUS_E_NOSUPPORT;
 }
+
+static inline
+const char *wlan_reg_get_power_string(enum reg_6g_ap_type power_type)
+{
+	return "INVALID";
+}
 #endif /* CONFIG_BAND_6GHZ */
 
 /**