Skip to content

Commit f8cdddb

Browse files
Michal Kaziorjmberg-intel
authored andcommitted
cfg80211: check iface combinations only when iface is running
Don't validate interface combinations on a stopped interface. Otherwise we might end up being able to create a new interface with a certain type, but won't be able to change an existing interface into that type. This also skips some other functions when interface is stopped and changing interface type. Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent d13e141 commit f8cdddb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/wireless/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
804804
ntype == NL80211_IFTYPE_P2P_CLIENT))
805805
return -EBUSY;
806806

807-
if (ntype != otype) {
807+
if (ntype != otype && netif_running(dev)) {
808808
err = cfg80211_can_change_interface(rdev, dev->ieee80211_ptr,
809809
ntype);
810810
if (err)

0 commit comments

Comments
 (0)