qcacld-3.0: dynamic channel switch implementation
When dynamic channel switch is enabled, trigger acs and switch to best channel if wlan interference is found in 5g mac. Change-Id: I56661f5c42a233a0dc0a6400d75cb8f5c0019706 CRs-Fixed: 2599176
Этот коммит содержится в:

коммит произвёл
nshrivas

родитель
01c969852b
Коммит
1b3be2948e
@@ -72,6 +72,7 @@ typedef const enum policy_mgr_conc_next_action
|
||||
* @CSA_REASON_LTE_COEX: LTE coex.
|
||||
* @CSA_REASON_CONCURRENT_NAN_EVENT: NAN concurrency.
|
||||
* @CSA_REASON_BAND_RESTRICTED: band disabled or re-enabled
|
||||
* @CSA_REASON_DCS: DCS
|
||||
*
|
||||
*/
|
||||
enum sap_csa_reason_code {
|
||||
@@ -84,7 +85,8 @@ enum sap_csa_reason_code {
|
||||
CSA_REASON_UNSAFE_CHANNEL,
|
||||
CSA_REASON_LTE_COEX,
|
||||
CSA_REASON_CONCURRENT_NAN_EVENT,
|
||||
CSA_REASON_BAND_RESTRICTED
|
||||
CSA_REASON_BAND_RESTRICTED,
|
||||
CSA_REASON_DCS,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1878,6 +1880,33 @@ QDF_STATUS policy_mgr_get_chan_by_session_id(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t session_id,
|
||||
uint32_t *ch_freq);
|
||||
|
||||
/**
|
||||
* policy_mgr_get_sap_go_count_on_mac() - Provide the count of sap and go on
|
||||
* given mac
|
||||
* @psoc: PSOC object information
|
||||
* @list: To provide the vdev_id of the satisfied sap and go (optional)
|
||||
* @mac_id: MAC ID
|
||||
*
|
||||
* This function provides the count of the matched sap and go
|
||||
*
|
||||
* Return: count of the satisfied sap and go
|
||||
*/
|
||||
uint32_t policy_mgr_get_sap_go_count_on_mac(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *list, uint8_t mac_id);
|
||||
|
||||
/**
|
||||
* policy_mgr_is_sta_gc_active_on_mac() - Is there active sta/gc for a
|
||||
* given mac id
|
||||
* @psoc: PSOC object information
|
||||
* @mac_id: MAC ID
|
||||
*
|
||||
* Checks if there is active sta/gc for a given mac id
|
||||
*
|
||||
* Return: true if there is active sta/gc for a given mac id, false otherwise
|
||||
*/
|
||||
bool policy_mgr_is_sta_gc_active_on_mac(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t mac_id);
|
||||
|
||||
/**
|
||||
* policy_mgr_get_mac_id_by_session_id() - Get MAC ID for a given session ID
|
||||
* @psoc: PSOC object information
|
||||
|
@@ -2564,7 +2564,8 @@ policy_mgr_allow_concurrency_csa(struct wlan_objmgr_psoc *psoc,
|
||||
*/
|
||||
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
|
||||
|
||||
if (forced && reason == CSA_REASON_UNSAFE_CHANNEL)
|
||||
if (forced && (reason == CSA_REASON_UNSAFE_CHANNEL ||
|
||||
reason == CSA_REASON_DCS))
|
||||
policy_mgr_store_and_del_conn_info_by_chan_and_mode(
|
||||
psoc, old_ch_freq, mode, info, &num_cxn_del);
|
||||
else
|
||||
@@ -3065,6 +3066,44 @@ bool policy_mgr_is_multiple_active_sta_sessions(struct wlan_objmgr_psoc *psoc)
|
||||
psoc, PM_STA_MODE, NULL) > 1;
|
||||
}
|
||||
|
||||
bool policy_mgr_is_sta_gc_active_on_mac(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t mac_id)
|
||||
{
|
||||
uint32_t list[MAX_NUMBER_OF_CONC_CONNECTIONS];
|
||||
uint32_t index, count;
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("Invalid Context");
|
||||
return false;
|
||||
}
|
||||
|
||||
count = policy_mgr_mode_specific_connection_count(
|
||||
psoc, PM_STA_MODE, list);
|
||||
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
|
||||
for (index = 0; index < count; index++) {
|
||||
if (mac_id == pm_conc_connection_list[list[index]].mac) {
|
||||
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
||||
|
||||
count = policy_mgr_mode_specific_connection_count(
|
||||
psoc, PM_P2P_CLIENT_MODE, list);
|
||||
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
|
||||
for (index = 0; index < count; index++) {
|
||||
if (mac_id == pm_conc_connection_list[list[index]].mac) {
|
||||
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* policy_mgr_is_sta_active_connection_exists() - Check if a STA
|
||||
* connection is active
|
||||
@@ -3361,6 +3400,38 @@ QDF_STATUS policy_mgr_get_mac_id_by_session_id(struct wlan_objmgr_psoc *psoc,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
uint32_t policy_mgr_get_sap_go_count_on_mac(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *list, uint8_t mac_id)
|
||||
{
|
||||
uint32_t conn_index;
|
||||
uint32_t count = 0;
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("Invalid Context");
|
||||
return count;
|
||||
}
|
||||
|
||||
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].mac == mac_id &&
|
||||
pm_conc_connection_list[conn_index].in_use &&
|
||||
(pm_conc_connection_list[conn_index].mode == PM_SAP_MODE ||
|
||||
pm_conc_connection_list[conn_index].mode ==
|
||||
PM_P2P_GO_MODE)) {
|
||||
if (list)
|
||||
list[count] =
|
||||
pm_conc_connection_list[conn_index].vdev_id;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
QDF_STATUS policy_mgr_get_mcc_session_id_on_mac(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t mac_id, uint8_t session_id,
|
||||
uint8_t *mcc_session_id)
|
||||
|
Ссылка в новой задаче
Block a user