qcacmn: Add new cfg item to disable SP AP connection to VLP STA

Add a new cfg item to drop connection request if
AP is operating in 6 GHz SP mode and STA doesn't
support SP mode but supports VLP mode.

Change-Id: Icbe109abecdd73ceedee8ecec45ae82cd47464e0
CRs-Fixed: 3470599
Esse commit está contido em:
Asutosh Mohapatra
2023-04-06 19:36:24 +05:30
commit de Madan Koyyalamudi
commit d549261151
3 arquivos alterados com 70 adições e 1 exclusões

Ver arquivo

@@ -2687,6 +2687,30 @@ bool wlan_cm_get_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc)
return mlme_psoc_obj->psoc_cfg.score_config.standard_6ghz_conn_policy;
}
void wlan_cm_set_disable_vlp_sta_conn_to_sp_ap(struct wlan_objmgr_psoc *psoc,
bool value)
{
struct psoc_mlme_obj *mlme_psoc_obj;
mlme_psoc_obj = wlan_psoc_mlme_get_cmpt_obj(psoc);
if (!mlme_psoc_obj)
return;
mlme_debug("disable_vlp_sta_conn_to_sp_ap val %x", value);
mlme_psoc_obj->psoc_cfg.score_config.disable_vlp_sta_conn_to_sp_ap = value;
}
bool wlan_cm_get_disable_vlp_sta_conn_to_sp_ap(struct wlan_objmgr_psoc *psoc)
{
struct psoc_mlme_obj *mlme_psoc_obj;
mlme_psoc_obj = wlan_psoc_mlme_get_cmpt_obj(psoc);
if (!mlme_psoc_obj)
return false;
return mlme_psoc_obj->psoc_cfg.score_config.disable_vlp_sta_conn_to_sp_ap;
}
void wlan_cm_set_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc,
uint32_t value)
{

Ver arquivo

@@ -235,6 +235,7 @@ enum cm_security_idx {
* @vendor_roam_score_algorithm: Preferred ETP vendor roam score algorithm
* @check_6ghz_security: check security for 6 GHz candidate
* @standard_6ghz_conn_policy: check for 6 GHz standard connection policy
* @disable_vlp_sta_conn_to_sp_ap: check for disable vlp sta conn to sp ap
* @key_mgmt_mask_6ghz: user configurable mask for 6 GHz AKM
* @mlsr_link_selection: MLSR link selection config
* @roam_tgt_score_cap: Roam score capability
@@ -252,7 +253,8 @@ struct scoring_cfg {
check_assoc_disallowed:1,
vendor_roam_score_algorithm:1,
check_6ghz_security:1,
standard_6ghz_conn_policy:1;
standard_6ghz_conn_policy:1,
disable_vlp_sta_conn_to_sp_ap:1;
uint32_t key_mgmt_mask_6ghz;
#ifdef WLAN_FEATURE_11BE_MLO
@@ -410,6 +412,33 @@ void wlan_cm_set_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc,
*/
uint32_t wlan_cm_get_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc);
/**
* wlan_cm_get_disable_vlp_sta_conn_to_sp_ap() - Set disable vlp sta connection
* to sp ap
* @psoc: pointer to psoc object
*
* Return: value
*/
bool wlan_cm_get_disable_vlp_sta_conn_to_sp_ap(struct wlan_objmgr_psoc *psoc);
/**
* wlan_cm_set_disable_vlp_sta_conn_to_sp_ap() - Set disable vlp sta connection
* to sp ap
* @psoc: pointer to psoc object
* @value: value to be set
*
* Return: void
*/
void wlan_cm_set_disable_vlp_sta_conn_to_sp_ap(struct wlan_objmgr_psoc *psoc,
bool value);
/**
* wlan_cm_set_standard_6ghz_conn_policy() - Set 6 GHz standard connection
* policy
* @psoc: pointer to psoc object
* @value: value to be set
*
* Return: void
*/
void wlan_cm_set_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc,
bool value);
@@ -457,6 +486,17 @@ bool wlan_cm_get_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc)
return false;
}
static inline
void wlan_cm_set_disable_vlp_sta_conn_to_sp_ap(struct wlan_objmgr_psoc *psoc,
bool value)
{}
static inline
bool wlan_cm_get_disable_vlp_sta_conn_to_sp_ap(struct wlan_objmgr_psoc *psoc)
{
return false;
}
static inline
void wlan_cm_set_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc,
uint32_t value) {}

Ver arquivo

@@ -425,6 +425,11 @@ reg_get_best_6g_power_type(struct wlan_objmgr_psoc *psoc,
}
} else if (ap_pwr_type == REG_STANDARD_POWER_AP) {
if (pdev_priv_obj->reg_rules.num_of_6g_client_reg_rules[REG_VERY_LOW_POWER_AP]) {
if (wlan_cm_get_disable_vlp_sta_conn_to_sp_ap(psoc)) {
reg_debug("AP SP and STA VLP connection disabled");
return QDF_STATUS_E_NOSUPPORT;
}
*pwr_type_6g = REG_VERY_LOW_POWER_AP;
reg_debug("AP power type = %d, selected power type = %d",
ap_pwr_type, *pwr_type_6g);