developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 1 | From f5e3b43de3a5e3e6332106282bbcaf336e8204a5 Mon Sep 17 00:00:00 2001 |
| 2 | From: Johannes Berg <johannes.berg@intel.com> |
| 3 | Date: Wed, 15 Mar 2023 16:08:22 +0100 |
| 4 | Subject: [PATCH 13/28] util: don't print EHT info if not present |
| 5 | |
| 6 | That's just confusing, don't print it if the EHT MAC |
| 7 | capabilities attribute isn't there (the kernel puts |
| 8 | all the attrs together.) |
| 9 | |
| 10 | Signed-off-by: Johannes Berg <johannes.berg@intel.com> |
| 11 | --- |
| 12 | util.c | 3 ++- |
| 13 | 1 file changed, 2 insertions(+), 1 deletion(-) |
| 14 | |
| 15 | diff --git a/util.c b/util.c |
| 16 | index 80dc301..50e3fbc 100644 |
| 17 | --- a/util.c |
| 18 | +++ b/util.c |
| 19 | @@ -1593,7 +1593,8 @@ void print_eht_info(struct nlattr *nl_iftype, int band) |
| 20 | nla_parse(tb, NL80211_BAND_IFTYPE_ATTR_MAX, |
| 21 | nla_data(nl_iftype), nla_len(nl_iftype), NULL); |
| 22 | |
| 23 | - if (!tb[NL80211_BAND_IFTYPE_ATTR_IFTYPES]) |
| 24 | + if (!tb[NL80211_BAND_IFTYPE_ATTR_IFTYPES] || |
| 25 | + !tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC]) |
| 26 | return; |
| 27 | |
| 28 | printf("\t\tEHT Iftypes: "); |
| 29 | -- |
| 30 | 2.39.2 |
| 31 | |