iw: Add support for NL80211_ATTR_WIPHY_COVERAGE_CLASS
New nl80211 attribute NL80211_ATTR_WIPHY_COVERAGE_CLASS allows setting
IEEE 802.11 coverage class, which is then used by drivers to calculate
slot time and ACK timeout for long distance links.
Two iw parameters are added: 'coverage' sets the coverage class
directly, while 'distance' is more user-friendly, as it allows to set
just the link distance and let iw do the necessary calculation itself.
Signed-off-by: Lukas Turek <8an@praha12.net>
diff --git a/info.c b/info.c
index 69af216..1a1b588 100644
--- a/info.c
+++ b/info.c
@@ -156,6 +156,14 @@
printf("\tRTS threshold: %d\n", rts);
}
+ if (tb_msg[NL80211_ATTR_WIPHY_COVERAGE_CLASS]) {
+ unsigned char coverage;
+
+ coverage = nla_get_u8(tb_msg[NL80211_ATTR_WIPHY_COVERAGE_CLASS]);
+ /* See handle_distance() for an explanation where the '450' comes from */
+ printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage);
+ }
+
if (!tb_msg[NL80211_ATTR_SUPPORTED_IFTYPES])
goto commands;