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>
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)
m->ht |= IWINFO_HTMODE_VHT160;
}
}
+ else
+ {
+ m->hw |= IWINFO_80211_A;
+ }
}
if (m->bands & IWINFO_BAND_60)
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)