|
@@ -3657,13 +3657,54 @@ bool reg_is_dfs_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq)
|
|
|
return chan_flags & REGULATORY_CHAN_RADAR;
|
|
|
}
|
|
|
|
|
|
+#ifdef CONFIG_REG_CLIENT
|
|
|
+/**
|
|
|
+ * reg_get_psoc_mas_chan_list () - Get psoc master channel list
|
|
|
+ * @pdev: pointer to pdev object
|
|
|
+ * @psoc: pointer to psoc object
|
|
|
+ *
|
|
|
+ * Return: psoc master chanel list
|
|
|
+ */
|
|
|
+static struct regulatory_channel *reg_get_psoc_mas_chan_list(
|
|
|
+ struct wlan_objmgr_pdev *pdev,
|
|
|
+ struct wlan_objmgr_psoc *psoc)
|
|
|
+{
|
|
|
+ struct wlan_regulatory_psoc_priv_obj *soc_reg;
|
|
|
+ uint8_t pdev_id;
|
|
|
+ uint8_t phy_id;
|
|
|
+ struct wlan_lmac_if_reg_tx_ops *reg_tx_ops;
|
|
|
+
|
|
|
+ soc_reg = reg_get_psoc_obj(psoc);
|
|
|
+ if (!soc_reg) {
|
|
|
+ reg_err("reg psoc private obj is NULL");
|
|
|
+ return NULL;
|
|
|
+ }
|
|
|
+ pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev);
|
|
|
+
|
|
|
+ reg_tx_ops = reg_get_psoc_tx_ops(psoc);
|
|
|
+ if (reg_tx_ops->get_phy_id_from_pdev_id)
|
|
|
+ reg_tx_ops->get_phy_id_from_pdev_id(psoc, pdev_id, &phy_id);
|
|
|
+ else
|
|
|
+ phy_id = pdev_id;
|
|
|
+
|
|
|
+ return soc_reg->mas_chan_params[phy_id].mas_chan_list;
|
|
|
+}
|
|
|
+#else
|
|
|
+static inline struct regulatory_channel *reg_get_psoc_mas_chan_list(
|
|
|
+ struct wlan_objmgr_pdev *pdev,
|
|
|
+ struct wlan_objmgr_psoc *psoc)
|
|
|
+{
|
|
|
+ return NULL;
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
void reg_update_nol_ch_for_freq(struct wlan_objmgr_pdev *pdev,
|
|
|
uint16_t *chan_freq_list,
|
|
|
uint8_t num_chan,
|
|
|
bool nol_chan)
|
|
|
{
|
|
|
enum channel_enum chan_enum;
|
|
|
- struct regulatory_channel *mas_chan_list;
|
|
|
+ struct regulatory_channel *mas_chan_list, *psoc_mas_chan_list;
|
|
|
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
|
|
struct wlan_objmgr_psoc *psoc;
|
|
|
uint16_t i;
|
|
@@ -3681,6 +3722,8 @@ void reg_update_nol_ch_for_freq(struct wlan_objmgr_pdev *pdev,
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ psoc_mas_chan_list = reg_get_psoc_mas_chan_list(pdev, psoc);
|
|
|
+
|
|
|
mas_chan_list = pdev_priv_obj->mas_chan_list;
|
|
|
for (i = 0; i < num_chan; i++) {
|
|
|
chan_enum = reg_get_chan_enum_for_freq(chan_freq_list[i]);
|
|
@@ -3690,6 +3733,8 @@ void reg_update_nol_ch_for_freq(struct wlan_objmgr_pdev *pdev,
|
|
|
continue;
|
|
|
}
|
|
|
mas_chan_list[chan_enum].nol_chan = nol_chan;
|
|
|
+ if (psoc_mas_chan_list)
|
|
|
+ psoc_mas_chan_list[chan_enum].nol_chan = nol_chan;
|
|
|
}
|
|
|
|
|
|
reg_compute_pdev_current_chan_list(pdev_priv_obj);
|