diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-11-01 07:10:30 -0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-11-01 07:10:30 -0300 |
| commit | 875eaa399042064c4ba08a56919f12ade8ea6cb9 (patch) | |
| tree | 34c754e6174795aee4830e9363af47217ebbd475 /net/wireless/util.c | |
| parent | perf test sample-parsing: Add endian test for struct branch_flags (diff) | |
| parent | Linux 5.15 (diff) | |
| download | linux-875eaa399042064c4ba08a56919f12ade8ea6cb9.tar.gz linux-875eaa399042064c4ba08a56919f12ade8ea6cb9.zip | |
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up fixes.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'net/wireless/util.c')
| -rw-r--r-- | net/wireless/util.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 18dba3d7c638..a1a99a574984 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1028,14 +1028,14 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, !(rdev->wiphy.interface_modes & (1 << ntype))) return -EOPNOTSUPP; - /* if it's part of a bridge, reject changing type to station/ibss */ - if (netif_is_bridge_port(dev) && - (ntype == NL80211_IFTYPE_ADHOC || - ntype == NL80211_IFTYPE_STATION || - ntype == NL80211_IFTYPE_P2P_CLIENT)) - return -EBUSY; - if (ntype != otype) { + /* if it's part of a bridge, reject changing type to station/ibss */ + if (netif_is_bridge_port(dev) && + (ntype == NL80211_IFTYPE_ADHOC || + ntype == NL80211_IFTYPE_STATION || + ntype == NL80211_IFTYPE_P2P_CLIENT)) + return -EBUSY; + dev->ieee80211_ptr->use_4addr = false; dev->ieee80211_ptr->mesh_id_up_len = 0; wdev_lock(dev->ieee80211_ptr); |
