2010-12-22 11:30:23

by Elvis Dowson

[permalink] [raw]
Subject: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

Hi,
I have a quick question.

I downloaded the http://www.orbit-lab.org/kernel/compat-wireless-2.6-stable/v2.6.37/compat-wireless-2.6.37-rc6-3.tar.bz2

The information contained in this link mentions: http://linuxwireless.org/en/users/Download/stable/

"You need kernel headers to compile compat-wireless. Ensure /lib/modules/$(uname -r)/build/ exists and points to the location where the kernel headers are installed. If you do not have them, read your distribution's documentation on getting help."

I have Ubuntu 10.04 as host, but I'm using a cross compiler for the OMAP3530 ARM target, and the kernel directory exists in a separate folder.

How do I tell the build system to use my cross compiled kernel libraries and headers, and not pick up the host /lib/modules kernel headers?

i.e. how can I cross compile and build compat-wireless for the ARM target on the host machine?

cd /path/to/compat-wireless-2.6.32-rc5
./scripts/driver-select <driver-name>
make
sudo make install


Best regards,

Elvis Dowson



2010-12-22 15:39:11

by Kahn, Gery

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

On Wed, Dec 22, 2010 at 13:30, Elvis Dowson <[email protected]> wrote:

Hi,
I have a quick question.

I downloaded the
http://www.orbit-lab.org/kernel/compat-wireless-2.6-stable/v2.6.37/compat-wireless-2.6.37-rc6-3.tar.bz2

The information contained in this link mentions:
http://linuxwireless.org/en/users/Download/stable/

"You need kernel headers to compile compat-wireless. Ensure
/lib/modules/$(uname -r)/build/ exists and points to the location
where the kernel headers are installed. If you do not have them, read
your distribution's documentation on getting help."

I have Ubuntu 10.04 as host, but I'm using a cross compiler for
the OMAP3530 ARM target, and the kernel directory exists in a separate
folder.

How do I tell the build system to use my cross compiled kernel
libraries and headers, and not pick up the host /lib/modules kernel
headers?

export CROSS_COMPILE=arm-none-linux-gnueabi-
May be also
export ARCH=arm

i.e. how can I cross compile and build compat-wireless for the ARM
target on the host machine?

cd /path/to/compat-wireless-2.6.32-rc5

copy appropriate configuration file to /path/to/compat-wireless-2.6.

32-rc5/.config

May also need to add configuration

./scripts/driver-select <driver-name>
make
sudo make install

It may be works without `sudo '. If you want all modules also
make modules_install INSTALL_MOD_PATH=${NFSROOT}
where NFSROOT is your directory to prepare filesystem for target


Best regards,

Elvis Dowson

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html


Gery

2010-12-22 16:13:42

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <[email protected]> wrote:
> netdev_alloc_skb_ip_align

I notice you have an android kernel, is that kernel a vanilla kernel
or did it get netdev_alloc_skb_ip_align() cherry picked into it?

Luis

2010-12-22 18:13:23

by Hauke Mehrtens

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

On 12/22/2010 06:39 PM, Luis R. Rodriguez wrote:
> On Wed, Dec 22, 2010 at 12:29 PM, Elvis Dowson <[email protected]> wrote:
>> Hi,
>>
>> On Dec 22, 2010, at 8:47 PM, Hauke Mehrtens wrote:
>>
>>> On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
>>>> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <[email protected]> wrote:
>>>>> netdev_alloc_skb_ip_align
>>>>
>>>> I notice you have an android kernel, is that kernel a vanilla kernel
>>>> or did it get netdev_alloc_skb_ip_align() cherry picked into it?
>>
>>
>> Yes, it is an android enabled 2.6.32 kernel. It also includes the TI
>> OMAP35xx/AM35xx platform support package SDK v03.00.01.06/
>>
>>
>>> netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
>>> kernel. Someone else (google or ti) must have backported it to this
>>> kernel and added it to your kernel.
>>>
>>> I do not want to add some special handling into compat-wireless just for
>>> some android kernel. Just remove netdev_alloc_skb_ip_align() and
>>> NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
>>> problems you posted should be fixed.
>>
>> I made the following modifications, but get another error:
>>
>> diff --git a/include/linux/compat-2.6.33.h b/include/linux/compat-2.6.33.h
>> index c2dbc1b..468a074 100644
>> --- a/include/linux/compat-2.6.33.h
>> +++ b/include/linux/compat-2.6.33.h
>> @@ -52,19 +52,6 @@ static inline void compat_release_firmware(const struct firmware *fw)
>> #define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
>> /* source: include/linux/if.h */
>>
>> -/* this will never happen on older kernels */
>> -#define NETDEV_POST_INIT 0xffff
>> -
>> -static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
>> - unsigned int length)
>> -{
>> - struct sk_buff *skb = netdev_alloc_skb(dev, length + NET_IP_ALIGN);
>> -
>> - if (NET_IP_ALIGN && skb)
>> - skb_reserve(skb, NET_IP_ALIGN);
>> - return skb;
>> -}
>> -
>> #if defined(CONFIG_PCCARD) || defined(CONFIG_PCCARD_MODULE)
>>
>> #if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
>
> I'd rather you figure out a way to identify that android kernel
> somehow reliably and send a patch upstream to ifdef out
> netdev_alloc_skb_ip_align() for that kernel, that way other Android
> hackers can benefit.
>
>> CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.o
>> /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c: In function ‘ieee80211_led_init’:
>> /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:59: error: invalid application of ‘sizeof’ to incomplete type ‘struct led_trigger’
>
>
> This is from:
>
> void ieee80211_led_init(struct ieee80211_local *local)
> {
> local->rx_led = kzalloc(sizeof(struct led_trigger), GFP_KERNEL);
> ...
> }
>
> Looks good to me.. Not sure what can cause this, hrm.
>
> Luis

In your kernel config CONFIG_LEDS_TRIGGERS is probably unset and then
net/mac80211/led.c should not be build at all. In the kernel
CONFIG_MAC80211_LEDS will select CONFIG_LEDS_TRIGGERS, but in
compat-wireless this should just be disabled.
I provided a patch for this problem, please apply it and try again.

Hauke

2010-12-23 05:52:48

by Ohad Ben Cohen

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

On Wed, Dec 22, 2010 at 11:07 PM, Elvis Dowson <[email protected]> wrote:
> I was just thinking, run-time PM never made it to 2.6.32 right ?

It did.

> So, I might not need to add those run-time PM patches ?

You must, otherwise there is no way to power SDIO cards up and down..

2010-12-22 17:21:58

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

On Wed, Dec 22, 2010 at 11:47 AM, Hauke Mehrtens <[email protected]> wrote:
> On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
>> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <[email protected]> wrote:
>>> netdev_alloc_skb_ip_align
>>
>> I notice you have an android kernel, is that kernel a vanilla kernel
>> or did it get netdev_alloc_skb_ip_align() cherry picked into it?
>>
>>   Luis
>
> netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
> kernel. Someone else (google or ti) must have backported it to this
> kernel and added it to your kernel.
>
> I do not want to add some special handling into compat-wireless just for
> some android kernel. Just remove netdev_alloc_skb_ip_align() and
> NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
> problems you posted should be fixed.

Well we did something to accommodate RHEL, I wouldn't mind supporting
some fudge for Android so long as someone is willing to submit the
patch and identify the kernel properly. Android is popular enough and
I rather reduce the time it takes to use it there than to create an
extra hurdle.

Luis

2010-12-24 05:17:41

by Elvis Dowson

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

Hi,
When working with the wl1271 backport to 2.6.32 kernel, is CONFIG_MMC_EMBEDDED_SDIO=y required?

Elvis Dowson

2010-12-25 08:05:28

by Ohad Ben Cohen

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

On Thu, Dec 23, 2010 at 11:12 PM, Elvis Dowson <[email protected]> wrote:
> Is the SDIO subsystem sufficiently modular so as to allow me to take a few file and use it as a drop in
> replacement for the 2.6.32 kernel?

I'm not sure I'm following the question...

btw, IMHO you don't need to replace any file at all. 2.6.32 has a
functional SDIO subsystem.


>
> Elvis Dowson
>
>

2010-12-23 21:13:07

by Elvis Dowson

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

Hi Ohad,
For 2.6.32, some more SDIO stuff needs to be backported. For example, I get the following error:

[ 16.232482] mmc1: card claims to support voltages below the defined range. These will be ignored.
[ 16.241424] mmc1: host doesn't support card's voltages
[ 16.246643] mmc1: error -22 whilst initialising SDIO card


So, the part for handling reporting card voltages need to be added in.

Also the SDIO run-time PM patches are not nearly as easy to apply to the android-rowboat-eclair-2.6.32 kernel.

Is the SDIO subsystem sufficiently modular so as to allow me to take a few file and use it as a drop in
replacement for the 2.6.32 kernel?

Elvis Dowson


2010-12-22 16:10:12

by Elvis Dowson

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

Hi,
I set the following values in my .bashrc file
#
# Environment setup for u-boot and linux kernel
#

export ARCH=arm
export CROSS_COMPILE=arm-angstrom-linux-gnueabi-
export CROSSCOMPILER=armv7a
export CROSSTOOLCHAIN=${OVEROTOP}/tmp/sysroots/x86_64-linux/usr/${CROSSCOMPILER}
export KERNEL_DIR="/tool/patches/android-rowboat-2.6.32-kernel-patchwork"
export UIMAGE_DIR="${KERNEL_DIR}/arch/arm/boot"
export KLIB="${KERNEL_DIR}"
export KLIB_BUILD="${KERNEL_DIR}"

I selected the wl12xx driver

$ cd /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork
$ ./scripts/driver-select wl12xx

then I try to build it, but it gives me the following error:

$ make
./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
make -C /tool/patches/android-rowboat-2.6.32-kernel-patchwork M=/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork modules
make[1]: Entering directory `/tool/patches/android-rowboat-2.6.32-kernel-patchwork'
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/main.o
In file included from /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/include/linux/compat-2.6.h:28,
from <command-line>:0:
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/include/linux/compat-2.6.33.h:56:1: warning: "NETDEV_POST_INIT" redefined
In file included from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:653,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from include/linux/textsearch.h:7,
from include/linux/skbuff.h:27,
from include/linux/if_ether.h:124,
from include/linux/netdevice.h:29,
from /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/include/linux/compat-2.6.29.h:5,
from /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/include/linux/compat-2.6.h:24,
from <command-line>:0:
include/linux/notifier.h:204:1: warning: this is the location of the previous definition
In file included from /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/include/linux/compat-2.6.h:28,
from <command-line>:0:
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/include/linux/compat-2.6.33.h:58: error: redefinition of ?netdev_alloc_skb_ip_align?
include/linux/skbuff.h:1487: error: previous definition of ?netdev_alloc_skb_ip_align? was here
make[3]: *** [/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/main.o] Error 1
make[2]: *** [/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat] Error 2
make[1]: *** [_module_/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork] Error 2
make[1]: Leaving directory `/tool/patches/android-rowboat-2.6.32-kernel-patchwork'
make: *** [modules] Error 2


Best regards,

Elvis

2010-12-22 17:30:27

by Elvis Dowson

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

Hi,

On Dec 22, 2010, at 8:47 PM, Hauke Mehrtens wrote:

> On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
>> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <[email protected]> wrote:
>>> netdev_alloc_skb_ip_align
>>
>> I notice you have an android kernel, is that kernel a vanilla kernel
>> or did it get netdev_alloc_skb_ip_align() cherry picked into it?


Yes, it is an android enabled 2.6.32 kernel. It also includes the TI
OMAP35xx/AM35xx platform support package SDK v03.00.01.06/


> netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
> kernel. Someone else (google or ti) must have backported it to this
> kernel and added it to your kernel.
>
> I do not want to add some special handling into compat-wireless just for
> some android kernel. Just remove netdev_alloc_skb_ip_align() and
> NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
> problems you posted should be fixed.

I made the following modifications, but get another error:

diff --git a/include/linux/compat-2.6.33.h b/include/linux/compat-2.6.33.h
index c2dbc1b..468a074 100644
--- a/include/linux/compat-2.6.33.h
+++ b/include/linux/compat-2.6.33.h
@@ -52,19 +52,6 @@ static inline void compat_release_firmware(const struct firmware *fw)
#define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
/* source: include/linux/if.h */

-/* this will never happen on older kernels */
-#define NETDEV_POST_INIT 0xffff
-
-static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
- unsigned int length)
-{
- struct sk_buff *skb = netdev_alloc_skb(dev, length + NET_IP_ALIGN);
-
- if (NET_IP_ALIGN && skb)
- skb_reserve(skb, NET_IP_ALIGN);
- return skb;
-}
-
#if defined(CONFIG_PCCARD) || defined(CONFIG_PCCARD_MODULE)

#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)


CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.o
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c: In function ?ieee80211_led_init?:
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:59: error: invalid application of ?sizeof? to incomplete type ?struct led_trigger?
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:63: error: dereferencing pointer to incomplete type
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:64: error: implicit declaration of function ?led_trigger_register?
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:70: error: invalid application of ?sizeof? to incomplete type ?struct led_trigger?
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:74: error: dereferencing pointer to incomplete type
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:81: error: invalid application of ?sizeof? to incomplete type ?struct led_trigger?
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:85: error: dereferencing pointer to incomplete type
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:92: error: invalid application of ?sizeof? to incomplete type ?struct led_trigger?
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:96: error: dereferencing pointer to incomplete type
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c: In function ?ieee80211_led_exit?:
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:107: error: implicit declaration of function ?led_trigger_unregister?
make[3]: *** [/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.o] Error 1
make[2]: *** [/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211] Error 2
make[1]: *** [_module_/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork] Error 2
make[1]: Leaving directory `/tool/patches/android-rowboat-2.6.32-kernel-patchwork'
make: *** [modules] Error 2


Elvis Dowson

2010-12-22 20:34:49

by Elvis Dowson

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless


On Dec 23, 2010, at 12:12 AM, Hauke Mehrtens wrote:

> Is CONFIG_CRC7=y set in your kernel config, the wl12xx module needs
> this? If it is not set the module will not be build.

It wasn't :-). After enabling it in the kernel and recompiling both the kernel and
compat-wireless wl12xx, it generated the following modules:

cfg80211.ko
compat.ko
compat_firmware_class.ko
mac80211.ko
wl1251.ko
wl1251_sdio.ko
wl1251_spi.ko
wl1271.ko
wl1271_spi.ko

I haven't applied the SDIO runtime PM patches yet.

http://www.spinics.net/lists/linux-mmc/msg03966.html

So, is a wl1271_sdio.ko also supposed to be generated, but didn't because I didn't add the SDIO pm patches?

To use this at run-time on the target, should I do insmod for multiple modules:

insmod cfg80211.ko
insmod compat.ko
insmod compat_firmware_class.ko
insmod mac80211.ko
insmod wl1271.ko


Elvis Dowson

2010-12-23 14:58:16

by Elvis Dowson

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

Hi Hauke,

On Dec 23, 2010, at 1:00 AM, Hauke Mehrtens wrote:

> You also have to backport the CONFIG_WL12XX_PLATFORM_DATA and activate
> it in your kernel config, wl1271_sdio depends on that.

I did as you suggested and was able to get wl1271_sdio.ko to build.

I have attached a patch for this, which can be applied on top of the TI android rowboat-eclair-2.6.32 kernel branch. This kernel works with android-2.2.1 (froyo), although the kernel was originally developed for android eclair.

>From cec5d06e38664a44e7b723f55648cbcfbc920d6e Mon Sep 17 00:00:00 2001
From: Elvis Dowson <[email protected]>
Date: Thu, 23 Dec 2010 18:52:42 +0400
Subject: [PATCH 3/3] wl12xx: Add support for wl12xx_platform_data.

---
drivers/net/wireless/wl12xx/Kconfig | 29 +++++++++++-
drivers/net/wireless/wl12xx/Makefile | 2 +
drivers/net/wireless/wl12xx/wl12xx_platform_data.c | 28 +++++++++++
include/linux/wl12xx.h | 51 ++++++++++++++++++++
4 files changed, 109 insertions(+), 1 deletions(-)
create mode 100644 drivers/net/wireless/wl12xx/wl12xx_platform_data.c
create mode 100644 include/linux/wl12xx.h

diff --git a/drivers/net/wireless/wl12xx/Kconfig b/drivers/net/wireless/wl12xx/Kconfig
index 785e024..4a8bb25 100644
--- a/drivers/net/wireless/wl12xx/Kconfig
+++ b/drivers/net/wireless/wl12xx/Kconfig
@@ -41,7 +41,7 @@ config WL1251_SDIO

config WL1271
tristate "TI wl1271 support"
- depends on WL12XX && SPI_MASTER && GENERIC_HARDIRQS
+ depends on WL12XX && GENERIC_HARDIRQS
depends on INET
select FW_LOADER
select CRC7
@@ -51,3 +51,30 @@ config WL1271

If you choose to build a module, it'll be called wl1271. Say N if
unsure.
+
+config WL1271_SPI
+ tristate "TI wl1271 SPI support"
+ depends on WL1271 && SPI_MASTER
+ ---help---
+ This module adds support for the SPI interface of adapters using
+ TI wl1271 chipset. Select this if your platform is using
+ the SPI bus.
+
+ If you choose to build a module, it'll be called wl1251_spi.
+ Say N if unsure.
+
+config WL1271_SDIO
+ tristate "TI wl1271 SDIO support"
+ depends on WL1271 && MMC
+ ---help---
+ This module adds support for the SDIO interface of adapters using
+ TI wl1271 chipset. Select this if your platform is using
+ the SDIO bus.
+
+ If you choose to build a module, it'll be called
+ wl1271_sdio. Say N if unsure.
+
+config WL12XX_PLATFORM_DATA
+ bool
+ depends on WL1271_SDIO != n
+ default y
diff --git a/drivers/net/wireless/wl12xx/Makefile b/drivers/net/wireless/wl12xx/Makefile
index 62e37ad..51b348e 100644
--- a/drivers/net/wireless/wl12xx/Makefile
+++ b/drivers/net/wireless/wl12xx/Makefile
@@ -12,3 +12,5 @@ wl1271-objs = wl1271_main.o wl1271_spi.o wl1271_cmd.o \
wl1271_ps.o wl1271_acx.o wl1271_boot.o \
wl1271_init.o wl1271_debugfs.o
obj-$(CONFIG_WL1271) += wl1271.o
+
+obj-$(CONFIG_WL12XX_PLATFORM_DATA) += wl12xx_platform_data.o
diff --git a/drivers/net/wireless/wl12xx/wl12xx_platform_data.c b/drivers/net/wireless/wl12xx/wl12xx_platform_data.c
new file mode 100644
index 0000000..973b110
--- /dev/null
+++ b/drivers/net/wireless/wl12xx/wl12xx_platform_data.c
@@ -0,0 +1,28 @@
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/wl12xx.h>
+
+static const struct wl12xx_platform_data *platform_data;
+
+int __init wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
+{
+ if (platform_data)
+ return -EBUSY;
+ if (!data)
+ return -EINVAL;
+
+ platform_data = kmemdup(data, sizeof(*data), GFP_KERNEL);
+ if (!platform_data)
+ return -ENOMEM;
+
+ return 0;
+}
+
+const struct wl12xx_platform_data *wl12xx_get_platform_data(void)
+{
+ if (!platform_data)
+ return ERR_PTR(-ENODEV);
+
+ return platform_data;
+}
+EXPORT_SYMBOL(wl12xx_get_platform_data);
diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h
new file mode 100644
index 0000000..4f902e1
--- /dev/null
+++ b/include/linux/wl12xx.h
@@ -0,0 +1,51 @@
+/*
+ * This file is part of wl12xx
+ *
+ * Copyright (C) 2009 Nokia Corporation
+ *
+ * Contact: Luciano Coelho <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef _LINUX_WL12XX_H
+#define _LINUX_WL12XX_H
+
+struct wl12xx_platform_data {
+ void (*set_power)(bool enable);
+ /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */
+ int irq;
+ bool use_eeprom;
+ int board_ref_clock;
+};
+
+#ifdef CONFIG_WL12XX_PLATFORM_DATA
+
+int wl12xx_set_platform_data(const struct wl12xx_platform_data *data);
+
+#else
+
+static inline
+int wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
+{
+ return -ENOSYS;
+}
+
+#endif
+
+const struct wl12xx_platform_data *wl12xx_get_platform_data(void);
+
+#endif
--
1.7.0.4


Best regards,

Elvis Dowson

2010-12-22 21:08:12

by Elvis Dowson

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless


On Dec 23, 2010, at 1:00 AM, Hauke Mehrtens wrote:

> Compat-wireless does not check what patches you applied to your kernel
> yet, it just checks what kernel version you are using and want patches
> are applied to it in the vanilla version. If you add some patches
> yourself to the kernel to backport some stuff you have to manually edit
> compat-wireless's config.mk file.

I was just thinking, run-time PM never made it to 2.6.32 right ? So, I might
not need to add those run-time PM patches ?


> You also have to backport the CONFIG_WL12XX_PLATFORM_DATA and activate
> it in your kernel config, wl1271_sdio depends on that.

Ok, you mean back port that structure from 2.6.37-rc6 to the android-2.6.32 kernel?

> Probably you have to change some other stuff on your architecture code
> so that your device finds this sdio card, but I do not know what you
> have to do exactly.

I've already got the required kernel modifications for the kernel board-omap3beagle.c
file, and have already tested it out with vanilla linux-2.6.37-rc6 with the wl1271 driver,
and it works.

So, I'll just need to port those changes across to the android-2.6.32 kernel and see if it
all works together.

"What are my chances, doc?" ;-)

Elvis Dowson



2010-12-22 17:40:11

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

On Wed, Dec 22, 2010 at 12:29 PM, Elvis Dowson <[email protected]> wrote:
> Hi,
>
> On Dec 22, 2010, at 8:47 PM, Hauke Mehrtens wrote:
>
>> On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
>>> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <[email protected]> wrote:
>>>> netdev_alloc_skb_ip_align
>>>
>>> I notice you have an android kernel, is that kernel a vanilla kernel
>>> or did it get netdev_alloc_skb_ip_align() cherry picked into it?
>
>
> Yes, it is an android enabled 2.6.32 kernel. It also includes the TI
> OMAP35xx/AM35xx platform support package SDK v03.00.01.06/
>
>
>> netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
>> kernel. Someone else (google or ti) must have backported it to this
>> kernel and added it to your kernel.
>>
>> I do not want to add some special handling into compat-wireless just for
>> some android kernel. Just remove netdev_alloc_skb_ip_align() and
>> NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
>> problems you posted should be fixed.
>
> I made the following modifications, but get another error:
>
> diff --git a/include/linux/compat-2.6.33.h b/include/linux/compat-2.6.33.h
> index c2dbc1b..468a074 100644
> --- a/include/linux/compat-2.6.33.h
> +++ b/include/linux/compat-2.6.33.h
> @@ -52,19 +52,6 @@ static inline void compat_release_firmware(const struct firmware *fw)
>  #define IFF_DONT_BRIDGE 0x800          /* disallow bridging this ether dev */
>  /* source: include/linux/if.h */
>
> -/* this will never happen on older kernels */
> -#define NETDEV_POST_INIT 0xffff
> -
> -static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
> -                unsigned int length)
> -{
> -       struct sk_buff *skb = netdev_alloc_skb(dev, length + NET_IP_ALIGN);
> -
> -       if (NET_IP_ALIGN && skb)
> -               skb_reserve(skb, NET_IP_ALIGN);
> -       return skb;
> -}
> -
>  #if defined(CONFIG_PCCARD) || defined(CONFIG_PCCARD_MODULE)
>
>  #if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)

I'd rather you figure out a way to identify that android kernel
somehow reliably and send a patch upstream to ifdef out
netdev_alloc_skb_ip_align() for that kernel, that way other Android
hackers can benefit.

> CC [M]  /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.o
> /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c: In function ‘ieee80211_led_init’:
> /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:59: error: invalid application of ‘sizeof’ to incomplete type ‘struct led_trigger’


This is from:

void ieee80211_led_init(struct ieee80211_local *local)
{
local->rx_led = kzalloc(sizeof(struct led_trigger), GFP_KERNEL);
...
}

Looks good to me.. Not sure what can cause this, hrm.

Luis

2010-12-22 20:04:15

by Elvis Dowson

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless


On Dec 22, 2010, at 11:34 PM, Elvis Dowson wrote:

> However, I don't see a wl1271.ko module in the list of built files. The TI android
> rowboard 2.6.32 kernel doesn't have an option for wl12xx or wl1271 at the moment
> so, what do I do next? :-)

I only see the following kernel modules :

cfg80211.ko
compat.ko
compat_firmware_class.ko
mac80211.ko

Shouldn't a wl1271.ko or wl12xx,ko module be there?

I configured compat-wireless for the wl12xx driver.

Elvis Dowson

2010-12-22 21:00:54

by Hauke Mehrtens

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

On 12/22/2010 09:34 PM, Elvis Dowson wrote:
>
> On Dec 23, 2010, at 12:12 AM, Hauke Mehrtens wrote:
>
>> Is CONFIG_CRC7=y set in your kernel config, the wl12xx module needs
>> this? If it is not set the module will not be build.
>
> It wasn't :-). After enabling it in the kernel and recompiling both the kernel and
> compat-wireless wl12xx, it generated the following modules:
>
> cfg80211.ko
> compat.ko
> compat_firmware_class.ko
> mac80211.ko
> wl1251.ko
> wl1251_sdio.ko
> wl1251_spi.ko
> wl1271.ko
> wl1271_spi.ko
>
> I haven't applied the SDIO runtime PM patches yet.
>
> http://www.spinics.net/lists/linux-mmc/msg03966.html
>
> So, is a wl1271_sdio.ko also supposed to be generated, but didn't because I didn't add the SDIO pm patches?
>
> To use this at run-time on the target, should I do insmod for multiple modules:
>
> insmod cfg80211.ko
> insmod compat.ko
> insmod compat_firmware_class.ko
> insmod mac80211.ko
> insmod wl1271.ko
>
>
> Elvis Dowson

Compat-wireless does not check what patches you applied to your kernel
yet, it just checks what kernel version you are using and want patches
are applied to it in the vanilla version. If you add some patches
yourself to the kernel to backport some stuff you have to manually edit
compat-wireless's config.mk file.

You also have to backport the CONFIG_WL12XX_PLATFORM_DATA and activate
it in your kernel config, wl1271_sdio depends on that.

Probably you have to change some other stuff on your architecture code
so that your device finds this sdio card, but I do not know what you
have to do exactly.

Hauke

2010-12-23 09:45:15

by Elvis Dowson

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless


On Dec 23, 2010, at 1:00 AM, Hauke Mehrtens wrote:

> You also have to backport the CONFIG_WL12XX_PLATFORM_DATA and activate
> it in your kernel config, wl1271_sdio depends on that.

Has anyone on the list backported CONFIG_WL12XX_PLATFORM_DATA to
2.6.32, and got wl1271_sdio.ko to build?

Elvis Dowson

2010-12-25 08:02:31

by Ohad Ben Cohen

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

On Fri, Dec 24, 2010 at 7:17 AM, Elvis Dowson <[email protected]> wrote:
> ? ? ? When working with the wl1271 backport to 2.6.32 kernel, is CONFIG_MMC_EMBEDDED_SDIO=y required?

Nope. wl1271 doesn't need it - the device is dynamically probed,
identified and configured.

2010-12-23 15:34:29

by Elvis Dowson

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

Hi,
I think the .startup_delay field is missing in the fixed regulator for 2.6.32.

I recall from the datasheets that during a reset, the WL_EN line should asserted
low for atleast 64 to 70ms before turning the power back on.

What do you think I should do?


/* Fixed voltage regulator for wlan module */
static struct fixed_voltage_config beagle_vwlan = {
.supply_name = "vwl1271",
.microvolts = 1850000, /* 1.8V */
.gpio = OMAP_BEAGLEBOARD20_WIFI_PMENA_GPIO,
.startup_delay = 70000, /* 70msec */
.enable_high = 1,
.enabled_at_boot = 0,
.init_data = &beagle_vmmc2,
};


CC arch/arm/mach-omap2/board-omap3beagle.o
arch/arm/mach-omap2/board-omap3beagle.c:409: error: unknown field ?startup_delay? specified in initializer
arch/arm/mach-omap2/board-omap3beagle.c:409: warning: large integer implicitly truncated to unsigned type
make[1]: *** [arch/arm/mach-omap2/board-omap3beagle.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

Elvis Dowson



2010-12-22 19:35:04

by Elvis Dowson

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

Hi,

On Dec 22, 2010, at 10:13 PM, Hauke Mehrtens wrote:

> In your kernel config CONFIG_LEDS_TRIGGERS is probably unset and then
> net/mac80211/led.c should not be build at all. In the kernel
> CONFIG_MAC80211_LEDS will select CONFIG_LEDS_TRIGGERS, but in
> compat-wireless this should just be disabled.
> I provided a patch for this problem, please apply it and try again.

Thanks for sending the patch across so quickly. I applied it and it built correctly.

However, I don't see a wl1271.ko module in the list of built files. The TI android
rowboard 2.6.32 kernel doesn't have an option for wl12xx or wl1271 at the moment
so, what do I do next? :-)

Sorry, its my first time trying to use compat-wireless.

$ ./scripts/driver-select wl12xx
Processing new driver-select request...
Backup exists: Makefile.bk
Backup exists: drivers/net/wireless/Makefile.bk
Backup exists: Makefile.bk
Backup exists: net/wireless/Makefile.bk
Backup exists: drivers/net/Makefile.bk
Backup exists: drivers/ssb/Makefile.bk
Backup exists: drivers/misc/eeprom/Makefile.bk
Backup exists: Makefile.bk
elvis@hercules:/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork$ make
./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
make -C /tool/patches/android-rowboat-2.6.32-kernel-patchwork M=/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork modules
make[1]: Entering directory `/tool/patches/android-rowboat-2.6.32-kernel-patchwork'
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/main.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/compat-2.6.33.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/compat-2.6.35.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/compat-2.6.36.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/compat-2.6.37.o
LD [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/compat.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/compat_firmware_class.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/main.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/status.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/sta_info.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/wep.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/wpa.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/scan.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/offchannel.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/ht.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/agg-tx.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/agg-rx.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/ibss.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/mlme.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/work.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/iface.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/rate.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/michael.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/tkip.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/aes_ccm.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/aes_cmac.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/cfg.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/rx.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/spectmgmt.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/tx.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/key.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/util.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/wme.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/event.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/chan.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/mesh.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/mesh_pathtbl.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/mesh_plink.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/mesh_hwmp.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/pm.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/rc80211_pid_algo.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/rc80211_minstrel.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/rc80211_minstrel_ht.o
LD [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/mac80211.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/core.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/sysfs.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/radiotap.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/util.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/reg.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/scan.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/nl80211.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/mlme.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/ibss.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/sme.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/chan.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/ethtool.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/wext-compat.o
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/wext-sme.o
LD [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/cfg80211.o
Building modules, stage 2.
MODPOST 4 modules
CC /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/compat.mod.o
LD [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/compat.ko
CC /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/compat_firmware_class.mod.o
LD [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/compat_firmware_class.ko
CC /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/mac80211.mod.o
LD [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/mac80211.ko
CC /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/cfg80211.mod.o
LD [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/wireless/cfg80211.ko
make[1]: Leaving directory `/tool/patches/android-rowboat-2.6.32-kernel-patchwork'



Elvis Dowson

2010-12-22 20:12:21

by Hauke Mehrtens

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

On 12/22/2010 09:03 PM, Elvis Dowson wrote:
>
> On Dec 22, 2010, at 11:34 PM, Elvis Dowson wrote:
>
>> However, I don't see a wl1271.ko module in the list of built files. The TI android
>> rowboard 2.6.32 kernel doesn't have an option for wl12xx or wl1271 at the moment
>> so, what do I do next? :-)
>
> I only see the following kernel modules :
>
> cfg80211.ko
> compat.ko
> compat_firmware_class.ko
> mac80211.ko
>
> Shouldn't a wl1271.ko or wl12xx,ko module be there?
>
> I configured compat-wireless for the wl12xx driver.
>
> Elvis Dowson
Hi Elvis,

Looks like you did everything correct. ;-)

Is CONFIG_CRC7=y set in your kernel config, the wl12xx module needs
this? If it is not set the module will not be build.

Hauke

2010-12-22 16:47:19

by Hauke Mehrtens

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <[email protected]> wrote:
>> netdev_alloc_skb_ip_align
>
> I notice you have an android kernel, is that kernel a vanilla kernel
> or did it get netdev_alloc_skb_ip_align() cherry picked into it?
>
> Luis

netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
kernel. Someone else (google or ti) must have backported it to this
kernel and added it to your kernel.

I do not want to add some special handling into compat-wireless just for
some android kernel. Just remove netdev_alloc_skb_ip_align() and
NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
problems you posted should be fixed.

Hauke

2010-12-23 15:57:09

by Elvis Dowson

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

Hi,
The following patch has to be added to the one I sent out ealier for backporting wl12xx_platform_data.

diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index 5d4ce4d..a13a602 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -50,5 +50,6 @@ obj-$(CONFIG_ATH_COMMON) += ath/
obj-$(CONFIG_MAC80211_HWSIM) += mac80211_hwsim.o

obj-$(CONFIG_WL12XX) += wl12xx/
+obj-$(CONFIG_WL12XX_PLATFORM_DATA) += wl12xx/

obj-$(CONFIG_IWM) += iwmc3200wifi/


Elvis Dowson

2010-12-22 17:22:41

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

On Wed, Dec 22, 2010 at 12:21 PM, Luis R. Rodriguez <[email protected]> wrote:
> On Wed, Dec 22, 2010 at 11:47 AM, Hauke Mehrtens <[email protected]> wrote:
>> On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
>>> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <[email protected]> wrote:
>>>> netdev_alloc_skb_ip_align
>>>
>>> I notice you have an android kernel, is that kernel a vanilla kernel
>>> or did it get netdev_alloc_skb_ip_align() cherry picked into it?
>>>
>>>   Luis
>>
>> netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
>> kernel. Someone else (google or ti) must have backported it to this
>> kernel and added it to your kernel.
>>
>> I do not want to add some special handling into compat-wireless just for
>> some android kernel. Just remove netdev_alloc_skb_ip_align() and
>> NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
>> problems you posted should be fixed.
>
> Well we did something to accommodate RHEL, I wouldn't mind supporting
> some fudge for Android so long as someone is willing to submit the
> patch and identify the kernel properly. Android is popular enough and
> I rather reduce the time it takes to use it there than to create an
> extra hurdle.

Now that I think about it I don't think John ever respinned his
patches for compat-wireless for RHEL.

Luis

2010-12-22 17:45:09

by John W. Linville

[permalink] [raw]
Subject: Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless

On Wed, Dec 22, 2010 at 12:22:21PM -0500, Luis R. Rodriguez wrote:
> On Wed, Dec 22, 2010 at 12:21 PM, Luis R. Rodriguez <[email protected]> wrote:
> > On Wed, Dec 22, 2010 at 11:47 AM, Hauke Mehrtens <[email protected]> wrote:
> >> On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
> >>> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <[email protected]> wrote:
> >>>> netdev_alloc_skb_ip_align
> >>>
> >>> I notice you have an android kernel, is that kernel a vanilla kernel
> >>> or did it get netdev_alloc_skb_ip_align() cherry picked into it?
> >>>
> >>> ? Luis
> >>
> >> netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
> >> kernel. Someone else (google or ti) must have backported it to this
> >> kernel and added it to your kernel.
> >>
> >> I do not want to add some special handling into compat-wireless just for
> >> some android kernel. Just remove netdev_alloc_skb_ip_align() and
> >> NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
> >> problems you posted should be fixed.
> >
> > Well we did something to accommodate RHEL, I wouldn't mind supporting
> > some fudge for Android so long as someone is willing to submit the
> > patch and identify the kernel properly. Android is popular enough and
> > I rather reduce the time it takes to use it there than to create an
> > extra hurdle.
>
> Now that I think about it I don't think John ever respinned his
> patches for compat-wireless for RHEL.

No, I didn't. Johannes wanted some sort of API level indicator instead
of checking for RHEL kernels, but I have no idea how to implement that.

FWIW, I'd rather you just take the patches I submitted and any
similar patches for other Enterprise-y distros (including Android).
But if someone else can demonstrate a workable, better alternative
then I will try to comply.

John
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.