nl80211: Radar background flag setting

Allow background radar detection flag to be set when specifying a
channel. This is a preliminary change to introduce radar/CAC background
detection support.

Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
This commit is contained in:
Lorenzo Bianconi 2022-03-06 20:34:11 +01:00 committed by Jouni Malinen
parent effd6111b8
commit bad12effe8
2 changed files with 10 additions and 0 deletions

View file

@ -782,6 +782,11 @@ struct hostapd_freq_params {
* for IEEE 802.11ay EDMG configuration.
*/
struct ieee80211_edmg_config edmg;
/**
* radar_background - Whether radar/CAC background is requested
*/
bool radar_background;
};
/**

View file

@ -4912,6 +4912,8 @@ static int nl80211_put_freq_params(struct nl_msg *msg,
wpa_printf(MSG_DEBUG, " * he_enabled=%d", freq->he_enabled);
wpa_printf(MSG_DEBUG, " * vht_enabled=%d", freq->vht_enabled);
wpa_printf(MSG_DEBUG, " * ht_enabled=%d", freq->ht_enabled);
wpa_printf(MSG_DEBUG, " * radar_background=%d",
freq->radar_background);
hw_mode = ieee80211_freq_to_chan(freq->freq, &channel);
is_24ghz = hw_mode == HOSTAPD_MODE_IEEE80211G ||
@ -4989,6 +4991,9 @@ static int nl80211_put_freq_params(struct nl_msg *msg,
NL80211_CHAN_NO_HT))
return -ENOBUFS;
}
if (freq->radar_background)
nla_put_flag(msg, NL80211_ATTR_RADAR_BACKGROUND);
return 0;
}