|
@@ -1032,16 +1032,31 @@ reg_append_mas_chan_list_for_6g(struct wlan_regulatory_pdev_priv_obj
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- master_chan_list_6g_client = pdev_priv_obj->mas_chan_list_6g_client
|
|
|
- [pdev_priv_obj->reg_cur_6g_ap_pwr_type]
|
|
|
+ master_chan_list_6g_client =
|
|
|
+ pdev_priv_obj->mas_chan_list_6g_client[REG_INDOOR_AP]
|
|
|
[pdev_priv_obj->reg_cur_6g_client_mobility_type];
|
|
|
|
|
|
- qdf_mem_copy(&pdev_priv_obj->mas_chan_list[MIN_6GHZ_CHANNEL],
|
|
|
- master_chan_list_6g_client,
|
|
|
- NUM_6GHZ_CHANNELS *
|
|
|
- sizeof(struct regulatory_channel));
|
|
|
+ qdf_mem_copy(&pdev_priv_obj->mas_chan_list[MIN_6GHZ_CHANNEL],
|
|
|
+ master_chan_list_6g_client,
|
|
|
+ NUM_6GHZ_CHANNELS *
|
|
|
+ sizeof(struct regulatory_channel));
|
|
|
}
|
|
|
-#else
|
|
|
+
|
|
|
+static void
|
|
|
+reg_populate_secondary_cur_chan_list(struct wlan_regulatory_pdev_priv_obj
|
|
|
+ *pdev_priv_obj)
|
|
|
+{
|
|
|
+ qdf_mem_copy(pdev_priv_obj->secondary_cur_chan_list,
|
|
|
+ pdev_priv_obj->mas_chan_list,
|
|
|
+ (NUM_CHANNELS - NUM_6GHZ_CHANNELS) *
|
|
|
+ sizeof(struct regulatory_channel));
|
|
|
+ qdf_mem_copy(&pdev_priv_obj->
|
|
|
+ secondary_cur_chan_list[MIN_6GHZ_CHANNEL],
|
|
|
+ pdev_priv_obj->mas_chan_list_6g_ap
|
|
|
+ [pdev_priv_obj->reg_cur_6g_ap_pwr_type],
|
|
|
+ NUM_6GHZ_CHANNELS * sizeof(struct regulatory_channel));
|
|
|
+}
|
|
|
+#else /* CONFIG_REG_CLIENT */
|
|
|
static void
|
|
|
reg_append_mas_chan_list_for_6g(struct wlan_regulatory_pdev_priv_obj
|
|
|
*pdev_priv_obj)
|
|
@@ -1057,6 +1072,12 @@ reg_append_mas_chan_list_for_6g(struct wlan_regulatory_pdev_priv_obj
|
|
|
pdev_priv_obj->mas_chan_list_6g_ap[ap_pwr_type],
|
|
|
NUM_6GHZ_CHANNELS * sizeof(struct regulatory_channel));
|
|
|
}
|
|
|
+
|
|
|
+static inline void
|
|
|
+reg_populate_secondary_cur_chan_list(struct wlan_regulatory_pdev_priv_obj
|
|
|
+ *pdev_priv_obj)
|
|
|
+{
|
|
|
+}
|
|
|
#endif /* CONFIG_REG_CLIENT */
|
|
|
|
|
|
static void reg_copy_6g_cur_mas_chan_list_to_cmn(
|
|
@@ -1065,7 +1086,7 @@ static void reg_copy_6g_cur_mas_chan_list_to_cmn(
|
|
|
if (pdev_priv_obj->is_6g_channel_list_populated)
|
|
|
reg_append_mas_chan_list_for_6g(pdev_priv_obj);
|
|
|
}
|
|
|
-#else
|
|
|
+#else /* CONFIG_BAND_6GHZ */
|
|
|
static inline void
|
|
|
reg_copy_6g_cur_mas_chan_list_to_cmn(
|
|
|
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj)
|
|
@@ -1077,6 +1098,23 @@ reg_append_mas_chan_list_for_6g(
|
|
|
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj)
|
|
|
{
|
|
|
}
|
|
|
+
|
|
|
+#ifdef CONFIG_REG_CLIENT
|
|
|
+static void
|
|
|
+reg_populate_secondary_cur_chan_list(struct wlan_regulatory_pdev_priv_obj
|
|
|
+ *pdev_priv_obj)
|
|
|
+{
|
|
|
+ qdf_mem_copy(pdev_priv_obj->secondary_cur_chan_list,
|
|
|
+ pdev_priv_obj->mas_chan_list,
|
|
|
+ NUM_CHANNELS * sizeof(struct regulatory_channel));
|
|
|
+}
|
|
|
+#else /* CONFIG_REG_CLIENT */
|
|
|
+static inline void
|
|
|
+reg_populate_secondary_cur_chan_list(struct wlan_regulatory_pdev_priv_obj
|
|
|
+ *pdev_priv_obj)
|
|
|
+{
|
|
|
+}
|
|
|
+#endif /* CONFIG_REG_CLIENT */
|
|
|
#endif /* CONFIG_BAND_6GHZ */
|
|
|
|
|
|
void reg_compute_pdev_current_chan_list(struct wlan_regulatory_pdev_priv_obj
|
|
@@ -1087,6 +1125,8 @@ void reg_compute_pdev_current_chan_list(struct wlan_regulatory_pdev_priv_obj
|
|
|
qdf_mem_copy(pdev_priv_obj->cur_chan_list, pdev_priv_obj->mas_chan_list,
|
|
|
NUM_CHANNELS * sizeof(struct regulatory_channel));
|
|
|
|
|
|
+ reg_populate_secondary_cur_chan_list(pdev_priv_obj);
|
|
|
+
|
|
|
reg_modify_chan_list_for_freq_range(pdev_priv_obj->cur_chan_list,
|
|
|
pdev_priv_obj->range_2g_low,
|
|
|
pdev_priv_obj->range_2g_high,
|
|
@@ -2162,3 +2202,24 @@ QDF_STATUS reg_get_current_chan_list(struct wlan_objmgr_pdev *pdev,
|
|
|
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
+
|
|
|
+#ifdef CONFIG_REG_CLIENT
|
|
|
+QDF_STATUS
|
|
|
+reg_get_secondary_current_chan_list(struct wlan_objmgr_pdev *pdev,
|
|
|
+ struct regulatory_channel *chan_list)
|
|
|
+{
|
|
|
+ struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
|
|
+
|
|
|
+ pdev_priv_obj = reg_get_pdev_obj(pdev);
|
|
|
+
|
|
|
+ if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
|
|
|
+ reg_err("reg pdev private obj is NULL");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ qdf_mem_copy(chan_list, pdev_priv_obj->secondary_cur_chan_list,
|
|
|
+ NUM_CHANNELS * sizeof(struct regulatory_channel));
|
|
|
+
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+#endif
|