--- zzzz-none-000/linux-4.19.183/net/wireless/mlme.c 2021-03-24 10:07:39.000000000 +0000 +++ bcm63-7530ax-756/linux-4.19.183/net/wireless/mlme.c 2023-06-28 08:54:21.000000000 +0000 @@ -872,17 +872,25 @@ trace_cfg80211_cac_event(netdev, event); +#ifndef CONFIG_BCM_KF_WL_HOSTAPD if (WARN_ON(!wdev->cac_started && event != NL80211_RADAR_CAC_STARTED)) return; if (WARN_ON(!wdev->chandef.chan)) return; +#endif /* CONFIG_BCM_KF_WL_HOSTAPD */ switch (event) { case NL80211_RADAR_CAC_FINISHED: timeout = wdev->cac_start_time + msecs_to_jiffies(wdev->cac_time_ms); +#if defined(CONFIG_BCM_KF_WL_HOSTAPD) + if (!wiphy_ext_feature_isset(wiphy, NL80211_EXT_FEATURE_DFS_OFFLOAD)) { + WARN_ON(!time_after_eq(jiffies, timeout)); + } +#else WARN_ON(!time_after_eq(jiffies, timeout)); +#endif cfg80211_set_dfs_state(wiphy, chandef, NL80211_DFS_AVAILABLE); memcpy(&rdev->cac_done_chandef, chandef, sizeof(struct cfg80211_chan_def));