--- zzzz-none-000/linux-4.9.276/net/wireless/sme.c 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/net/wireless/sme.c 2023-04-05 08:19:02.000000000 +0000 @@ -635,10 +635,23 @@ return is_all_idle; } +static bool cfg80211_drv_is_all_idle(void) +{ + struct cfg80211_registered_device *rdev; + bool is_all_idle = true; + + list_for_each_entry (rdev, &cfg80211_rdev_list, list) { + if (!rdev_is_all_iface_idle(rdev)) + is_all_idle = false; + } + + return is_all_idle; +} + static void disconnect_work(struct work_struct *work) { rtnl_lock(); - if (cfg80211_is_all_idle()) + if (cfg80211_is_all_idle() && cfg80211_drv_is_all_idle()) regulatory_hint_disconnect(); rtnl_unlock(); } @@ -756,8 +769,9 @@ * - country_ie + 2, the start of the country ie data, and * - and country_ie[1] which is the IE length */ - regulatory_hint_country_ie(wdev->wiphy, bss->channel->band, - country_ie + 2, country_ie[1]); + if (!(wdev->wiphy->flags & WIPHY_FLAG_DISABLE_11D_HINT)) + regulatory_hint_country_ie(wdev->wiphy, bss->channel->band, + country_ie + 2, country_ie[1]); kfree(country_ie); }