aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2012-06-08 10:55:44 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-19 08:58:22 -0700
commit31b83ef7cfda5a7b74446ca70c1e231b24450cbd (patch)
tree60d1289fb4e5865df2bfa1f1cb734fe6454ca18b /net/wireless
parent1a4eda9788a542347dfc2b1684636bcbe2ee3f79 (diff)
downloadkernel_samsung_smdk4412-31b83ef7cfda5a7b74446ca70c1e231b24450cbd.zip
kernel_samsung_smdk4412-31b83ef7cfda5a7b74446ca70c1e231b24450cbd.tar.gz
kernel_samsung_smdk4412-31b83ef7cfda5a7b74446ca70c1e231b24450cbd.tar.bz2
cfg80211: check iface combinations only when iface is running
commit f8cdddb8d61d16a156229f0910f7ecfc7a82c003 upstream. 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 <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> [Fixes regression introduced by cherry pick of 463454b5dbd8] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 30f68dc..bbcb58e 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -807,7 +807,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
ntype == NL80211_IFTYPE_P2P_CLIENT))
return -EBUSY;
- if (ntype != otype) {
+ if (ntype != otype && netif_running(dev)) {
err = cfg80211_can_change_interface(rdev, dev->ieee80211_ptr,
ntype);
if (err)