I cannot compile the current compat tarball.
Make log:
./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
make -C /usr/src/linux-2.6.26.6-rt11/ M=/root/compat-wireless-2.6-old modules
make[1]: Entering directory `/usr/src/linux-2.6.26.6-rt11'
CC [M] /root/compat-wireless-2.6-old/drivers/net/wireless/mac80211_hwsim.o
In file included from <command-line>:0:
/root/compat-wireless-2.6-old/include/net/compat.h:877: error:
redefinition of 'list_splice_tail'
include/linux/list.h:356: error: previous definition of
'list_splice_tail' was here
/root/compat-wireless-2.6-old/include/net/compat.h:892: error:
redefinition of 'list_splice_tail_init'
include/linux/list.h:379: error: previous definition of
'list_splice_tail_init' was here
make[3]: *** [/root/compat-wireless-2.6-old/drivers/net/wireless/mac80211_hwsim.o]
Error 1
make[2]: *** [/root/compat-wireless-2.6-old/drivers/net/wireless] Error 2
make[1]: *** [_module_/root/compat-wireless-2.6-old] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.26.6-rt11'
make: *** [modules] Error 2
KLIB_BUILD/.config:
#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCI_DOMAINS=y
CONFIG_DMAR=y
CONFIG_DMAR_GFX_WA=y
CONFIG_DMAR_FLOPPY_WA=y
CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_PCIEAER=y
# CONFIG_PCIEASPM is not set
CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y
# CONFIG_PCI_LEGACY is not set
# CONFIG_PCI_DEBUG is not set
CONFIG_HT_IRQ=y
CONFIG_ISA_DMA_API=y
CONFIG_K8_NB=y
# CONFIG_PCCARD is not set
CONFIG_HOTPLUG_PCI=y
# CONFIG_HOTPLUG_PCI_FAKE is not set
CONFIG_HOTPLUG_PCI_ACPI=m
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
# CONFIG_HOTPLUG_PCI_CPCI is not set
CONFIG_HOTPLUG_PCI_SHPC=m
#
# Networking
#
CONFIG_NET=y
#
# Wireless
#
CONFIG_CFG80211=y
CONFIG_NL80211=y
CONFIG_WIRELESS_EXT=y
CONFIG_MAC80211=y
#
# Rate control algorithm selection
#
CONFIG_MAC80211_RC_DEFAULT_PID=y
# CONFIG_MAC80211_RC_DEFAULT_NONE is not set
#
# Selecting 'y' for an algorithm will
#
#
# build the algorithm into mac80211.
#
CONFIG_MAC80211_RC_DEFAULT="pid"
CONFIG_MAC80211_RC_PID=y
# CONFIG_MAC80211_MESH is not set
CONFIG_MAC80211_LEDS=y
# CONFIG_MAC80211_DEBUGFS is not set
# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
# CONFIG_MAC80211_DEBUG is not set
# CONFIG_IEEE80211 is not set
CONFIG_RFKILL=m
CONFIG_RFKILL_INPUT=m
CONFIG_RFKILL_LEDS=y
# CONFIG_NET_9P is not set
#
# Device Drivers
#
#
# Wireless LAN
#
# CONFIG_WLAN_PRE80211 is not set
CONFIG_WLAN_80211=y
# CONFIG_IPW2100 is not set
# CONFIG_IPW2200 is not set
# CONFIG_LIBERTAS is not set
# CONFIG_AIRO is not set
# CONFIG_HERMES is not set
# CONFIG_ATMEL is not set
# CONFIG_PRISM54 is not set
# CONFIG_USB_ZD1201 is not set
# CONFIG_USB_NET_RNDIS_WLAN is not set
# CONFIG_RTL8180 is not set
# CONFIG_RTL8187 is not set
# CONFIG_ADM8211 is not set
# CONFIG_P54_COMMON is not set
# CONFIG_ATH5K is not set
CONFIG_IWLWIFI=m
CONFIG_IWLCORE=m
# CONFIG_IWLWIFI_LEDS is not set
CONFIG_IWLWIFI_RFKILL=y
# CONFIG_IWL4965 is not set
# CONFIG_IWL3945 is not set
# CONFIG_HOSTAP is not set
# CONFIG_B43 is not set
# CONFIG_B43LEGACY is not set
# CONFIG_ZD1211RW is not set
# CONFIG_RT2X00 is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
#
# LED drivers
#
CONFIG_LEDS_CLEVO_MAIL=m
#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=m
CONFIG_LEDS_TRIGGER_HEARTBEAT=m
CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
# CONFIG_ACCESSIBILITY is not set
# CONFIG_INFINIBAND is not set
# CONFIG_EDAC is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set
#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
CONFIG_CRC_ITU_T=y
CONFIG_CRC32=y
# CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
--
Andrey Vul
PS: I'm not subscribed to linux-wireless - CC me when replying.
On Wed, Nov 26, 2008 at 03:54:14PM -0800, Andrey Vul wrote:
> On Wed, Nov 26, 2008 at 12:34, Luis R. Rodriguez <[email protected]> wrote:
> > On Tue, Nov 25, 2008 at 04:51:48PM -0800, Andrey Vul wrote:
> >> On Tue, Nov 25, 2008 at 16:30, Andrey Vul <[email protected]> wrote:
> >> > On Tue, Nov 25, 2008 at 15:32, Luis R. Rodriguez <[email protected]> wrote:
> >> >> On Tue, Nov 25, 2008 at 09:57:57AM -0800, Andrey Vul wrote:
> >> >>> I cannot compile the current compat tarball.
> >> >>> Make log:
> >> >>> ./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
> >> >>> make -C /usr/src/linux-2.6.26.6-rt11/ M=/root/compat-wireless-2.6-old modules
> >> >>> make[1]: Entering directory `/usr/src/linux-2.6.26.6-rt11'
> >> >>> CC [M] /root/compat-wireless-2.6-old/drivers/net/wireless/mac80211_hwsim.o
> >> >>> In file included from <command-line>:0:
> >> >>> /root/compat-wireless-2.6-old/include/net/compat.h:877: error:
> >> >>> redefinition of 'list_splice_tail'
> >> >>> include/linux/list.h:356: error: previous definition of
> >> >>> 'list_splice_tail' was here
> >> >>> /root/compat-wireless-2.6-old/include/net/compat.h:892: error:
> >> >>> redefinition of 'list_splice_tail_init'
> >> >>> include/linux/list.h:379: error: previous definition of
> >> >>> 'list_splice_tail_init' was here
> >> >>
> >> >> list_splice_tail was added as of 2.6.27, and you have 2.6.26. Which
> >> >> means your kernel headers for your box are completely messed up. This
> >> >> means you can expect a kernel panic if you were to successfully
> >> >> compile external modules. Go fix that first.
> >> >>
> >> I have $(uname -r)/include/linux/list.h containing list_splice_tail,
> >> where uname -r is 2.6.26.5-rt9.
> >> Frankly, I need rt and the code for my wifi card is only in the compat tarball.
> >> Is this a problem with .[56] or with -rt?
> >
> > Ah, yeah RT had their own list_splice_tail(), try this. BTW what driver
> > are you going to be using?
> >
>
> I'm going to be using iwl5000 which depends on iwlwifi, iwlcore,
> iwlwifi-leds, and iwlwifi-rfkill .
>
> So, in short, all I have to do is this?
> #!/bin/bash
> for a in `find ~/compat-wireless-2.6-old -name '*.c' -or -name '*.h'`; do
> sed -e 's/list_splice_tail/list_splice_tail27/' -i $a;
> done
>
> The only thing I see as possibly problematic is
> list_splice_tail27_init() (sed is regex after all).
Yup, but since there are some RT 2.6.26 kernels out there if we want
this fixed in compat-wireless-old I'd rather apply a patch there too.
Anyway list_splice_tail() is only used for ath9k.
Luis
On Wed, Nov 26, 2008 at 20:04, Luis R. Rodriguez <[email protected]> wrote:
> On Wed, Nov 26, 2008 at 03:54:14PM -0800, Andrey Vul wrote:
>> On Wed, Nov 26, 2008 at 12:34, Luis R. Rodriguez <[email protected]> wrote:
>> > On Tue, Nov 25, 2008 at 04:51:48PM -0800, Andrey Vul wrote:
>> >> On Tue, Nov 25, 2008 at 16:30, Andrey Vul <[email protected]> wrote:
>> >> > On Tue, Nov 25, 2008 at 15:32, Luis R. Rodriguez <[email protected]> wrote:
>> >> >> On Tue, Nov 25, 2008 at 09:57:57AM -0800, Andrey Vul wrote:
>> >> >>> I cannot compile the current compat tarball.
>> >> >>> Make log:
>> >> >>> ./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
>> >> >>> make -C /usr/src/linux-2.6.26.6-rt11/ M=/root/compat-wireless-2.6-old modules
>> >> >>> make[1]: Entering directory `/usr/src/linux-2.6.26.6-rt11'
>> >> >>> CC [M] /root/compat-wireless-2.6-old/drivers/net/wireless/mac80211_hwsim.o
>> >> >>> In file included from <command-line>:0:
>> >> >>> /root/compat-wireless-2.6-old/include/net/compat.h:877: error:
>> >> >>> redefinition of 'list_splice_tail'
>> >> >>> include/linux/list.h:356: error: previous definition of
>> >> >>> 'list_splice_tail' was here
>> >> >>> /root/compat-wireless-2.6-old/include/net/compat.h:892: error:
>> >> >>> redefinition of 'list_splice_tail_init'
>> >> >>> include/linux/list.h:379: error: previous definition of
>> >> >>> 'list_splice_tail_init' was here
>> >> >>
>> >> >> list_splice_tail was added as of 2.6.27, and you have 2.6.26. Which
>> >> >> means your kernel headers for your box are completely messed up. This
>> >> >> means you can expect a kernel panic if you were to successfully
>> >> >> compile external modules. Go fix that first.
>> >> >>
>> >> I have $(uname -r)/include/linux/list.h containing list_splice_tail,
>> >> where uname -r is 2.6.26.5-rt9.
>> >> Frankly, I need rt and the code for my wifi card is only in the compat tarball.
>> >> Is this a problem with .[56] or with -rt?
>> >
>> > Ah, yeah RT had their own list_splice_tail(), try this. BTW what driver
>> > are you going to be using?
>> >
>>
>> I'm going to be using iwl5000 which depends on iwlwifi, iwlcore,
>> iwlwifi-leds, and iwlwifi-rfkill .
>>
>> So, in short, all I have to do is this?
>> #!/bin/bash
>> for a in `find ~/compat-wireless-2.6-old -name '*.c' -or -name '*.h'`; do
>> sed -e 's/list_splice_tail/list_splice_tail27/' -i $a;
>> done
>>
>> The only thing I see as possibly problematic is
>> list_splice_tail27_init() (sed is regex after all).
>
> Yup, but since there are some RT 2.6.26 kernels out there if we want
> this fixed in compat-wireless-old I'd rather apply a patch there too.
> Anyway list_splice_tail() is only used for ath9k.
It's used in ath9k but exported to all the drivers via net/compat.h,
leading to the redefinition errors from gcc when compiling an
unrelated (to ath9k) wireless driver.
So for RT-safety, just do the sed -i in the previous message on
drivers/net/wirelss/ath9k/xmit.c and on include/net/compat.h .
Unless grep found other instances of list_splice_tail, which it didn't.
--
Andrey Vul
On Tue, Nov 25, 2008 at 09:57:57AM -0800, Andrey Vul wrote:
> I cannot compile the current compat tarball.
> Make log:
> ./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
> make -C /usr/src/linux-2.6.26.6-rt11/ M=/root/compat-wireless-2.6-old modules
> make[1]: Entering directory `/usr/src/linux-2.6.26.6-rt11'
> CC [M] /root/compat-wireless-2.6-old/drivers/net/wireless/mac80211_hwsim.o
> In file included from <command-line>:0:
> /root/compat-wireless-2.6-old/include/net/compat.h:877: error:
> redefinition of 'list_splice_tail'
> include/linux/list.h:356: error: previous definition of
> 'list_splice_tail' was here
> /root/compat-wireless-2.6-old/include/net/compat.h:892: error:
> redefinition of 'list_splice_tail_init'
> include/linux/list.h:379: error: previous definition of
> 'list_splice_tail_init' was here
list_splice_tail was added as of 2.6.27, and you have 2.6.26. Which
means your kernel headers for your box are completely messed up. This
means you can expect a kernel panic if you were to successfully
compile external modules. Go fix that first.
Luis
On Wed, Nov 26, 2008 at 12:34, Luis R. Rodriguez <[email protected]> wrote:
> On Tue, Nov 25, 2008 at 04:51:48PM -0800, Andrey Vul wrote:
>> On Tue, Nov 25, 2008 at 16:30, Andrey Vul <[email protected]> wrote:
>> > On Tue, Nov 25, 2008 at 15:32, Luis R. Rodriguez <[email protected]> wrote:
>> >> On Tue, Nov 25, 2008 at 09:57:57AM -0800, Andrey Vul wrote:
>> >>> I cannot compile the current compat tarball.
>> >>> Make log:
>> >>> ./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
>> >>> make -C /usr/src/linux-2.6.26.6-rt11/ M=/root/compat-wireless-2.6-old modules
>> >>> make[1]: Entering directory `/usr/src/linux-2.6.26.6-rt11'
>> >>> CC [M] /root/compat-wireless-2.6-old/drivers/net/wireless/mac80211_hwsim.o
>> >>> In file included from <command-line>:0:
>> >>> /root/compat-wireless-2.6-old/include/net/compat.h:877: error:
>> >>> redefinition of 'list_splice_tail'
>> >>> include/linux/list.h:356: error: previous definition of
>> >>> 'list_splice_tail' was here
>> >>> /root/compat-wireless-2.6-old/include/net/compat.h:892: error:
>> >>> redefinition of 'list_splice_tail_init'
>> >>> include/linux/list.h:379: error: previous definition of
>> >>> 'list_splice_tail_init' was here
>> >>
>> >> list_splice_tail was added as of 2.6.27, and you have 2.6.26. Which
>> >> means your kernel headers for your box are completely messed up. This
>> >> means you can expect a kernel panic if you were to successfully
>> >> compile external modules. Go fix that first.
>> >>
>> I have $(uname -r)/include/linux/list.h containing list_splice_tail,
>> where uname -r is 2.6.26.5-rt9.
>> Frankly, I need rt and the code for my wifi card is only in the compat tarball.
>> Is this a problem with .[56] or with -rt?
>
> Ah, yeah RT had their own list_splice_tail(), try this. BTW what driver
> are you going to be using?
>
I'm going to be using iwl5000 which depends on iwlwifi, iwlcore,
iwlwifi-leds, and iwlwifi-rfkill .
So, in short, all I have to do is this?
#!/bin/bash
for a in `find ~/compat-wireless-2.6-old -name '*.c' -or -name '*.h'`; do
sed -e 's/list_splice_tail/list_splice_tail27/' -i $a;
done
The only thing I see as possibly problematic is
list_splice_tail27_init() (sed is regex after all).
--
Andrey Vul
On Tue, Nov 25, 2008 at 15:32, Luis R. Rodriguez <[email protected]> wrote:
> On Tue, Nov 25, 2008 at 09:57:57AM -0800, Andrey Vul wrote:
>> I cannot compile the current compat tarball.
>> Make log:
>> ./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
>> make -C /usr/src/linux-2.6.26.6-rt11/ M=/root/compat-wireless-2.6-old modules
>> make[1]: Entering directory `/usr/src/linux-2.6.26.6-rt11'
>> CC [M] /root/compat-wireless-2.6-old/drivers/net/wireless/mac80211_hwsim.o
>> In file included from <command-line>:0:
>> /root/compat-wireless-2.6-old/include/net/compat.h:877: error:
>> redefinition of 'list_splice_tail'
>> include/linux/list.h:356: error: previous definition of
>> 'list_splice_tail' was here
>> /root/compat-wireless-2.6-old/include/net/compat.h:892: error:
>> redefinition of 'list_splice_tail_init'
>> include/linux/list.h:379: error: previous definition of
>> 'list_splice_tail_init' was here
>
> list_splice_tail was added as of 2.6.27, and you have 2.6.26. Which
> means your kernel headers for your box are completely messed up. This
> means you can expect a kernel panic if you were to successfully
> compile external modules. Go fix that first.
>
> Luis
>
Ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooh, it
used /usr/include/* , not KLIB_BUILD/include/*
I now see what happened. I had 2.6.27 headers installed because the
default kernel was 2.6.27.
Should I have done the following: # cd KLIB_BUILD && make
headers_check && make headers_install && cp -Rv include/* /usr/include
?
--
Andrey Vul
On Tue, Nov 25, 2008 at 04:51:48PM -0800, Andrey Vul wrote:
> On Tue, Nov 25, 2008 at 16:30, Andrey Vul <[email protected]> wrote:
> > On Tue, Nov 25, 2008 at 15:32, Luis R. Rodriguez <[email protected]> wrote:
> >> On Tue, Nov 25, 2008 at 09:57:57AM -0800, Andrey Vul wrote:
> >>> I cannot compile the current compat tarball.
> >>> Make log:
> >>> ./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
> >>> make -C /usr/src/linux-2.6.26.6-rt11/ M=/root/compat-wireless-2.6-old modules
> >>> make[1]: Entering directory `/usr/src/linux-2.6.26.6-rt11'
> >>> CC [M] /root/compat-wireless-2.6-old/drivers/net/wireless/mac80211_hwsim.o
> >>> In file included from <command-line>:0:
> >>> /root/compat-wireless-2.6-old/include/net/compat.h:877: error:
> >>> redefinition of 'list_splice_tail'
> >>> include/linux/list.h:356: error: previous definition of
> >>> 'list_splice_tail' was here
> >>> /root/compat-wireless-2.6-old/include/net/compat.h:892: error:
> >>> redefinition of 'list_splice_tail_init'
> >>> include/linux/list.h:379: error: previous definition of
> >>> 'list_splice_tail_init' was here
> >>
> >> list_splice_tail was added as of 2.6.27, and you have 2.6.26. Which
> >> means your kernel headers for your box are completely messed up. This
> >> means you can expect a kernel panic if you were to successfully
> >> compile external modules. Go fix that first.
> >>
> I have $(uname -r)/include/linux/list.h containing list_splice_tail,
> where uname -r is 2.6.26.5-rt9.
> Frankly, I need rt and the code for my wifi card is only in the compat tarball.
> Is this a problem with .[56] or with -rt?
Ah, yeah RT had their own list_splice_tail(), try this. BTW what driver
are you going to be using?
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
index 3fc6641..6562dae 100644
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -80,7 +80,7 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc,
bf = list_first_entry(head, struct ath_buf, list);
- list_splice_tail_init(head, &txq->axq_q);
+ list_splice_tail_init_27(head, &txq->axq_q);
txq->axq_depth++;
txq->axq_totalqueued++;
txq->axq_linkbuf = list_entry(txq->axq_q.prev, struct ath_buf, list);
@@ -426,7 +426,7 @@ static void ath_tx_complete_buf(struct ath_softc *sc,
* Return the list of ath_buf of this mpdu to free queue
*/
spin_lock_bh(&sc->sc_txbuflock);
- list_splice_tail_init(bf_q, &sc->sc_txbuf);
+ list_splice_tail_init_27(bf_q, &sc->sc_txbuf);
spin_unlock_bh(&sc->sc_txbuflock);
}
@@ -1084,7 +1084,7 @@ static void ath_tx_complete_aggr_rifs(struct ath_softc *sc,
* Put this buffer to the temporary pending
* queue to retain ordering
*/
- list_splice_tail_init(&bf_head, &bf_pending);
+ list_splice_tail_init_27(&bf_head, &bf_pending);
}
bf = bf_next;
@@ -1423,7 +1423,7 @@ static int ath_tx_send_ampdu(struct ath_softc *sc,
* Add this frame to software queue for scheduling later
* for aggregation.
*/
- list_splice_tail_init(bf_head, &tid->buf_q);
+ list_splice_tail_init_27(bf_head, &tid->buf_q);
ath_tx_queue_tid(txq, tid);
return 0;
}
@@ -1682,7 +1682,7 @@ static enum ATH_AGGR_STATUS ath_tx_form_aggr(struct ath_softc *sc,
/*
* link buffers of this frame to the aggregate
*/
- list_splice_tail_init(&bf_head, bf_q);
+ list_splice_tail_init_27(&bf_head, bf_q);
nframes++;
if (bf_prev) {
diff --git a/include/net/compat.h b/include/net/compat.h
index 0ccabcd..7baae3f 100644
--- a/include/net/compat.h
+++ b/include/net/compat.h
@@ -869,12 +869,18 @@ static inline void __compat_list_splice_new_27(const struct list_head *list,
next->prev = last;
}
+/* This is how we ended up implementing list_splice_tail on >= 2.6.27,
+ * note that the realtime kernel has their own list_splice_tail(), IIRC
+ * its the same, but lets just call it separately, just to be sure,
+ * and to avoid conflicts with the Realtime kernels. On >= 2.6.27
+ * this should not be an issue */
+
/**
- * list_splice_tail - join two lists, each list being a queue
+ * list_splice_tail_27 - join two lists, each list being a queue
* @list: the new list to add.
* @head: the place to add it in the first list.
*/
-static inline void list_splice_tail(struct list_head *list,
+static inline void list_splice_tail_27(struct list_head *list,
struct list_head *head)
{
if (!list_empty(list))
@@ -882,14 +888,14 @@ static inline void list_splice_tail(struct list_head *list,
}
/**
- * list_splice_tail_init - join two lists and reinitialise the emptied list
+ * list_splice_tail_init_27 - join two lists and reinitialise the emptied list
* @list: the new list to add.
* @head: the place to add it in the first list.
*
* Each of the lists is a queue.
* The list at @list is reinitialised
*/
-static inline void list_splice_tail_init(struct list_head *list,
+static inline void list_splice_tail_init_27(struct list_head *list,
struct list_head *head)
{
if (!list_empty(list)) {
On Tue, Nov 25, 2008 at 16:30, Andrey Vul <[email protected]> wrote:
> On Tue, Nov 25, 2008 at 15:32, Luis R. Rodriguez <[email protected]> wrote:
>> On Tue, Nov 25, 2008 at 09:57:57AM -0800, Andrey Vul wrote:
>>> I cannot compile the current compat tarball.
>>> Make log:
>>> ./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
>>> make -C /usr/src/linux-2.6.26.6-rt11/ M=/root/compat-wireless-2.6-old modules
>>> make[1]: Entering directory `/usr/src/linux-2.6.26.6-rt11'
>>> CC [M] /root/compat-wireless-2.6-old/drivers/net/wireless/mac80211_hwsim.o
>>> In file included from <command-line>:0:
>>> /root/compat-wireless-2.6-old/include/net/compat.h:877: error:
>>> redefinition of 'list_splice_tail'
>>> include/linux/list.h:356: error: previous definition of
>>> 'list_splice_tail' was here
>>> /root/compat-wireless-2.6-old/include/net/compat.h:892: error:
>>> redefinition of 'list_splice_tail_init'
>>> include/linux/list.h:379: error: previous definition of
>>> 'list_splice_tail_init' was here
>>
>> list_splice_tail was added as of 2.6.27, and you have 2.6.26. Which
>> means your kernel headers for your box are completely messed up. This
>> means you can expect a kernel panic if you were to successfully
>> compile external modules. Go fix that first.
>>
I have $(uname -r)/include/linux/list.h containing list_splice_tail,
where uname -r is 2.6.26.5-rt9.
Frankly, I need rt and the code for my wifi card is only in the compat tarball.
Is this a problem with .[56] or with -rt?
--
Andrey Vul
On Wed, Nov 26, 2008 at 09:11:49PM -0800, Andrey Vul wrote:
> On Wed, Nov 26, 2008 at 20:04, Luis R. Rodriguez <[email protected]> wrote:
> > On Wed, Nov 26, 2008 at 03:54:14PM -0800, Andrey Vul wrote:
> >> On Wed, Nov 26, 2008 at 12:34, Luis R. Rodriguez <[email protected]> wrote:
> >> > On Tue, Nov 25, 2008 at 04:51:48PM -0800, Andrey Vul wrote:
> >> >> On Tue, Nov 25, 2008 at 16:30, Andrey Vul <[email protected]> wrote:
> >> >> > On Tue, Nov 25, 2008 at 15:32, Luis R. Rodriguez <[email protected]> wrote:
> >> >> >> On Tue, Nov 25, 2008 at 09:57:57AM -0800, Andrey Vul wrote:
> >> >> >>> I cannot compile the current compat tarball.
> >> >> >>> Make log:
> >> >> >>> ./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
> >> >> >>> make -C /usr/src/linux-2.6.26.6-rt11/ M=/root/compat-wireless-2.6-old modules
> >> >> >>> make[1]: Entering directory `/usr/src/linux-2.6.26.6-rt11'
> >> >> >>> CC [M] /root/compat-wireless-2.6-old/drivers/net/wireless/mac80211_hwsim.o
> >> >> >>> In file included from <command-line>:0:
> >> >> >>> /root/compat-wireless-2.6-old/include/net/compat.h:877: error:
> >> >> >>> redefinition of 'list_splice_tail'
> >> >> >>> include/linux/list.h:356: error: previous definition of
> >> >> >>> 'list_splice_tail' was here
> >> >> >>> /root/compat-wireless-2.6-old/include/net/compat.h:892: error:
> >> >> >>> redefinition of 'list_splice_tail_init'
> >> >> >>> include/linux/list.h:379: error: previous definition of
> >> >> >>> 'list_splice_tail_init' was here
> >> >> >>
> >> >> >> list_splice_tail was added as of 2.6.27, and you have 2.6.26. Which
> >> >> >> means your kernel headers for your box are completely messed up. This
> >> >> >> means you can expect a kernel panic if you were to successfully
> >> >> >> compile external modules. Go fix that first.
> >> >> >>
> >> >> I have $(uname -r)/include/linux/list.h containing list_splice_tail,
> >> >> where uname -r is 2.6.26.5-rt9.
> >> >> Frankly, I need rt and the code for my wifi card is only in the compat tarball.
> >> >> Is this a problem with .[56] or with -rt?
> >> >
> >> > Ah, yeah RT had their own list_splice_tail(), try this. BTW what driver
> >> > are you going to be using?
> >> >
> >>
> >> I'm going to be using iwl5000 which depends on iwlwifi, iwlcore,
> >> iwlwifi-leds, and iwlwifi-rfkill .
> >>
> >> So, in short, all I have to do is this?
> >> #!/bin/bash
> >> for a in `find ~/compat-wireless-2.6-old -name '*.c' -or -name '*.h'`; do
> >> sed -e 's/list_splice_tail/list_splice_tail27/' -i $a;
> >> done
> >>
> >> The only thing I see as possibly problematic is
> >> list_splice_tail27_init() (sed is regex after all).
> >
> > Yup, but since there are some RT 2.6.26 kernels out there if we want
> > this fixed in compat-wireless-old I'd rather apply a patch there too.
> > Anyway list_splice_tail() is only used for ath9k.
> It's used in ath9k but exported to all the drivers via net/compat.h,
> leading to the redefinition errors from gcc when compiling an
> unrelated (to ath9k) wireless driver.
>
> So for RT-safety, just do the sed -i in the previous message on
> drivers/net/wirelss/ath9k/xmit.c and on include/net/compat.h .
So I'd like to commit this to compat-wireless-old to help users like you
instead of requiring them to sed all the time. It would be appreciated
if you can test the patch to ensure it compiles fine.
Luis