qcacld-3.0: Add NAN+SAP concurrency related checks
Add NAN+SAP concurrency setup constraints in HDD. Change-Id: Ie7f2fa5694fc1b8af5931e9216164acbfcf3eafd CRs-fixed: 2431539
This commit is contained in:
parent
ad93a751b5
commit
956b69e3e0
@ -18254,7 +18254,7 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
|
|||||||
struct cfg80211_connect_params *req)
|
struct cfg80211_connect_params *req)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
u16 channel;
|
u16 channel, sap_cnt, sta_cnt;
|
||||||
const u8 *bssid = NULL;
|
const u8 *bssid = NULL;
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
|
||||||
const u8 *bssid_hint = req->bssid_hint;
|
const u8 *bssid_hint = req->bssid_hint;
|
||||||
@ -18301,13 +18301,20 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Disable NAN Discovery if incoming connection is P2P or if a STA
|
* Disable NAN Discovery if incoming connection is P2P or if a STA
|
||||||
* connection already exists and if this is a case of STA+STA.
|
* connection already exists and if this is a case of STA+STA
|
||||||
|
* or SAP+STA concurrency
|
||||||
*/
|
*/
|
||||||
if (adapter->device_mode == QDF_P2P_CLIENT_MODE ||
|
sta_cnt = policy_mgr_mode_specific_connection_count(hdd_ctx->psoc,
|
||||||
policy_mgr_mode_specific_connection_count(hdd_ctx->psoc,
|
PM_STA_MODE, NULL);
|
||||||
PM_STA_MODE, NULL))
|
sap_cnt = policy_mgr_mode_specific_connection_count(hdd_ctx->psoc,
|
||||||
ucfg_nan_disable_concurrency(hdd_ctx->psoc);
|
PM_SAP_MODE, NULL);
|
||||||
|
|
||||||
|
if (adapter->device_mode == QDF_P2P_CLIENT_MODE || sap_cnt || sta_cnt) {
|
||||||
|
hdd_debug("Invalid NAN concurrency. SAP: %d STA: %d P2P: %d",
|
||||||
|
sap_cnt, sta_cnt,
|
||||||
|
(adapter->device_mode == QDF_P2P_CLIENT_MODE));
|
||||||
|
ucfg_nan_disable_concurrency(hdd_ctx->psoc);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* STA+NDI concurrency gets preference over NDI+NDI. Disable
|
* STA+NDI concurrency gets preference over NDI+NDI. Disable
|
||||||
* first NDI in case an NDI+NDI concurrency exists.
|
* first NDI in case an NDI+NDI concurrency exists.
|
||||||
|
@ -5586,7 +5586,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
|
|||||||
hdd_unsafe_channel_restart_sap(hdd_ctx);
|
hdd_unsafe_channel_restart_sap(hdd_ctx);
|
||||||
|
|
||||||
hdd_set_connection_in_progress(false);
|
hdd_set_connection_in_progress(false);
|
||||||
|
policy_mgr_nan_sap_post_enable_conc_check(hdd_ctx->psoc);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto free;
|
goto free;
|
||||||
|
|
||||||
@ -5948,7 +5948,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|||||||
struct sme_sta_inactivity_timeout *sta_inactivity_timer;
|
struct sme_sta_inactivity_timeout *sta_inactivity_timer;
|
||||||
uint8_t channel, mandt_chnl_list = 0;
|
uint8_t channel, mandt_chnl_list = 0;
|
||||||
bool sta_sap_scc_on_dfs_chan;
|
bool sta_sap_scc_on_dfs_chan;
|
||||||
uint16_t sta_cnt;
|
uint16_t sta_cnt, sap_cnt;
|
||||||
bool val;
|
bool val;
|
||||||
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
||||||
|
|
||||||
@ -6026,9 +6026,10 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|||||||
sta_sap_scc_on_dfs_chan =
|
sta_sap_scc_on_dfs_chan =
|
||||||
policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(
|
policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(
|
||||||
hdd_ctx->psoc);
|
hdd_ctx->psoc);
|
||||||
sta_cnt =
|
sta_cnt = policy_mgr_mode_specific_connection_count(hdd_ctx->psoc,
|
||||||
policy_mgr_mode_specific_connection_count(
|
PM_STA_MODE, NULL);
|
||||||
hdd_ctx->psoc, PM_STA_MODE, NULL);
|
sap_cnt = policy_mgr_mode_specific_connection_count(hdd_ctx->psoc,
|
||||||
|
PM_SAP_MODE, NULL);
|
||||||
|
|
||||||
hdd_debug("sta_sap_scc_on_dfs_chan %u, sta_cnt %u",
|
hdd_debug("sta_sap_scc_on_dfs_chan %u, sta_cnt %u",
|
||||||
sta_sap_scc_on_dfs_chan, sta_cnt);
|
sta_sap_scc_on_dfs_chan, sta_cnt);
|
||||||
@ -6080,9 +6081,17 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|||||||
sap_cfg->SapHw_mode = eCSR_DOT11_MODE_abg;
|
sap_cfg->SapHw_mode = eCSR_DOT11_MODE_abg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable NAN Discovery before starting P2P GO */
|
/* Disable NAN Disc before starting P2P GO or STA+SAP or SAP+SAP */
|
||||||
if (adapter->device_mode == QDF_P2P_GO_MODE)
|
if (adapter->device_mode == QDF_P2P_GO_MODE || sta_cnt || sap_cnt) {
|
||||||
|
hdd_debug("Invalid NAN concurrency. SAP: %d STA: %d P2P_GO: %d",
|
||||||
|
sap_cnt, sta_cnt,
|
||||||
|
(adapter->device_mode == QDF_P2P_GO_MODE));
|
||||||
ucfg_nan_disable_concurrency(hdd_ctx->psoc);
|
ucfg_nan_disable_concurrency(hdd_ctx->psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!policy_mgr_nan_sap_pre_enable_conc_check(hdd_ctx->psoc,
|
||||||
|
PM_SAP_MODE, channel))
|
||||||
|
hdd_debug("NAN disabled due to concurrency constraints");
|
||||||
|
|
||||||
/* check if concurrency is allowed */
|
/* check if concurrency is allowed */
|
||||||
if (!policy_mgr_allow_concurrency(hdd_ctx->psoc,
|
if (!policy_mgr_allow_concurrency(hdd_ctx->psoc,
|
||||||
|
@ -8787,11 +8787,15 @@ void hdd_unsafe_channel_restart_sap(struct hdd_context *hdd_ctxt)
|
|||||||
* If STA+SAP is doing SCC & g_sta_sap_scc_on_lte_coex_chan
|
* If STA+SAP is doing SCC & g_sta_sap_scc_on_lte_coex_chan
|
||||||
* is set, no need to move SAP.
|
* is set, no need to move SAP.
|
||||||
*/
|
*/
|
||||||
if (policy_mgr_is_sta_sap_scc(hdd_ctxt->psoc,
|
if ((policy_mgr_is_sta_sap_scc(
|
||||||
adapter->session.ap.operating_channel) &&
|
hdd_ctxt->psoc,
|
||||||
scc_on_lte_coex)
|
adapter->session.ap.operating_channel) &&
|
||||||
hdd_debug("SAP is allowed on SCC channel, no need to move SAP");
|
scc_on_lte_coex) ||
|
||||||
else {
|
policy_mgr_nan_sap_scc_on_unsafe_ch_chk(
|
||||||
|
hdd_ctxt->psoc,
|
||||||
|
adapter->session.ap.operating_channel)) {
|
||||||
|
hdd_debug("SAP allowed in unsafe SCC channel");
|
||||||
|
} else {
|
||||||
for (i = 0; i < hdd_ctxt->unsafe_channel_count; i++) {
|
for (i = 0; i < hdd_ctxt->unsafe_channel_count; i++) {
|
||||||
if (adapter->session.ap.operating_channel ==
|
if (adapter->session.ap.operating_channel ==
|
||||||
hdd_ctxt->unsafe_channel_list[i]) {
|
hdd_ctxt->unsafe_channel_list[i]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user