qcacld-3.0: Check concurrency before STA vdev start

Currently if there are 3 connections in MCC on same
MAC, FW asserts.
If there are several bssid for same ssid and channel id from wpa
supplicant is 0, driver will sort candidate AP and try one by
one, vdev start channel isn't decided until candidate is
selected, need do concurrency allow check at that time, or lead
to 3 connections on the same MAC.

STA+STA MCC on same MAC has no benefit,  total throughput is even
lower than single STA for channel switch frequently on same MAC.
so add check to disallow STA+STA MCC.

Change-Id: Id286096ea156915432807e42983c68cc83a8b42e
CRs-Fixed: 2545411
这个提交包含在:
Jianmin Zhu
2019-10-15 13:34:34 +08:00
提交者 nshrivas
父节点 f46232b8c4
当前提交 2e2d53ecec
修改 2 个文件,包含 31 行新增17 行删除

查看文件

@@ -2955,15 +2955,17 @@ bool policy_mgr_allow_sap_go_concurrency(struct wlan_objmgr_psoc *psoc,
uint32_t vdev_id);
/**
* policy_mgr_allow_multiple_sta_connections() - API to get FW support
* policy_mgr_allow_multiple_sta_connections() - check whether multiple STA
* concurrency is allowed and F/W supported
* @psoc: Pointer to soc
*
* This function checks FW support for simultaneous connections on
* concurrent STA interfaces.
* @second_sta_chan: 2nd STA channel
* @first_sta_chan: 2nd STA channel
*
* Return: true if supports else false.
*/
bool policy_mgr_allow_multiple_sta_connections(struct wlan_objmgr_psoc *psoc);
bool policy_mgr_allow_multiple_sta_connections(struct wlan_objmgr_psoc *psoc,
uint8_t second_sta_chan,
uint8_t first_sta_chan);
/**
* policy_mgr_dual_beacon_on_single_mac_scc_capable() - get capability that

查看文件

@@ -34,6 +34,7 @@
#include "wlan_objmgr_vdev_obj.h"
#include "wlan_nan_api.h"
#include "nan_public_structs.h"
#include "wlan_reg_services_api.h"
/* invalid channel id. */
#define INVALID_CHANNEL_ID 0
@@ -2114,6 +2115,7 @@ bool policy_mgr_is_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
uint32_t list[MAX_NUMBER_OF_CONC_CONNECTIONS];
struct policy_mgr_psoc_priv_obj *pm_ctx;
bool sta_sap_scc_on_dfs_chan;
uint8_t chan;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
@@ -2186,14 +2188,18 @@ bool policy_mgr_is_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
}
}
/* Check for STA+STA concurrency */
count = policy_mgr_mode_specific_connection_count(psoc, PM_STA_MODE,
list);
/* Check for STA+STA concurrency */
if (mode == PM_STA_MODE && count &&
!policy_mgr_allow_multiple_sta_connections(psoc)) {
policy_mgr_err("No 2nd STA connection, already one STA is connected");
goto done;
if (mode == PM_STA_MODE && count) {
if (count >= 2) {
policy_mgr_err("3rd STA isn't permitted");
goto done;
}
chan = pm_conc_connection_list[list[0]].chan;
if (!policy_mgr_allow_multiple_sta_connections(psoc, channel,
chan))
goto done;
}
/*
@@ -3753,7 +3759,9 @@ bool policy_mgr_allow_sap_go_concurrency(struct wlan_objmgr_psoc *psoc,
return true;
}
bool policy_mgr_allow_multiple_sta_connections(struct wlan_objmgr_psoc *psoc)
bool policy_mgr_allow_multiple_sta_connections(struct wlan_objmgr_psoc *psoc,
uint8_t second_sta_chan,
uint8_t first_sta_chan)
{
struct wmi_unified *wmi_handle;
@@ -3762,13 +3770,17 @@ bool policy_mgr_allow_multiple_sta_connections(struct wlan_objmgr_psoc *psoc)
policy_mgr_debug("Invalid WMI handle");
return false;
}
if (!wmi_service_enabled(wmi_handle,
wmi_service_sta_plus_sta_support))
return false;
if (wmi_service_enabled(wmi_handle,
wmi_service_sta_plus_sta_support))
return true;
if (second_sta_chan && second_sta_chan != first_sta_chan &&
wlan_reg_is_same_band_channels(second_sta_chan, first_sta_chan)) {
policy_mgr_err("STA+STA MCC isn't permitted");
return false;
}
policy_mgr_debug("Concurrent STA connections are not supported");
return false;
return true;
}
bool policy_mgr_dual_beacon_on_single_mac_scc_capable(