aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-02-17 09:52:35 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-04-09 04:55:39 -0400
commitcb2d956dd329caa11b5ece454dc52253aa038e73 (patch)
treee1f03836ab1dc2bd10e2249972c42534b0c08101 /include/net/cfg80211.h
parentc8866e55a94fb02b83b13f289e5e470fc928703a (diff)
cfg80211: refactor cfg80211_can_use_iftype_chan()
Separate the code that counts the interface types and channels from the code that check the interface combinations. The new function that checks for combinations is exported so it can be called by the drivers. This is done in preparation for moving the interface combinations checks out of cfg80211. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 5640dc028bfa..4653e9f75d0d 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4692,6 +4692,28 @@ void cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp);
4692 */ 4692 */
4693unsigned int ieee80211_get_num_supported_channels(struct wiphy *wiphy); 4693unsigned int ieee80211_get_num_supported_channels(struct wiphy *wiphy);
4694 4694
4695/**
4696 * cfg80211_check_combinations - check interface combinations
4697 *
4698 * @wiphy: the wiphy
4699 * @num_different_channels: the number of different channels we want
4700 * to use for verification
4701 * @radar_detect: a bitmap where each bit corresponds to a channel
4702 * width where radar detection is needed, as in the definition of
4703 * &struct ieee80211_iface_combination.@radar_detect_widths
4704 * @iftype_num: array with the numbers of interfaces of each interface
4705 * type. The index is the interface type as specified in &enum
4706 * nl80211_iftype.
4707 *
4708 * This function can be called by the driver to check whether a
4709 * combination of interfaces and their types are allowed according to
4710 * the interface combinations.
4711 */
4712int cfg80211_check_combinations(struct wiphy *wiphy,
4713 const int num_different_channels,
4714 const u8 radar_detect,
4715 const int iftype_num[NUM_NL80211_IFTYPES]);
4716
4695/* Logging, debugging and troubleshooting/diagnostic helpers. */ 4717/* Logging, debugging and troubleshooting/diagnostic helpers. */
4696 4718
4697/* wiphy_printk helpers, similar to dev_printk */ 4719/* wiphy_printk helpers, similar to dev_printk */