On Tue, Nov 20, 2007 at 06:53:15PM +0530, Kamalesh Babulal wrote:
> Hi Andrew,
>
> The kernel build fails, with following message
>
> LD drivers/net/wireless/built-in.o
> drivers/net/wireless/rtl8187.o: In function `rtl8225z2_rf_init':
> (.opd+0x180): multiple definition of `rtl8225z2_rf_init'
> drivers/net/wireless/rtl8180.o:(.opd+0x1b0): first defined here
> drivers/net/wireless/rtl8187.o: In function `rtl8225z2_rf_init':
> /root/linux-2.6.24-rc3/drivers/net/wireless/rtl8187_rtl8225.c:571: multiple definition of `.rtl8225z2_rf_init'
> drivers/net/wireless/rtl8180.o:/root/linux-2.6.24-rc3/drivers/net/wireless/rtl8180_rtl8225.c:561: first defined here
> ld: Warning: size of symbol `.rtl8225z2_rf_init' changed from 3836 in drivers/net/wireless/rtl8180.o to 3544 in drivers/net/wireless/rtl8187.o
<snip>
The patch below is a little ugly but will allow allyesconfig to work. I
don't know enough about the Realtek devices to make intellegent
suggestions on how to fix this particular problem. Clearly the 2
drivers share a lot of common code so perhaps they can be merged?
I assumed that the RTL8180, is still somewhat WiP based on the commit
message for a2645795713c4374ff2efda960251cdc30b63430 (wireless-2.6.git).
Appologies for the uber long CC line, wasn't sure who can be pruned.
From: Tony Breeds <[email protected]>
Temporarily ensure that Realtek 8185 and 8187 aren't compiled together.
These two drivers share a number of common (global) functions. While RTL8180
is still being worked on ensure that it's not built together with the RTL8187
(ie allyseconfig).
Signed-off-by: Tony Breeds <[email protected]>
---
drivers/net/wireless/Kconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 82e5de7..ab2eac0 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -555,6 +555,7 @@ config USB_ZD1201
config RTL8180
tristate "Realtek 8185 PCI support"
depends on MAC80211 && PCI && WLAN_80211 && EXPERIMENTAL
+ depends on !RTL8187
select EEPROM_93CX6
config RTL8187
Yours Tony
linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
On Tue, 27 Nov 2007 13:34:30 +1100 [email protected] (Tony Breeds) wrote:
> On Mon, Nov 26, 2007 at 09:20:08PM -0500, Michael Wu wrote:
>
> > I would rather have a patch to temporarily not allow them to be built into the
> > kernel. (or only allow one at a time to be built as a module) There's no
> > issues when these drivers are compiled as modules.
>
> Perhaps as below?
>
> > It's mostly the rtl8225 radio tuning code that's similar. They're not exactly
> > the same though, so it'll be a bit messy to merge the usb rtl8225 radio
> > tuning and pci rtl8225 radio tuning code. However, I do think it'll be better
> > overall so the merger of that code is planned.
>
> okay, the diff between the 2 drivers doesn't look too bad really, but as
> you say it won't be trivial to merge them.
>
> From: Tony Breeds <[email protected]>
>
> Temporarily ensure that Realtek 8185 and 8187 can only be built as modules.
>
> These two drivers share a number of common (global) functions. While a better
> long term solution is developed lets ensure that they are never built into
> the kernel, to avoid symbol conflicts.
>
> Signed-off-by: Tony Breeds <[email protected]>
>
> ---
>
> drivers/net/wireless/Kconfig | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
> index 82e5de7..023dd9d 100644
> --- a/drivers/net/wireless/Kconfig
> +++ b/drivers/net/wireless/Kconfig
> @@ -555,11 +555,13 @@ config USB_ZD1201
> config RTL8180
> tristate "Realtek 8185 PCI support"
> depends on MAC80211 && PCI && WLAN_80211 && EXPERIMENTAL
> + depends on m
> select EEPROM_93CX6
>
> config RTL8187
> tristate "Realtek 8187 USB support"
> depends on MAC80211 && USB && WLAN_80211 && EXPERIMENTAL
> + depends on m
> select EEPROM_93CX6
> ---help---
> This is a driver for RTL8187 based cards.
>
<head spins>
Why not just rename one of them?
diff -puN drivers/net/wireless/rtl8187_dev.c~a drivers/net/wireless/rtl8187_dev.c
--- a/drivers/net/wireless/rtl8187_dev.c~a
+++ a/drivers/net/wireless/rtl8187_dev.c
@@ -764,7 +764,7 @@ static int __devinit rtl8187_probe(struc
if (rtl8225_read(dev, 8) != 0x588 || rtl8225_read(dev, 9) != 0x700)
priv->rf_init = rtl8225_rf_init;
else
- priv->rf_init = rtl8225z2_rf_init;
+ priv->rf_init = rtl8187_rf_init;
rtl8225_write(dev, 0, 0x0B7);
diff -puN drivers/net/wireless/rtl8187_rtl8225.c~a drivers/net/wireless/rtl8187_rtl8225.c
--- a/drivers/net/wireless/rtl8187_rtl8225.c~a
+++ a/drivers/net/wireless/rtl8187_rtl8225.c
@@ -567,7 +567,7 @@ static const u8 rtl8225z2_gain_bg[] = {
0x63, 0x15, 0xc5 /* -66dBm */
};
-void rtl8225z2_rf_init(struct ieee80211_hw *dev)
+void rtl8187_rf_init(struct ieee80211_hw *dev)
{
struct rtl8187_priv *priv = dev->priv;
int i;
diff -puN drivers/net/wireless/rtl8187_rtl8225.h~a drivers/net/wireless/rtl8187_rtl8225.h
--- a/drivers/net/wireless/rtl8187_rtl8225.h~a
+++ a/drivers/net/wireless/rtl8187_rtl8225.h
@@ -24,7 +24,7 @@ void rtl8225_write(struct ieee80211_hw *
u16 rtl8225_read(struct ieee80211_hw *, u8 addr);
void rtl8225_rf_init(struct ieee80211_hw *);
-void rtl8225z2_rf_init(struct ieee80211_hw *);
+void rtl8187_rf_init(struct ieee80211_hw *);
void rtl8225_rf_stop(struct ieee80211_hw *);
void rtl8225_rf_set_channel(struct ieee80211_hw *, int);
_
On Mon, 26 Nov 2007 23:31:20 -0500 Michael Wu <[email protected]> wrote:
> On Monday 26 November 2007 21:54:23 Andrew Morton wrote:
> > <head spins>
> >
> > Why not just rename one of them?
> >
> Fine for your tree as a stopgap measure. Please don't merge in wireless-2.6.
>
Why not?
Having very long and specific identifiers duplicated in two drivers is a
daft situation. Unless they both drive the same hardware, which afaict
they do not?
On Monday 26 November 2007 21:54:23 Andrew Morton wrote:
> Why not just rename one of them?
>
Wait, why does renaming just one of them work?
-Michael Wu
On Mon, Nov 26, 2007 at 09:20:08PM -0500, Michael Wu wrote:
> I would rather have a patch to temporarily not allow them to be built into the
> kernel. (or only allow one at a time to be built as a module) There's no
> issues when these drivers are compiled as modules.
Perhaps as below?
> It's mostly the rtl8225 radio tuning code that's similar. They're not exactly
> the same though, so it'll be a bit messy to merge the usb rtl8225 radio
> tuning and pci rtl8225 radio tuning code. However, I do think it'll be better
> overall so the merger of that code is planned.
okay, the diff between the 2 drivers doesn't look too bad really, but as
you say it won't be trivial to merge them.
From: Tony Breeds <[email protected]>
Temporarily ensure that Realtek 8185 and 8187 can only be built as modules.
These two drivers share a number of common (global) functions. While a better
long term solution is developed lets ensure that they are never built into
the kernel, to avoid symbol conflicts.
Signed-off-by: Tony Breeds <[email protected]>
---
drivers/net/wireless/Kconfig | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 82e5de7..023dd9d 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -555,11 +555,13 @@ config USB_ZD1201
config RTL8180
tristate "Realtek 8185 PCI support"
depends on MAC80211 && PCI && WLAN_80211 && EXPERIMENTAL
+ depends on m
select EEPROM_93CX6
config RTL8187
tristate "Realtek 8187 USB support"
depends on MAC80211 && USB && WLAN_80211 && EXPERIMENTAL
+ depends on m
select EEPROM_93CX6
---help---
This is a driver for RTL8187 based cards.
Yours Tony
linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
On Monday 26 November 2007 23:37:16 Andrew Morton wrote:
> Why not?
>
> Having very long and specific identifiers duplicated in two drivers is a
> daft situation. Unless they both drive the same hardware, which afaict
> they do not?
The radios and macs are very similar (radios could actually be the same, not
sure), with modifications to run on whatever bus they're on. That's why I'm
going to be merging the rtl8180_rtl8225.c and rtl8187_rtl8225.c into a single
piece of code. Besides that, rtl8187 != rtl8225 since rtl8187 is a mac and
rtl8225 is a radio. Replacing rtl8225z2 with rtl8187 makes no sense but is
okay temporarily to fix build issues in -mm.
-Michael Wu
On Tue, 27 Nov 2007 00:06:16 -0500 Michael Wu <[email protected]> wrote:
> On Monday 26 November 2007 23:55:59 Andrew Morton wrote:
> > On Mon, 26 Nov 2007 23:37:48 -0500 Michael Wu <[email protected]>
> wrote:
> > > On Monday 26 November 2007 21:54:23 Andrew Morton wrote:
> > > > Why not just rename one of them?
> > >
> > > Wait, why does renaming just one of them work?
> >
> > umm, well I assume that the failure is because we're trying to link two
> > identically-named symbols together?
> But there's more than one pair..
>
> rtl8180_rtl8225.h:
> void rtl8225_rf_init(struct ieee80211_hw *);
> void rtl8225z2_rf_init(struct ieee80211_hw *);
> void rtl8225_rf_stop(struct ieee80211_hw *);
>
> rtl8187_rtl8225.h:
> void rtl8225_rf_init(struct ieee80211_hw *);
> void rtl8225z2_rf_init(struct ieee80211_hw *);
> void rtl8225_rf_stop(struct ieee80211_hw *);
Oh. Someone must have trimmed the error messages.
Sigh, whatever. Please fix it all when convenient...
(Trimmed CC list a bit, hopefully didn't cut anyone interested out)
On Monday 26 November 2007 19:59:50 Tony Breeds wrote:
> On Tue, Nov 20, 2007 at 06:53:15PM +0530, Kamalesh Babulal wrote:
> > Hi Andrew,
> >
> > The kernel build fails, with following message
> >
> > LD drivers/net/wireless/built-in.o
> > drivers/net/wireless/rtl8187.o: In function `rtl8225z2_rf_init':
> > (.opd+0x180): multiple definition of `rtl8225z2_rf_init'
> > drivers/net/wireless/rtl8180.o:(.opd+0x1b0): first defined here
> > drivers/net/wireless/rtl8187.o: In function `rtl8225z2_rf_init':
> > /root/linux-2.6.24-rc3/drivers/net/wireless/rtl8187_rtl8225.c:571:
> > multiple definition of `.rtl8225z2_rf_init'
> > drivers/net/wireless/rtl8180.o:/root/linux-2.6.24-rc3/drivers/net/wireles
> >s/rtl8180_rtl8225.c:561: first defined here ld: Warning: size of symbol
> > `.rtl8225z2_rf_init' changed from 3836 in drivers/net/wireless/rtl8180.o
> > to 3544 in drivers/net/wireless/rtl8187.o
>
> <snip>
>
> The patch below is a little ugly but will allow allyesconfig to work. I
> don't know enough about the Realtek devices to make intellegent
> suggestions on how to fix this particular problem. Clearly the 2
> drivers share a lot of common code so perhaps they can be merged?
>
I would rather have a patch to temporarily not allow them to be built into the
kernel. (or only allow one at a time to be built as a module) There's no
issues when these drivers are compiled as modules.
It's mostly the rtl8225 radio tuning code that's similar. They're not exactly
the same though, so it'll be a bit messy to merge the usb rtl8225 radio
tuning and pci rtl8225 radio tuning code. However, I do think it'll be better
overall so the merger of that code is planned.
-Michael Wu
On Monday 26 November 2007 23:55:59 Andrew Morton wrote:
> On Mon, 26 Nov 2007 23:37:48 -0500 Michael Wu <[email protected]>
wrote:
> > On Monday 26 November 2007 21:54:23 Andrew Morton wrote:
> > > Why not just rename one of them?
> >
> > Wait, why does renaming just one of them work?
>
> umm, well I assume that the failure is because we're trying to link two
> identically-named symbols together?
But there's more than one pair..
rtl8180_rtl8225.h:
void rtl8225_rf_init(struct ieee80211_hw *);
void rtl8225z2_rf_init(struct ieee80211_hw *);
void rtl8225_rf_stop(struct ieee80211_hw *);
rtl8187_rtl8225.h:
void rtl8225_rf_init(struct ieee80211_hw *);
void rtl8225z2_rf_init(struct ieee80211_hw *);
void rtl8225_rf_stop(struct ieee80211_hw *);
-Michael Wu
On Monday 26 November 2007 21:54:23 Andrew Morton wrote:
> <head spins>
>
> Why not just rename one of them?
>
Fine for your tree as a stopgap measure. Please don't merge in wireless-2.6.
-Michael Wu
On Mon, 26 Nov 2007 23:37:48 -0500 Michael Wu <[email protected]> wrote:
> On Monday 26 November 2007 21:54:23 Andrew Morton wrote:
> > Why not just rename one of them?
> >
> Wait, why does renaming just one of them work?
>
umm, well I assume that the failure is because we're trying to link two
identically-named symbols together?
On Mon, 26 Nov 2007 23:52:09 -0500 Michael Wu <[email protected]> wrote:
> On Monday 26 November 2007 23:37:16 Andrew Morton wrote:
> > Why not?
> >
> > Having very long and specific identifiers duplicated in two drivers is a
> > daft situation. Unless they both drive the same hardware, which afaict
> > they do not?
> The radios and macs are very similar (radios could actually be the same, not
> sure), with modifications to run on whatever bus they're on. That's why I'm
> going to be merging the rtl8180_rtl8225.c and rtl8187_rtl8225.c into a single
> piece of code. Besides that, rtl8187 != rtl8225 since rtl8187 is a mac and
> rtl8225 is a radio. Replacing rtl8225z2 with rtl8187 makes no sense but is
> okay temporarily to fix build issues in -mm.
>
Well I assumed that someone would be able to think up a better name than
"rtl8187". I was thinking of using "foo" to make that clear...
But whatever. I suppose we should mention allyesconfig in the
file-which-nobody-reads.