qcacld-3.0: Add support for STA+GO and CLI+GO for liberal mode
Currently in liberal mode STA+GO and CLI+GO scenario is not handled, so when sta is there and Go tries to come up then GO should follow STA or CLI's channel in case of force scc but as handling is not there so Go doesn't consider scc channel. Fix is to add handling of STA+GO and CLI+GO for liberal mode. Change-Id: I227fb0661c5c3a41b296fd0c954ac87675f28ed6 CRs-Fixed: 3048501
This commit is contained in:

committed by
Madan Koyyalamudi

parent
7117cb3c42
commit
898339bbbc
@@ -692,20 +692,29 @@ policy_mgr_is_p2p_p2p_conc_supported(struct wlan_objmgr_psoc *psoc)
|
||||
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.
|
||||
* policy_mgr_fetch_existing_con_info() - check if another vdev
|
||||
* is present and find mode, freq , vdev id and chan width
|
||||
*
|
||||
* @psoc: psoc object
|
||||
* @vdev: vdev id
|
||||
* @freq: frequency
|
||||
* @mode: existing vdev mode
|
||||
* @con_freq: existing connection freq
|
||||
* @ch_width: ch_width of existing connection
|
||||
*
|
||||
* This function checks if another p2p go is there.
|
||||
* This function checks if another vdev is there and fetch connection
|
||||
* info for that vdev.This is mainly for force SCC implementation of GO+GO ,
|
||||
* GO+SAP or GO+STA where we fetch other existing GO, STA, SAP on the same
|
||||
* band with MCC.
|
||||
*
|
||||
* 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_fetch_existing_con_info(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, uint32_t curr_go_freq,
|
||||
enum policy_mgr_con_mode *mode,
|
||||
uint32_t *con_freq,
|
||||
enum phy_ch_width *ch_width);
|
||||
|
||||
/**
|
||||
* policy_mgr_process_forcescc_for_go () - start work queue to move first p2p go
|
||||
@@ -715,6 +724,7 @@ policy_mgr_check_forcescc_for_other_go(struct wlan_objmgr_psoc *psoc,
|
||||
* @vdev_id: Vdev id
|
||||
* @ch_freq: Channel frequency to change
|
||||
* @ch_width: channel width to change
|
||||
* @mode: existing vdev mode
|
||||
*
|
||||
* starts delayed work queue of 1 second to move first p2p go to new
|
||||
* p2p go's channel.
|
||||
@@ -723,7 +733,8 @@ policy_mgr_check_forcescc_for_other_go(struct wlan_objmgr_psoc *psoc,
|
||||
*/
|
||||
void policy_mgr_process_forcescc_for_go(
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||
uint32_t ch_freq, uint32_t ch_width);
|
||||
uint32_t ch_freq, uint32_t ch_width,
|
||||
enum policy_mgr_con_mode mode);
|
||||
|
||||
/**
|
||||
* policy_mgr_do_go_plus_go_force_scc() - First p2p go
|
||||
@@ -750,9 +761,12 @@ bool policy_mgr_is_go_scc_strict(struct wlan_objmgr_psoc *psoc)
|
||||
}
|
||||
|
||||
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)
|
||||
uint8_t policy_mgr_fetch_existing_con_info(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
uint32_t curr_go_freq,
|
||||
enum policy_mgr_con_mode *mode,
|
||||
uint32_t *con_freq,
|
||||
enum phy_ch_width *ch_width)
|
||||
{
|
||||
return WLAN_UMAC_VDEV_ID_MAX;
|
||||
}
|
||||
@@ -760,7 +774,8 @@ uint8_t policy_mgr_check_forcescc_for_other_go(struct wlan_objmgr_psoc *psoc,
|
||||
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)
|
||||
uint32_t ch_freq, uint32_t ch_width,
|
||||
enum policy_mgr_con_mode mode)
|
||||
{}
|
||||
|
||||
static inline
|
||||
|
@@ -2026,25 +2026,27 @@ static void __policy_mgr_check_sta_ap_concurrent_ch_intf(
|
||||
uint32_t ch_freq;
|
||||
uint32_t op_ch_freq_list[MAX_NUMBER_OF_CONC_CONNECTIONS];
|
||||
uint8_t vdev_id[MAX_NUMBER_OF_CONC_CONNECTIONS];
|
||||
struct sta_ap_intf_check_work_ctx *work_info;
|
||||
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("Invalid context");
|
||||
return;
|
||||
}
|
||||
work_info = pm_ctx->sta_ap_intf_check_work_info;
|
||||
/*
|
||||
* 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);
|
||||
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;
|
||||
pm_ctx->psoc, work_info->go_plus_go_force_scc.vdev_id,
|
||||
work_info->go_plus_go_force_scc.ch_freq,
|
||||
work_info->go_plus_go_force_scc.ch_width);
|
||||
work_info->go_plus_go_force_scc.vdev_id = WLAN_UMAC_VDEV_ID_MAX;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2642,9 +2644,11 @@ void policy_mgr_do_go_plus_go_force_scc(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
void policy_mgr_process_forcescc_for_go(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, uint32_t ch_freq,
|
||||
uint32_t ch_width)
|
||||
uint32_t ch_width,
|
||||
enum policy_mgr_con_mode mode)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
struct sta_ap_intf_check_work_ctx *work_info;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
@@ -2655,19 +2659,16 @@ void policy_mgr_process_forcescc_for_go(struct wlan_objmgr_psoc *psoc,
|
||||
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;
|
||||
work_info = pm_ctx->sta_ap_intf_check_work_info;
|
||||
if (mode == PM_P2P_GO_MODE) {
|
||||
work_info->go_plus_go_force_scc.vdev_id = vdev_id;
|
||||
work_info->go_plus_go_force_scc.ch_freq = ch_freq;
|
||||
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;
|
||||
}
|
||||
WAIT_BEFORE_GO_FORCESCC_RESTART))
|
||||
policy_mgr_debug("change interface request already queued");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -5155,8 +5155,11 @@ bool policy_mgr_go_scc_enforced(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
#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)
|
||||
policy_mgr_fetch_existing_con_info(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, uint32_t freq,
|
||||
enum policy_mgr_con_mode *mode,
|
||||
uint32_t *existing_con_freq,
|
||||
enum phy_ch_width *existing_ch_width)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
uint32_t conn_index;
|
||||
@@ -5170,8 +5173,12 @@ policy_mgr_check_forcescc_for_other_go(struct wlan_objmgr_psoc *psoc,
|
||||
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 &&
|
||||
if ((pm_conc_connection_list[conn_index].mode ==
|
||||
PM_P2P_GO_MODE ||
|
||||
pm_conc_connection_list[conn_index].mode ==
|
||||
PM_P2P_CLIENT_MODE ||
|
||||
pm_conc_connection_list[conn_index].mode ==
|
||||
PM_STA_MODE) &&
|
||||
pm_conc_connection_list[conn_index].in_use &&
|
||||
wlan_reg_is_same_band_freqs(
|
||||
freq,
|
||||
@@ -5180,8 +5187,14 @@ policy_mgr_check_forcescc_for_other_go(struct wlan_objmgr_psoc *psoc,
|
||||
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",
|
||||
"Existing vdev_id for mode %d is %d",
|
||||
pm_conc_connection_list[conn_index].mode,
|
||||
pm_conc_connection_list[conn_index].vdev_id);
|
||||
*mode = pm_conc_connection_list[conn_index].mode;
|
||||
*existing_con_freq =
|
||||
pm_conc_connection_list[conn_index].freq;
|
||||
*existing_ch_width = policy_mgr_get_ch_width(
|
||||
pm_conc_connection_list[conn_index].bw);
|
||||
return pm_conc_connection_list[conn_index].vdev_id;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user