@@ -806,6 +806,8 @@ int mt7996_init_debugfs(struct mt7996_phy *phy)
debugfs_create_devm_seqfile(dev->mt76.dev, "twt_stats", dir,
mt7996_twt_stats);
debugfs_create_file("rf_regval", 0600, dir, dev, &fops_rf_regval);
+ debugfs_create_u32("ignore_radar", 0600, dir,
+ &dev->ignore_radar);
if (phy->mt76->cap.has_5ghz) {
debugfs_create_u32("dfs_hw_pattern", 0400, dir,
@@ -391,12 +391,14 @@ mt7996_mcu_rx_radar_detected(struct mt7996_dev *dev, struct sk_buff *skb)
if (!mphy)
return;
- 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);
+ if (!dev->ignore_radar) {
+ 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++;
}
@@ -286,6 +286,7 @@ struct mt7996_dev {
struct list_head twt_list;
u32 hw_pattern;
+ u32 ignore_radar; /* skip propagating up the stack, for debugging */
bool flash_mode:1;
bool has_eht:1;