diff mbox series

[05/12] wiphy: set band->freq when parsing band info

Message ID 20220719185544.456727-5-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [01/12] scan: add colocated scan flag | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood July 19, 2022, 6:55 p.m. UTC
This sets the band into the 'band' structure in order to support
HE data rates.
---
 src/wiphy.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

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