summaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-02-17 16:52:35 +0200
committerJohannes Berg <johannes.berg@intel.com>2014-04-09 10:55:39 +0200
commitcb2d956dd329caa11b5ece454dc52253aa038e73 (patch)
treee1f03836ab1dc2bd10e2249972c42534b0c08101 /include/net/cfg80211.h
parentc8866e55a94fb02b83b13f289e5e470fc928703a (diff)
downloadop-kernel-dev-cb2d956dd329caa11b5ece454dc52253aa038e73.zip
op-kernel-dev-cb2d956dd329caa11b5ece454dc52253aa038e73.tar.gz
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 5640dc0..4653e9f 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);
*/
unsigned int ieee80211_get_num_supported_channels(struct wiphy *wiphy);
+/**
+ * cfg80211_check_combinations - check interface combinations
+ *
+ * @wiphy: the wiphy
+ * @num_different_channels: the number of different channels we want
+ * to use for verification
+ * @radar_detect: a bitmap where each bit corresponds to a channel
+ * width where radar detection is needed, as in the definition of
+ * &struct ieee80211_iface_combination.@radar_detect_widths
+ * @iftype_num: array with the numbers of interfaces of each interface
+ * type. The index is the interface type as specified in &enum
+ * nl80211_iftype.
+ *
+ * This function can be called by the driver to check whether a
+ * combination of interfaces and their types are allowed according to
+ * the interface combinations.
+ */
+int cfg80211_check_combinations(struct wiphy *wiphy,
+ const int num_different_channels,
+ const u8 radar_detect,
+ const int iftype_num[NUM_NL80211_IFTYPES]);
+
/* Logging, debugging and troubleshooting/diagnostic helpers. */
/* wiphy_printk helpers, similar to dev_printk */
OpenPOWER on IntegriCloud