diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-15 05:16:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-16 14:16:58 -0400 |
commit | 8e8b41f9d8c8e63fc92f899ace8da91a490ac573 (patch) | |
tree | 154122d12331baa908766b87782cad69b4a7da7d /net/wireless/util.c | |
parent | 0d920987f900573f9f86b7310147ebd1646657c9 (diff) |
cfg80211: enforce lack of interface combinations
My grand plan to allow drivers to gradually move over
to advertising virtual interface combinations and only
enforce with drivers that do want it enforced doesn't
seem to be working out, only Christian ever added the
advertising (to carl9170), nobody else did.
Begin enforcing combinations in cfg80211 so that users
can rely on the information reported about a device.
Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Cc: Jouni Malinen <jouni@qca.qualcomm.com>
Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Bob Copeland <me@bobcopeland.com>
Cc: Bing Zhao <bzhao@marvell.com>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: Luciano Coelho <coelho@ti.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 1b7a08df933c..ffced852284d 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -946,13 +946,6 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev, | |||
946 | if (rdev->wiphy.software_iftypes & BIT(iftype)) | 946 | if (rdev->wiphy.software_iftypes & BIT(iftype)) |
947 | return 0; | 947 | return 0; |
948 | 948 | ||
949 | /* | ||
950 | * Drivers will gradually all set this flag, until all | ||
951 | * have it we only enforce for those that set it. | ||
952 | */ | ||
953 | if (!(rdev->wiphy.flags & WIPHY_FLAG_ENFORCE_COMBINATIONS)) | ||
954 | return 0; | ||
955 | |||
956 | memset(num, 0, sizeof(num)); | 949 | memset(num, 0, sizeof(num)); |
957 | 950 | ||
958 | num[iftype] = 1; | 951 | num[iftype] = 1; |
@@ -972,6 +965,9 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev, | |||
972 | } | 965 | } |
973 | mutex_unlock(&rdev->devlist_mtx); | 966 | mutex_unlock(&rdev->devlist_mtx); |
974 | 967 | ||
968 | if (total == 1) | ||
969 | return 0; | ||
970 | |||
975 | for (i = 0; i < rdev->wiphy.n_iface_combinations; i++) { | 971 | for (i = 0; i < rdev->wiphy.n_iface_combinations; i++) { |
976 | const struct ieee80211_iface_combination *c; | 972 | const struct ieee80211_iface_combination *c; |
977 | struct ieee80211_iface_limit *limits; | 973 | struct ieee80211_iface_limit *limits; |