Report radar pattern to mac80211 if detected by the
offchannel chain.
Tested-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
        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++;
 }