qcacld-3.0: Add an API to check if a new connection causes DBS/SBS
Add an API to loop through all existing connections and check if the new connection frequency causes DBS/SBS. Change-Id: Ib7929fc969cd04a26e082f6f9a3acf991befcc5d CRs-Fixed: 3600235
This commit is contained in:

committed by
Rahul Choudhary

szülő
1d6c4f420f
commit
825a7d1dd9
@@ -5530,4 +5530,16 @@ uint32_t policy_mgr_get_beaconing_mode_info(struct wlan_objmgr_psoc *psoc,
|
||||
bool policy_mgr_is_freq_on_mac_id(struct policy_mgr_freq_range *freq_range,
|
||||
qdf_freq_t freq, uint8_t mac_id);
|
||||
|
||||
/**
|
||||
* policy_mgr_is_conn_lead_to_dbs_sbs() - New freq leads to DBS/SBS
|
||||
* @psoc: PSOC object information
|
||||
* @freq: New connection frequency
|
||||
*
|
||||
* This API loops through existing connections from policy_mgr connection table
|
||||
*
|
||||
* Return: True if new frequency causes DBS/SBS with existing connections
|
||||
*/
|
||||
bool
|
||||
policy_mgr_is_conn_lead_to_dbs_sbs(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t freq);
|
||||
#endif /* __WLAN_POLICY_MGR_API_H */
|
||||
|
@@ -845,6 +845,27 @@ policy_mgr_get_third_conn_action_table(
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
policy_mgr_is_conn_lead_to_dbs_sbs(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t freq)
|
||||
{
|
||||
struct connection_info info[MAX_NUMBER_OF_CONC_CONNECTIONS] = {0};
|
||||
uint32_t connection_count, i;
|
||||
|
||||
if (policy_mgr_is_current_hwmode_dbs(psoc) ||
|
||||
policy_mgr_is_current_hwmode_sbs(psoc))
|
||||
return true;
|
||||
|
||||
connection_count = policy_mgr_get_connection_info(psoc, info);
|
||||
|
||||
for (i = 0; i < connection_count; i++)
|
||||
if (!policy_mgr_2_freq_always_on_same_mac(psoc, freq,
|
||||
info[i].ch_freq))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static QDF_STATUS
|
||||
policy_mgr_get_next_action(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t session_id,
|
||||
|
Reference in New Issue
Block a user