All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Zaborowski <andrew.zaborowski@intel.com>
To: iwd@lists.01.org
Subject: [PATCH 4/6] scan: Drop unused frequency list parsing
Date: Tue, 29 Sep 2020 18:37:07 +0200	[thread overview]
Message-ID: <20200929163717.754459-4-andrew.zaborowski@intel.com> (raw)
In-Reply-To: <20200929163717.754459-1-andrew.zaborowski@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2501 bytes --]

---
I have sent this once or twice before but this code is still
unused.

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

diff --git a/src/scan.c b/src/scan.c
index b4135d7c..fe780f51 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -115,7 +115,6 @@ struct scan_context {
 struct scan_results {
 	struct scan_context *sc;
 	struct l_queue *bss_list;
-	struct scan_freq_set *freqs;
 	uint64_t time_stamp;
 	struct scan_request *sr;
 };
@@ -1200,28 +1199,6 @@ fail:
 	return NULL;
 }
 
-static struct scan_freq_set *scan_parse_attr_scan_frequencies(
-						struct l_genl_attr *attr)
-{
-	uint16_t type, len;
-	const void *data;
-	struct scan_freq_set *set;
-
-	set = scan_freq_set_new();
-
-	while (l_genl_attr_next(attr, &type, &len, &data)) {
-		uint32_t freq;
-
-		if (len != sizeof(uint32_t))
-			continue;
-
-		freq = *((uint32_t *) data);
-		scan_freq_set_add(set, freq);
-	}
-
-	return set;
-}
-
 static struct scan_bss *scan_parse_result(struct l_genl_msg *msg,
 						uint64_t *out_wdev)
 {
@@ -1541,9 +1518,6 @@ static void get_scan_done(void *user)
 		l_queue_destroy(results->bss_list,
 				(l_queue_destroy_func_t) scan_bss_free);
 
-	if (results->freqs)
-		scan_freq_set_free(results->freqs);
-
 	l_free(results);
 }
 
@@ -1563,31 +1537,6 @@ static bool scan_parse_flush_flag_from_msg(struct l_genl_msg *msg)
 	return false;
 }
 
-static void scan_parse_new_scan_results(struct l_genl_msg *msg,
-					struct scan_results *results)
-{
-	struct l_genl_attr attr, nested;
-	uint16_t type, len;
-	const void *data;
-
-	if (!l_genl_attr_init(&attr, msg))
-		return;
-
-	while (l_genl_attr_next(&attr, &type, &len, &data)) {
-		switch (type) {
-		case NL80211_ATTR_SCAN_FREQUENCIES:
-			if (!l_genl_attr_recurse(&attr, &nested)) {
-				l_warn("Failed to parse ATTR_SCAN_FREQUENCIES");
-				break;
-			}
-
-			results->freqs =
-				scan_parse_attr_scan_frequencies(&nested);
-			break;
-		}
-	}
-}
-
 static void scan_notify(struct l_genl_msg *msg, void *user_data)
 {
 	struct l_genl_attr attr;
@@ -1706,8 +1655,6 @@ static void scan_notify(struct l_genl_msg *msg, void *user_data)
 		results->sr = sr;
 		results->bss_list = l_queue_new();
 
-		scan_parse_new_scan_results(msg, results);
-
 		scan_msg = l_genl_msg_new_sized(NL80211_CMD_GET_SCAN, 8);
 		l_genl_msg_append_attr(scan_msg, NL80211_ATTR_WDEV, 8,
 					&sc->wdev_id);
-- 
2.25.1

  parent reply	other threads:[~2020-09-29 16:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29 16:37 [PATCH 1/6] frame-xchg: Add no-cck-rate flag only for P2P interfaces Andrew Zaborowski
2020-09-29 16:37 ` [PATCH 2/6] frame-xchg: Cancel NL80211_CMD_FRAME commands when interrupted Andrew Zaborowski
2020-09-29 16:37 ` [PATCH 3/6] wscutil: Fix subcategory string lookup Andrew Zaborowski
2020-09-29 16:37 ` Andrew Zaborowski [this message]
2020-09-29 16:37 ` [PATCH 5/6] p2p: Fix adding peers from Probe Request info Andrew Zaborowski
2020-09-29 16:37 ` [PATCH 6/6] p2p: Respond to Probe Requests when in discovery Andrew Zaborowski
2020-09-29 16:37 ` [PATCH 1/8] test-runner: Reserve radios for wpa_supplicant Andrew Zaborowski
2020-09-29 17:14   ` James Prestwood
2020-09-29 23:29     ` Andrew Zaborowski
2020-09-30 15:56       ` James Prestwood
2020-09-30 20:34         ` Andrew Zaborowski
2020-09-30 20:41           ` James Prestwood
2020-09-29 16:37 ` [PATCH 2/8] test-runner: Enable --p2p when creating interfaces Andrew Zaborowski
2020-09-29 18:21   ` Denis Kenzior
2020-09-29 16:37 ` [PATCH 3/8] test-runner: Add flags for DHCP and TLS verbose output Andrew Zaborowski
2020-09-29 16:37 ` [PATCH 4/8] test-runner: Make hwsim medium optional Andrew Zaborowski
2020-09-29 16:37 ` [PATCH 5/8] autotests: Basic P2P python API Andrew Zaborowski
2020-09-29 16:37 ` [PATCH 6/8] autotests: Add basic wpa_supplicant P2P python wrapper Andrew Zaborowski
2020-09-30 15:58   ` James Prestwood
2020-09-30 20:38     ` Andrew Zaborowski
2020-09-29 16:37 ` [PATCH 7/8] autotests: Move some variables from IWD class to instance Andrew Zaborowski
2020-09-29 16:37 ` [PATCH 8/8] autotests: Add testP2P Andrew Zaborowski
2020-09-29 18:15 ` [PATCH 1/6] frame-xchg: Add no-cck-rate flag only for P2P interfaces Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200929163717.754459-4-andrew.zaborowski@intel.com \
    --to=andrew.zaborowski@intel.com \
    --cc=iwd@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.