qcacld-3.0: SAP concurrency changes

SAP concurrency changes to support
SBS

Change-Id: I8a509b20ab172bce2df977f69a78f5ec0070535a
CRs-Fixed: 3052123
This commit is contained in:
Utkarsh Bhatnagar
2021-10-08 10:46:17 +05:30
gecommit door Madan Koyyalamudi
bovenliggende cea21cd5c9
commit fb350af4eb
12 gewijzigde bestanden met toevoegingen van 279 en 33 verwijderingen

Bestand weergeven

@@ -1040,6 +1040,28 @@ bool policy_mgr_allow_concurrency(struct wlan_objmgr_psoc *psoc,
enum hw_mode_bandwidth bw, enum hw_mode_bandwidth bw,
uint32_t ext_flags); uint32_t ext_flags);
/**
* policy_mgr_check_scc_sbs_channel() - Check for allowed
* concurrency combination
* @psoc: PSOC object information
* @mode: new connection mode
* @ch_freq: channel frequency on which new connection is coming up
* @bw: Bandwidth requested by the connection (optional)
* @vdev_id: Vdev Id
* @cc_mode: concurrent switch mode
*
* When a new connection is about to come up check if current
* concurrency combination including the new connection is
* allowed or not based on the HW capability, but no need to
* invoke get_pcl
*
* Return: True/False
*/
void policy_mgr_check_scc_sbs_channel(struct wlan_objmgr_psoc *psoc,
qdf_freq_t *intf_ch_freq,
qdf_freq_t sap_ch_freq,
uint8_t vdev_id, uint8_t cc_mode);
/** /**
* policy_mgr_nan_sap_pre_enable_conc_check() - Check if NAN+SAP SCC is * policy_mgr_nan_sap_pre_enable_conc_check() - Check if NAN+SAP SCC is
* allowed in given ch * allowed in given ch
@@ -1638,6 +1660,7 @@ struct policy_mgr_sme_cbacks {
* @wlan_hdd_indicate_active_ndp_cnt: indicate active ndp cnt to hdd * @wlan_hdd_indicate_active_ndp_cnt: indicate active ndp cnt to hdd
* @wlan_get_ap_prefer_conc_ch_params: get prefer ap channel bw parameters * @wlan_get_ap_prefer_conc_ch_params: get prefer ap channel bw parameters
* based on target channel frequency and concurrent connections. * based on target channel frequency and concurrent connections.
* @wlan_get_sap_acs_band: get acs band from sap config
*/ */
struct policy_mgr_hdd_cbacks { struct policy_mgr_hdd_cbacks {
void (*sap_restart_chan_switch_cb)(struct wlan_objmgr_psoc *psoc, void (*sap_restart_chan_switch_cb)(struct wlan_objmgr_psoc *psoc,
@@ -1663,6 +1686,8 @@ struct policy_mgr_hdd_cbacks {
struct wlan_objmgr_psoc *psoc, struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint32_t chan_freq, uint8_t vdev_id, uint32_t chan_freq,
struct ch_params *ch_params); struct ch_params *ch_params);
uint32_t (*wlan_get_sap_acs_band)(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint32_t *acs_band);
}; };
/** /**

Bestand weergeven

@@ -3155,7 +3155,9 @@ bool policy_mgr_disallow_mcc(struct wlan_objmgr_psoc *psoc,
} }
} else if (WLAN_REG_IS_5GHZ_CH_FREQ } else if (WLAN_REG_IS_5GHZ_CH_FREQ
(pm_conc_connection_list[index].freq)) { (pm_conc_connection_list[index].freq)) {
if (pm_conc_connection_list[index].freq != ch_freq) { if (pm_conc_connection_list[index].freq != ch_freq &&
!policy_mgr_are_sbs_chan(psoc, ch_freq,
pm_conc_connection_list[index].freq)) {
match = true; match = true;
break; break;
} }
@@ -3370,6 +3372,184 @@ bool policy_mgr_is_5g_channel_allowed(struct wlan_objmgr_psoc *psoc,
return true; return true;
} }
static qdf_freq_t
policy_mgr_get_iface_5g_freq(struct wlan_objmgr_psoc *psoc)
{
qdf_freq_t if_freq = 0;
struct policy_mgr_psoc_priv_obj *pm_ctx;
uint32_t conn_index;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return 0;
}
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].in_use &&
(WLAN_REG_IS_5GHZ_CH_FREQ(
pm_conc_connection_list[conn_index].freq) ||
WLAN_REG_IS_6GHZ_CHAN_FREQ(
pm_conc_connection_list[conn_index].freq))) {
if_freq = pm_conc_connection_list[conn_index].freq;
break;
}
}
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
return if_freq;
}
static qdf_freq_t
policy_mgr_get_iface_2g_freq(struct wlan_objmgr_psoc *psoc)
{
qdf_freq_t if_freq = 0;
struct policy_mgr_psoc_priv_obj *pm_ctx;
uint32_t conn_index;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return 0;
}
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].in_use &&
(WLAN_REG_IS_24GHZ_CH_FREQ(
pm_conc_connection_list[conn_index].freq))) {
if_freq = pm_conc_connection_list[conn_index].freq;
break;
}
}
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
return if_freq;
}
static qdf_freq_t
policy_mgr_get_same_band_iface_frq(struct wlan_objmgr_psoc *psoc,
qdf_freq_t ch_freq)
{
return (WLAN_REG_IS_24GHZ_CH_FREQ(ch_freq) ?
policy_mgr_get_iface_2g_freq(psoc) :
policy_mgr_get_iface_5g_freq(psoc));
}
void policy_mgr_check_scc_sbs_channel(struct wlan_objmgr_psoc *psoc,
qdf_freq_t *intf_ch_freq,
qdf_freq_t sap_ch_freq,
uint8_t vdev_id, uint8_t cc_mode)
{
uint32_t num_connections, acs_band = QCA_ACS_MODE_IEEE80211ANY;
struct policy_mgr_psoc_priv_obj *pm_ctx;
QDF_STATUS status;
struct policy_mgr_conc_connection_info
info[MAX_NUMBER_OF_CONC_CONNECTIONS] = { {0} };
uint8_t num_cxn_del = 0;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return;
}
if (pm_ctx->hdd_cbacks.wlan_get_sap_acs_band) {
status = pm_ctx->hdd_cbacks.wlan_get_sap_acs_band(psoc,
vdev_id,
&acs_band);
if (QDF_IS_STATUS_SUCCESS(status))
policy_mgr_debug("acs_band: %d", acs_band);
}
/*
* Different band, this also means that there is only one interface
* which is not on same band as csr_check_concurrent_channel_overlap
* try to find same band vdev if available
*/
if ((WLAN_REG_IS_24GHZ_CH_FREQ(sap_ch_freq) &&
!WLAN_REG_IS_24GHZ_CH_FREQ(*intf_ch_freq)) ||
(WLAN_REG_IS_24GHZ_CH_FREQ(*intf_ch_freq) &&
!WLAN_REG_IS_24GHZ_CH_FREQ(sap_ch_freq))) {
if (policy_mgr_is_current_hwmode_sbs(psoc))
goto sbs_check;
if (policy_mgr_is_hw_dbs_capable(psoc) ||
cc_mode == QDF_MCC_TO_SCC_WITH_PREFERRED_BAND) {
*intf_ch_freq = 0;
return;
}
} else if (policy_mgr_is_hw_dbs_capable(psoc) &&
cc_mode == QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL) {
/* Same band with Fav channel */
status = policy_mgr_get_sap_mandatory_channel(psoc,
sap_ch_freq,
intf_ch_freq);
if (QDF_IS_STATUS_SUCCESS(status))
return;
policy_mgr_debug("no mandatory channels (%d, %d)", sap_ch_freq,
*intf_ch_freq);
}
sbs_check:
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
/*
* For SAP restart case SAP entry might be present in table,
* so delete it temporary
*/
policy_mgr_store_and_del_conn_info_by_vdev_id(psoc, vdev_id, info,
&num_cxn_del);
/*
* If at least one interface is in same band as the required freq, try
* and set SBS/SCC.
*/
num_connections = policy_mgr_get_connection_count(psoc);
switch (num_connections) {
case 0:
/* use sap channel */
*intf_ch_freq = 0;
break;
case 1:
/* Do not overwrite if the channel can create SBS */
if (policy_mgr_are_sbs_chan(psoc, sap_ch_freq,
*intf_ch_freq))
*intf_ch_freq = 0;
break;
case 2:
if (policy_mgr_is_current_hwmode_sbs(psoc)) {
if (WLAN_REG_IS_24GHZ_CH_FREQ(sap_ch_freq)) {
if (acs_band == QCA_ACS_MODE_IEEE80211ANY)
*intf_ch_freq =
policy_mgr_get_iface_5g_freq(psoc);
else
/* keep the sap req unchanged, MCC on MAC 0 */
*intf_ch_freq = 0;
} else {
*intf_ch_freq =
policy_mgr_get_iface_5g_freq(psoc);
}
} else if (policy_mgr_is_current_hwmode_dbs(psoc)) {
*intf_ch_freq =
policy_mgr_get_same_band_iface_frq(psoc,
sap_ch_freq);
}
/* This mean Force SCC on *intf_ch_freq */
break;
default:
break;
}
/* Restore the connection entry */
if (num_cxn_del > 0)
policy_mgr_restore_deleted_conn_info(psoc, info, num_cxn_del);
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
}
/** /**
* policy_mgr_nss_update_cb() - callback from SME confirming nss * policy_mgr_nss_update_cb() - callback from SME confirming nss
* update * update

Bestand weergeven

@@ -717,6 +717,8 @@ QDF_STATUS policy_mgr_register_hdd_cb(struct wlan_objmgr_psoc *psoc,
hdd_cbacks->wlan_hdd_indicate_active_ndp_cnt; hdd_cbacks->wlan_hdd_indicate_active_ndp_cnt;
pm_ctx->hdd_cbacks.wlan_get_ap_prefer_conc_ch_params = pm_ctx->hdd_cbacks.wlan_get_ap_prefer_conc_ch_params =
hdd_cbacks->wlan_get_ap_prefer_conc_ch_params; hdd_cbacks->wlan_get_ap_prefer_conc_ch_params;
pm_ctx->hdd_cbacks.wlan_get_sap_acs_band =
hdd_cbacks->wlan_get_sap_acs_band;
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
@@ -739,6 +741,7 @@ QDF_STATUS policy_mgr_deregister_hdd_cb(struct wlan_objmgr_psoc *psoc)
pm_ctx->hdd_cbacks.hdd_is_cac_in_progress = NULL; pm_ctx->hdd_cbacks.hdd_is_cac_in_progress = NULL;
pm_ctx->hdd_cbacks.hdd_get_ap_6ghz_capable = NULL; pm_ctx->hdd_cbacks.hdd_get_ap_6ghz_capable = NULL;
pm_ctx->hdd_cbacks.wlan_get_ap_prefer_conc_ch_params = NULL; pm_ctx->hdd_cbacks.wlan_get_ap_prefer_conc_ch_params = NULL;
pm_ctx->hdd_cbacks.wlan_get_sap_acs_band = NULL;
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }

Bestand weergeven

@@ -3474,6 +3474,34 @@ sap_restart:
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
QDF_STATUS
wlan_get_sap_acs_band(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint32_t *acs_band)
{
struct hdd_adapter *ap_adapter = wlan_hdd_get_adapter_from_vdev(psoc,
vdev_id);
struct sap_config *sap_config;
if (!ap_adapter || (ap_adapter->device_mode != QDF_SAP_MODE &&
ap_adapter->device_mode != QDF_P2P_GO_MODE)) {
hdd_err("invalid adapter");
return QDF_STATUS_E_FAILURE;
}
/*
* If acs mode is false, that means acs is disabled and acs band can be
* QCA_ACS_MODE_IEEE80211ANY
*/
sap_config = &ap_adapter->session.ap.sap_config;
if (sap_config->acs_cfg.acs_mode == false) {
*acs_band = QCA_ACS_MODE_IEEE80211ANY;
return QDF_STATUS_SUCCESS;
}
*acs_band = sap_config->acs_cfg.band;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS QDF_STATUS
wlan_get_ap_prefer_conc_ch_params( wlan_get_ap_prefer_conc_ch_params(
struct wlan_objmgr_psoc *psoc, struct wlan_objmgr_psoc *psoc,

Bestand weergeven

@@ -110,6 +110,21 @@ QDF_STATUS wlan_hdd_get_channel_for_sap_restart(
struct wlan_objmgr_psoc *psoc, struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint32_t *ch_freq); uint8_t vdev_id, uint32_t *ch_freq);
/**
* wlan_get_sap_acs_band() - Get sap acs band
*
* @psoc: pointer to psoc
* @vdev_id: vdev id
* @acs_band: Pointer to acs_band
*
* This function is used to get sap acs band from sap config
*
* Return: QDF_STATUS_SUCCESS if successful
*/
uint32_t
wlan_get_sap_acs_band(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint32_t *acs_band);
/** /**
* wlan_get_ap_prefer_conc_ch_params() - Get prefer sap target channel * wlan_get_ap_prefer_conc_ch_params() - Get prefer sap target channel
* bw parameters * bw parameters

Bestand weergeven

@@ -3831,6 +3831,8 @@ static void hdd_register_policy_manager_callback(
hdd_indicate_active_ndp_cnt; hdd_indicate_active_ndp_cnt;
hdd_cbacks.wlan_get_ap_prefer_conc_ch_params = hdd_cbacks.wlan_get_ap_prefer_conc_ch_params =
wlan_get_ap_prefer_conc_ch_params; wlan_get_ap_prefer_conc_ch_params;
hdd_cbacks.wlan_get_sap_acs_band =
wlan_get_sap_acs_band;
if (QDF_STATUS_SUCCESS != if (QDF_STATUS_SUCCESS !=
policy_mgr_register_hdd_cb(psoc, &hdd_cbacks)) { policy_mgr_register_hdd_cb(psoc, &hdd_cbacks)) {

Bestand weergeven

@@ -976,7 +976,8 @@ sap_validate_chan(struct sap_context *sap_context,
mac_handle, mac_handle,
sap_context->chan_freq, sap_context->chan_freq,
sap_context->phyMode, sap_context->phyMode,
sap_context->cc_switch_mode); sap_context->cc_switch_mode,
sap_context->sessionId);
sap_debug("After check overlap: sap freq %d con freq:%d", sap_debug("After check overlap: sap freq %d con freq:%d",
sap_context->chan_freq, con_ch_freq); sap_context->chan_freq, con_ch_freq);
ch_params = sap_context->ch_params; ch_params = sap_context->ch_params;

Bestand weergeven

@@ -454,6 +454,7 @@ uint16_t wlansap_check_cc_intf(struct sap_context *sap_ctx)
struct mac_context *mac; struct mac_context *mac;
uint16_t intf_ch_freq; uint16_t intf_ch_freq;
eCsrPhyMode phy_mode; eCsrPhyMode phy_mode;
uint8_t vdev_id;
mac = sap_get_mac_context(); mac = sap_get_mac_context();
if (!mac) { if (!mac) {
@@ -461,11 +462,13 @@ uint16_t wlansap_check_cc_intf(struct sap_context *sap_ctx)
return 0; return 0;
} }
phy_mode = sap_ctx->phyMode; phy_mode = sap_ctx->phyMode;
vdev_id = sap_ctx->sessionId;
intf_ch_freq = sme_check_concurrent_channel_overlap( intf_ch_freq = sme_check_concurrent_channel_overlap(
MAC_HANDLE(mac), MAC_HANDLE(mac),
sap_ctx->chan_freq, sap_ctx->chan_freq,
phy_mode, phy_mode,
sap_ctx->cc_switch_mode); sap_ctx->cc_switch_mode,
vdev_id);
return intf_ch_freq; return intf_ch_freq;
} }
#endif #endif
@@ -3250,14 +3253,14 @@ qdf_freq_t wlansap_get_chan_band_restrict(struct sap_context *sap_ctx,
cc_mode = sap_ctx->cc_switch_mode; cc_mode = sap_ctx->cc_switch_mode;
phy_mode = sap_ctx->phyMode; phy_mode = sap_ctx->phyMode;
vdev_id = wlan_vdev_get_id(sap_ctx->vdev);
intf_ch_freq = sme_check_concurrent_channel_overlap( intf_ch_freq = sme_check_concurrent_channel_overlap(
MAC_HANDLE(mac), MAC_HANDLE(mac),
restart_freq, restart_freq,
phy_mode, phy_mode,
cc_mode); cc_mode, vdev_id);
if (intf_ch_freq) if (intf_ch_freq)
restart_freq = intf_ch_freq; restart_freq = intf_ch_freq;
vdev_id = sap_ctx->vdev->vdev_objmgr.vdev_id;
sap_debug("vdev: %d, CSA target freq: %d", vdev_id, restart_freq); sap_debug("vdev: %d, CSA target freq: %d", vdev_id, restart_freq);
return restart_freq; return restart_freq;

Bestand weergeven

@@ -544,7 +544,7 @@ uint32_t csr_get_beaconing_concurrent_channel(struct mac_context *mac_ctx,
uint16_t csr_check_concurrent_channel_overlap( uint16_t csr_check_concurrent_channel_overlap(
struct mac_context *mac, struct mac_context *mac,
uint32_t sap_ch_freq, eCsrPhyMode sap_phymode, uint32_t sap_ch_freq, eCsrPhyMode sap_phymode,
uint8_t cc_switch_mode); uint8_t cc_switch_mode, uint8_t vdev_id);
#endif #endif
/* Returns whether the current association is a 11r assoc or not */ /* Returns whether the current association is a 11r assoc or not */

Bestand weergeven

@@ -853,6 +853,7 @@ uint32_t sme_get_beaconing_concurrent_operation_channel(mac_handle_t mac_handle,
* @sap_ch_freq: SAP home channel frequency * @sap_ch_freq: SAP home channel frequency
* @sapPhyMode: sap phymode * @sapPhyMode: sap phymode
* @cc_switch_mode: force scc channel switch mode * @cc_switch_mode: force scc channel switch mode
* @vdev_id: vdev id
* *
* Determine if a concurrent channel is interfering. * Determine if a concurrent channel is interfering.
* *
@@ -861,7 +862,8 @@ uint32_t sme_get_beaconing_concurrent_operation_channel(mac_handle_t mac_handle,
uint16_t sme_check_concurrent_channel_overlap(mac_handle_t mac_handle, uint16_t sme_check_concurrent_channel_overlap(mac_handle_t mac_handle,
uint16_t sap_ch_freq, uint16_t sap_ch_freq,
eCsrPhyMode sapPhyMode, eCsrPhyMode sapPhyMode,
uint8_t cc_switch_mode); uint8_t cc_switch_mode,
uint8_t vdev_id);
#endif #endif
/** /**
@@ -1924,7 +1926,7 @@ void sme_update_tgt_services(mac_handle_t mac_handle,
bool sme_validate_sap_channel_switch(mac_handle_t mac_handle, bool sme_validate_sap_channel_switch(mac_handle_t mac_handle,
uint32_t sap_ch_freq, eCsrPhyMode sap_phy_mode, uint32_t sap_ch_freq, eCsrPhyMode sap_phy_mode,
uint8_t cc_switch_mode, uint8_t cc_switch_mode,
uint8_t session_id); uint8_t vdev_id);
bool sme_is_session_id_valid(mac_handle_t mac_handle, uint32_t session_id); bool sme_is_session_id_valid(mac_handle_t mac_handle, uint32_t session_id);

Bestand weergeven

@@ -5361,7 +5361,8 @@ uint32_t sme_get_beaconing_concurrent_operation_channel(mac_handle_t mac_handle,
uint16_t sme_check_concurrent_channel_overlap(mac_handle_t mac_handle, uint16_t sme_check_concurrent_channel_overlap(mac_handle_t mac_handle,
uint16_t sap_ch_freq, uint16_t sap_ch_freq,
eCsrPhyMode sapPhyMode, eCsrPhyMode sapPhyMode,
uint8_t cc_switch_mode) uint8_t cc_switch_mode,
uint8_t vdev_id)
{ {
QDF_STATUS status = QDF_STATUS_E_FAILURE; QDF_STATUS status = QDF_STATUS_E_FAILURE;
struct mac_context *mac = MAC_CONTEXT(mac_handle); struct mac_context *mac = MAC_CONTEXT(mac_handle);
@@ -5370,7 +5371,7 @@ uint16_t sme_check_concurrent_channel_overlap(mac_handle_t mac_handle,
status = sme_acquire_global_lock(&mac->sme); status = sme_acquire_global_lock(&mac->sme);
if (QDF_IS_STATUS_SUCCESS(status)) { if (QDF_IS_STATUS_SUCCESS(status)) {
intf_ch_freq = csr_check_concurrent_channel_overlap( intf_ch_freq = csr_check_concurrent_channel_overlap(
mac, sap_ch_freq, sapPhyMode, cc_switch_mode); mac, sap_ch_freq, sapPhyMode, cc_switch_mode, vdev_id);
sme_release_global_lock(&mac->sme); sme_release_global_lock(&mac->sme);
} }
@@ -10353,7 +10354,7 @@ QDF_STATUS sme_enable_dfs_chan_scan(mac_handle_t mac_handle, uint8_t dfs_flag)
* @sap_ch - channel to switch * @sap_ch - channel to switch
* @sap_phy_mode - phy mode of SAP * @sap_phy_mode - phy mode of SAP
* @cc_switch_mode - concurreny switch mode * @cc_switch_mode - concurreny switch mode
* @session_id - sme session id. * @vdev_id - vdev id.
* *
* Return: true if there is no channel interference else return false * Return: true if there is no channel interference else return false
*/ */
@@ -10361,11 +10362,11 @@ bool sme_validate_sap_channel_switch(mac_handle_t mac_handle,
uint32_t sap_ch_freq, uint32_t sap_ch_freq,
eCsrPhyMode sap_phy_mode, eCsrPhyMode sap_phy_mode,
uint8_t cc_switch_mode, uint8_t cc_switch_mode,
uint8_t session_id) uint8_t vdev_id)
{ {
QDF_STATUS status = QDF_STATUS_E_FAILURE; QDF_STATUS status = QDF_STATUS_E_FAILURE;
struct mac_context *mac = MAC_CONTEXT(mac_handle); struct mac_context *mac = MAC_CONTEXT(mac_handle);
struct csr_roam_session *session = CSR_GET_SESSION(mac, session_id); struct csr_roam_session *session = CSR_GET_SESSION(mac, vdev_id);
uint16_t intf_channel_freq = 0; uint16_t intf_channel_freq = 0;
if (!session) if (!session)
@@ -10375,7 +10376,8 @@ bool sme_validate_sap_channel_switch(mac_handle_t mac_handle,
status = sme_acquire_global_lock(&mac->sme); status = sme_acquire_global_lock(&mac->sme);
if (QDF_IS_STATUS_SUCCESS(status)) { if (QDF_IS_STATUS_SUCCESS(status)) {
intf_channel_freq = csr_check_concurrent_channel_overlap( intf_channel_freq = csr_check_concurrent_channel_overlap(
mac, sap_ch_freq, sap_phy_mode, cc_switch_mode); mac, sap_ch_freq, sap_phy_mode, cc_switch_mode,
vdev_id);
sme_release_global_lock(&mac->sme); sme_release_global_lock(&mac->sme);
} else { } else {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,

Bestand weergeven

@@ -614,7 +614,7 @@ static void csr_handle_conc_chnl_overlap_for_sap_go(
*/ */
uint16_t csr_check_concurrent_channel_overlap(struct mac_context *mac_ctx, uint16_t csr_check_concurrent_channel_overlap(struct mac_context *mac_ctx,
uint32_t sap_ch_freq, eCsrPhyMode sap_phymode, uint32_t sap_ch_freq, eCsrPhyMode sap_phymode,
uint8_t cc_switch_mode) uint8_t cc_switch_mode, uint8_t vdev_id)
{ {
struct csr_roam_session *session = NULL; struct csr_roam_session *session = NULL;
uint8_t i = 0, chb = PHY_SINGLE_CHANNEL_CENTERED; uint8_t i = 0, chb = PHY_SINGLE_CHANNEL_CENTERED;
@@ -708,24 +708,9 @@ uint16_t csr_check_concurrent_channel_overlap(struct mac_context *mac_ctx,
intf_ch_freq = 0; intf_ch_freq = 0;
} else if (intf_ch_freq && sap_ch_freq != intf_ch_freq && } else if (intf_ch_freq && sap_ch_freq != intf_ch_freq &&
(policy_mgr_is_force_scc(mac_ctx->psoc))) { (policy_mgr_is_force_scc(mac_ctx->psoc))) {
if (!((intf_ch_freq <= wlan_reg_ch_to_freq(CHAN_ENUM_2484) && policy_mgr_check_scc_sbs_channel(mac_ctx->psoc, &intf_ch_freq,
sap_ch_freq <= wlan_reg_ch_to_freq(CHAN_ENUM_2484)) || sap_ch_freq, vdev_id,
(intf_ch_freq > wlan_reg_ch_to_freq(CHAN_ENUM_2484) && cc_switch_mode);
sap_ch_freq > wlan_reg_ch_to_freq(CHAN_ENUM_2484)))) {
if (policy_mgr_is_hw_dbs_capable(mac_ctx->psoc) ||
cc_switch_mode ==
QDF_MCC_TO_SCC_WITH_PREFERRED_BAND)
intf_ch_freq = 0;
} else if (policy_mgr_is_hw_dbs_capable(mac_ctx->psoc) &&
cc_switch_mode ==
QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL) {
status = policy_mgr_get_sap_mandatory_channel(
mac_ctx->psoc, sap_ch_freq,
&intf_ch_freq);
if (QDF_IS_STATUS_ERROR(status))
sme_err("no mandatory channels (%d, %d)",
sap_ch_freq, intf_ch_freq);
}
} else if ((intf_ch_freq == sap_ch_freq) && (cc_switch_mode == } else if ((intf_ch_freq == sap_ch_freq) && (cc_switch_mode ==
QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL)) { QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL)) {
if (WLAN_REG_IS_24GHZ_CH_FREQ(intf_ch_freq) || if (WLAN_REG_IS_24GHZ_CH_FREQ(intf_ch_freq) ||