Driver build fails on IEEE80211_CHAN_IGNORE

Hi @ajudge ,
I am building the latest morse_driver and still getting the below error:

morse_driver/dot11ah/s1g_channels.c:724:70: error: ‘IEEE80211_CHAN_IGNORE’ undeclared (first use in this function); did you mean ‘IEEE80211_CHAN_NO_HE’?
724 | __mors_s1g_map->s1g_channels[ch].ch.flags |= IEEE80211_CHAN_IGNORE;
| ^~~~~~~~~~~~~~~~~~~~~
| IEEE80211_CHAN_NO_HE

Can you please help me with this?

Thanks,

Arti

What’s the Linux kernel Version?

guess that you might need some patches.

--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -106,6 +106,8 @@ struct wiphy;
  *     on this channel.
  * @IEEE80211_CHAN_16MHZ: 16 MHz bandwidth is permitted
  *     on this channel.
+ * @IEEE80211_CHAN_IGNORE: Mark this channel as disabled when
+ *     communicating channel list via nl80211.
  *
  */
 enum ieee80211_channel_flags {
@@ -128,8 +130,11 @@ enum ieee80211_channel_flags {
        IEEE80211_CHAN_4MHZ             = 1<<16,
        IEEE80211_CHAN_8MHZ             = 1<<17,
        IEEE80211_CHAN_16MHZ            = 1<<18,
+       IEEE80211_CHAN_IGNORE           = 1<<19,
 };

+#define HAS_IEEE80211_CHAN_IGNORE
+
 #define IEEE80211_CHAN_NO_HT40 \
        (IEEE80211_CHAN_NO_HT40PLUS | IEEE80211_CHAN_NO_HT40MINUS)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 535e34a84d65..f2163d885d3b 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -997,6 +997,9 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy,
        if ((chan->flags & IEEE80211_CHAN_DISABLED) &&
            nla_put_flag(msg, NL80211_FREQUENCY_ATTR_DISABLED))
                goto nla_put_failure;
+       if ((chan->flags & IEEE80211_CHAN_IGNORE) &&
+           nla_put_flag(msg, NL80211_FREQUENCY_ATTR_DISABLED))
+               goto nla_put_failure;
        if (chan->flags & IEEE80211_CHAN_NO_IR) {
                if (nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_IR))
                        goto nla_put_failure;

Hi @BiaoWang ,
I am using 6.6.36 kernel.

We might need some kernel patches.

6.6.x.zip (17.9 KB)