提交 6c507cd0 编写于 作者: J Johannes Berg 提交者: John W. Linville

cfg80211: don't export ieee80211_get_channel

This patch makes ieee80211_get_channel a static inline defined in
cfg80211's header file which simply calls __ieee80211_get_channel
to avoid symbol clashes with the ieee80211 code.

The problem was pointed out by David Miller, thanks!
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 7d579611
......@@ -304,10 +304,22 @@ extern int ieee80211_channel_to_frequency(int chan);
*/
extern int ieee80211_frequency_to_channel(int freq);
/**
* ieee80211_get_channel - get channel struct from wiphy for specified frequency
/*
* 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,
extern struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
int freq);
/**
* ieee80211_get_channel - get channel struct from wiphy for specified frequency
*/
static inline struct ieee80211_channel *
ieee80211_get_channel(struct wiphy *wiphy, int freq)
{
return __ieee80211_get_channel(wiphy, freq);
}
#endif /* __NET_WIRELESS_H */
......@@ -33,7 +33,7 @@ int ieee80211_frequency_to_channel(int freq)
}
EXPORT_SYMBOL(ieee80211_frequency_to_channel);
struct ieee80211_channel *ieee80211_get_channel(struct wiphy *wiphy,
struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
int freq)
{
enum ieee80211_band band;
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册