From 5b94045f927e4f3d007509a4a823318278d4326d Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Wed, 12 Jan 2022 18:53:53 +0100 Subject: [PATCH] mt76: mt7915: report radar pattern if detected by rdd2 Report radar pattern to mac80211 if detected by the offchannel chain. Tested-by: Evelyn Tsai Tested-by: Owen Peng Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau --- mt7915/mcu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mt7915/mcu.c b/mt7915/mcu.c index 3752dc01..c60b7d8c 100644 --- a/mt7915/mcu.c +++ b/mt7915/mcu.c @@ -358,7 +358,12 @@ mt7915_mcu_rx_radar_detected(struct mt7915_dev *dev, struct sk_buff *skb) if (r->band_idx && dev->mt76.phy2) mphy = dev->mt76.phy2; - ieee80211_radar_detected(mphy->hw); + if (r->band_idx == MT_RX_SEL2) + cfg80211_background_radar_event(mphy->hw->wiphy, + &dev->rdd2_chandef, + GFP_ATOMIC); + else + ieee80211_radar_detected(mphy->hw); dev->hw_pattern++; }