All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gokul Sivakumar <gokulkumar792@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Gokul Sivakumar <gokulkumar792@gmail.com>,
	linux-wireless@vger.kernel.org
Subject: [PATCH 2/2] iw: mesh: add new cmd to dump all the supported mesh config params at once
Date: Thu,  5 Aug 2021 21:08:07 +0530	[thread overview]
Message-ID: <20210805153807.645106-2-gokulkumar792@gmail.com> (raw)
In-Reply-To: <20210805153807.645106-1-gokulkumar792@gmail.com>

The function print_mesh_param_handler() already supports printing all the
mesh config params when not pasing one specific parameter, so add a new
"mesh_param dump" command to help the user see all the parameters at once.

$ iw dev mesh0 mesh_param dump
mesh_retry_timeout = 100 milliseconds
mesh_confirm_timeout = 100 milliseconds
mesh_holding_timeout = 100 milliseconds
mesh_max_peer_links = 99
mesh_max_retries = 3
mesh_ttl = 31
mesh_element_ttl = 31
mesh_auto_open_plinks = 0
mesh_hwmp_max_preq_retries = 4
mesh_path_refresh_time = 1000 milliseconds
mesh_min_discovery_timeout = 100 milliseconds
mesh_hwmp_active_path_timeout = 5000 TUs
mesh_hwmp_preq_min_interval = 10 TUs
mesh_hwmp_net_diameter_traversal_time = 50 TUs
mesh_hwmp_rootmode = 0
mesh_hwmp_rann_interval = 5000 TUs
mesh_gate_announcements = 0
mesh_fwding = 1
mesh_sync_offset_max_neighor = 50
mesh_rssi_threshold = 0 dBm
mesh_hwmp_active_path_to_root_timeout = 6000 TUs
mesh_hwmp_root_interval = 5000 TUs
mesh_hwmp_confirmation_interval = 2000 TUs
mesh_power_mode = active
mesh_awake_window = 10 TUs
mesh_plink_timeout = 0 seconds
mesh_connected_to_gate = 0

Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com>
---
 mesh.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/mesh.c b/mesh.c
index 3797335..943edf5 100644
--- a/mesh.c
+++ b/mesh.c
@@ -11,6 +11,7 @@
 #include "iw.h"
 
 SECTION(mesh);
+SECTION(mesh_param);
 
 
 typedef struct _any_t {
@@ -447,6 +448,19 @@ COMMAND(get, mesh_param, "[<param>]",
 	NL80211_CMD_GET_MESH_PARAMS, 0, CIB_NETDEV, get_interface_meshparam,
 	"Retrieve mesh parameter (run command without any to see available ones).");
 
+static int dump_interface_meshparam(struct nl80211_state *state,
+				    struct nl_msg *msg,
+				    int argc, char **argv,
+				    enum id_input id)
+{
+	register_handler(print_mesh_param_handler, NULL);
+	return 0;
+}
+
+COMMAND(mesh_param, dump, "",
+	NL80211_CMD_GET_MESH_PARAMS, 0, CIB_NETDEV, dump_interface_meshparam,
+	"List all supported mesh parameters");
+
 static int join_mesh(struct nl80211_state *state,
 		     struct nl_msg *msg, int argc, char **argv,
 		     enum id_input id)
-- 
2.25.1


      reply	other threads:[~2021-08-05 15:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05 15:38 [PATCH 1/2] iw: mesh: fix crash when attempting to print the conf param "mesh_nolearn" Gokul Sivakumar
2021-08-05 15:38 ` Gokul Sivakumar [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=20210805153807.645106-2-gokulkumar792@gmail.com \
    --to=gokulkumar792@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.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.