Skip to contentSkip to conversation

scan: remove unneeded debug prints

PATCH Applied James Prestwood 2 participants 2 messages Aug 7, 2023 – Aug 8, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scan: remove unneeded debug prints

Removed several debug prints which are very verbose and provide little to no important information.

The get_scan_{done,callback} prints are pointless since all the parsed scan results are printed by station anyways.

Printing the BSS load is also not that useful since it doesn't include the BSSID. If anything the BSS load should be included when station prints out each individual BSS (along with frequency, rank, etc).

The advertisement protocol print was just just left in there by accident when debugging, and also provides basically no useful information.

---
 src/scan.c | 8 --------
 1 file changed, 8 deletions(-)
src/scan.c +0 -8
index 48e53e9a..5a972efb 100644
@@ -1230,8 +1230,6 @@ static bool scan_parse_advertisement_protocol(struct scan_bss *bss,
 {
 	const uint8_t *ptr = data;
 
-	l_debug("");
-
 	while (len) {
 		/*
 		 * TODO: Store query info for GAS response length verification
@@ -1304,8 +1302,6 @@ static bool scan_parse_bss_information_elements(struct scan_bss *bss,
 						NULL) < 0)
 				l_warn("Unable to parse BSS Load IE for "
 					MAC, MAC_STR(bss->addr));
-			else
-				l_debug("Load: %u/255", bss->utilization);
 
 			break;
 		case IE_TYPE_VENDOR_SPECIFIC:
@@ -1795,8 +1791,6 @@ static void get_scan_callback(struct l_genl_msg *msg, void *user_data)
 	uint64_t wdev_id;
 	uint32_t seen_ms_ago = 0;
 
-	l_debug("get_scan_callback");
-
 	if (nl80211_parse_attrs(msg, NL80211_ATTR_WDEV, &wdev_id,
 					NL80211_ATTR_UNSPEC) < 0)
 		return;
@@ -1875,8 +1869,6 @@ static void get_scan_done(void *user)
 	struct scan_results *results = user;
 	struct scan_context *sc = results->sc;
 
-	l_debug("get_scan_done");
-
 	sc->get_scan_cmd_id = 0;
 
 	if (!results->sr || !results->sr->canceled)
Signature · 1 line
2.25.1
#1 lore raw

Hi James,

Quoted 11 lines · James Prestwood

Removed several debug prints which are very verbose and provide little to no important information.

The get_scan_{done,callback} prints are pointless since all the parsed scan results are printed by station anyways.

Printing the BSS load is also not that useful since it doesn't include the BSSID. If anything the BSS load should be included when station prints out each individual BSS (along with frequency, rank, etc).

Quoted 7 lines

The advertisement protocol print was just just left in there by accident when debugging, and also provides basically no useful information.

---
  src/scan.c | 8 --------
  1 file changed, 8 deletions(-)

Applied, thanks.

Regards,
-Denis