From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH v2 7/7] station: remove ANQP watch
Date: Thu, 25 Jun 2020 11:56:45 -0700 [thread overview]
Message-ID: <20200625185645.30122-8-prestwoj@gmail.com> (raw)
In-Reply-To: <20200625185645.30122-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3399 bytes --]
---
src/station.c | 34 ++--------------------------------
src/station.h | 5 -----
2 files changed, 2 insertions(+), 37 deletions(-)
diff --git a/src/station.c b/src/station.c
index 69c4ae01..113f030b 100644
--- a/src/station.c
+++ b/src/station.c
@@ -59,7 +59,6 @@ static uint32_t netdev_watch;
static uint32_t mfp_setting;
static bool anqp_disabled;
static bool netconfig_enabled;
-static struct watchlist anqp_watches;
struct station {
enum station_state state;
@@ -450,18 +449,6 @@ static void remove_anqp(void *data)
l_free(entry);
}
-static bool anqp_entry_foreach(void *data, void *user_data)
-{
- struct anqp_entry *e = data;
-
- WATCHLIST_NOTIFY(&anqp_watches, station_anqp_watch_func_t,
- STATION_ANQP_FINISHED, e->network);
-
- remove_anqp(e);
-
- return true;
-}
-
static void station_anqp_response_cb(enum anqp_result result,
const void *anqp, size_t anqp_len,
void *user_data)
@@ -518,8 +505,8 @@ request_done:
if (l_queue_find(station->anqp_pending, match_pending, NULL))
return;
- /* Notify all watchers now that every ANQP request has finished */
- l_queue_foreach_remove(station->anqp_pending, anqp_entry_foreach, NULL);
+ /* Clear queue now that every ANQP request has finished */
+ l_queue_clear(station->anqp_pending, remove_anqp);
l_queue_destroy(station->autoconnect_list, l_free);
station->autoconnect_list = l_queue_new();
@@ -589,8 +576,6 @@ static bool station_start_anqp(struct station *station, struct network *network,
l_queue_push_head(station->anqp_pending, entry);
- WATCHLIST_NOTIFY(&anqp_watches, station_anqp_watch_func_t,
- STATION_ANQP_STARTED, network);
return true;
}
@@ -1232,18 +1217,6 @@ bool station_remove_state_watch(struct station *station, uint32_t id)
return watchlist_remove(&station->state_watches, id);
}
-uint32_t station_add_anqp_watch(station_anqp_watch_func_t func,
- void *user_data,
- station_destroy_func_t destroy)
-{
- return watchlist_add(&anqp_watches, func, user_data, destroy);
-}
-
-void station_remove_anqp_watch(uint32_t id)
-{
- watchlist_remove(&anqp_watches, id);
-}
-
bool station_set_autoconnect(struct station *station, bool autoconnect)
{
if (station->autoconnect == autoconnect)
@@ -3303,8 +3276,6 @@ static int station_init(void)
if (!netconfig_enabled)
l_info("station: Network configuration is disabled.");
- watchlist_init(&anqp_watches, NULL);
-
return 0;
}
@@ -3314,7 +3285,6 @@ static void station_exit(void)
netdev_watch_remove(netdev_watch);
l_queue_destroy(station_list, NULL);
station_list = NULL;
- watchlist_destroy(&anqp_watches);
}
IWD_MODULE(station, station_init, station_exit)
diff --git a/src/station.h b/src/station.h
index 17a0f8df..a9a33afe 100644
--- a/src/station.h
+++ b/src/station.h
@@ -74,11 +74,6 @@ uint32_t station_add_state_watch(struct station *station,
station_destroy_func_t destroy);
bool station_remove_state_watch(struct station *station, uint32_t id);
-uint32_t station_add_anqp_watch(station_anqp_watch_func_t func,
- void *user_data,
- station_destroy_func_t destroy);
-void station_remove_anqp_watch(uint32_t id);
-
bool station_set_autoconnect(struct station *station, bool autoconnect);
void station_ap_directed_roam(struct station *station,
--
2.21.1
prev parent reply other threads:[~2020-06-25 18:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 18:56 [PATCH v2 0/7] Radio Management Module James Prestwood
2020-06-25 18:56 ` [PATCH v2 1/7] radio_mgmt: introduce new radio management module James Prestwood
2020-06-25 18:56 ` [PATCH v2 2/7] wiphy: integrate " James Prestwood
2020-06-25 18:56 ` [PATCH v2 3/7] frame-xchg: refactor to use " James Prestwood
2020-06-25 18:56 ` [PATCH v2 4/7] anqp: refactor to use frame-xchg James Prestwood
2020-06-25 18:56 ` [PATCH v2 5/7] scan: refactor to use radio management module James Prestwood
2020-06-25 18:56 ` [PATCH v2 6/7] network: use radio management for connections James Prestwood
2020-06-25 18:56 ` James Prestwood [this message]
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=20200625185645.30122-8-prestwoj@gmail.com \
--to=prestwoj@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox