qcacld-3.0: Removed IBSS from wlan_policy_mgr

Removed IBSS feature from wlan policy Manager

Change-Id: If31514e8b67042a798419e29ddda0538e2ebb265
CRs-Fixed: 2681063
This commit is contained in:
Utkarsh Bhatnagar
2020-05-07 18:03:11 +05:30
committed by nshrivas
parent f3a05294f4
commit f3e4542667
10 changed files with 242 additions and 1568 deletions

View File

@@ -1018,19 +1018,6 @@ policy_mgr_get_preferred_dbs_action_table(
uint32_t ch_freq,
enum policy_mgr_conn_update_reason reason);
/**
* policy_mgr_is_ibss_conn_exist() - to check if IBSS connection already present
* @psoc: PSOC object information
* @ibss_ch_freq: pointer to ibss channel which needs to be filled
*
* this routine will check if IBSS connection already exist or no. If it
* exist then this routine will return true and fill the ibss_channel value.
*
* Return: true if ibss connection exist else false
*/
bool policy_mgr_is_ibss_conn_exist(struct wlan_objmgr_psoc *psoc,
uint32_t *ibss_ch_freq);
/**
* policy_mgr_get_conn_info() - get the current connections list
* @len: length of the list

View File

@@ -255,7 +255,6 @@ enum policy_mgr_conc_priority_mode {
* @PM_SAP_MODE: SAP mode
* @PM_P2P_CLIENT_MODE: P2P client mode
* @PM_P2P_GO_MODE: P2P Go mode
* @PM_IBSS_MODE: IBSS mode
* @PM_NDI_MODE: NDI mode
* @PM_NAN_DISC_MODE: NAN Discovery mode
* @PM_MAX_NUM_OF_MODE: max value place holder
@@ -265,7 +264,6 @@ enum policy_mgr_con_mode {
PM_SAP_MODE,
PM_P2P_CLIENT_MODE,
PM_P2P_GO_MODE,
PM_IBSS_MODE,
PM_NDI_MODE,
PM_NAN_DISC_MODE,
PM_MAX_NUM_OF_MODE
@@ -371,10 +369,6 @@ enum policy_mgr_pcl_type {
* @PM_SAP_24_2x2: SAP connection using 2x2@2.4 Ghz
* @PM_SAP_5_1x1: SAP connection using 1x1@5 Ghz
* @PM_SAP_5_1x1: SAP connection using 2x2@5 Ghz
* @PM_IBSS_24_1x1: IBSS connection using 1x1@2.4 Ghz
* @PM_IBSS_24_2x2: IBSS connection using 2x2@2.4 Ghz
* @PM_IBSS_5_1x1: IBSS connection using 1x1@5 Ghz
* @PM_IBSS_5_2x2: IBSS connection using 2x2@5 Ghz
* @PM_NAN_DISC_24_1x1: NAN Discovery using 1x1@2.4 Ghz
* @PM_NAN_DISC_24_2x2: NAN Discovery using 2x2@2.4 Ghz
* @PM_NDI_24_1x1: NAN Datapath using 1x1@2.4 Ghz
@@ -403,10 +397,6 @@ enum policy_mgr_one_connection_mode {
PM_SAP_24_2x2,
PM_SAP_5_1x1,
PM_SAP_5_2x2,
PM_IBSS_24_1x1,
PM_IBSS_24_2x2,
PM_IBSS_5_1x1,
PM_IBSS_5_2x2,
PM_NAN_DISC_24_1x1,
PM_NAN_DISC_24_2x2,
PM_NDI_24_1x1,
@@ -897,7 +887,6 @@ enum policy_mgr_band {
/**
* enum policy_mgr_conn_update_reason: Reason for conc connection update
* @POLICY_MGR_UPDATE_REASON_SET_OPER_CHAN: Set probable operating channel
* @POLICY_MGR_UPDATE_REASON_JOIN_IBSS: Join IBSS
* @POLICY_MGR_UPDATE_REASON_UT: Unit test related
* @POLICY_MGR_UPDATE_REASON_START_AP: Start AP
* @POLICY_MGR_UPDATE_REASON_NORMAL_STA: Connection to Normal STA
@@ -916,7 +905,6 @@ enum policy_mgr_band {
*/
enum policy_mgr_conn_update_reason {
POLICY_MGR_UPDATE_REASON_SET_OPER_CHAN,
POLICY_MGR_UPDATE_REASON_JOIN_IBSS,
POLICY_MGR_UPDATE_REASON_UT,
POLICY_MGR_UPDATE_REASON_START_AP,
POLICY_MGR_UPDATE_REASON_NORMAL_STA,

View File

@@ -1025,10 +1025,6 @@ static uint32_t policy_mgr_dump_current_concurrency_one_connection(
count = strlcat(cc_mode, "P2P GO",
length);
break;
case PM_IBSS_MODE:
count = strlcat(cc_mode, "IBSS",
length);
break;
case PM_NAN_DISC_MODE:
count = strlcat(cc_mode, "NAN DISC", length);
break;
@@ -1086,12 +1082,6 @@ static uint32_t policy_mgr_dump_current_concurrency_two_connection(
count += strlcat(cc_mode, "+P2P GO",
length);
break;
case PM_IBSS_MODE:
count = policy_mgr_dump_current_concurrency_one_connection(
cc_mode, length);
count += strlcat(cc_mode, "+IBSS",
length);
break;
case PM_NDI_MODE:
count = policy_mgr_dump_current_concurrency_one_connection(
cc_mode, length);
@@ -1149,12 +1139,6 @@ static uint32_t policy_mgr_dump_current_concurrency_three_connection(
count += strlcat(cc_mode, "+P2P GO",
length);
break;
case PM_IBSS_MODE:
count = policy_mgr_dump_current_concurrency_two_connection(
cc_mode, length);
count += strlcat(cc_mode, "+IBSS",
length);
break;
case PM_NAN_DISC_MODE:
count = policy_mgr_dump_current_concurrency_two_connection(
cc_mode, length);
@@ -1341,9 +1325,6 @@ QDF_STATUS policy_mgr_pdev_get_pcl(struct wlan_objmgr_psoc *psoc,
case QDF_SAP_MODE:
con_mode = PM_SAP_MODE;
break;
case QDF_IBSS_MODE:
con_mode = PM_IBSS_MODE;
break;
default:
policy_mgr_err("Unable to set PCL to FW: %d", mode);
return QDF_STATUS_E_FAILURE;
@@ -1552,8 +1533,6 @@ enum policy_mgr_con_mode policy_mgr_get_mode(uint8_t type,
subtype, type);
break;
}
} else if (type == WMI_VDEV_TYPE_IBSS) {
mode = PM_IBSS_MODE;
} else if (type == WMI_VDEV_TYPE_NAN) {
mode = PM_NAN_DISC_MODE;
} else if (type == WMI_VDEV_TYPE_NDI) {

View File

@@ -1640,7 +1640,6 @@ void policy_mgr_set_concurrency_mode(struct wlan_objmgr_psoc *psoc,
case QDF_P2P_CLIENT_MODE:
case QDF_P2P_GO_MODE:
case QDF_SAP_MODE:
case QDF_IBSS_MODE:
case QDF_MONITOR_MODE:
pm_ctx->concurrency_mode |= (1 << mode);
pm_ctx->no_of_open_sessions[mode]++;
@@ -1716,7 +1715,6 @@ void policy_mgr_incr_active_session(struct wlan_objmgr_psoc *psoc,
case QDF_P2P_CLIENT_MODE:
case QDF_P2P_GO_MODE:
case QDF_SAP_MODE:
case QDF_IBSS_MODE:
case QDF_NAN_DISC_MODE:
case QDF_NDI_MODE:
pm_ctx->no_of_active_sessions[mode]++;
@@ -1752,7 +1750,7 @@ void policy_mgr_incr_active_session(struct wlan_objmgr_psoc *psoc,
pm_ctx->tdls_cbacks.tdls_notify_increment_session(psoc);
/*
* Disable LRO/GRO if P2P or IBSS or SAP connection has come up or
* Disable LRO/GRO if P2P or SAP connection has come up or
* there are more than one STA connections
*/
if ((policy_mgr_mode_specific_connection_count(psoc, PM_STA_MODE, NULL) > 1) ||
@@ -1760,9 +1758,6 @@ void policy_mgr_incr_active_session(struct wlan_objmgr_psoc *psoc,
(policy_mgr_mode_specific_connection_count(psoc, PM_P2P_CLIENT_MODE, NULL) >
0) ||
(policy_mgr_mode_specific_connection_count(psoc, PM_P2P_GO_MODE, NULL) > 0) ||
(policy_mgr_mode_specific_connection_count(psoc,
PM_IBSS_MODE,
NULL) > 0) ||
(policy_mgr_mode_specific_connection_count(psoc,
PM_NDI_MODE,
NULL) > 0)) {
@@ -1817,7 +1812,6 @@ QDF_STATUS policy_mgr_decr_active_session(struct wlan_objmgr_psoc *psoc,
case QDF_P2P_CLIENT_MODE:
case QDF_P2P_GO_MODE:
case QDF_SAP_MODE:
case QDF_IBSS_MODE:
case QDF_NAN_DISC_MODE:
case QDF_NDI_MODE:
if (pm_ctx->no_of_active_sessions[mode])
@@ -1859,9 +1853,6 @@ QDF_STATUS policy_mgr_decr_active_session(struct wlan_objmgr_psoc *psoc,
(policy_mgr_mode_specific_connection_count(psoc,
PM_P2P_GO_MODE,
NULL) == 0) &&
(policy_mgr_mode_specific_connection_count(psoc,
PM_IBSS_MODE,
NULL) == 0) &&
(policy_mgr_mode_specific_connection_count(psoc,
PM_NDI_MODE,
NULL) == 0))) {
@@ -2069,9 +2060,6 @@ bool policy_mgr_map_concurrency_mode(enum QDF_OPMODE *old_mode,
case QDF_P2P_GO_MODE:
*new_mode = PM_P2P_GO_MODE;
break;
case QDF_IBSS_MODE:
*new_mode = PM_IBSS_MODE;
break;
case QDF_NAN_DISC_MODE:
*new_mode = PM_NAN_DISC_MODE;
break;
@@ -2087,42 +2075,6 @@ bool policy_mgr_map_concurrency_mode(enum QDF_OPMODE *old_mode,
return status;
}
bool policy_mgr_is_ibss_conn_exist(struct wlan_objmgr_psoc *psoc,
uint32_t *ibss_ch_freq)
{
uint32_t count = 0, index = 0;
uint32_t list[MAX_NUMBER_OF_CONC_CONNECTIONS];
bool status = false;
struct policy_mgr_psoc_priv_obj *pm_ctx;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return status;
}
if (!ibss_ch_freq) {
policy_mgr_err("Null pointer error");
return false;
}
count = policy_mgr_mode_specific_connection_count(
psoc, PM_IBSS_MODE, list);
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
if (count == 0) {
/* No IBSS connection */
status = false;
} else if (count == 1) {
*ibss_ch_freq = pm_conc_connection_list[list[index]].freq;
status = true;
} else {
*ibss_ch_freq = pm_conc_connection_list[list[index]].freq;
policy_mgr_debug("Multiple IBSS connections, picking first one");
status = true;
}
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
return status;
}
uint32_t policy_mgr_get_mode_specific_conn_info(
struct wlan_objmgr_psoc *psoc,
uint32_t *ch_freq_list, uint8_t *vdev_id,
@@ -2484,98 +2436,6 @@ bool policy_mgr_is_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
goto done;
}
/*
* Check all IBSS+STA concurrencies
*
* don't allow IBSS + STA MCC
* don't allow IBSS + STA SCC if IBSS is on DFS channel
*/
if ((PM_IBSS_MODE == mode) &&
(policy_mgr_mode_specific_connection_count(psoc,
PM_IBSS_MODE, list)) && count) {
policy_mgr_rl_debug("No 2nd IBSS, we already have STA + IBSS");
goto done;
}
if ((PM_IBSS_MODE == mode) &&
(wlan_reg_is_dfs_for_freq(pm_ctx->pdev, ch_freq)) && count) {
policy_mgr_rl_debug("No IBSS + STA SCC/MCC, IBSS is on DFS channel");
goto done;
}
if (PM_IBSS_MODE == mode) {
if (policy_mgr_is_hw_dbs_capable(psoc) == true) {
if (num_connections > 1) {
policy_mgr_rl_debug("No IBSS, we have concurrent connections already");
goto done;
}
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
if (PM_STA_MODE != pm_conc_connection_list[0].mode) {
policy_mgr_rl_debug("No IBSS, we've a non-STA connection");
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
goto done;
}
/*
* This logic protects STA and IBSS to come up on same
* band. If requirement changes then this condition
* needs to be removed
*/
if (ch_freq &&
pm_conc_connection_list[0].freq != ch_freq &&
WLAN_REG_IS_SAME_BAND_FREQS(
pm_conc_connection_list[0].freq, ch_freq)) {
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
policy_mgr_rl_debug("No IBSS + STA MCC");
goto done;
}
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
} else if (num_connections) {
policy_mgr_rl_debug("No IBSS, we have one connection already");
goto done;
}
}
if ((PM_STA_MODE == mode) &&
(policy_mgr_mode_specific_connection_count(psoc,
PM_IBSS_MODE, list)) && count) {
policy_mgr_rl_debug("No 2nd STA, we already have STA + IBSS");
goto done;
}
if ((PM_STA_MODE == mode) &&
(policy_mgr_mode_specific_connection_count(psoc,
PM_IBSS_MODE, list))) {
if (policy_mgr_is_hw_dbs_capable(psoc) == true) {
if (num_connections > 1) {
policy_mgr_rl_debug("No 2nd STA, we already have IBSS concurrency");
goto done;
}
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
if (ch_freq &&
(wlan_reg_is_dfs_for_freq(pm_ctx->pdev,
pm_conc_connection_list[0].freq)) &&
(WLAN_REG_IS_5GHZ_CH_FREQ(ch_freq))) {
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
policy_mgr_rl_debug("No IBSS + STA SCC/MCC, IBSS is on DFS channel");
goto done;
}
/*
* This logic protects STA and IBSS to come up on same
* band. If requirement changes then this condition
* needs to be removed
*/
if (pm_conc_connection_list[0].freq != ch_freq &&
WLAN_REG_IS_SAME_BAND_FREQS(
pm_conc_connection_list[0].freq, ch_freq)) {
policy_mgr_rl_debug("No IBSS + STA MCC");
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
goto done;
}
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
} else {
policy_mgr_rl_debug("No STA, we have IBSS connection already");
goto done;
}
}
if (!policy_mgr_allow_sap_go_concurrency(psoc, mode, ch_freq,
WLAN_INVALID_VDEV_ID)) {
policy_mgr_rl_debug("This concurrency combination is not allowed");
@@ -3036,9 +2896,6 @@ enum policy_mgr_con_mode policy_mgr_convert_device_mode_to_qdf_type(
case QDF_SAP_MODE:
mode = PM_SAP_MODE;
break;
case QDF_IBSS_MODE:
mode = PM_IBSS_MODE;
break;
case QDF_NAN_DISC_MODE:
mode = PM_NAN_DISC_MODE;
break;
@@ -3071,9 +2928,6 @@ enum QDF_OPMODE policy_mgr_get_qdf_mode_from_pm(
case PM_P2P_GO_MODE:
mode = QDF_P2P_GO_MODE;
break;
case PM_IBSS_MODE:
mode = QDF_IBSS_MODE;
break;
case PM_NAN_DISC_MODE:
mode = QDF_NAN_DISC_MODE;
break;
@@ -3153,7 +3007,7 @@ bool policy_mgr_concurrent_open_sessions_running(
* for concurrent beaconing entities
* @psoc: PSOC object information
*
* Checks if multiple beaconing sessions are running i.e., if SAP or GO or IBSS
* Checks if multiple beaconing sessions are running i.e., if SAP or GO
* are beaconing together
*
* Return: True if multiple entities are beaconing together, False otherwise
@@ -3170,8 +3024,8 @@ bool policy_mgr_concurrent_beaconing_sessions_running(
}
return (pm_ctx->no_of_open_sessions[QDF_SAP_MODE] +
pm_ctx->no_of_open_sessions[QDF_P2P_GO_MODE] +
pm_ctx->no_of_open_sessions[QDF_IBSS_MODE] > 1) ? true : false;
pm_ctx->no_of_open_sessions[QDF_P2P_GO_MODE]
> 1) ? true : false;
}

View File

@@ -46,7 +46,6 @@ first_connection_pcl_table[PM_MAX_NUM_OF_MODE]
[PM_SAP_MODE] = {PM_5G, PM_5G, PM_5G },
[PM_P2P_CLIENT_MODE] = {PM_5G, PM_5G, PM_5G },
[PM_P2P_GO_MODE] = {PM_5G, PM_5G, PM_5G },
[PM_IBSS_MODE] = {PM_NONE, PM_NONE, PM_NONE},
[PM_NAN_DISC_MODE] = {PM_5G, PM_5G, PM_5G},
};
@@ -688,7 +687,6 @@ static QDF_STATUS policy_mgr_mode_specific_modification_on_pcl(
break;
case PM_STA_MODE:
case PM_P2P_CLIENT_MODE:
case PM_IBSS_MODE:
case PM_NAN_DISC_MODE:
status = QDF_STATUS_SUCCESS;
break;
@@ -964,21 +962,6 @@ enum policy_mgr_one_connection_mode
else
index = PM_P2P_GO_5_2x2;
}
} else if (PM_IBSS_MODE == pm_conc_connection_list[0].mode) {
if (WLAN_REG_IS_24GHZ_CH_FREQ(
pm_conc_connection_list[0].freq)) {
if (POLICY_MGR_ONE_ONE ==
pm_conc_connection_list[0].chain_mask)
index = PM_IBSS_24_1x1;
else
index = PM_IBSS_24_2x2;
} else {
if (POLICY_MGR_ONE_ONE ==
pm_conc_connection_list[0].chain_mask)
index = PM_IBSS_5_1x1;
else
index = PM_IBSS_5_2x2;
}
} else if (PM_NAN_DISC_MODE == pm_conc_connection_list[0].mode) {
if (POLICY_MGR_ONE_ONE == pm_conc_connection_list[0].chain_mask)
index = PM_NAN_DISC_24_1x1;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2018, 2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -44,10 +44,6 @@ static policy_mgr_next_action_two_connection_table_type
[PM_SAP_24_2x2] = {PM_NOP, PM_DBS2},
[PM_SAP_5_1x1] = {PM_DBS2, PM_NOP},
[PM_SAP_5_2x2] = {PM_DBS2_DOWNGRADE, PM_NOP},
[PM_IBSS_24_1x1] = {PM_NOP, PM_DBS2},
[PM_IBSS_24_2x2] = {PM_NOP, PM_DBS2},
[PM_IBSS_5_1x1] = {PM_DBS2, PM_NOP},
[PM_IBSS_5_2x2] = {PM_DBS2_DOWNGRADE, PM_NOP},
};
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2018, 2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -44,10 +44,6 @@ static policy_mgr_next_action_two_connection_table_type
[PM_SAP_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
[PM_SAP_5_1x1] = {PM_DBS1, PM_NOP},
[PM_SAP_5_2x2] = {PM_DBS1, PM_NOP},
[PM_IBSS_24_1x1] = {PM_NOP, PM_DBS1},
[PM_IBSS_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
[PM_IBSS_5_1x1] = {PM_DBS1, PM_NOP},
[PM_IBSS_5_2x2] = {PM_DBS1, PM_NOP},
};
/**