|
@@ -773,9 +773,9 @@ static void reg_propagate_6g_mas_channel_list(
|
|
|
mas_chan_params->is_6g_channel_list_populated;
|
|
|
pdev_priv_obj->reg_6g_superid =
|
|
|
mas_chan_params->reg_6g_superid;
|
|
|
- pdev_priv_obj->reg_cur_6g_ap_pwr_type = REG_INDOOR_AP;
|
|
|
pdev_priv_obj->reg_6g_thresh_priority_freq =
|
|
|
mas_chan_params->reg_6g_thresh_priority_freq;
|
|
|
+ reg_set_ap_pwr_type(pdev_priv_obj);
|
|
|
}
|
|
|
#else
|
|
|
static inline void reg_propagate_6g_mas_channel_list(
|
|
@@ -785,6 +785,21 @@ static inline void reg_propagate_6g_mas_channel_list(
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
+#ifdef CONFIG_AFC_SUPPORT
|
|
|
+void reg_set_ap_pwr_type(struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj)
|
|
|
+{
|
|
|
+ if (pdev_priv_obj->reg_afc_dev_deployment_type == AFC_DEPLOYMENT_OUTDOOR)
|
|
|
+ pdev_priv_obj->reg_cur_6g_ap_pwr_type = REG_STANDARD_POWER_AP;
|
|
|
+ else
|
|
|
+ pdev_priv_obj->reg_cur_6g_ap_pwr_type = REG_INDOOR_AP;
|
|
|
+}
|
|
|
+#else
|
|
|
+void reg_set_ap_pwr_type(struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj)
|
|
|
+{
|
|
|
+ pdev_priv_obj->reg_cur_6g_ap_pwr_type = REG_INDOOR_AP;
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
void reg_init_pdev_mas_chan_list(
|
|
|
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj,
|
|
|
struct mas_chan_params *mas_chan_params)
|
|
@@ -1918,6 +1933,70 @@ static bool reg_is_edge_chan_disable_needed(struct wlan_objmgr_psoc *psoc,
|
|
|
return is_lower_edge_disable || is_upper_edge_disable;
|
|
|
}
|
|
|
|
|
|
+#ifdef CONFIG_AFC_SUPPORT
|
|
|
+/**
|
|
|
+ * reg_set_flag_afc_not_done() - Set channel flag REGULATORY_CHAN_AFC_NOT_DONE
|
|
|
+ * @chan_flags: Channel flags
|
|
|
+ * @is_set: boolean to set/unset the flag
|
|
|
+ *
|
|
|
+ * Return: void
|
|
|
+ */
|
|
|
+static inline void
|
|
|
+reg_set_flag_afc_not_done(uint32_t *chan_flags, bool is_set)
|
|
|
+{
|
|
|
+ if (is_set)
|
|
|
+ *chan_flags |= REGULATORY_CHAN_AFC_NOT_DONE;
|
|
|
+ else
|
|
|
+ *chan_flags &= ~REGULATORY_CHAN_AFC_NOT_DONE;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * reg_update_6g_chan_for_outdoor() - Update channel state and flags for
|
|
|
+ * outdoor
|
|
|
+ * @pdev_priv: Regulatory pdev private object
|
|
|
+ * @chan_info: Channel parameters
|
|
|
+ * @chan_idx: Channel index.
|
|
|
+ *
|
|
|
+ * Return: void
|
|
|
+ */
|
|
|
+static void
|
|
|
+reg_update_6g_chan_for_outdoor(struct wlan_regulatory_pdev_priv_obj *pdev_priv,
|
|
|
+ struct super_chan_info *chan_info,
|
|
|
+ uint16_t chan_idx)
|
|
|
+{
|
|
|
+ uint32_t *p_chan_flags;
|
|
|
+
|
|
|
+ if (pdev_priv->reg_afc_dev_deployment_type != AFC_DEPLOYMENT_OUTDOOR)
|
|
|
+ return;
|
|
|
+
|
|
|
+ if (chan_info->state_arr[REG_AP_SP] == CHANNEL_STATE_DISABLE)
|
|
|
+ return;
|
|
|
+
|
|
|
+ p_chan_flags = &chan_info->chan_flags_arr[REG_AP_SP];
|
|
|
+
|
|
|
+ if (pdev_priv->is_6g_afc_power_event_received) {
|
|
|
+ reg_set_flag_afc_not_done(p_chan_flags, false);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ reg_set_flag_afc_not_done(p_chan_flags, true);
|
|
|
+}
|
|
|
+
|
|
|
+#else
|
|
|
+static inline void
|
|
|
+reg_set_flag_afc_not_done(uint32_t *chan_flags, bool is_set)
|
|
|
+{
|
|
|
+}
|
|
|
+
|
|
|
+static inline void
|
|
|
+reg_update_6g_chan_for_outdoor(struct wlan_regulatory_pdev_priv_obj *pdev_priv,
|
|
|
+ struct super_chan_info *chan_info,
|
|
|
+ uint16_t chan_idx)
|
|
|
+{
|
|
|
+}
|
|
|
+
|
|
|
+#endif
|
|
|
+
|
|
|
/**
|
|
|
* reg_dis_6g_edge_chan_in_enh_chan() - Disable the 6g edge
|
|
|
* channels in the super channel list
|
|
@@ -2258,16 +2337,13 @@ static void reg_update_sup_ch_entry_for_mode(
|
|
|
return;
|
|
|
|
|
|
if (reg_is_sp_supp_pwr_mode(supp_pwr_mode)) {
|
|
|
- if (wlan_reg_is_afc_power_event_received(pdev))
|
|
|
- reg_assign_afc_chan_entry_to_mas_chan(pdev_priv_obj,
|
|
|
- &mas_chan,
|
|
|
- chn_idx);
|
|
|
- else
|
|
|
- /*
|
|
|
- * Disable the SP channels if AFC power event
|
|
|
- * is not received
|
|
|
- */
|
|
|
- return;
|
|
|
+ /* Add the entry to super channel list whether or not AFC
|
|
|
+ * response is received. If AFC response is not received
|
|
|
+ * mark the channel flag as REGULATORY_AFC_NOT_DONE
|
|
|
+ */
|
|
|
+ reg_assign_afc_chan_entry_to_mas_chan(pdev_priv_obj,
|
|
|
+ &mas_chan,
|
|
|
+ chn_idx);
|
|
|
}
|
|
|
|
|
|
if (!mas_chan)
|
|
@@ -2294,6 +2370,10 @@ static void reg_update_sup_ch_entry_for_mode(
|
|
|
&temp_reg_chan);
|
|
|
reg_dis_6g_edge_chan_in_enh_chan(pdev, &super_chan_list[chn_idx],
|
|
|
chn_idx, supp_pwr_mode);
|
|
|
+ reg_update_6g_chan_for_outdoor(pdev_priv_obj,
|
|
|
+ &super_chan_list[chn_idx],
|
|
|
+ chn_idx);
|
|
|
+
|
|
|
reg_fill_best_pwr_mode(pdev_priv_obj, super_chan_list, chn_idx,
|
|
|
supp_pwr_mode, temp_reg_chan.tx_power,
|
|
|
max_eirp_pwr);
|
|
@@ -3516,11 +3596,13 @@ static void reg_free_expiry_afc_info(struct afc_regulatory_info *afc_info)
|
|
|
* reg_disable_sp_entries_in_supr_chan_entry() - Disable the SP entries in the
|
|
|
* super channel list
|
|
|
* @chan_info: Pointer to chan_info
|
|
|
+ * @reg_afc_dev_type: AFC device deployment type
|
|
|
*
|
|
|
* Return: void
|
|
|
*/
|
|
|
static void reg_disable_sp_entries_in_supr_chan_entry(
|
|
|
- struct super_chan_info *chan_info)
|
|
|
+ struct super_chan_info *chan_info,
|
|
|
+ enum reg_afc_dev_deploy_type reg_afc_dev_type)
|
|
|
{
|
|
|
uint8_t j;
|
|
|
static enum supported_6g_pwr_types list_of_sp_lists[] = {
|
|
@@ -3536,8 +3618,17 @@ static void reg_disable_sp_entries_in_supr_chan_entry(
|
|
|
if (reg_is_supp_pwr_mode_invalid(idx))
|
|
|
continue;
|
|
|
|
|
|
- reg_dis_chan_state_and_flags(&chan_info->state_arr[idx],
|
|
|
- &chan_info->chan_flags_arr[idx]);
|
|
|
+ if (chan_info->state_arr[idx] == CHANNEL_STATE_DISABLE)
|
|
|
+ continue;
|
|
|
+
|
|
|
+ if (reg_afc_dev_type == AFC_DEPLOYMENT_OUTDOOR)
|
|
|
+ reg_set_flag_afc_not_done(
|
|
|
+ &chan_info->chan_flags_arr[idx],
|
|
|
+ true);
|
|
|
+ else
|
|
|
+ reg_dis_chan_state_and_flags(
|
|
|
+ &chan_info->state_arr[idx],
|
|
|
+ &chan_info->chan_flags_arr[idx]);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -3559,8 +3650,9 @@ reg_disable_sp_channels_in_super_chan_list(
|
|
|
for (i = 0; i < NUM_6GHZ_CHANNELS; i++) {
|
|
|
struct super_chan_info *chan_info =
|
|
|
&super_chan_list[i];
|
|
|
-
|
|
|
- reg_disable_sp_entries_in_supr_chan_entry(chan_info);
|
|
|
+ reg_disable_sp_entries_in_supr_chan_entry(
|
|
|
+ chan_info,
|
|
|
+ pdev_priv_obj->reg_afc_dev_deployment_type);
|
|
|
}
|
|
|
}
|
|
|
|