]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
channel: report punctured subchannel bitmap
authorJohannes Berg <johannes.berg@intel.com>
Mon, 15 Jan 2024 12:26:49 +0000 (14:26 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 17 May 2024 09:18:29 +0000 (11:18 +0200)
If the used channel is punctured, display the bitmap of
subchannels that are punctured.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
interface.c

index eeef496c4956eaaaebe48946dc867efe652547cc..bb1a1d30385cddcbf9a295cb14f6be1ac608dc41 100644 (file)
@@ -385,6 +385,13 @@ static void print_channel(struct nlattr **tb)
                if (tb[NL80211_ATTR_CENTER_FREQ2])
                        printf(", center2: %d MHz",
                                nla_get_u32(tb[NL80211_ATTR_CENTER_FREQ2]));
+
+               if (tb[NL80211_ATTR_PUNCT_BITMAP]) {
+                       uint32_t punct = nla_get_u32(tb[NL80211_ATTR_PUNCT_BITMAP]);
+
+                       if (punct)
+                               printf(", punctured: 0x%x", punct);
+               }
        } else if (tb[NL80211_ATTR_WIPHY_CHANNEL_TYPE]) {
                enum nl80211_channel_type channel_type;