qcacmn: Fix scan entry age out failure

If STA is connected to AP (non MBSS AP), the scm_age_out_entries
try to age out check for APs which are not non-tx AP of MBSS.
But the API doesn't check the current connect AP is MBSS or not
and do the mbssid_info.trans_bssid mac address comparing. So
the check is invalid if both trans_bssid is zero.
Fix by check mbssid_info.profile_num value first and then
trans_bssid field of two scan nodes.

Change-Id: I64ed1eddf0583211a305ba61e1d15a6c674be3fe
CRs-Fixed: 3236072
このコミットが含まれているのは:
Liangwei Dong
2022-07-06 10:58:34 +08:00
committed by Madan Koyyalamudi
コミット 25e13778d6

ファイルの表示

@@ -527,6 +527,19 @@ struct scan_cache_node *scm_get_conn_node(struct scan_dbs *scan_db)
return NULL;
}
static bool
scm_bss_is_nontx_of_conn_bss(struct scan_cache_node *conn_node,
struct scan_cache_node *cur_node)
{
if (cur_node->entry->mbssid_info.profile_num &&
!memcmp(conn_node->entry->mbssid_info.trans_bssid,
cur_node->entry->mbssid_info.trans_bssid,
QDF_MAC_ADDR_SIZE))
return true;
return false;
}
void scm_age_out_entries(struct wlan_objmgr_psoc *psoc,
struct scan_dbs *scan_db)
{
@@ -551,10 +564,9 @@ void scm_age_out_entries(struct wlan_objmgr_psoc *psoc,
/* OR cur_node is not part of the MBSSID of the
* connected node
*/
memcmp(conn_node->entry->mbssid_info.trans_bssid,
cur_node->entry->mbssid_info.trans_bssid,
QDF_MAC_ADDR_SIZE)
) {
(!scm_bss_is_connected(cur_node->entry) &&
!scm_bss_is_nontx_of_conn_bss(conn_node,
cur_node))) {
scm_check_and_age_out(scan_db, cur_node,
def_param->scan_cache_aging_time);
}