]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: print NO-EHT flags for reg get command
authorAditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Mon, 12 May 2025 15:23:04 +0000 (20:53 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 16 May 2025 08:54:27 +0000 (10:54 +0200)
Currently when NO-EHT flag is set by driver, iw doesn't display that
information in the 'iw reg get' command. Add changes to print "NO-EHT"
while displaying the reg rules via reg get command, if a reg rule is
marked with NO-EHT flag.

Sample Output:

country RU: DFS-UNSET
        (2402 - 2472 @ 40), (N/A, 20), (N/A), NO-EHT
        (5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW, NO-EHT
        (5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW, NO-EHT
        (5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW, NO-EHT
        (5735 - 5835 @ 80), (N/A, 30), (N/A), AUTO-BW, NO-EHT

Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Signed-off-by: Manish Dharanenthiran <manish.dharanenthiran@oss.qualcomm.com>
Link: https://patch.msgid.link/20250512152304.2852658-1-manish.dharanenthiran@oss.qualcomm.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
reg.c

diff --git a/reg.c b/reg.c
index 27899ce859eafb245bf79cbede97edfbd3c9718c..f24535d901e12c593f59b2c4a9d98e84dcc53e95 100644 (file)
--- a/reg.c
+++ b/reg.c
@@ -204,6 +204,7 @@ static int print_reg_handler(struct nl_msg *msg, void *arg)
                PARSE_FLAG(NL80211_RRF_NO_160MHZ, "NO-160MHZ");
                PARSE_FLAG(NL80211_RRF_NO_HE, "NO-HE");
                PARSE_FLAG(NL80211_RRF_NO_320MHZ, "NO-320MHZ");
+               PARSE_FLAG(NL80211_RRF_NO_EHT, "NO-EHT");
 
                /* Kernels that support NO_IR always turn on both flags */
                if ((flags & NL80211_RRF_NO_IR) && (flags & __NL80211_RRF_NO_IBSS)) {