diff mbox

[14/16] wpa_supplicant: send CTRL-EVENT-REGDOM-CHANGE on the global control interface

Message ID 1434547502-7475-15-git-send-email-ilan.peer@intel.com
State Changes Requested
Headers show

Commit Message

Ilan Peer June 17, 2015, 1:25 p.m. UTC
From: Ben Rosenfeld <ben.rosenfeld@intel.com>

The regulatory domain change event can be handled by any interface
as it is a global event and not an interface specific one. Thus,
send the event on the global control interface socket.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
---
 wpa_supplicant/events.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Jouni Malinen June 19, 2015, 8:31 a.m. UTC | #1
On Wed, Jun 17, 2015 at 04:25:00PM +0300, Ilan Peer wrote:
> The regulatory domain change event can be handled by any interface
> as it is a global event and not an interface specific one. Thus,
> send the event on the global control interface socket.

While I mostly agree with this, I'm a bit concerned about the change
being able to break some existing user cases since this would remove the
per-interface event. The per-interface event is already going out on the
global control interface with the IFNAME prefix, so I'm not completely
sure this change would be needed in the first place..
diff mbox

Patch

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index f8ab4b8..75e0caf 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2975,10 +2975,11 @@  static void wpa_supplicant_update_channel_list(
 {
 	struct wpa_supplicant *ifs;
 
-	wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_REGDOM_CHANGE "init=%s type=%s%s%s",
-		reg_init_str(info->initiator), reg_type_str(info->type),
-		info->alpha2[0] ? " alpha2=" : "",
-		info->alpha2[0] ? info->alpha2 : "");
+	wpa_msg_global(wpa_s, MSG_INFO,
+		       WPA_EVENT_REGDOM_CHANGE "init=%s type=%s%s%s",
+		       reg_init_str(info->initiator), reg_type_str(info->type),
+		       info->alpha2[0] ? " alpha2=" : "",
+		       info->alpha2[0] ? info->alpha2 : "");
 
 	if (wpa_s->drv_priv == NULL)
 		return; /* Ignore event during drv initialization */