qcacld-3.0: Enhance g_enable_go_force_scc for liberal mode

INI g_enable_go_force_scc states the force MCC to SCC mode.
Mode 1-strict: Implement force scc strictly as part of start bss
Mode 2-liberal: Turn on p2p go on provided channel and move
first p2p go to the new p2p go channel after set key.

Currently for p2p-GO forceSCC, support is present where no matter
what is the GO negotiated channel in start_bss, driver will force
the other GO/STA/GC channel (on the same band) to the current GO
channel. This is force SCC strict mode where value 1 is used for
g_enable_go_force_scc ini. In this mode GC will have to do full
scan as the GO channel may be different from actual negotiated
channel. DUT may see some issues if GC dosent do full scan in
this mode.

As part of this change, add support for value 2(Liberal mode)
in g_enable_go_force_scc ini. As part of this liberal mode,
driver will allow the GO to start in MCC mode and after set key,
it will check any other concurrent GO and will do forceSCC for
that GO to the newly formed GO channel.

Change-Id: Ifc7beb06335616c51dc064f48a78b825dbdbda25
CRs-Fixed: 2992098
This commit is contained in:
sheenam monga
2021-08-27 13:32:11 +05:30
committed by Madan Koyyalamudi
szülő c339ab4ddf
commit 265f8960fa
10 fájl változott, egészen pontosan 399 új sor hozzáadva és 7 régi sor törölve

Fájl megtekintése

@@ -670,6 +670,106 @@ policy_mgr_is_p2p_p2p_conc_supported(struct wlan_objmgr_psoc *psoc)
}
#endif
#define GO_FORCE_SCC_DISABLE 0
#define GO_FORCE_SCC_STRICT 1
#define GO_FORCE_SCC_LIBERAL 2
#ifdef WLAN_FEATURE_P2P_P2P_STA
/**
* Stay in MCC for 1 second, in case of first p2p go channel
* needs to be moved to curr go channel
*/
#define WAIT_BEFORE_GO_FORCESCC_RESTART (1000)
/**
* policy_mgr_is_go_scc_strict() - Get GO force SCC enabled or not
* @psoc: psoc object
*
* This function checks if force SCC logic should be used on GO interface
* as a strict mode.
*
* Return: True if p2p needs o be start on provided channel only.
*/
bool policy_mgr_is_go_scc_strict(struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_check_forcescc_for_other_go() - check if another p2pgo
* is present and find vdev id.
*
* @psoc: psoc object
* @vdev: vdev id
* @freq: frequency
*
* This function checks if another p2p go is there.
*
* Return: vdev_id
*/
uint8_t
policy_mgr_check_forcescc_for_other_go(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint32_t curr_go_freq);
/**
* policy_mgr_process_forcescc_for_go () - start work queue to move first p2p go
* to new p2p go's channel
*
* @psoc: PSOC object information
* @vdev_id: Vdev id
* @ch_freq: Channel frequency to change
* @ch_width: channel width to change
*
* starts delayed work queue of 1 second to move first p2p go to new
* p2p go's channel.
*
* Return: None
*/
void policy_mgr_process_forcescc_for_go(
struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint32_t ch_freq, uint32_t ch_width);
/**
* policy_mgr_do_go_plus_go_force_scc() - First p2p go
* to new p2p go's channel
*
* @psoc: PSOC object information
* @vdev_id: Vdev id
* @ch_freq: Channel frequency to change
* @ch_width: channel width to change
*
* Move first p2p go to new
* p2p go's channel.
*
* Return: None
*/
void policy_mgr_do_go_plus_go_force_scc(
struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint32_t ch_freq, uint32_t ch_width);
#else
static inline
bool policy_mgr_is_go_scc_strict(struct wlan_objmgr_psoc *psoc)
{
return false;
}
static inline
uint8_t policy_mgr_check_forcescc_for_other_go(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id,
uint32_t curr_go_freq)
{
return WLAN_UMAC_VDEV_ID_MAX;
}
static inline
void policy_mgr_process_forcescc_for_go(
struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint32_t ch_freq, uint32_t ch_width)
{}
static inline
void policy_mgr_do_go_plus_go_force_scc(
struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint32_t ch_freq, uint32_t ch_width)
{}
#endif
/**
* policy_mgr_set_pcl_for_existing_combo() - SET PCL for existing combo
* @psoc: PSOC object information

Fájl megtekintése

@@ -525,12 +525,19 @@ CFG_INI_UINT("g_mark_sap_indoor_as_disable", 0, 1, 0, CFG_VALUE_OR_DEFAULT, \
* <ini>
* g_enable_go_force_scc - Enable/Disable force SCC on P2P GO
* @Min: 0
* @Max: 1
* @Max: 2
* @Default: 0
*
* This ini and along with "gWlanMccToSccSwitchMode" is used to enable
* force SCC on P2P GO interface.
*
* GO_FORCE_SCC_DISABLED (value 0): GO force scc disabled and GO can come up
* in MCC mode
* GO_FORCE_SCC_STRICT (value 1): New GO will be forced to form on existing
* GO/STA/GC channel in start bss itself.
* GO_FORCE_SCC_LIBERAL (value 2): After SET KEY is done, do force SCC for the
* first GO to move to new GO channel.
*
* Supported Feature: P2P GO
*
* Usage: External
@@ -539,7 +546,7 @@ CFG_INI_UINT("g_mark_sap_indoor_as_disable", 0, 1, 0, CFG_VALUE_OR_DEFAULT, \
*/
#define CFG_P2P_GO_ENABLE_FORCE_SCC \
CFG_INI_UINT("g_enable_go_force_scc", 0, 1, 0, CFG_VALUE_OR_DEFAULT, \
CFG_INI_UINT("g_enable_go_force_scc", 0, 2, 0, CFG_VALUE_OR_DEFAULT, \
"Enable/Disable P2P GO force SCC")
/**

Fájl megtekintése

@@ -1298,12 +1298,30 @@ struct connection_info {
uint32_t ch_freq;
};
/**
* struct go_plus_go_force_scc - structure to hold p2p go
* params for forcescc restart
*
* @vdev_id: vdev id of first p2p go which needs to do csa
* @ch_freq: ch freq of curr p2p go
* @ch_width: ch width of curr p2p go
*/
struct go_plus_go_force_scc {
uint8_t vdev_id;
uint32_t ch_freq;
uint32_t ch_width;
};
/**
* struct sta_ap_intf_check_work_ctx - sta_ap_intf_check_work
* related info
* @psoc: pointer to PSOC object information
* @go_plus_go_force_scc: structure to hold params of
* curr and first p2p go ctx
*/
struct sta_ap_intf_check_work_ctx {
struct wlan_objmgr_psoc *psoc;
struct go_plus_go_force_scc go_plus_go_force_scc;
};
#endif /* __WLAN_POLICY_MGR_PUBLIC_STRUCT_H */

Fájl megtekintése

@@ -2022,6 +2022,22 @@ static void __policy_mgr_check_sta_ap_concurrent_ch_intf(
policy_mgr_err("Invalid context");
return;
}
/*
* Check if force scc is required for GO + GO case. vdev id will be
* valid in case of GO+GO force scc only. So, for valid vdev id move
* first GO to newly formed GO channel.
*/
policy_mgr_debug("p2p go vdev id: %d",
pm_ctx->sta_ap_intf_check_work_info->go_plus_go_force_scc.vdev_id);
if (pm_ctx->sta_ap_intf_check_work_info->go_plus_go_force_scc.vdev_id <
WLAN_UMAC_VDEV_ID_MAX) {
policy_mgr_do_go_plus_go_force_scc(
pm_ctx->psoc, pm_ctx->sta_ap_intf_check_work_info->go_plus_go_force_scc.vdev_id,
pm_ctx->sta_ap_intf_check_work_info->go_plus_go_force_scc.ch_freq,
pm_ctx->sta_ap_intf_check_work_info->go_plus_go_force_scc.ch_width);
pm_ctx->sta_ap_intf_check_work_info->go_plus_go_force_scc.vdev_id = WLAN_UMAC_VDEV_ID_MAX;
return;
}
mcc_to_scc_switch =
policy_mgr_get_mcc_to_scc_switch_mode(pm_ctx->psoc);
@@ -2584,6 +2600,56 @@ void policy_mgr_change_sap_channel_with_csa(struct wlan_objmgr_psoc *psoc,
}
#endif /* FEATURE_WLAN_MCC_TO_SCC_SWITCH */
#ifdef WLAN_FEATURE_P2P_P2P_STA
void policy_mgr_do_go_plus_go_force_scc(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint32_t ch_freq,
uint32_t ch_width)
{
uint8_t total_connection;
total_connection = policy_mgr_mode_specific_connection_count(
psoc, PM_P2P_GO_MODE, NULL);
policy_mgr_debug("Total p2p go connection %d", total_connection);
/* If any p2p disconnected, don't do csa */
if (total_connection > 1) {
policy_mgr_change_sap_channel_with_csa(psoc, vdev_id,
ch_freq, ch_width, true);
}
}
void policy_mgr_process_forcescc_for_go(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint32_t ch_freq,
uint32_t ch_width)
{
struct policy_mgr_psoc_priv_obj *pm_ctx;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return;
}
if (!pm_ctx->sta_ap_intf_check_work_info) {
policy_mgr_err("invalid work info");
return;
}
pm_ctx->sta_ap_intf_check_work_info->go_plus_go_force_scc.vdev_id =
vdev_id;
pm_ctx->sta_ap_intf_check_work_info->go_plus_go_force_scc.ch_freq =
ch_freq;
pm_ctx->sta_ap_intf_check_work_info->go_plus_go_force_scc.ch_width =
ch_width;
if (!qdf_delayed_work_start(&pm_ctx->sta_ap_intf_check_work,
WAIT_BEFORE_GO_FORCESCC_RESTART)) {
policy_mgr_err("change interface request failure");
pm_ctx->sta_ap_intf_check_work_info->go_plus_go_force_scc.vdev_id =
WLAN_UMAC_VDEV_ID_MAX;
}
}
#endif
QDF_STATUS policy_mgr_wait_for_connection_update(struct wlan_objmgr_psoc *psoc)
{
QDF_STATUS status;

Fájl megtekintése

@@ -4636,6 +4636,63 @@ bool policy_mgr_go_scc_enforced(struct wlan_objmgr_psoc *psoc)
return false;
}
#ifdef WLAN_FEATURE_P2P_P2P_STA
uint8_t
policy_mgr_check_forcescc_for_other_go(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint32_t freq)
{
struct policy_mgr_psoc_priv_obj *pm_ctx;
uint32_t conn_index;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return WLAN_UMAC_VDEV_ID_MAX;
}
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS;
conn_index++) {
if (pm_conc_connection_list[conn_index].mode ==
PM_P2P_GO_MODE &&
pm_conc_connection_list[conn_index].in_use &&
wlan_reg_is_same_band_freqs(
freq,
pm_conc_connection_list[conn_index].freq) &&
freq != pm_conc_connection_list[conn_index].freq &&
vdev_id != pm_conc_connection_list[conn_index].vdev_id) {
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
policy_mgr_debug(
"Existing p2p go vdev_id is %d",
pm_conc_connection_list[conn_index].vdev_id);
return pm_conc_connection_list[conn_index].vdev_id;
}
}
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
return WLAN_UMAC_VDEV_ID_MAX;
}
bool policy_mgr_is_go_scc_strict(struct wlan_objmgr_psoc *psoc)
{
struct policy_mgr_psoc_priv_obj *pm_ctx;
bool ret = false;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
ret = false;
goto return_val;
}
if (pm_ctx->cfg.go_force_scc & GO_FORCE_SCC_STRICT) {
ret = true;
goto return_val;
}
ret = false;
return_val:
policy_mgr_debug("ret val is %d", ret);
return ret;
}
#endif
QDF_STATUS policy_mgr_update_nan_vdev_mac_info(struct wlan_objmgr_psoc *psoc,
uint8_t nan_vdev_id,
uint8_t mac_id)

Fájl megtekintése

@@ -339,6 +339,8 @@ QDF_STATUS policy_mgr_psoc_open(struct wlan_objmgr_psoc *psoc)
return QDF_STATUS_E_FAILURE;
}
pm_ctx->sta_ap_intf_check_work_info->psoc = psoc;
pm_ctx->sta_ap_intf_check_work_info->go_plus_go_force_scc.vdev_id =
WLAN_UMAC_VDEV_ID_MAX;
if (QDF_IS_STATUS_ERROR(qdf_delayed_work_create(
&pm_ctx->sta_ap_intf_check_work,
policy_mgr_check_sta_ap_concurrent_ch_intf,