From d418bb63f82a01cd018917ff3725907c73f67a94 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 26 Mar 2008 14:14:55 +0100 Subject: [PATCH] --- yaml --- r: 90434 b: refs/heads/master c: 6c507cd0400cb51dd2ee251c1b8756b9375a1128 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/wireless.h | 18 +++++++++++++++--- trunk/net/wireless/util.c | 6 +++--- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 4498db071eb4..a791f7739171 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7d5796118353cd45e9e301fdf3ff99fdec5390e9 +refs/heads/master: 6c507cd0400cb51dd2ee251c1b8756b9375a1128 diff --git a/trunk/include/net/wireless.h b/trunk/include/net/wireless.h index f4b77ab66bae..667b4080d30f 100644 --- a/trunk/include/net/wireless.h +++ b/trunk/include/net/wireless.h @@ -304,10 +304,22 @@ extern int ieee80211_channel_to_frequency(int chan); */ extern int ieee80211_frequency_to_channel(int freq); +/* + * Name indirection necessary because the ieee80211 code also has + * a function named "ieee80211_get_channel", so if you include + * cfg80211's header file you get cfg80211's version, if you try + * to include both header files you'll (rightfully!) get a symbol + * clash. + */ +extern struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, + int freq); + /** * ieee80211_get_channel - get channel struct from wiphy for specified frequency */ -extern struct ieee80211_channel *ieee80211_get_channel(struct wiphy *wiphy, - int freq); - +static inline struct ieee80211_channel * +ieee80211_get_channel(struct wiphy *wiphy, int freq) +{ + return __ieee80211_get_channel(wiphy, freq); +} #endif /* __NET_WIRELESS_H */ diff --git a/trunk/net/wireless/util.c b/trunk/net/wireless/util.c index f3e623df3515..f54424693a38 100644 --- a/trunk/net/wireless/util.c +++ b/trunk/net/wireless/util.c @@ -33,8 +33,8 @@ int ieee80211_frequency_to_channel(int freq) } EXPORT_SYMBOL(ieee80211_frequency_to_channel); -struct ieee80211_channel *ieee80211_get_channel(struct wiphy *wiphy, - int freq) +struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, + int freq) { enum ieee80211_band band; struct ieee80211_supported_band *sband; @@ -54,7 +54,7 @@ struct ieee80211_channel *ieee80211_get_channel(struct wiphy *wiphy, return NULL; } -EXPORT_SYMBOL(ieee80211_get_channel); +EXPORT_SYMBOL(__ieee80211_get_channel); static void set_mandatory_flags_band(struct ieee80211_supported_band *sband, enum ieee80211_band band)