All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/11] hwsim: add --no-register option
@ 2020-12-17 19:36 James Prestwood
  2020-12-17 19:36 ` [PATCH 02/11] hwsim: check pending_create_msg before replying James Prestwood
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: James Prestwood @ 2020-12-17 19:36 UTC (permalink / raw)
  To: iwd

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

Starts hwsim but does not register to mac80211_hwsim. This is to
allow autotests to disable hwsim, while still having the ability
to create/destroy radios over DBus.
---
 tools/hwsim.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tools/hwsim.c b/tools/hwsim.c
index 02053fa1..641a6c6f 100644
--- a/tools/hwsim.c
+++ b/tools/hwsim.c
@@ -151,6 +151,7 @@ static enum action {
 
 static bool no_vif_attr;
 static bool p2p_attr;
+static bool no_register = false;
 static const char *radio_name_attr;
 static struct l_dbus *dbus;
 static struct l_queue *rules;
@@ -2347,6 +2348,9 @@ static void get_interface_done_initial(void *user_data)
 {
 	struct l_genl_msg *msg;
 
+	if (no_register)
+		return;
+
 	msg = l_genl_msg_new_sized(HWSIM_CMD_REGISTER, 4);
 	l_genl_family_send(hwsim, msg, register_callback, NULL, NULL);
 }
@@ -2625,6 +2629,7 @@ static const struct option main_options[] = {
 	{ "version",	 no_argument,		NULL, 'v' },
 	{ "iftype-disable", required_argument,	NULL, 't' },
 	{ "cipher-disable", required_argument,	NULL, 'c' },
+	{ "no-register", no_argument,		NULL, 'r' },
 	{ "help",	 no_argument,		NULL, 'h' },
 	{ }
 };
@@ -2636,7 +2641,7 @@ int main(int argc, char *argv[])
 	for (;;) {
 		int opt;
 
-		opt = getopt_long(argc, argv, ":L:CD:kndetc:ipvh", main_options,
+		opt = getopt_long(argc, argv, ":L:CD:kndetrc:ipvh", main_options,
 									NULL);
 		if (opt < 0)
 			break;
@@ -2682,6 +2687,9 @@ int main(int argc, char *argv[])
 		case 'c':
 			hwsim_disable_ciphers(optarg);
 			break;
+		case 'r':
+			no_register = true;
+			break;
 		case 'v':
 			printf("%s\n", VERSION);
 			return EXIT_SUCCESS;
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-12-18  2:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 19:36 [PATCH 01/11] hwsim: add --no-register option James Prestwood
2020-12-17 19:36 ` [PATCH 02/11] hwsim: check pending_create_msg before replying James Prestwood
2020-12-17 19:36 ` [PATCH 03/11] auto-t: fix hwsim.py to use Destroy rather than Remove James Prestwood
2020-12-17 19:36 ` [PATCH 04/11] hwsim: change radio Create() to take a dictionary James Prestwood
2020-12-17 19:36 ` [PATCH 05/11] auto-t: update hwsim radio create to use dictionary James Prestwood
2020-12-17 19:36 ` [PATCH 06/11] test-runner: add wait_for_dbus_service James Prestwood
2020-12-17 19:36 ` [PATCH 07/11] test-runner: start hwsim always (optionally --no-register) James Prestwood
2020-12-17 19:36 ` [PATCH 08/11] hwsim: add iftype/cipher disabling through DBus James Prestwood
2020-12-17 19:36 ` [PATCH 09/11] auto-t: add iftype/cipher disable to hwsim.py James Prestwood
2020-12-17 19:36 ` [PATCH 10/11] test-runner: Use DBus for hwsim radios James Prestwood
2020-12-17 19:36 ` [PATCH 11/11] auto-t: fix hwsim.py spoof frame James Prestwood
2020-12-18  2:15 ` [PATCH 01/11] hwsim: add --no-register option Denis Kenzior

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.