diff mbox

[05/18] driver_nl80211: pass bss struct to event callbacks

Message ID 20111104103809.407325280@sipsolutions.net
State Superseded
Headers show

Commit Message

Johannes Berg Nov. 4, 2011, 10:37 a.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
---
 src/drivers/driver_nl80211.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

Comments

Jouni Malinen Nov. 19, 2011, 10:23 a.m. UTC | #1
On Fri, Nov 04, 2011 at 11:37:54AM +0100, Johannes Berg wrote:
> -static int process_event(struct nl_msg *msg, void *arg)
> +static int process_drv_event(struct nl_msg *msg, void *arg)
> -static void wpa_driver_nl80211_event_receive(int sock, void *eloop_ctx,
> +static void wpa_driver_nl80211_drv_event_receive(int sock, void *eloop_ctx,
> -	nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, process_event, drv);
> +	nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, process_drv_event, drv);
> -				 wpa_driver_nl80211_event_receive, drv,
> +				 wpa_driver_nl80211_drv_event_receive, drv,
> -				 wpa_driver_nl80211_event_receive, drv,
> +				 wpa_driver_nl80211_drv_event_receive, drv,

All this patch seems to be doing is to rename couple of functions which
does not match with the "pass bss struct to event callbacks"
description... Was there supposed to be something else here?

To make things even more confusing, patch 12/18 reverts part of these
changes.. Should 5 and 12 be merged together?
Johannes Berg Nov. 19, 2011, 11:10 a.m. UTC | #2
On Sat, 2011-11-19 at 12:23 +0200, Jouni Malinen wrote:
> On Fri, Nov 04, 2011 at 11:37:54AM +0100, Johannes Berg wrote:
> > -static int process_event(struct nl_msg *msg, void *arg)
> > +static int process_drv_event(struct nl_msg *msg, void *arg)
> > -static void wpa_driver_nl80211_event_receive(int sock, void *eloop_ctx,
> > +static void wpa_driver_nl80211_drv_event_receive(int sock, void *eloop_ctx,
> > -	nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, process_event, drv);
> > +	nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, process_drv_event, drv);
> > -				 wpa_driver_nl80211_event_receive, drv,
> > +				 wpa_driver_nl80211_drv_event_receive, drv,
> > -				 wpa_driver_nl80211_event_receive, drv,
> > +				 wpa_driver_nl80211_drv_event_receive, drv,
> 
> All this patch seems to be doing is to rename couple of functions which
> does not match with the "pass bss struct to event callbacks"
> description... Was there supposed to be something else here?
> 
> To make things even more confusing, patch 12/18 reverts part of these
> changes.. Should 5 and 12 be merged together?

Humm, I must have gotten this messed up during the various rebases on
top of Ben's patches. I'll take a look later.

johannes
Johannes Berg Nov. 19, 2011, 11:45 a.m. UTC | #3
On Sat, 2011-11-19 at 12:10 +0100, Johannes Berg wrote:
> On Sat, 2011-11-19 at 12:23 +0200, Jouni Malinen wrote:
> > On Fri, Nov 04, 2011 at 11:37:54AM +0100, Johannes Berg wrote:
> > > -static int process_event(struct nl_msg *msg, void *arg)
> > > +static int process_drv_event(struct nl_msg *msg, void *arg)
> > > -static void wpa_driver_nl80211_event_receive(int sock, void *eloop_ctx,
> > > +static void wpa_driver_nl80211_drv_event_receive(int sock, void *eloop_ctx,
> > > -	nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, process_event, drv);
> > > +	nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, process_drv_event, drv);
> > > -				 wpa_driver_nl80211_event_receive, drv,
> > > +				 wpa_driver_nl80211_drv_event_receive, drv,
> > > -				 wpa_driver_nl80211_event_receive, drv,
> > > +				 wpa_driver_nl80211_drv_event_receive, drv,
> > 
> > All this patch seems to be doing is to rename couple of functions which
> > does not match with the "pass bss struct to event callbacks"
> > description... Was there supposed to be something else here?
> > 
> > To make things even more confusing, patch 12/18 reverts part of these
> > changes.. Should 5 and 12 be merged together?
> 
> Humm, I must have gotten this messed up during the various rebases on
> top of Ben's patches. I'll take a look later.

Ok I got rid of most of this patch, it now only does the process_event
-> process_drv_event rename and I also moved it right before where that
is needed (before adding process_bss_event). It'd be easy to squash them
together if you prefer.

I also updated over your merges from just now and pushed it all out to
http://git.sipsolutions.net/?p=hostap.git;a=shortlog;h=refs/heads/work

I'll repost but wanted to ask you if you wanted it squashed first.

johannes
diff mbox

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 1128e44..0fc15c9 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -1705,7 +1705,7 @@  static void nl80211_client_probe_event(struct wpa_driver_nl80211_data *drv,
 }
 
 
-static int process_event(struct nl_msg *msg, void *arg)
+static int process_drv_event(struct nl_msg *msg, void *arg)
 {
 	struct wpa_driver_nl80211_data *drv = arg;
 	struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
@@ -1840,8 +1840,8 @@  static int process_event(struct nl_msg *msg, void *arg)
 }
 
 
-static void wpa_driver_nl80211_event_receive(int sock, void *eloop_ctx,
-					     void *handle)
+static void wpa_driver_nl80211_drv_event_receive(int sock, void *eloop_ctx,
+						 void *handle)
 {
 	struct nl_cb *cb;
 	struct wpa_driver_nl80211_data *drv = eloop_ctx;
@@ -1852,7 +1852,7 @@  static void wpa_driver_nl80211_event_receive(int sock, void *eloop_ctx,
 	if (!cb)
 		return;
 	nl_cb_set(cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM, no_seq_check, NULL);
-	nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, process_event, drv);
+	nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, process_drv_event, drv);
 	nl_recvmsgs(handle, cb);
 	nl_cb_put(cb);
 }
@@ -2215,7 +2215,7 @@  static int wpa_driver_nl80211_init_nl(struct wpa_driver_nl80211_data *drv)
 	}
 
 	eloop_register_read_sock(nl_socket_get_fd(drv->nl_event.handle),
-				 wpa_driver_nl80211_event_receive, drv,
+				 wpa_driver_nl80211_drv_event_receive, drv,
 				 drv->nl_event.handle);
 
 	return 0;
@@ -7081,7 +7081,7 @@  static int wpa_driver_nl80211_probe_req_report(void *priv, int report)
 		goto out_err;
 
 	eloop_register_read_sock(nl_socket_get_fd(drv->nl_preq.handle),
-				 wpa_driver_nl80211_event_receive, drv,
+				 wpa_driver_nl80211_drv_event_receive, drv,
 				 drv->nl_preq.handle);
 
 	return 0;