diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-02-13 04:31:59 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-04-09 04:55:43 -0400 |
commit | 73de86a38962b18edad3205c2358599dd9c83e9f (patch) | |
tree | caf27b6e5000427c940a07d325d1210417ba87ad /net/wireless/mlme.c | |
parent | 2beb6dab2d799ee8934cb0801845e551ad8c70f2 (diff) |
cfg80211/mac80211: move interface counting for combination check to mac80211
Move the counting part of the interface combination check from
cfg80211 to mac80211.
This is needed to simplify locking when the driver has to perform a
combination check by itself (eg. with channel-switch).
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r-- | net/wireless/mlme.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index c52ff59a3e96..4b4ba707fab9 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -233,14 +233,8 @@ int cfg80211_mlme_auth(struct cfg80211_registered_device *rdev, | |||
233 | if (!req.bss) | 233 | if (!req.bss) |
234 | return -ENOENT; | 234 | return -ENOENT; |
235 | 235 | ||
236 | err = cfg80211_can_use_chan(rdev, wdev, req.bss->channel, | ||
237 | CHAN_MODE_SHARED); | ||
238 | if (err) | ||
239 | goto out; | ||
240 | |||
241 | err = rdev_auth(rdev, dev, &req); | 236 | err = rdev_auth(rdev, dev, &req); |
242 | 237 | ||
243 | out: | ||
244 | cfg80211_put_bss(&rdev->wiphy, req.bss); | 238 | cfg80211_put_bss(&rdev->wiphy, req.bss); |
245 | return err; | 239 | return err; |
246 | } | 240 | } |
@@ -306,16 +300,10 @@ int cfg80211_mlme_assoc(struct cfg80211_registered_device *rdev, | |||
306 | if (!req->bss) | 300 | if (!req->bss) |
307 | return -ENOENT; | 301 | return -ENOENT; |
308 | 302 | ||
309 | err = cfg80211_can_use_chan(rdev, wdev, chan, CHAN_MODE_SHARED); | ||
310 | if (err) | ||
311 | goto out; | ||
312 | |||
313 | err = rdev_assoc(rdev, dev, req); | 303 | err = rdev_assoc(rdev, dev, req); |
314 | if (!err) | 304 | if (!err) |
315 | cfg80211_hold_bss(bss_from_pub(req->bss)); | 305 | cfg80211_hold_bss(bss_from_pub(req->bss)); |
316 | 306 | else | |
317 | out: | ||
318 | if (err) | ||
319 | cfg80211_put_bss(&rdev->wiphy, req->bss); | 307 | cfg80211_put_bss(&rdev->wiphy, req->bss); |
320 | 308 | ||
321 | return err; | 309 | return err; |