qcacmn: Enable 11d in WORLD mode

In WORLD mode, there can be urgency to discover the current country since
WORLD mode restricts the channel and TX power availability. Therefore,
enhance 11d state machine to enable 11d in world mode. Use INI
configuration parameter enable_11d_in_world_mode to decide whether to
enable 11d in world mode automatically.

CRs-Fixed: 2289358
Change-Id: I8a4e1f6c74acb5ac1faec8f98840bf66c3d9a3f7
This commit is contained in:
Amar Singhal
2018-08-01 13:41:46 -07:00
committed by nshrivas
parent afcd0f1289
commit f318f04a83
3 changed files with 19 additions and 4 deletions

View File

@@ -88,6 +88,7 @@ struct wlan_regulatory_psoc_priv_obj {
reg_cap[PSOC_MAX_PHY_REG_CAP];
bool force_ssc_disable_indoor_channel;
bool enable_srd_chan_in_master_mode;
bool enable_11d_in_world_mode;
qdf_spinlock_t cbk_list_lock;
};

View File

@@ -2962,6 +2962,7 @@ static void reg_run_11d_state_machine(struct wlan_objmgr_psoc *psoc)
{
bool temp_11d_support;
struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj;
bool world_mode;
psoc_priv_obj = wlan_objmgr_psoc_get_comp_private_obj(psoc,
WLAN_UMAC_COMP_REGULATORY);
@@ -2970,8 +2971,12 @@ static void reg_run_11d_state_machine(struct wlan_objmgr_psoc *psoc)
return;
}
world_mode = reg_is_world_alpha2(psoc_priv_obj->cur_country);
temp_11d_support = psoc_priv_obj->enable_11d_supp;
if (((psoc_priv_obj->user_ctry_set) &&
if ((psoc_priv_obj->enable_11d_in_world_mode) && (world_mode))
psoc_priv_obj->enable_11d_supp = true;
else if (((psoc_priv_obj->user_ctry_set) &&
(psoc_priv_obj->user_ctry_priority)) ||
(psoc_priv_obj->master_vdev_cnt))
psoc_priv_obj->enable_11d_supp = false;
@@ -3142,15 +3147,19 @@ QDF_STATUS reg_process_master_chan_list(struct cur_regulatory_info
soc_reg->new_11d_ctry_pending = false;
soc_reg->cc_src = SOURCE_11D;
soc_reg->user_ctry_set = false;
reg_run_11d_state_machine(psoc);
} else if (soc_reg->world_country_pending == true) {
soc_reg->world_country_pending = false;
soc_reg->cc_src = SOURCE_CORE;
soc_reg->user_ctry_set = false;
reg_run_11d_state_machine(psoc);
} else {
soc_reg->cc_src = SOURCE_DRIVER;
if (reg_is_world_alpha2(regulat_info->alpha2))
if (reg_is_world_alpha2(regulat_info->alpha2)) {
soc_reg->cc_src = SOURCE_CORE;
reg_run_11d_state_machine(psoc);
}
qdf_mem_copy(soc_reg->mas_chan_params[phy_id].default_country,
regulat_info->alpha2,
@@ -3216,6 +3225,7 @@ QDF_STATUS wlan_regulatory_psoc_obj_created_notification(
soc_reg_obj->vdev_cnt_11d = 0;
soc_reg_obj->restart_beaconing = CH_AVOID_RULE_RESTART;
soc_reg_obj->enable_srd_chan_in_master_mode = false;
soc_reg_obj->enable_11d_in_world_mode = true;
for (i = 0; i < MAX_STA_VDEV_CNT; i++)
soc_reg_obj->vdev_ids_11d[i] = INVALID_VDEV_ID;
@@ -3954,6 +3964,8 @@ QDF_STATUS reg_set_config_vars(struct wlan_objmgr_psoc *psoc,
psoc_priv_obj->restart_beaconing = config_vars.restart_beaconing;
psoc_priv_obj->enable_srd_chan_in_master_mode =
config_vars.enable_srd_chan_in_master_mode;
psoc_priv_obj->enable_11d_in_world_mode =
config_vars.enable_11d_in_world_mode;
status = wlan_objmgr_psoc_try_get_ref(psoc, WLAN_REGULATORY_SB_ID);
if (QDF_IS_STATUS_ERROR(status)) {

View File

@@ -857,6 +857,7 @@ enum restart_beaconing_on_ch_avoid_rule {
* @restart_beaconing: control the beaconing entity to move
* away from active LTE channels
* @enable_srd_chan_in_master_mode: SRD channel support in master mode
* @enable_11d_in_world_mode: enable 11d in world mode
*/
struct reg_config_vars {
uint32_t enable_11d_support;
@@ -868,6 +869,7 @@ struct reg_config_vars {
uint32_t force_ssc_disable_indoor_channel;
enum restart_beaconing_on_ch_avoid_rule restart_beaconing;
bool enable_srd_chan_in_master_mode;
bool enable_11d_in_world_mode;
};
/**