Przeglądaj źródła

qcacmn: Optimize logging in scan filter

Optimize logging is scan filter by removing the logs from
success case.

Change-Id: I1687c9e4ad1394b25baf37a3fa3594571998fd7e
CRs-Fixed: 3626736
Abhishek Singh 1 rok temu
rodzic
commit
342cc8dfb8
1 zmienionych plików z 23 dodań i 36 usunięć
  1. 23 36
      umac/scan/core/src/wlan_scan_filter.c

+ 23 - 36
umac/scan/core/src/wlan_scan_filter.c

@@ -264,9 +264,6 @@ static void scm_check_and_update_adaptive_11r_key_mgmt_support(
 		return;
 	}
 
-	scm_debug("First AKM:%d present in RSN IE of bcn/Probe rsp at index:%d",
-		  first_key_mgmt, i);
-
 	if (first_key_mgmt == WLAN_CRYPTO_KEY_MGMT_IEEE8021X)
 		QDF_SET_PARAM(ap_crypto->key_mgmt,
 			      WLAN_CRYPTO_KEY_MGMT_FT_IEEE8021X);
@@ -323,8 +320,6 @@ static bool scm_check_rsn(struct scan_filter *filter,
 	if (is_adaptive_11r)
 		scm_check_and_update_adaptive_11r_key_mgmt_support(ap_crypto);
 
-	scm_debug("ap_crypto->key_mgmt:%d, filter->key_mgmt:%d",
-		  ap_crypto->key_mgmt, filter->key_mgmt);
 	match = scm_chk_crypto_params(filter, ap_crypto, is_adaptive_11r,
 				      db_entry, security);
 	qdf_mem_free(ap_crypto);
@@ -701,9 +696,9 @@ static bool scm_check_dot11mode(struct scan_cache_entry *db_entry,
 }
 
 #ifdef WLAN_FEATURE_11BE_MLO
-static bool util_mlo_filter_match(struct wlan_objmgr_pdev *pdev,
-				  struct scan_filter *filter,
-				  struct scan_cache_entry *db_entry)
+static bool scm_mlo_filter_match(struct wlan_objmgr_pdev *pdev,
+				 struct scan_filter *filter,
+				 struct scan_cache_entry *db_entry)
 {
 	uint8_t i, band_bitmap, assoc_band_bitmap;
 	enum reg_wifi_band band;
@@ -721,9 +716,9 @@ static bool util_mlo_filter_match(struct wlan_objmgr_pdev *pdev,
 	band = wlan_reg_freq_to_band(db_entry->channel.chan_freq);
 	if ((assoc_band_bitmap && !(band_bitmap & BIT(band) & assoc_band_bitmap)) ||
 	    (!assoc_band_bitmap && !(band_bitmap & BIT(band)))) {
-		scm_debug("bss freq %d not match band bitmap: 0x%x",
-			  db_entry->channel.chan_freq,
-			  filter->band_bitmap);
+		scm_debug(QDF_MAC_ADDR_FMT ": Ignore as bss freq %d not match band bitmap: 0x%x",
+			  QDF_MAC_ADDR_REF(db_entry->bssid.bytes),
+			  db_entry->channel.chan_freq, filter->band_bitmap);
 		return false;
 	}
 	for (i = 0; i < db_entry->ml_info.num_links; i++) {
@@ -735,38 +730,33 @@ static bool util_mlo_filter_match(struct wlan_objmgr_pdev *pdev,
 				    partner_link->freq,
 				    REG_BEST_PWR_MODE);
 		if (is_disabled) {
-			scm_debug("partner link id %d freq %d disabled : "QDF_MAC_ADDR_FMT,
-				  partner_link->link_id,
-				  partner_link->freq,
+			scm_debug(QDF_MAC_ADDR_FMT ": Partner " QDF_MAC_ADDR_FMT " link id %d freq %d disabled",
+				  QDF_MAC_ADDR_REF(db_entry->bssid.bytes),
 				  QDF_MAC_ADDR_REF(
-				  partner_link->link_addr.bytes));
+				  partner_link->link_addr.bytes),
+				  partner_link->link_id,
+				  partner_link->freq);
 			continue;
 		}
-		if (band_bitmap & BIT(band)) {
-			scm_debug("partner link id %d freq %d match band bitmap: 0x%x "QDF_MAC_ADDR_FMT,
-				  partner_link->link_id,
-				  partner_link->freq,
-				  filter->band_bitmap,
-				  QDF_MAC_ADDR_REF(
-				  partner_link->link_addr.bytes));
+		if (band_bitmap & BIT(band))
 			partner_link->is_valid_link = true;
-		}
 	}
 
 	return true;
 }
 #else
-static bool util_mlo_filter_match(struct wlan_objmgr_pdev *pdev,
-				  struct scan_filter *filter,
-				  struct scan_cache_entry *db_entry)
+static inline bool scm_mlo_filter_match(struct wlan_objmgr_pdev *pdev,
+					struct scan_filter *filter,
+					struct scan_cache_entry *db_entry)
 {
 	return true;
 }
 #endif
 
 #ifdef WLAN_FEATURE_11BE
+
 /**
- * util_eht_puncture_valid(): The function finds the puncturing pattern from the
+ * scm_eht_puncture_valid(): The function finds the puncturing pattern from the
  * IE. If the primary channel is in the punctured list then the channel cannot
  * be used, and this function returns false/invalid.
  * @pdev: pdev device.
@@ -774,8 +764,8 @@ static bool util_mlo_filter_match(struct wlan_objmgr_pdev *pdev,
  *
  * Return - false if the primary channel is punctured and true if otherwise.
  */
-static bool util_eht_puncture_valid(struct wlan_objmgr_pdev *pdev,
-				    struct scan_cache_entry *db_entry)
+static bool scm_eht_puncture_valid(struct wlan_objmgr_pdev *pdev,
+				   struct scan_cache_entry *db_entry)
 {
 	struct wlan_ie_ehtops *eht_ops;
 	int8_t orig_width;
@@ -848,8 +838,8 @@ static bool util_eht_puncture_valid(struct wlan_objmgr_pdev *pdev,
 	}
 }
 #else
-static bool util_eht_puncture_valid(struct wlan_objmgr_pdev *pdev,
-				    struct scan_cache_entry *db_entry)
+static inline bool scm_eht_puncture_valid(struct wlan_objmgr_pdev *pdev,
+					  struct scan_cache_entry *db_entry)
 {
 	return true;
 }
@@ -1032,11 +1022,8 @@ bool scm_filter_match(struct wlan_objmgr_psoc *psoc,
 		return false;
 	}
 
-	if (!util_mlo_filter_match(pdev, filter, db_entry)) {
-		scm_debug(QDF_MAC_ADDR_FMT ": Ignore as mlo filter didn't match",
-			  QDF_MAC_ADDR_REF(db_entry->bssid.bytes));
+	if (!scm_mlo_filter_match(pdev, filter, db_entry))
 		return false;
-	}
 
 	pdev = wlan_objmgr_get_pdev_by_id(psoc, db_entry->pdev_id,
 					  WLAN_SCAN_ID);
@@ -1045,7 +1032,7 @@ bool scm_filter_match(struct wlan_objmgr_psoc *psoc,
 			QDF_MAC_ADDR_REF(db_entry->bssid.bytes));
 		return false;
 	}
-	if (!util_eht_puncture_valid(pdev, db_entry)) {
+	if (!scm_eht_puncture_valid(pdev, db_entry)) {
 		wlan_objmgr_pdev_release_ref(pdev, WLAN_SCAN_ID);
 		return false;
 	}