From 5c15f5736de0c329bccd1a39264a7bd00299f728 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 5 Jan 2021 22:32:45 +0000 Subject: iwinfo: return hwmode 'ad' on 802.11ad-only hardware Signed-off-by: Daniel Golle --- iwinfo.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iwinfo.c b/iwinfo.c index 4133dc4..7c9a656 100644 --- a/iwinfo.c +++ b/iwinfo.c @@ -301,6 +301,12 @@ static void rpc_iwinfo_call_hw_ht_mode() const char *hwmode_str; const char *htmode_str; int32_t htmode = 0; + int modes; + + if (!iw->hwmodelist(ifname, &modes) && (modes == IWINFO_80211_AD)) { + blobmsg_add_string(&buf, "hwmode", "ad"); + return; + } if (iw->htmode(ifname, &htmode)) return; -- cgit v1.2.1