qcacld-3.0: Select a different channel than self for SAP restart
Scenario of the issue is :- 1. Keep sta+sap_scc_dfs_ch as 0 to disable the dfs concurrency 2. Start a SAP on any 5ghz channel(NON-DFS). 3. Start a STA on a DFS channel. Expectation: The SAP should not do MCC, SCC as the above mentioned ini is 0, also MCC is not prefereed in a HW solution where DFS is preferred, hence the SAP should go to 2.4ghz and DBS should be the expectation. Observation: The SAP does not do a DBS operation, and falls to MCC here. Reason: When the SAP gets a PCL in the path of SAP restart, the PCL feels that a new SAP is going to come up, and hence gives the best channel (first element of PCL ) as its own, which leads to restart being rejected, as the SAP cannot start on a channel which is the same as existing. The final channel then selected is the STA channel, leading to DFS SCC which is also not allowed. Hence the SAP is now stuck in MCC(STA+SAP , one on DFS, and the other on NON-DFS channel). Fix: The fix is to get an alternate channel for SAP restart, other than the channel on which the SAP is already up, to lead to DBS, if the STA channel is not suitable for SCC operaion. Change-Id: Iab3ad22b2f970ca26ce3e6bc7a9b5ee34bc7e7ba CRs-Fixed: 2443718
This commit is contained in:

gecommit door
nshrivas

bovenliggende
0a3c8d83f2
commit
eae608a5a2
@@ -2555,24 +2555,29 @@ bool policy_mgr_is_force_scc(struct wlan_objmgr_psoc *psoc);
|
||||
* @psoc: PSOC object information
|
||||
* @con_ch: pointer to the channel on which sap will come up
|
||||
* @sap_ch: initial channel for SAP
|
||||
* @sap_vdev_id: sap vdev id.
|
||||
*
|
||||
* This function checks & updates the channel SAP to come up on in
|
||||
* case of STA+SAP concurrency
|
||||
* Return: Success if SAP can come up on a channel
|
||||
*/
|
||||
QDF_STATUS policy_mgr_valid_sap_conc_channel_check(
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t *con_ch, uint8_t sap_ch);
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t *con_ch, uint8_t sap_ch,
|
||||
uint8_t sap_vdev_id);
|
||||
|
||||
/**
|
||||
* policy_mgr_get_alternate_channel_for_sap() - Get an alternate
|
||||
* channel to move the SAP to
|
||||
* @psoc: PSOC object information
|
||||
* @sap_vdev_id: sap vdev id.
|
||||
* @sap_channel: sap channel.
|
||||
*
|
||||
* This function returns an alternate channel for SAP to move to
|
||||
* Return: The new channel for SAP
|
||||
*/
|
||||
uint8_t policy_mgr_get_alternate_channel_for_sap(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t sap_vdev_id,
|
||||
uint8_t sap_channel);
|
||||
|
||||
/**
|
||||
* policy_mgr_disallow_mcc() - Check for mcc
|
||||
|
@@ -1742,7 +1742,8 @@ static bool policy_mgr_valid_sta_channel_check(struct wlan_objmgr_psoc *psoc,
|
||||
}
|
||||
|
||||
QDF_STATUS policy_mgr_valid_sap_conc_channel_check(
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t *con_ch, uint8_t sap_ch)
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t *con_ch, uint8_t sap_ch,
|
||||
uint8_t sap_vdev_id)
|
||||
{
|
||||
uint8_t channel = *con_ch;
|
||||
uint8_t temp_channel = 0;
|
||||
@@ -1795,7 +1796,9 @@ QDF_STATUS policy_mgr_valid_sap_conc_channel_check(
|
||||
|
||||
if (policy_mgr_is_hw_dbs_capable(psoc)) {
|
||||
temp_channel =
|
||||
policy_mgr_get_alternate_channel_for_sap(psoc);
|
||||
policy_mgr_get_alternate_channel_for_sap(psoc,
|
||||
sap_vdev_id,
|
||||
sap_ch);
|
||||
policy_mgr_debug("temp_channel is %d",
|
||||
temp_channel);
|
||||
if (temp_channel) {
|
||||
|
@@ -1997,18 +1997,49 @@ uint8_t policy_mgr_mode_specific_get_channel(
|
||||
}
|
||||
|
||||
uint8_t policy_mgr_get_alternate_channel_for_sap(
|
||||
struct wlan_objmgr_psoc *psoc)
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t sap_vdev_id,
|
||||
uint8_t sap_channel)
|
||||
{
|
||||
uint8_t pcl_channels[QDF_MAX_NUM_CHAN];
|
||||
uint8_t pcl_weight[QDF_MAX_NUM_CHAN];
|
||||
uint8_t channel = 0;
|
||||
uint32_t pcl_len = 0;
|
||||
struct policy_mgr_conc_connection_info info;
|
||||
uint8_t num_cxn_del = 0;
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
uint8_t i;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("Invalid Context");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Store the connection's parameter and temporarily delete it
|
||||
* from the concurrency table. This way the get pcl can be used as a
|
||||
* new connection is coming up, after check, restore the connection to
|
||||
* concurrency table.
|
||||
*/
|
||||
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
|
||||
policy_mgr_store_and_del_conn_info_by_vdev_id(psoc, sap_vdev_id,
|
||||
&info, &num_cxn_del);
|
||||
|
||||
if (QDF_STATUS_SUCCESS == policy_mgr_get_pcl(psoc, PM_SAP_MODE,
|
||||
&pcl_channels[0], &pcl_len,
|
||||
pcl_channels, &pcl_len,
|
||||
pcl_weight, QDF_ARRAY_SIZE(pcl_weight))) {
|
||||
channel = pcl_channels[0];
|
||||
for (i = 0; i < pcl_len; i++) {
|
||||
if (pcl_channels[i] == sap_channel)
|
||||
continue;
|
||||
channel = pcl_channels[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Restore the connection entry */
|
||||
if (num_cxn_del > 0)
|
||||
policy_mgr_restore_deleted_conn_info(psoc, &info, num_cxn_del);
|
||||
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
||||
|
||||
return channel;
|
||||
}
|
||||
|
||||
|
Verwijs in nieuw issue
Block a user