qcacld-3.0: Disable BTM offload to fw if peer support MBO/OCE

If DUT connected to a non-PMF AP in MBO/OCE enabled network, STA
should not initiate roaming due to BTM trigger.

Fix is to enable BTM offload to firmware only if a peer support
pmf in case of MBO/OCE connection.

Change-Id: Ifee077fed2630242e7dc93e6d1a3915e592d4285
CRs-Fixed: 2678005
This commit is contained in:
Abhinav Kumar 2020-05-06 16:13:05 +05:30 committed by nshrivas
parent 501cfcbf49
commit ba7131dd8c
3 changed files with 33 additions and 16 deletions

View File

@ -711,6 +711,7 @@ struct bss_description {
#endif
uint32_t assoc_disallowed;
uint32_t adaptive_11r_ap;
uint32_t mbo_oce_enabled_ap;
#if defined(WLAN_SAE_SINGLE_PMK) && defined(WLAN_FEATURE_ROAM_OFFLOAD)
uint32_t is_single_pmk;
#endif

View File

@ -18130,22 +18130,38 @@ void csr_rso_command_fill_11w_params(struct mac_context *mac_ctx,
#endif
/**
* csr_get_peer_pmf_status() - Get the PMF capability of peer
* csr_update_btm_offload_config() - Update btm config param to fw
* @mac_ctx: Global mac ctx
* @command: Roam offload command
* @req_buf: roam offload scan request
* @session: roam session
*
* Return: True if PMF is enabled, false otherwise.
* Return: None
*/
static bool csr_get_peer_pmf_status(struct mac_context *mac_ctx,
static void csr_update_btm_offload_config(struct mac_context *mac_ctx,
uint8_t command,
struct roam_offload_scan_req *req_buf,
struct csr_roam_session *session)
{
struct wlan_objmgr_peer *peer;
bool is_pmf_enabled;
req_buf->btm_offload_config =
mac_ctx->mlme_cfg->btm.btm_offload_config;
/* Return if INI is disabled */
if (!req_buf->btm_offload_config)
return;
/* For RSO Stop Disable BTM offload to firmware */
if (command == ROAM_SCAN_OFFLOAD_STOP) {
req_buf->btm_offload_config = 0;
return;
}
if (!session->pConnectBssDesc) {
sme_err("Connected Bss Desc is NULL");
return false;
return;
}
peer = wlan_objmgr_get_peer(mac_ctx->psoc,
@ -18155,7 +18171,7 @@ static bool csr_get_peer_pmf_status(struct mac_context *mac_ctx,
if (!peer) {
sme_debug("Peer of peer_mac %pM not found",
session->pConnectBssDesc->bssId);
return false;
return;
}
is_pmf_enabled = mlme_get_peer_pmf_status(peer);
@ -18163,7 +18179,12 @@ static bool csr_get_peer_pmf_status(struct mac_context *mac_ctx,
sme_debug("get is_pmf_enabled %d for %pM", is_pmf_enabled,
session->pConnectBssDesc->bssId);
return is_pmf_enabled;
/* If peer does not support PMF in case of OCE/MBO
* Connection, Disable BTM offload to firmware.
*/
if (session->pConnectBssDesc->mbo_oce_enabled_ap &&
!is_pmf_enabled)
req_buf->btm_offload_config = 0;
}
/**
@ -18437,15 +18458,7 @@ csr_create_roam_scan_offload_request(struct mac_context *mac_ctx,
req_buf->lca_config_params.num_disallowed_aps =
mac_ctx->mlme_cfg->lfr.lfr3_num_disallowed_aps;
/* For RSO Stop or if peer does not support PMF, Disable BTM offload
* to firmware.
*/
if (command == ROAM_SCAN_OFFLOAD_STOP ||
!csr_get_peer_pmf_status(mac_ctx, session))
req_buf->btm_offload_config = 0;
else
req_buf->btm_offload_config =
mac_ctx->mlme_cfg->btm.btm_offload_config;
csr_update_btm_offload_config(mac_ctx, command, req_buf, session);
req_buf->btm_solicited_timeout =
mac_ctx->mlme_cfg->btm.btm_solicited_timeout;

View File

@ -2394,6 +2394,9 @@ static QDF_STATUS csr_fill_bss_from_scan_entry(struct mac_context *mac_ctx,
scan_entry);
bss_desc->adaptive_11r_ap = scan_entry->adaptive_11r_ap;
bss_desc->mbo_oce_enabled_ap =
util_scan_entry_mbo_oce(scan_entry) ? true : false;
csr_fill_single_pmk_ap_cap_from_scan_entry(bss_desc, scan_entry);
qdf_mem_copy(&bss_desc->mbssid_info, &scan_entry->mbssid_info,