summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2022-04-26 01:53:51 +0200
committerDavid Bauer <mail@david-bauer.net>2022-04-27 00:51:14 +0200
commitdc6847eb5ec8747867bc20f1024723c6397c1df7 (patch)
tree55298c833c90e72adc655ace1151f4bf155027b1
parenta479b9b08aeac82fd45cc7a306937c9447157f5e (diff)
downloadiwinfo-dc6847eb5ec8747867bc20f1024723c6397c1df7.tar.gz
iwinfo: nl80211: omit A-hwmode on non-5GHz hardware
Don't add the hwmode A for radios which do not support 5GHz operation. Before, this hwmode was added to all non-VHT radios regardless of their supported bands. Fixes commit 562d01532616 ("iwinfo: nl80211: fix hwmode parsing for multi-band NICs") Signed-off-by: David Bauer <mail@david-bauer.net>
-rw-r--r--iwinfo_nl80211.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index 5b5deec..adb8c45 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -3051,7 +3051,7 @@ static int nl80211_eval_modelist(struct nl80211_modes *m)
m->hw |= IWINFO_80211_G;
}
- if (m->nl_vht)
+ if (m->bands & IWINFO_BAND_5)
{
/* Treat any nonzero capability as 11ac */
if (m->nl_vht > 0)
@@ -3069,6 +3069,10 @@ static int nl80211_eval_modelist(struct nl80211_modes *m)
m->ht |= IWINFO_HTMODE_VHT160;
}
}
+ else
+ {
+ m->hw |= IWINFO_80211_A;
+ }
}
if (m->bands & IWINFO_BAND_60)
@@ -3076,10 +3080,6 @@ static int nl80211_eval_modelist(struct nl80211_modes *m)
m->hw |= IWINFO_80211_AD;
}
- if (!(m->hw & IWINFO_80211_AC))
- {
- m->hw |= IWINFO_80211_A;
- }
}
static int nl80211_get_modelist_cb(struct nl_msg *msg, void *arg)