aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-15 05:16:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-16 14:16:58 -0400
commit8e8b41f9d8c8e63fc92f899ace8da91a490ac573 (patch)
tree154122d12331baa908766b87782cad69b4a7da7d /net/wireless
parent0d920987f900573f9f86b7310147ebd1646657c9 (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')
-rw-r--r--net/wireless/core.c4
-rw-r--r--net/wireless/util.c10
2 files changed, 3 insertions, 11 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 59f4a7e7c092..39f2538a46fc 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -422,10 +422,6 @@ static int wiphy_verify_combinations(struct wiphy *wiphy)
422 const struct ieee80211_iface_combination *c; 422 const struct ieee80211_iface_combination *c;
423 int i, j; 423 int i, j;
424 424
425 /* If we have combinations enforce them */
426 if (wiphy->n_iface_combinations)
427 wiphy->flags |= WIPHY_FLAG_ENFORCE_COMBINATIONS;
428
429 for (i = 0; i < wiphy->n_iface_combinations; i++) { 425 for (i = 0; i < wiphy->n_iface_combinations; i++) {
430 u32 cnt = 0; 426 u32 cnt = 0;
431 u16 all_iftypes = 0; 427 u16 all_iftypes = 0;
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;