aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-06 09:57:14 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 07:01:31 -0500
commit361c9c8b0eeeec7d881e018d5143bf883558c566 (patch)
tree631cd436b7e80b8134084a935337c6ee3243bd7b /include/net/cfg80211.h
parentc492db370c17c428a0a58d3673294d4e99634b7d (diff)
regulatory: use IS_ERR macro family for freq_reg_info
Instead of returning an error and filling a pointer return the pointer and an ERR_PTR value in error cases. Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f3be58a29642..1f74360b527c 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2938,22 +2938,22 @@ extern void wiphy_apply_custom_regulatory(
2938 * freq_reg_info - get regulatory information for the given frequency 2938 * freq_reg_info - get regulatory information for the given frequency
2939 * @wiphy: the wiphy for which we want to process this rule for 2939 * @wiphy: the wiphy for which we want to process this rule for
2940 * @center_freq: Frequency in KHz for which we want regulatory information for 2940 * @center_freq: Frequency in KHz for which we want regulatory information for
2941 * @reg_rule: the regulatory rule which we have for this frequency
2942 * 2941 *
2943 * Use this function to get the regulatory rule for a specific frequency on 2942 * Use this function to get the regulatory rule for a specific frequency on
2944 * a given wireless device. If the device has a specific regulatory domain 2943 * a given wireless device. If the device has a specific regulatory domain
2945 * it wants to follow we respect that unless a country IE has been received 2944 * it wants to follow we respect that unless a country IE has been received
2946 * and processed already. 2945 * and processed already.
2947 * 2946 *
2948 * Returns 0 if it was able to find a valid regulatory rule which does 2947 * When an error occurs, for example if no rule can be found, the return value
2949 * apply to the given center_freq otherwise it returns non-zero. It will 2948 * is encoded using ERR_PTR(). Use IS_ERR() to check and PTR_ERR() to obtain
2950 * also return -ERANGE if we determine the given center_freq does not even have 2949 * the numeric return value. The numeric return value will be -ERANGE if we
2951 * a regulatory rule for a frequency range in the center_freq's band. See 2950 * determine the given center_freq does not even have a regulatory rule for a
2952 * freq_in_rule_band() for our current definition of a band -- this is purely 2951 * frequency range in the center_freq's band. See freq_in_rule_band() for our
2953 * subjective and right now its 802.11 specific. 2952 * current definition of a band -- this is purely subjective and right now it's
2953 * 802.11 specific.
2954 */ 2954 */
2955extern int freq_reg_info(struct wiphy *wiphy, u32 center_freq, 2955const struct ieee80211_reg_rule *freq_reg_info(struct wiphy *wiphy,
2956 const struct ieee80211_reg_rule **reg_rule); 2956 u32 center_freq);
2957 2957
2958/* 2958/*
2959 * callbacks for asynchronous cfg80211 methods, notification 2959 * callbacks for asynchronous cfg80211 methods, notification