]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
cfg80211: export freq_reg_info()
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Thu, 22 Jan 2009 23:05:45 +0000 (15:05 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 29 Jan 2009 21:01:14 +0000 (16:01 -0500)
This can be used by drivers on the reg_notifier()

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/net/wireless.h
net/wireless/reg.c

index c5538b923afb4389b838b7c1432de6a1ecde53d5..f68602eb4160e5ba059b43c7de6a273bf1982d87 100644 (file)
@@ -418,4 +418,28 @@ extern void wiphy_apply_custom_regulatory(
        struct wiphy *wiphy,
        const struct ieee80211_regdomain *regd);
 
+/**
+ * freq_reg_info - get regulatory information for the given frequency
+ * @wiphy: the wiphy for which we want to process this rule for
+ * @center_freq: Frequency in KHz for which we want regulatory information for
+ * @bandwidth: the bandwidth requirement you have in KHz, if you do not have one
+ *     you can set this to 0. If this frequency is allowed we then set
+ *     this value to the maximum allowed bandwidth.
+ * @reg_rule: the regulatory rule which we have for this frequency
+ *
+ * Use this function to get the regulatory rule for a specific frequency on
+ * a given wireless device. If the device has a specific regulatory domain
+ * it wants to follow we respect that unless a country IE has been received
+ * and processed already.
+ *
+ * Returns 0 if it was able to find a valid regulatory rule which does
+ * apply to the given center_freq otherwise it returns non-zero. It will
+ * also return -ERANGE if we determine the given center_freq does not even have
+ * a regulatory rule for a frequency range in the center_freq's band. See
+ * freq_in_rule_band() for our current definition of a band -- this is purely
+ * subjective and right now its 802.11 specific.
+ */
+extern int freq_reg_info(struct wiphy *wiphy, u32 center_freq, u32 *bandwidth,
+                        const struct ieee80211_reg_rule **reg_rule);
+
 #endif /* __NET_WIRELESS_H */
index 0d6059502b406ff99cba6b25d083c0b53d7b68d7..d663795d69447aaca0e8307257648f2a48dc973b 100644 (file)
@@ -833,29 +833,9 @@ static int freq_reg_info_regd(struct wiphy *wiphy,
 
        return !max_bandwidth;
 }
+EXPORT_SYMBOL(freq_reg_info);
 
-/**
- * freq_reg_info - get regulatory information for the given frequency
- * @wiphy: the wiphy for which we want to process this rule for
- * @center_freq: Frequency in KHz for which we want regulatory information for
- * @bandwidth: the bandwidth requirement you have in KHz, if you do not have one
- *     you can set this to 0. If this frequency is allowed we then set
- *     this value to the maximum allowed bandwidth.
- * @reg_rule: the regulatory rule which we have for this frequency
- *
- * Use this function to get the regulatory rule for a specific frequency on
- * a given wireless device. If the device has a specific regulatory domain
- * it wants to follow we respect that unless a country IE has been received
- * and processed already.
- *
- * Returns 0 if it was able to find a valid regulatory rule which does
- * apply to the given center_freq otherwise it returns non-zero. It will
- * also return -ERANGE if we determine the given center_freq does not even have
- * a regulatory rule for a frequency range in the center_freq's band. See
- * freq_in_rule_band() for our current definition of a band -- this is purely
- * subjective and right now its 802.11 specific.
- */
-static int freq_reg_info(struct wiphy *wiphy, u32 center_freq, u32 *bandwidth,
+int freq_reg_info(struct wiphy *wiphy, u32 center_freq, u32 *bandwidth,
                         const struct ieee80211_reg_rule **reg_rule)
 {
        return freq_reg_info_regd(wiphy, center_freq,