summaryrefslogtreecommitdiff
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2021-10-23 11:10:51 +0200
committerJohannes Berg <johannes.berg@intel.com>2021-11-19 09:38:49 +0100
commit237337c230b94e78a5a0f88d1705259ab543fc40 (patch)
treee5b5b8a54419b1abbee0682a294270cddcc75777 /net/mac80211/cfg.c
parentbc2dfc02836b1133d1bf4d22aa13d48ac98eabef (diff)
mac80211: introduce set_radar_offchan callback
Similar to cfg80211, introduce set_radar_offchan callback in mac80211_ops in order to configure a dedicated offchannel chain available on some hw (e.g. mt7915) to perform offchannel CAC detection and avoid tx/rx downtime. Tested-by: Evelyn Tsai <evelyn.tsai@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/201110606d4f3a7dfdf31440e351f2e2c375d4f0.1634979655.git.lorenzo@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index bd3d3195097f..45334d59fe06 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -4383,6 +4383,18 @@ out:
return err;
}
+static int
+ieee80211_set_radar_offchan(struct wiphy *wiphy,
+ struct cfg80211_chan_def *chandef)
+{
+ struct ieee80211_local *local = wiphy_priv(wiphy);
+
+ if (!local->ops->set_radar_offchan)
+ return -EOPNOTSUPP;
+
+ return local->ops->set_radar_offchan(&local->hw, chandef);
+}
+
const struct cfg80211_ops mac80211_config_ops = {
.add_virtual_intf = ieee80211_add_iface,
.del_virtual_intf = ieee80211_del_iface,
@@ -4487,4 +4499,5 @@ const struct cfg80211_ops mac80211_config_ops = {
.reset_tid_config = ieee80211_reset_tid_config,
.set_sar_specs = ieee80211_set_sar_specs,
.color_change = ieee80211_color_change,
+ .set_radar_offchan = ieee80211_set_radar_offchan,
};