2020-08-03 15:34:45

by Markus Theil

[permalink] [raw]
Subject: [PATCH 1/4] iw: print current ext feature set

Signed-off-by: Markus Theil <[email protected]>
---
info.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/info.c b/info.c
index f7889fe..ee2faeb 100644
--- a/info.c
+++ b/info.c
@@ -710,6 +710,8 @@ broken_combination:
ext_feat_print(tb, BEACON_PROTECTION_CLIENT, "beacon prot. for clients support");
ext_feat_print(tb, SCAN_FREQ_KHZ, "scan on kHz frequency support");
ext_feat_print(tb, CONTROL_PORT_OVER_NL80211_TX_STATUS, "tx status for nl80211 control port support");
+ ext_feat_print(tb, OPERATING_CHANNEL_VALIDATION, "Operating Channel Validation (OCV) support");
+ ext_feat_print(tb, 4WAY_HANDSHAKE_AP_PSK, "AP mode PSK offload support");
}

if (tb_msg[NL80211_ATTR_COALESCE_RULE]) {
--
2.28.0


2020-08-03 15:35:00

by Markus Theil

[permalink] [raw]
Subject: [PATCH 3/4] iw: handle all mesh config parameters

Signed-off-by: Markus Theil <[email protected]>
---
mesh.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/mesh.c b/mesh.c
index 0650d0c..23b3471 100644
--- a/mesh.c
+++ b/mesh.c
@@ -264,6 +264,12 @@ static const struct mesh_param_descr _mesh_param_descrs[] =
_my_nla_put_u16, _parse_u16, _print_u16_in_TUs},
{"mesh_plink_timeout", NL80211_MESHCONF_PLINK_TIMEOUT,
_my_nla_put_u32, _parse_u32, _print_u32_in_seconds},
+ {"mesh_connected_to_gate", NL80211_MESHCONF_CONNECTED_TO_GATE,
+ _my_nla_put_u8, _parse_u8_as_bool, _print_u8},
+ {"mesh_nolearn", NL80211_MESHCONF_NOLEARN,
+ _my_nla_put_u8, _parse_u8_as_bool, _print_u8},
+ {"mesh_connected_to_as", NL80211_MESHCONF_CONNECTED_TO_AS,
+ _my_nla_put_u8, _parse_u8_as_bool, _print_u8},
};

static void print_all_mesh_param_descr(void)
--
2.28.0

2020-08-03 15:35:06

by Markus Theil

[permalink] [raw]
Subject: [PATCH 4/4] iw: handle more mesh station info

Signed-off-by: Markus Theil <[email protected]>
---
station.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/station.c b/station.c
index f8600b7..b2c5b9c 100644
--- a/station.c
+++ b/station.c
@@ -328,6 +328,9 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
[NL80211_STA_INFO_TX_DURATION] = { .type = NLA_U64 },
[NL80211_STA_INFO_ACK_SIGNAL] = {.type = NLA_U8 },
[NL80211_STA_INFO_ACK_SIGNAL_AVG] = { .type = NLA_U8 },
+ [NL80211_STA_INFO_AIRTIME_LINK_METRIC] = { .type = NLA_U32 },
+ [NL80211_STA_INFO_CONNECTED_TO_AS] = { .type = NLA_FLAG },
+ [NL80211_STA_INFO_CONNECTED_TO_GATE] = { .type = NLA_FLAG },
};
char *chain;
struct timeval now;
@@ -497,6 +500,18 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
}
printf("\n\tmesh plink:\t%s", state_name);
}
+ if (sinfo[NL80211_STA_INFO_AIRTIME_LINK_METRIC])
+ printf("\n\tmesh airtime link metric: %d",
+ nla_get_u32(sinfo[NL80211_STA_INFO_AIRTIME_LINK_METRIC]));
+ if (sinfo[NL80211_STA_INFO_CONNECTED_TO_GATE])
+ printf("\n\tmesh connected to gate:\t%s",
+ nla_get_u8(sinfo[NL80211_STA_INFO_CONNECTED_TO_GATE]) ?
+ "yes" : "no");
+ if (sinfo[NL80211_STA_INFO_CONNECTED_TO_AS])
+ printf("\n\tmesh connected to auth server:\t%s",
+ nla_get_u8(sinfo[NL80211_STA_INFO_CONNECTED_TO_AS]) ?
+ "yes" : "no");
+
if (sinfo[NL80211_STA_INFO_LOCAL_PM]) {
printf("\n\tmesh local PS mode:\t");
print_power_mode(sinfo[NL80211_STA_INFO_LOCAL_PM]);
--
2.28.0

2020-08-03 15:35:50

by Markus Theil

[permalink] [raw]
Subject: [PATCH 2/4] iw: handle all chan width cases

Signed-off-by: Markus Theil <[email protected]>
---
measurements.c | 5 +++++
util.c | 5 +++++
2 files changed, 10 insertions(+)

diff --git a/measurements.c b/measurements.c
index 385143f..49ef946 100644
--- a/measurements.c
+++ b/measurements.c
@@ -153,8 +153,13 @@ static int parse_ftm_target(struct nl_msg *msg, char *str, int peer_index)

switch (str_to_bw(bw)) {
case NL80211_CHAN_WIDTH_20_NOHT:
+ case NL80211_CHAN_WIDTH_1:
+ case NL80211_CHAN_WIDTH_2:
+ case NL80211_CHAN_WIDTH_4:
case NL80211_CHAN_WIDTH_5:
+ case NL80211_CHAN_WIDTH_8:
case NL80211_CHAN_WIDTH_10:
+ case NL80211_CHAN_WIDTH_16:
preamble = NL80211_PREAMBLE_LEGACY;
break;
case NL80211_CHAN_WIDTH_20:
diff --git a/util.c b/util.c
index ac6a96d..ebb2de8 100644
--- a/util.c
+++ b/util.c
@@ -492,8 +492,13 @@ static int parse_freqs(struct chandef *chandef, int argc, char **argv,
/* First argument was not understood, give up gracefully. */
return 0;
case NL80211_CHAN_WIDTH_20:
+ case NL80211_CHAN_WIDTH_1:
+ case NL80211_CHAN_WIDTH_2:
+ case NL80211_CHAN_WIDTH_4:
case NL80211_CHAN_WIDTH_5:
+ case NL80211_CHAN_WIDTH_8:
case NL80211_CHAN_WIDTH_10:
+ case NL80211_CHAN_WIDTH_16:
break;
case NL80211_CHAN_WIDTH_80P80:
need_cf2 = true;
--
2.28.0