diff mbox series

[02/10] nl80211util: parse additional channel restriction flags

Message ID 20221220214318.2041986-2-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [01/10] ap: make supported rates a common builder. | expand

Checks

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

Commit Message

James Prestwood Dec. 20, 2022, 9:43 p.m. UTC
---
 src/band.h        |  5 +++++
 src/nl80211util.c | 15 +++++++++++++++
 2 files changed, 20 insertions(+)
diff mbox series

Patch

diff --git a/src/band.h b/src/band.h
index da4c0ae5..e196a416 100644
--- a/src/band.h
+++ b/src/band.h
@@ -59,6 +59,11 @@  struct band_freq_attrs {
 	bool supported : 1;
 	bool disabled : 1;
 	bool no_ir : 1;
+	bool no_ht40_plus : 1;
+	bool no_ht40_minus : 1;
+	bool no_80mhz : 1;
+	bool no_160mhz : 1;
+	bool no_he : 1;
 } __attribute__ ((packed));
 
 struct band {
diff --git a/src/nl80211util.c b/src/nl80211util.c
index 712cdec3..400871fd 100644
--- a/src/nl80211util.c
+++ b/src/nl80211util.c
@@ -533,6 +533,21 @@  int nl80211_parse_supported_frequencies(struct l_genl_attr *band_freqs,
 			case NL80211_FREQUENCY_ATTR_NO_IR:
 				freq_attr.no_ir = true;
 				break;
+			case NL80211_FREQUENCY_ATTR_NO_HT40_MINUS:
+				freq_attr.no_ht40_minus = true;
+				break;
+			case NL80211_FREQUENCY_ATTR_NO_HT40_PLUS:
+				freq_attr.no_ht40_plus = true;
+				break;
+			case NL80211_FREQUENCY_ATTR_NO_80MHZ:
+				freq_attr.no_80mhz = true;
+				break;
+			case NL80211_FREQUENCY_ATTR_NO_160MHZ:
+				freq_attr.no_160mhz = true;
+				break;
+			case NL80211_FREQUENCY_ATTR_NO_HE:
+				freq_attr.no_he = true;
+				break;
 			}
 		}