3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:59:25 +01:00

wiphy: set band->freq when parsing band info

This sets the band into the 'band' structure in order to support
HE data rates.
This commit is contained in:
James Prestwood 2022-07-19 11:55:37 -07:00 committed by Denis Kenzior
parent fce1449a87
commit d46fac6e93

View File

@ -1203,16 +1203,20 @@ static void parse_supported_bands(struct wiphy *wiphy,
while (l_genl_attr_next(bands, &type, NULL, NULL)) { while (l_genl_attr_next(bands, &type, NULL, NULL)) {
struct band **bandp; struct band **bandp;
struct band *band; struct band *band;
enum band_freq freq;
switch (type) { switch (type) {
case NL80211_BAND_2GHZ: case NL80211_BAND_2GHZ:
bandp = &wiphy->band_2g; bandp = &wiphy->band_2g;
freq = BAND_FREQ_2_4_GHZ;
break; break;
case NL80211_BAND_5GHZ: case NL80211_BAND_5GHZ:
bandp = &wiphy->band_5g; bandp = &wiphy->band_5g;
freq = BAND_FREQ_5_GHZ;
break; break;
case NL80211_BAND_6GHZ: case NL80211_BAND_6GHZ:
bandp = &wiphy->band_6g; bandp = &wiphy->band_6g;
freq = BAND_FREQ_6_GHZ;
break; break;
default: default:
continue; continue;
@ -1226,6 +1230,8 @@ static void parse_supported_bands(struct wiphy *wiphy,
if (!band) if (!band)
continue; continue;
band->freq = freq;
/* Reset iter to beginning */ /* Reset iter to beginning */
if (!l_genl_attr_recurse(bands, &attr)) { if (!l_genl_attr_recurse(bands, &attr)) {
band_free(band); band_free(band);