diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-03-20 10:14:03 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-03-25 17:39:28 +0300 |
commit | 2f51c87a156c2ee30bf6a66694c64856177c5303 (patch) | |
tree | e1e012b3cdc3c6ec2b0b1b87facd78bb54d43eaa /net/mac80211/link.c | |
parent | 80b0aacd1ad046b46d471cf8ed6203bbd777f988 (diff) | |
download | linux-2f51c87a156c2ee30bf6a66694c64856177c5303.tar.xz |
wifi: mac80211: don't ask driver about no-op link changes
If the links won't actually change, nothing will happen.
This was previously done in the inner function (twice in
some cases), but we shouldn't bother the driver with it.
Clean that up.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320091155.a8190a312a27.If4e6f5ce8228eda7afac0fc8c17dd731c5da9ed9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/link.c')
-rw-r--r-- | net/mac80211/link.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/link.c b/net/mac80211/link.c index db49bcec5db4..43f9672fc7f1 100644 --- a/net/mac80211/link.c +++ b/net/mac80211/link.c @@ -450,10 +450,13 @@ int ieee80211_set_active_links(struct ieee80211_vif *vif, u16 active_links) if (WARN_ON(!active_links)) return -EINVAL; + old_active = sdata->vif.active_links; + if (old_active == active_links) + return 0; + if (!drv_can_activate_links(local, sdata, active_links)) return -EINVAL; - old_active = sdata->vif.active_links; if (old_active & active_links) { /* * if there's at least one link that stays active across |