--- zzzz-none-000/linux-4.9.231/net/wireless/sme.c 2020-07-22 07:10:54.000000000 +0000 +++ falcon-5530-730/linux-4.9.231/net/wireless/sme.c 2022-08-31 08:19:49.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); }