Sfoglia il codice sorgente

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 3 anni fa
parent
commit
25e13778d6
1 ha cambiato i file con 16 aggiunte e 4 eliminazioni
  1. 16 4
      umac/scan/core/src/wlan_scan_cache_db.c

+ 16 - 4
umac/scan/core/src/wlan_scan_cache_db.c

@@ -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);
 			}