]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Update channels unavailability for 320 MHz
authorGovindaraj Saminathan <quic_gsaminat@quicinc.com>
Fri, 6 Dec 2024 13:14:04 +0000 (18:44 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 12 Dec 2024 10:18:05 +0000 (12:18 +0200)
Parse NL80211_FREQUENCY_ATTR_NO_320MHZ channel attributes to ensure
correct checking of channel availability in a 320 MHz bandwidth.

Signed-off-by: Govindaraj Saminathan <quic_gsaminat@quicinc.com>
src/drivers/driver_nl80211_capa.c

index c950ddffcc5752bc3ceeea40c73ab9316e051be3..7c688acf8d72c5c85f9b6226cf2abb737cba6004 100644 (file)
@@ -1726,6 +1726,8 @@ static void phy_info_freq(struct hostapd_hw_modes *mode,
                chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_80;
        if (tb_freq[NL80211_FREQUENCY_ATTR_NO_160MHZ])
                chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_160;
+       if (tb_freq[NL80211_FREQUENCY_ATTR_NO_320MHZ])
+               chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_320;
 
        if (tb_freq[NL80211_FREQUENCY_ATTR_DFS_STATE]) {
                enum nl80211_dfs_state state =
@@ -1827,6 +1829,8 @@ static int phy_info_freqs(struct phy_info_arg *phy_info,
                [NL80211_FREQUENCY_ATTR_NO_HT40_MINUS] = { .type = NLA_FLAG },
                [NL80211_FREQUENCY_ATTR_NO_80MHZ] = { .type = NLA_FLAG },
                [NL80211_FREQUENCY_ATTR_NO_160MHZ] = { .type = NLA_FLAG },
+               [NL80211_FREQUENCY_ATTR_NO_320MHZ] = { .type = NLA_FLAG },
+
        };
        int new_channels = 0;
        struct hostapd_channel_data *channel;