]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
wifi: mac80211: don't check carrier in chanctx code
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Tue, 14 Jun 2022 07:16:26 +0000 (10:16 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 15 Jul 2022 09:43:20 +0000 (11:43 +0200)
We check here that we don't enable TX (netif_carrier_ok())
before we actually start using some channel context, but to
our knowledge this check has never triggered, and with MLO
it's just wrong since links can be added and removed much
more dynamically than before.

Simply remove the checks, there's no really good way to do
anything that would replace them.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/chan.c

index 5ab210706123a85557efd0e327c3a21f90ac1245..2e9bc285f0a5b69d1e988c2fe0c2dcc5f26374f6 100644 (file)
@@ -1800,8 +1800,6 @@ int ieee80211_link_use_channel(struct ieee80211_link_data *link,
 
        lockdep_assert_held(&local->mtx);
 
-       WARN_ON(sdata->dev && netif_carrier_ok(sdata->dev));
-
        mutex_lock(&local->chanctx_mtx);
 
        ret = cfg80211_chandef_dfs_required(local->hw.wiphy,
@@ -1989,8 +1987,6 @@ void ieee80211_link_release_channel(struct ieee80211_link_data *link)
 {
        struct ieee80211_sub_if_data *sdata = link->sdata;
 
-       WARN_ON(sdata->dev && netif_carrier_ok(sdata->dev));
-
        mutex_lock(&sdata->local->chanctx_mtx);
        if (rcu_access_pointer(link->conf->chanctx_conf)) {
                lockdep_assert_held(&sdata->local->mtx);