From: Hauke Mehrtens Date: Sat, 17 Oct 2009 21:06:45 +0000 (+0200) Subject: rename ieee80211_rx X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=da767e297c0cf01d95013ab7188b82b399364e1f;p=openwrt%2Fstaging%2Fblogic.git rename ieee80211_rx Rename ieee80211_rx to avoild conflicts with the export done by older libipw. libipw in kernel 2.6.32 and older also exports a symbol named ieee80211_rx. If libipw from normal kernel and mac80211 from compat-wireless is loaded you will get an conflict. Signed-off-by: Hauke Mehrtens --- diff --git a/compat/compat-2.6.32.h b/compat/compat-2.6.32.h index ad7f01b7a175..1362e3e074b1 100644 --- a/compat/compat-2.6.32.h +++ b/compat/compat-2.6.32.h @@ -71,6 +71,9 @@ struct dev_pm_ops name = { \ #define wireless_send_event(a, b, c, d) wireless_send_event(a, b, c, (char * ) d) +/* The export symbol in changed in compat/patches/15-symbol-export-conflicts.patch */ +#define ieee80211_rx(hw, skb) mac80211_ieee80211_rx(hw, skb) + #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)) */ #endif /* LINUX_26_32_COMPAT_H */ diff --git a/compat/patches/15-symbol-export-conflicts.patch b/compat/patches/15-symbol-export-conflicts.patch new file mode 100644 index 000000000000..e095f9bf8c32 --- /dev/null +++ b/compat/patches/15-symbol-export-conflicts.patch @@ -0,0 +1,20 @@ +In kernel < 2.6.32 libipw also exports ieee80211_rx. +To avoid conflicts with the other export we rename our. + +diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c +index 5c385e3..26e5fc9 100644 +--- a/net/mac80211/rx.c ++++ b/net/mac80211/rx.c +@@ -2545,7 +2545,12 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb) + drop: + kfree_skb(skb); + } ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) + EXPORT_SYMBOL(ieee80211_rx); ++#else ++EXPORT_SYMBOL(mac80211_ieee80211_rx); ++#endif ++ + + /* This is a version of the rx handler that can be called from hard irq + * context. Post the skb on the queue and schedule the tasklet */