if (caps > 0)
*modes |= IWINFO_80211_N;
- if (bands[NL80211_BAND_ATTR_VHT_CAPA])
- vht_caps = nla_get_u32(bands[NL80211_BAND_ATTR_VHT_CAPA]);
-
- /* Treat any nonzero capability as 11ac */
- if (vht_caps > 0)
- *modes |= IWINFO_80211_AC;
-
nla_for_each_nested(freq, bands[NL80211_BAND_ATTR_FREQS],
freqs_remain)
{
*modes |= IWINFO_80211_B;
*modes |= IWINFO_80211_G;
}
+ else if (bands[NL80211_BAND_ATTR_VHT_CAPA])
+ {
+ vht_caps = nla_get_u32(bands[NL80211_BAND_ATTR_VHT_CAPA]);
+
+ /* Treat any nonzero capability as 11ac */
+ if (vht_caps > 0)
+ *modes |= IWINFO_80211_AC;
+ }
else if (!(*modes & IWINFO_80211_AC))
{
*modes |= IWINFO_80211_A;