aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.h
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-02-13 04:31:59 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-04-09 04:55:43 -0400
commit73de86a38962b18edad3205c2358599dd9c83e9f (patch)
treecaf27b6e5000427c940a07d325d1210417ba87ad /net/wireless/core.h
parent2beb6dab2d799ee8934cb0801845e551ad8c70f2 (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/core.h')
-rw-r--r--net/wireless/core.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 6f6f75609852..6684c5d965d8 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -417,6 +417,9 @@ cfg80211_can_change_interface(struct cfg80211_registered_device *rdev,
417 struct wireless_dev *wdev, 417 struct wireless_dev *wdev,
418 enum nl80211_iftype iftype) 418 enum nl80211_iftype iftype)
419{ 419{
420 /* TODO: For this function, we'll probably need to keep some
421 * kind of interface combination check in cfg80211...
422 */
420 return cfg80211_can_use_iftype_chan(rdev, wdev, iftype, NULL, 423 return cfg80211_can_use_iftype_chan(rdev, wdev, iftype, NULL,
421 CHAN_MODE_UNDEFINED, 0); 424 CHAN_MODE_UNDEFINED, 0);
422} 425}
@@ -431,16 +434,6 @@ cfg80211_can_add_interface(struct cfg80211_registered_device *rdev,
431 return cfg80211_can_change_interface(rdev, NULL, iftype); 434 return cfg80211_can_change_interface(rdev, NULL, iftype);
432} 435}
433 436
434static inline int
435cfg80211_can_use_chan(struct cfg80211_registered_device *rdev,
436 struct wireless_dev *wdev,
437 struct ieee80211_channel *chan,
438 enum cfg80211_chan_mode chanmode)
439{
440 return cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype,
441 chan, chanmode, 0);
442}
443
444static inline unsigned int elapsed_jiffies_msecs(unsigned long start) 437static inline unsigned int elapsed_jiffies_msecs(unsigned long start)
445{ 438{
446 unsigned long end = jiffies; 439 unsigned long end = jiffies;