On Thu, 2 Feb 2006 20:36:26 +0100, Michael Buesch wrote:
> Maybe people always compile the stacks as modules, so this does
> only appear on insmod time... .

That's my case. I've also never inserted both modules together.

> But how to solve it? I suggest to change all dscape function prefixes
> from ieee80211_FOO to d80211_FOO.

I renamed ieee80211_rx function, see the patch below (can be pulled from
'up' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jbenc/dscape.git).

Compiles fine and no other multiple definition errors occured.

> As bcm43xx is the only driver using it currently (AFAIK), this should
> be easiest and safest.

It's not the only driver, see rt2x00 patches sent to netdev last week.
Also adm8211 is being ported to the dscape stack.

---

Subject: [PATCH] d80211: rename ieee80211_rx to __ieee80211_rx

This patch fix the problem reported by Michael Buesch <[EMAIL PROTECTED]>:

net/ieee80211/built-in.o: In function `ieee80211_rx':
: multiple definition of `ieee80211_rx'
net/d80211/built-in.o:: first defined here

The ieee80211_rx function is renamed to __ieee80211_rx. That function must
not be called from hard irq (drivers use ieee80211_rx_irqsafe instead), so
the new name seems to be appropriate.

Signed-off-by: Jiri Benc <[EMAIL PROTECTED]>

---

 include/net/d80211.h   |    4 ++--
 net/d80211/ieee80211.c |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

e5f58acd6d6d290e3db847510434b7bbcf75b02c
diff --git a/include/net/d80211.h b/include/net/d80211.h
index 6b24183..c0dbe3a 100644
--- a/include/net/d80211.h
+++ b/include/net/d80211.h
@@ -629,8 +629,8 @@ void ieee80211_free_hw(struct net_device
 /* Receive frame callback function. The low-level driver uses this function to
  * send received frames to the IEEE 802.11 code. Receive buffer (skb) must
  * start with IEEE 802.11 header. */
-void ieee80211_rx(struct net_device *dev, struct sk_buff *skb,
-                 struct ieee80211_rx_status *status);
+void __ieee80211_rx(struct net_device *dev, struct sk_buff *skb,
+                   struct ieee80211_rx_status *status);
 void ieee80211_rx_irqsafe(struct net_device *dev, struct sk_buff *skb,
                          struct ieee80211_rx_status *status);
 
diff --git a/net/d80211/ieee80211.c b/net/d80211/ieee80211.c
index eacecc1..2297da5 100644
--- a/net/d80211/ieee80211.c
+++ b/net/d80211/ieee80211.c
@@ -3261,8 +3261,8 @@ static void ieee80211_sta_rx_broadcast(s
  * This is the receive path handler. It is called by a low level driver when an
  * 802.11 MPDU is received from the hardware.
  */
-void ieee80211_rx(struct net_device *dev, struct sk_buff *skb,
-                 struct ieee80211_rx_status *status)
+void __ieee80211_rx(struct net_device *dev, struct sk_buff *skb,
+                   struct ieee80211_rx_status *status)
 {
        struct ieee80211_local *local = dev->priv;
        struct sta_info *sta;
@@ -3553,7 +3553,7 @@ static void ieee80211_tasklet_handler(un
                        /* Clear skb->type in order to not confuse kernel
                         * netstack. */
                        skb->pkt_type = 0;
-                       ieee80211_rx(skb->dev, skb, rx_status);
+                       __ieee80211_rx(skb->dev, skb, rx_status);
                        kfree(rx_status);
                        break;
                case ieee80211_tx_status_msg:
@@ -4884,7 +4884,7 @@ EXPORT_SYMBOL(ieee80211_register_hw);
 EXPORT_SYMBOL(ieee80211_update_hw);
 EXPORT_SYMBOL(ieee80211_unregister_hw);
 EXPORT_SYMBOL(ieee80211_free_hw);
-EXPORT_SYMBOL(ieee80211_rx);
+EXPORT_SYMBOL(__ieee80211_rx);
 EXPORT_SYMBOL(ieee80211_tx_status);
 EXPORT_SYMBOL(ieee80211_beacon_get);
 EXPORT_SYMBOL(ieee80211_get_buffered_bc);


-- 
Jiri Benc
SUSE Labs
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to