2010-10-14 07:41:05

by George News

[permalink] [raw]
Subject: Compat-wireless N900

Hi all,

I'm trying to use compat-wireless to upgrade my n900 wireless driver.
N900 is using WL1251 wireless driver and the omap1 kernel version used
it 2.6.28.

The issue is that 2.6.28 does not have implemented many issues for
nl80211 netlink family which I wanted to test on my n900.

I have recompiled the kernel to make cfg80211 and mac80211 modules, so I
can use compat-wireless. After that I have compiled compat-wireless by
selecting the driver family I need. All done under scratchbox.

# scripts/driver-select wl12xx
# make KLIB=/lib/modules/2.6.28-myversion \
KMODPATH_ARG=/lib/modules/2.6.28-myversion
# make KLIB=/lib/modules/2.6.28-myversion \
KMODPATH_ARG=/lib/modules/2.6.28-myversion install

After that I have installed the new kernel and the drivers in the n900
and the system starts. `uname -a` reports I'm using my custom kernel.

The problem is that the wireless modules are not working as expected and
I cannot get access to my wifi networks. Actually bluetooth is not
working as well, as far as I have tested.

dmesg reports --> http://pastebin.com/xskKcGnE

I have hightlighted the lines that seems to be reflecting what is not
working. So it seems that on startup it is trying to upload the former
wl12xx.ko module. Then I decided to manually upload the new modules to
check them out.

$ sudo gainroot
# modprobe wl1251_spi
# ifconfig -a
---- no wlan0 iface ----
# iwconfig
---- no wireless devices ----

I have also tried with wl1251_sdio driver but I have the same problem.
dmesg doesn't report any error while uploading these drivers, but I
don't know why not a new wireless interface is not created.

BTW, the firmware is in /lib/modules/firmware so it is in a place that
can be found. Do I have to change something?

What files do I need to reconfigure as to get the kernel to point to the
correct driver upon booting?
How do I create a new wireless interface if the driver is uploaded
properly but the interface is not created?
Any other issue that you find I'm not doing correctly?

Any help is welcome.

Regards,
George


2010-10-25 07:49:59

by George News

[permalink] [raw]
Subject: Re: Compat-wireless N900

On 25/10/2010 4:03, Kalle Valo wrote:
> George<[email protected]> writes:
>
>> It seems that it tries to do something but it is not finally done.
>> However, as you can see it seems there is no error (at least
>> reported). Could it be that spi_read buf is almost everytime reading
>> 00 00 00 00?
>
> If you get nothing but zeros back from the device, most likely that
> means that it's not powered up properly.
>
> wl1251 chip on n900 is powered up by using a gpio line. I'm worried
> that the struct wl12xx_platform_data wl1251 wireless-compat driver
> expects (defined in /include/linux/wl12xx.h) doesn't match what the
> old maemo kernel provides. Unfortunately I can't remember anymore what
> the platform data was like in maemo kernels and there's no easy way
> for me to check that right now.
>

Thanks a lot for that hint. Now I'm involved in another issue but when I
have more time I will look at those .h, but don't expect too much from
me as I'm not expert but just user.

Thanks a lot.

2010-10-19 14:32:49

by George News

[permalink] [raw]
Subject: Re: Compat-wireless N900

On 19/10/2010 15:52, Grazvydas Ignotas wrote:
> On Tue, Oct 19, 2010 at 11:12 AM, George<[email protected]> wrote:
>> On 18/10/2010 21:02, Luciano Coelho wrote:
>>>
>>> On Mon, 2010-10-18 at 20:41 +0200, ext Luciano Coelho wrote:
>>>>
>>>> On Mon, 2010-10-18 at 21:04 +0200, ext George wrote:
>>>>>
>>>>> On 18/10/2010 19:21, Luis R. Rodriguez wrote:
>>>>>> Does your device use SDIO or SPI?
>>>>>>
>>>>>> Luis
>>>>>
>>>>> I have tried both and none of them have worked.
>>>>
>>>> On the N900 the wl1271 chip is connected via SPI.
>>
>> The chip is a wl1251, isn't it? wl1271 is n capable and n900 is not.
>
> I think your problem is that the driver (in
> drivers/net/wireless/wl1251/spi.c) and spi_board_info (in
> arch/arm/mach-omap2/board-rx51-peripherals.c) names don't match
> (wl1251 vs wl12xx). Probably easiest to edit .modalias in
> board-rx51-peripherals.c and rebuild the kernel.
>

It seems getting closer ;)

After changing wl12xx for spi:wl1251 now modules are uploaded on startup.

However this is the output from lsmod | grep spi
spi 4352 0
wl1251 75840 1 spi
mac80211 256892 2 spi,wl1251
crc7 1216 1 spi

As you can see spi module is not used :( and no interface is created.
Still a way to go.



2010-10-19 15:09:14

by George News

[permalink] [raw]
Subject: Re: Compat-wireless N900

On 19/10/2010 16:38, Grazvydas Ignotas wrote:
>>> I think your problem is that the driver (in
>>> drivers/net/wireless/wl1251/spi.c) and spi_board_info (in
>>> arch/arm/mach-omap2/board-rx51-peripherals.c) names don't match
>>> (wl1251 vs wl12xx). Probably easiest to edit .modalias in
>>> board-rx51-peripherals.c and rebuild the kernel.
>>>
>>
>> It seems getting closer ;)
>>
>> After changing wl12xx for spi:wl1251 now modules are uploaded on startup.
>
> You should just use "wl1251", not spi:wl1251, so it becomes:
>
> {
> .modalias = "wl1251",
> .bus_num = 4,
> .chip_select = 0,
> .max_speed_hz = 48000000,
> ...

Tried and got a similar behaviour as when using spi:wl1251.

I have also set the debug ALL mode to see if I get something that can
help you out on finding the problem.

When uploading only wl1251 nothing appears in dmesg. But when uploading
module spi, I got the following info: http://pastebin.com/ysdTSDnB

HTH

TA
Jorge

> --
> 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
>


2010-10-19 13:52:02

by Grazvydas Ignotas

[permalink] [raw]
Subject: Re: Compat-wireless N900

On Tue, Oct 19, 2010 at 11:12 AM, George <[email protected]> wrote:
> On 18/10/2010 21:02, Luciano Coelho wrote:
>>
>> On Mon, 2010-10-18 at 20:41 +0200, ext Luciano Coelho wrote:
>>>
>>> On Mon, 2010-10-18 at 21:04 +0200, ext George wrote:
>>>>
>>>> On 18/10/2010 19:21, Luis R. Rodriguez wrote:
>>>>> Does your device use SDIO or SPI?
>>>>>
>>>>> ? ?Luis
>>>>
>>>> I have tried both and none of them have worked.
>>>
>>> On the N900 the wl1271 chip is connected via SPI.
>
> The chip is a wl1251, isn't it? wl1271 is n capable and n900 is not.

I think your problem is that the driver (in
drivers/net/wireless/wl1251/spi.c) and spi_board_info (in
arch/arm/mach-omap2/board-rx51-peripherals.c) names don't match
(wl1251 vs wl12xx). Probably easiest to edit .modalias in
board-rx51-peripherals.c and rebuild the kernel.

2010-10-17 08:18:03

by George News

[permalink] [raw]
Subject: Re: Compat-wireless N900

On 15/10/2010 20:01, Luis R. Rodriguez wrote:
> On Thu, Oct 14, 2010 at 11:42 PM, George<[email protected]> wrote:
>> On 14/10/2010 20:03, Luis R. Rodriguez wrote:
>>>
>>> On Thu, Oct 14, 2010 at 11:09 AM, George<[email protected]> wrote:
>>>
>>>> I have tried using even insmod and the modules load perfectly but the
>>>> wlan
>>>> device doesn't show up.
>>>
>>> Then that likely means you are not loading the right module.
>>>
>>>> In dmesg nothing is displayed except for the cfg80211 and when I rmmod
>>>> the
>>>> module wl1251 (wl1251: removed or similar)
>>>>
>>>> I'm still wondering what the hell I have to do.
>>>
>>> Are you sure you have the right module?
>>
>> Yes. The driver is the wl1251 family. As I said in previous posts and from
>> what some guys in the IRC channel tried to guess, it seems that the problem
>> might be in that the spi interface is specific for any device, and in the
>> n900 might be different from the one implemented in compat-wireless.
>
> Heh, nope.
>
>> I'm a bit suprised about this fact, but they know more than I.
>
> Or, we had not yet accommodated yet for the fact that the wl1251
> driver was split out into its own directory from the original wl12xx/
> directory and no one ever sent a patch to fix this on compat-wireless.
> I just fixed this on today's compat-wireless, so you can try that
> around noon PST time when the new tarball will be generated. Ah but
> there are some pcmcia crap compile issues, we just have to remove
> pcmcia support, well not now, I have other stuff to do.

Thanks for that. Tomorrow at work I will try to test it out and get back
to you if something happens ;)

> I welcome patches if someone gets to it.

I'm sorry but my knowdledge of the system is from a higher level of
abstraction. Otherwise I will be soooo please of helping you out.

Again. Thanks.
Jorge

> Luis
> --
> 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
>


2010-10-19 07:28:22

by George News

[permalink] [raw]
Subject: Re: Compat-wireless N900

On 18/10/2010 21:02, Luciano Coelho wrote:
> On Mon, 2010-10-18 at 20:41 +0200, ext Luciano Coelho wrote:
>> On Mon, 2010-10-18 at 21:04 +0200, ext George wrote:
>>> On 18/10/2010 19:21, Luis R. Rodriguez wrote:
>>>>> Any help on that? Sorry but I'm somehow desesperate and don't know what to
>>>>> do. Actually I'm thinking on not using compat-wireless and nl80211 and get
>>>>> back to wireless-extensions.
>>
>> Getting back to wireless-extensions would certainly be a very desperate
>> measure! :P

I guess it is, evenmore when nl80211 is the present ;) But I'm running
out of time and getting desperate ;)

>>
>>>> Does your device use SDIO or SPI?
>>>>
>>>> Luis
>>>
>>> I have tried both and none of them have worked.
>>
>> On the N900 the wl1271 chip is connected via SPI.

The chip is a wl1251, isn't it? wl1271 is n capable and n900 is not.

>> I'll re-read this thread more carefully to see if I can spot anything
>> that could help you.
>
> First thing that came to my mind after re-reading the thread... Does the
> wl1251 driver work *without* compat-wireless?

I don't now how to test the driver without compat-wireless. If you can
explain it I will try. Do I have just to copy driver code on
compat-wireless directly into my kernel source directory? I don't think
that would work and probably complain, but I can try if this is the way.

> Where did you get the
> kernel that you have compiled?

The kernel is the official one for n900, kernel-2.6.28 (uname -a returns
2.6.28-omap1). I got it using scratchbox and downloading it with:

sb# apt-get source kernel

Then I have compiled it using:

sb# make EXTRAVERSION=-mine rx51_defconfig
sb# make EXTRAVERSION=-mine menuconfig
sb# make EXTRAVERSION=-mine bzImage modules
sb# make EXTRAVERSION=-mine modules_install

After that I have compiled on scratchbox compat-wireless package:

sb# cd compat-wireless-2010-10-17
sb# scripts/driver-select wl12xx
sb# make KLIB=/lib/modules/2.6.28-mine
KMODPATH_ARG=/lib/modules/2.6.28-mine
sb# make KLIB=/lib/modules/2.6.28-mine
KMODPATH_ARG=/lib/modules/2.6.28-mine install

Then move the new set of modules to my n900

n900# mkdir -p /lib/modules/2.6.28-mine

# cd /lib/modules/2.6.28-mine
# scp -r updates/ kernel/ modules.*
[email protected]:/lib/modules/2.6.28-mine

And then boot with the new kernel image

ubuntu$ sudo flasher-3.5 -l -b -k
PATH_TO_KERNEL/kernel-2.6.28/arch/arm/boot/zImage


> My initial guess is that the SPI is not configured correctly so the
> probe function is never called in the wl1251_spi module and thus the
> interface is never created...

I'm attaching a link to my .config file to check if you consider I have
to activate any other stuff.

http://pastebin.com/sCnHzp3V

I would like to thank you all for the tremendous effort you are doing
helping me out on this issue.

BR
Jorge


2010-10-18 15:50:55

by George News

[permalink] [raw]
Subject: Re: Compat-wireless N900

On 17/10/2010 11:01, George wrote:
> On 15/10/2010 20:01, Luis R. Rodriguez wrote:
>> On Thu, Oct 14, 2010 at 11:42 PM, George<[email protected]>
>> wrote:
>>> On 14/10/2010 20:03, Luis R. Rodriguez wrote:
>>>>
>>>> On Thu, Oct 14, 2010 at 11:09 AM, George<[email protected]>
>>>> wrote:
>>>>
>>>>> I have tried using even insmod and the modules load perfectly
>>>>> but the wlan device doesn't show up.
>>>>
>>>> Then that likely means you are not loading the right module.
>>>>
>>>>> In dmesg nothing is displayed except for the cfg80211 and
>>>>> when I rmmod the module wl1251 (wl1251: removed or similar)
>>>>>
>>>>> I'm still wondering what the hell I have to do.
>>>>
>>>> Are you sure you have the right module?
>>>
>>> Yes. The driver is the wl1251 family. As I said in previous posts
>>> and from what some guys in the IRC channel tried to guess, it
>>> seems that the problem might be in that the spi interface is
>>> specific for any device, and in the n900 might be different from
>>> the one implemented in compat-wireless.
>>
>> Heh, nope.
>>
>>> I'm a bit suprised about this fact, but they know more than I.
>>
>> Or, we had not yet accommodated yet for the fact that the wl1251
>> driver was split out into its own directory from the original
>> wl12xx/ directory and no one ever sent a patch to fix this on
>> compat-wireless. I just fixed this on today's compat-wireless, so
>> you can try that around noon PST time when the new tarball will be
>> generated. Ah but there are some pcmcia crap compile issues, we
>> just have to remove pcmcia support, well not now, I have other
>> stuff to do.

I have downloaded compat-wireless-2010-10-17.tar.bz2 and have compiled
the code with no problem. I have seen the changes you've made creating
modules wl1251, spi and sdio.

I have run modprobe spi to upload the modules (also tried sdio) and no
way. dmesg doesn't include any message. Below is the one after unloading
the modules and uploading them again:
rmmod spi wl1251 mac80211 cfg80211 compat_firmware_class
modprobe spi

>>
wl1251: unloaded
cfg80211: Calling CRDA to update world regulatory domain
>>

Below is the output for lsmod. As you can see modules are up and
running, but when I execute ifconfig -a no wlan0 device shows up.

Nokia-N900:~# lsmod | grep spi
spi 4352 0
wl1251 75840 1 spi
mac80211 212984 2 spi,wl1251
crc7 1216 1 spi
Nokia-N900:~# lsmod | grep compat
compat_firmware_class 8896 1 wl1251
compat 10496 2 mac80211,cfg80211
v4l1_compat 12100 1 videodev
compat_ioctl32 832 1 fmtx_si4713
Nokia-N900:~# lsmod | grep wl12
wl1251 75840 1 spi
compat_firmware_class 8896 1 wl1251
mac80211 212984 2 spi,wl1251
cfg80211 148904 2 wl1251,mac80211

Any help on that? Sorry but I'm somehow desesperate and don't know what
to do. Actually I'm thinking on not using compat-wireless and nl80211
and get back to wireless-extensions.

CU
Jorge

> Thanks for that. Tomorrow at work I will try to test it out and get
> back to you if something happens ;)
>
>> I welcome patches if someone gets to it.
>
> I'm sorry but my knowdledge of the system is from a higher level of
> abstraction. Otherwise I will be soooo please of helping you out.
>
> Again. Thanks. Jorge
>
>> Luis -- 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
>>
>
> -- 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
>


2010-10-15 18:01:26

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: Compat-wireless N900

On Thu, Oct 14, 2010 at 11:42 PM, George <[email protected]> wrote:
> On 14/10/2010 20:03, Luis R. Rodriguez wrote:
>>
>> On Thu, Oct 14, 2010 at 11:09 AM, George<[email protected]>  wrote:
>>
>>> I have tried using even insmod and the modules load perfectly but the
>>> wlan
>>> device doesn't show up.
>>
>> Then that likely means you are not loading the right module.
>>
>>> In dmesg nothing is displayed except for the cfg80211 and when I rmmod
>>> the
>>> module wl1251 (wl1251: removed or similar)
>>>
>>> I'm still wondering what the hell I have to do.
>>
>> Are you sure you have the right module?
>
> Yes. The driver is the wl1251 family. As I said in previous posts and from
> what some guys in the IRC channel tried to guess, it seems that the problem
> might be in that the spi interface is specific for any device, and in the
> n900 might be different from the one implemented in compat-wireless.

Heh, nope.

> I'm a bit suprised about this fact, but they know more than I.

Or, we had not yet accommodated yet for the fact that the wl1251
driver was split out into its own directory from the original wl12xx/
directory and no one ever sent a patch to fix this on compat-wireless.
I just fixed this on today's compat-wireless, so you can try that
around noon PST time when the new tarball will be generated. Ah but
there are some pcmcia crap compile issues, we just have to remove
pcmcia support, well not now, I have other stuff to do.

I welcome patches if someone gets to it.

Luis

2010-10-18 18:42:00

by Luciano Coelho

[permalink] [raw]
Subject: Re: Compat-wireless N900

On Mon, 2010-10-18 at 21:04 +0200, ext George wrote:
> On 18/10/2010 19:21, Luis R. Rodriguez wrote:
> >> Any help on that? Sorry but I'm somehow desesperate and don't know what to
> >> do. Actually I'm thinking on not using compat-wireless and nl80211 and get
> >> back to wireless-extensions.

Getting back to wireless-extensions would certainly be a very desperate
measure! :P


> > Does your device use SDIO or SPI?
> >
> > Luis
>
> I have tried both and none of them have worked.

On the N900 the wl1271 chip is connected via SPI.

I'll re-read this thread more carefully to see if I can spot anything
that could help you.


--
Cheers,
Luca.


2010-10-20 06:53:58

by George News

[permalink] [raw]
Subject: Re: Compat-wireless N900

On 19/10/2010 17:18, Grazvydas Ignotas wrote:
>> I have also set the debug ALL mode to see if I get something that can help
>> you out on finding the problem.
>>
>> When uploading only wl1251 nothing appears in dmesg. But when uploading
>> module spi, I got the following info: http://pastebin.com/ysdTSDnB
>
> You need both wl1251 and spi. This is normal output, you should get
> wlan0 interface at this point.
> --

Yes, that is what I was expecting from the begining but although phy0
should appear in /sys/class/ieee80211, this directory is empty :(

It seems that it tries to do something but it is not finally done.
However, as you can see it seems there is no error (at least reported).
Could it be that spi_read buf is almost everytime reading 00 00 00 00?

Another issue is that I have to manually upload the spi module as by
default it only uploads wl1251 but not the spi. But this is not a big deal.

Again, thank you all for the help... You are almost there (I cannot say
we as I've been only following your advices).

TA

2010-10-19 14:38:06

by Grazvydas Ignotas

[permalink] [raw]
Subject: Re: Compat-wireless N900

>> I think your problem is that the driver (in
>> drivers/net/wireless/wl1251/spi.c) and spi_board_info (in
>> arch/arm/mach-omap2/board-rx51-peripherals.c) names don't match
>> (wl1251 vs wl12xx). Probably easiest to edit .modalias in
>> board-rx51-peripherals.c and rebuild the kernel.
>>
>
> It seems getting closer ;)
>
> After changing wl12xx for spi:wl1251 now modules are uploaded on startup.

You should just use "wl1251", not spi:wl1251, so it becomes:

{
.modalias = "wl1251",
.bus_num = 4,
.chip_select = 0,
.max_speed_hz = 48000000,
...

2010-10-19 14:35:09

by George News

[permalink] [raw]
Subject: Re: Compat-wireless N900

On 19/10/2010 17:16, George wrote:
> On 19/10/2010 15:52, Grazvydas Ignotas wrote:
>> On Tue, Oct 19, 2010 at 11:12 AM, George<[email protected]> wrote:
>>> On 18/10/2010 21:02, Luciano Coelho wrote:
>>>>
>>>> On Mon, 2010-10-18 at 20:41 +0200, ext Luciano Coelho wrote:
>>>>>
>>>>> On Mon, 2010-10-18 at 21:04 +0200, ext George wrote:
>>>>>>
>>>>>> On 18/10/2010 19:21, Luis R. Rodriguez wrote:
>>>>>>> Does your device use SDIO or SPI?
>>>>>>>
>>>>>>> Luis
>>>>>>
>>>>>> I have tried both and none of them have worked.
>>>>>
>>>>> On the N900 the wl1271 chip is connected via SPI.
>>>
>>> The chip is a wl1251, isn't it? wl1271 is n capable and n900 is not.
>>
>> I think your problem is that the driver (in
>> drivers/net/wireless/wl1251/spi.c) and spi_board_info (in
>> arch/arm/mach-omap2/board-rx51-peripherals.c) names don't match
>> (wl1251 vs wl12xx). Probably easiest to edit .modalias in
>> board-rx51-peripherals.c and rebuild the kernel.
>>
>
> It seems getting closer ;)
>
> After changing wl12xx for spi:wl1251 now modules are uploaded on startup.
>
> However this is the output from lsmod | grep spi
> spi 4352 0
> wl1251 75840 1 spi
> mac80211 256892 2 spi,wl1251
> crc7 1216 1 spi
>
> As you can see spi module is not used :( and no interface is created.
> Still a way to go.
>

I forgot also to mention that bluetooth in not working with new modules
from compat-wireless


> --
> 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
>


2010-10-14 16:03:07

by Denis 'GNUtoo' Carikli

[permalink] [raw]
Subject: Re: Compat-wireless N900

On Thu, 2010-10-14 at 10:24 +0200, George wrote:
> Hi all,
>
> I'm trying to use compat-wireless to upgrade my n900 wireless driver.
> N900 is using WL1251 wireless driver and the omap1 kernel version used
> it 2.6.28.
>
> The issue is that 2.6.28 does not have implemented many issues for
> nl80211 netlink family which I wanted to test on my n900.
>
> I have recompiled the kernel to make cfg80211 and mac80211 modules, so I
> can use compat-wireless. After that I have compiled compat-wireless by
> selecting the driver family I need. All done under scratchbox.
>
> # scripts/driver-select wl12xx
> # make KLIB=/lib/modules/2.6.28-myversion \
> KMODPATH_ARG=/lib/modules/2.6.28-myversion
> # make KLIB=/lib/modules/2.6.28-myversion \
> KMODPATH_ARG=/lib/modules/2.6.28-myversion install
>
> After that I have installed the new kernel and the drivers in the n900
> and the system starts. `uname -a` reports I'm using my custom kernel.
>
> The problem is that the wireless modules are not working as expected and
> I cannot get access to my wifi networks. Actually bluetooth is not
> working as well, as far as I have tested.
>
> dmesg reports --> http://pastebin.com/xskKcGnE
At first sight it seem that you have some mismatch issues,
Try to compile the maemo 2.6.28 kenrel without the wireless modules or
replace the wireless modules by the compat-wireless ones.
(normally the compat-wireless modules should take the precedence but as
it seem here, it didn't work)

by the way, are you aware of the meego 2.6.35 kernel, it might not be
complete yet, but may solve some of your problems.

Denis.



2010-10-14 17:18:06

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: Compat-wireless N900

On Thu, Oct 14, 2010 at 8:57 AM, Denis 'GNUtoo' Carikli
<[email protected]> wrote:
> On Thu, 2010-10-14 at 10:24 +0200, George wrote:
>> Hi all,
>>
>> I'm trying to use compat-wireless to upgrade my n900 wireless driver.
>> N900 is using WL1251 wireless driver and the omap1 kernel version used
>> it 2.6.28.
>>
>> The issue is that 2.6.28 does not have implemented many issues for
>> nl80211 netlink family which I wanted to test on my n900.
>>
>> I have recompiled the kernel to make cfg80211 and mac80211 modules, so I
>> can use compat-wireless. After that I have compiled compat-wireless by
>> selecting the driver family I need. All done under scratchbox.
>>
>> # scripts/driver-select wl12xx
>> # make KLIB=/lib/modules/2.6.28-myversion \
>>     KMODPATH_ARG=/lib/modules/2.6.28-myversion
>> # make  KLIB=/lib/modules/2.6.28-myversion \
>>     KMODPATH_ARG=/lib/modules/2.6.28-myversion install
>>
>> After that I have installed the new kernel and the drivers in the n900
>> and the system starts. `uname -a` reports I'm using my custom kernel.
>>
>> The problem is that the wireless modules are not working as expected and
>> I cannot get access to my wifi networks. Actually bluetooth is not
>> working as well, as far as I have tested.
>>
>> dmesg reports --> http://pastebin.com/xskKcGnE
> At first sight it seem that you have some mismatch issues,

Agreed, try:

for i in mac80211 cfg80211 wl1251_spi; do modprobe -l $i; done

This will show you where its picking up the modules upon load. If you
see some disagreement with paths, that's the issue. Compat-wireless
relies on stuffing them on your /lib/modules/$(uname -r)/updates/
directory and in order for these modules to take precedence over the
/lib/modules/$(uname -r)/kernel/ modules we rely on a file in
/etc/depmod.d/ which tells depmod to prefer updates first. For example
on an ubuntu box you get:

mcgrof@tux ~ $ cat /etc/depmod.d/ubuntu.conf
search updates ubuntu built-in

Luis

2010-10-14 17:25:36

by George News

[permalink] [raw]
Subject: Re: Compat-wireless N900

On 14/10/2010 19:17, Luis R. Rodriguez wrote:
> On Thu, Oct 14, 2010 at 8:57 AM, Denis 'GNUtoo' Carikli
> <[email protected]> wrote:
>> On Thu, 2010-10-14 at 10:24 +0200, George wrote:
>>> Hi all,
>>>
>>> I'm trying to use compat-wireless to upgrade my n900 wireless driver.
>>> N900 is using WL1251 wireless driver and the omap1 kernel version used
>>> it 2.6.28.
>>>
>>> The issue is that 2.6.28 does not have implemented many issues for
>>> nl80211 netlink family which I wanted to test on my n900.
>>>
>>> I have recompiled the kernel to make cfg80211 and mac80211 modules, so I
>>> can use compat-wireless. After that I have compiled compat-wireless by
>>> selecting the driver family I need. All done under scratchbox.
>>>
>>> # scripts/driver-select wl12xx
>>> # make KLIB=/lib/modules/2.6.28-myversion \
>>> KMODPATH_ARG=/lib/modules/2.6.28-myversion
>>> # make KLIB=/lib/modules/2.6.28-myversion \
>>> KMODPATH_ARG=/lib/modules/2.6.28-myversion install
>>>
>>> After that I have installed the new kernel and the drivers in the n900
>>> and the system starts. `uname -a` reports I'm using my custom kernel.
>>>
>>> The problem is that the wireless modules are not working as expected and
>>> I cannot get access to my wifi networks. Actually bluetooth is not
>>> working as well, as far as I have tested.
>>>
>>> dmesg reports --> http://pastebin.com/xskKcGnE
>> At first sight it seem that you have some mismatch issues,
>
> Agreed, try:
>
> for i in mac80211 cfg80211 wl1251_spi; do modprobe -l $i; done
>
> This will show you where its picking up the modules upon load. If you
> see some disagreement with paths, that's the issue. Compat-wireless
> relies on stuffing them on your /lib/modules/$(uname -r)/updates/
> directory and in order for these modules to take precedence over the
> /lib/modules/$(uname -r)/kernel/ modules we rely on a file in
> /etc/depmod.d/ which tells depmod to prefer updates first. For example
> on an ubuntu box you get:
>
> mcgrof@tux ~ $ cat /etc/depmod.d/ubuntu.conf
> search updates ubuntu built-in
>

I have tried using even insmod and the modules load perfectly but the
wlan device doesn't show up.
In dmesg nothing is displayed except for the cfg80211 and when I rmmod
the module wl1251 (wl1251: removed or similar)

I'm still wondering what the hell I have to do.

TA

2010-10-18 17:21:40

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: Compat-wireless N900

On Mon, Oct 18, 2010 at 9:34 AM, George <[email protected]> wrote:
> On 17/10/2010 11:01, George wrote:
>>
>> On 15/10/2010 20:01, Luis R. Rodriguez wrote:
>>>
>>> On Thu, Oct 14, 2010 at 11:42 PM, George<[email protected]>
>>> wrote:
>>>>
>>>> On 14/10/2010 20:03, Luis R. Rodriguez wrote:
>>>>>
>>>>> On Thu, Oct 14, 2010 at 11:09 AM, George<[email protected]>
>>>>> wrote:
>>>>>
>>>>>> I have tried using even insmod and the modules load perfectly
>>>>>> but the wlan device doesn't show up.
>>>>>
>>>>> Then that likely means you are not loading the right module.
>>>>>
>>>>>> In dmesg nothing is displayed except for the cfg80211 and
>>>>>> when I rmmod the module wl1251 (wl1251: removed or similar)
>>>>>>
>>>>>> I'm still wondering what the hell I have to do.
>>>>>
>>>>> Are you sure you have the right module?
>>>>
>>>> Yes. The driver is the wl1251 family. As I said in previous posts
>>>> and from what some guys in the IRC channel tried to guess, it
>>>> seems that the problem might be in that the spi interface is
>>>> specific for any device, and in the n900 might be different from
>>>> the one implemented in compat-wireless.
>>>
>>> Heh, nope.
>>>
>>>> I'm a bit suprised about this fact, but they know more than I.
>>>
>>> Or, we had not yet accommodated yet for the fact that the wl1251
>>> driver was split out into its own directory from the original
>>> wl12xx/ directory and no one ever sent a patch to fix this on
>>> compat-wireless. I just fixed this on today's compat-wireless, so
>>> you can try that around noon PST time when the new tarball will be
>>> generated. Ah but there are some pcmcia crap compile issues, we
>>> just have to remove pcmcia support, well not now, I have other
>>> stuff to do.
>
> I have downloaded compat-wireless-2010-10-17.tar.bz2 and have compiled the
> code with no problem. I have seen the changes you've made creating modules
> wl1251, spi and sdio.
>
> I have run modprobe spi to upload the modules (also tried sdio) and no way.
> dmesg doesn't include any message. Below is the one after unloading the
> modules and uploading them again:
> rmmod spi wl1251 mac80211 cfg80211 compat_firmware_class
> modprobe spi
>
>>>
> wl1251: unloaded
> cfg80211: Calling CRDA to update world regulatory domain
>>>
>
> Below is the output for lsmod. As you can see modules are up and running,
> but when I execute ifconfig -a no wlan0 device shows up.
>
> Nokia-N900:~# lsmod | grep spi
> spi                     4352  0
> wl1251                 75840  1 spi
> mac80211              212984  2 spi,wl1251
> crc7                    1216  1 spi
> Nokia-N900:~# lsmod | grep compat
> compat_firmware_class     8896  1 wl1251
> compat                 10496  2 mac80211,cfg80211
> v4l1_compat            12100  1 videodev
> compat_ioctl32           832  1 fmtx_si4713
> Nokia-N900:~# lsmod | grep wl12
> wl1251                 75840  1 spi
> compat_firmware_class     8896  1 wl1251
> mac80211              212984  2 spi,wl1251
> cfg80211              148904  2 wl1251,mac80211
>
> Any help on that? Sorry but I'm somehow desesperate and don't know what to
> do. Actually I'm thinking on not using compat-wireless and nl80211 and get
> back to wireless-extensions.

Does your device use SDIO or SPI?

Luis

2010-10-14 16:45:23

by George News

[permalink] [raw]
Subject: Re: Compat-wireless N900

On 14/10/2010 17:57, Denis 'GNUtoo' Carikli wrote:
> On Thu, 2010-10-14 at 10:24 +0200, George wrote:
>> Hi all,
>>
>> I'm trying to use compat-wireless to upgrade my n900 wireless driver.
>> N900 is using WL1251 wireless driver and the omap1 kernel version used
>> it 2.6.28.
>>
>> The issue is that 2.6.28 does not have implemented many issues for
>> nl80211 netlink family which I wanted to test on my n900.

What I want is to get iw and nl80211 working properly so I can use
netlink sockets to get all the information. Currently I cannot do
anything as every iw command reports operation not supported.

>> I have recompiled the kernel to make cfg80211 and mac80211 modules, so I
>> can use compat-wireless. After that I have compiled compat-wireless by
>> selecting the driver family I need. All done under scratchbox.
>>
>> # scripts/driver-select wl12xx
>> # make KLIB=/lib/modules/2.6.28-myversion \
>> KMODPATH_ARG=/lib/modules/2.6.28-myversion
>> # make KLIB=/lib/modules/2.6.28-myversion \
>> KMODPATH_ARG=/lib/modules/2.6.28-myversion install
>>
>> After that I have installed the new kernel and the drivers in the n900
>> and the system starts. `uname -a` reports I'm using my custom kernel.
>>
>> The problem is that the wireless modules are not working as expected and
>> I cannot get access to my wifi networks. Actually bluetooth is not
>> working as well, as far as I have tested.
>>
>> dmesg reports --> http://pastebin.com/xskKcGnE
> At first sight it seem that you have some mismatch issues,
> Try to compile the maemo 2.6.28 kenrel without the wireless modules or
> replace the wireless modules by the compat-wireless ones.
> (normally the compat-wireless modules should take the precedence but as
> it seem here, it didn't work)

If I compile the kernel withouth the wireless modules then they are not
going to be recognized and compat-wireless will complain that .config
that kernel was compiled without wireless.

On the other hand, what do you mean by replacing the wireless modules?
just cut and paste from compat-wireless.

The issue is that 2.6.28 has nl80211, cfg80211 and mac80211 on their
very stages. I think what will solve my problem is just updating those
modules, but for that I have to change also the driver.

Besides that, the main problemm, as some guys pointed in the IRC
channel, is that wl1251 driver is spi and they need something about the
board interfaces.

> by the way, are you aware of the meego 2.6.35 kernel, it might not be
> complete yet, but may solve some of your problems.

Yes I'm aware of that. I have compiled the kernel and try to load it on
the n900 with maemo rootfs and ... crashes.

Actually I have meego (mmc rootfs) also running on my N900 and wireless
drivers work perfect. The problem is that the gui and develepment SDK
and toolchains are still underdevelopment and I cannot then use
something like the maemo scratchbox.

I have compiled an small application directly on the n900 with meego,
but for larger applications it is not viable.


>
> Denis.
>
>
> --
> 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
>


2010-10-15 05:58:22

by George News

[permalink] [raw]
Subject: Re: Compat-wireless N900

On 14/10/2010 20:03, Luis R. Rodriguez wrote:
> On Thu, Oct 14, 2010 at 11:09 AM, George<[email protected]> wrote:
>
>> I have tried using even insmod and the modules load perfectly but the wlan
>> device doesn't show up.
>
> Then that likely means you are not loading the right module.
>
>> In dmesg nothing is displayed except for the cfg80211 and when I rmmod the
>> module wl1251 (wl1251: removed or similar)
>>
>> I'm still wondering what the hell I have to do.
>
> Are you sure you have the right module?

Yes. The driver is the wl1251 family. As I said in previous posts and
from what some guys in the IRC channel tried to guess, it seems that the
problem might be in that the spi interface is specific for any device,
and in the n900 might be different from the one implemented in
compat-wireless.

I'm a bit suprised about this fact, but they know more than I.

TA

> Luis
> --
> 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
>


2010-10-25 02:03:25

by Kalle Valo

[permalink] [raw]
Subject: Re: Compat-wireless N900

George <[email protected]> writes:

> It seems that it tries to do something but it is not finally done.
> However, as you can see it seems there is no error (at least
> reported). Could it be that spi_read buf is almost everytime reading
> 00 00 00 00?

If you get nothing but zeros back from the device, most likely that
means that it's not powered up properly.

wl1251 chip on n900 is powered up by using a gpio line. I'm worried
that the struct wl12xx_platform_data wl1251 wireless-compat driver
expects (defined in /include/linux/wl12xx.h) doesn't match what the
old maemo kernel provides. Unfortunately I can't remember anymore what
the platform data was like in maemo kernels and there's no easy way
for me to check that right now.

--
Kalle Valo

2010-10-14 18:04:19

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: Compat-wireless N900

On Thu, Oct 14, 2010 at 11:09 AM, George <[email protected]> wrote:

> I have tried using even insmod and the modules load perfectly but the wlan
> device doesn't show up.

Then that likely means you are not loading the right module.

> In dmesg nothing is displayed except for the cfg80211 and when I rmmod the
> module wl1251 (wl1251: removed or similar)
>
> I'm still wondering what the hell I have to do.

Are you sure you have the right module?

Luis

2010-10-20 08:44:54

by Grazvydas Ignotas

[permalink] [raw]
Subject: Re: Compat-wireless N900

On Wed, Oct 20, 2010 at 10:37 AM, George <[email protected]> wrote:
> On 19/10/2010 17:18, Grazvydas Ignotas wrote:
>>>
>>> I have also set the debug ALL mode to see if I get something that can
>>> help
>>> you out on finding the problem.
>>>
>>> When uploading only wl1251 nothing appears in dmesg. But when uploading
>>> module spi, I got the following info: http://pastebin.com/ysdTSDnB
>>
>> You need both wl1251 and spi. This is normal output, you should get
>> wlan0 interface at this point.
>> --
>
> Yes, that is what I was expecting from the begining but although phy0 should
> appear in /sys/class/ieee80211, this directory is empty :(

Hm, maybe try enabling CONFIG_MAC80211_DEBUG* stuff in config.mk in
compat_wireless.

2010-10-20 11:40:55

by George News

[permalink] [raw]
Subject: Re: Compat-wireless N900

On 20/10/2010 10:44, Grazvydas Ignotas wrote:
> On Wed, Oct 20, 2010 at 10:37 AM, George<[email protected]> wrote:
>> On 19/10/2010 17:18, Grazvydas Ignotas wrote:
>>>>
>>>> I have also set the debug ALL mode to see if I get something that can
>>>> help
>>>> you out on finding the problem.
>>>>
>>>> When uploading only wl1251 nothing appears in dmesg. But when uploading
>>>> module spi, I got the following info: http://pastebin.com/ysdTSDnB
>>>
>>> You need both wl1251 and spi. This is normal output, you should get
>>> wlan0 interface at this point.
>>> --
>>
>> Yes, that is what I was expecting from the begining but although phy0 should
>> appear in /sys/class/ieee80211, this directory is empty :(
>
> Hm, maybe try enabling CONFIG_MAC80211_DEBUG* stuff in config.mk in
> compat_wireless.
> --

I have done that and no extra messages appear besides the former ones :(

Any other idea :(

I have look at compat-2.6.28.c and in the comments it says that is for
kernel 2.6.28. However it is not compiled as in the #ifdef it is said to
be < 2.6.28. Is it right? I guess yes, but just for curiosity.

No other idea :(



2010-10-18 19:03:06

by Luciano Coelho

[permalink] [raw]
Subject: Re: Compat-wireless N900

On Mon, 2010-10-18 at 20:41 +0200, ext Luciano Coelho wrote:
> On Mon, 2010-10-18 at 21:04 +0200, ext George wrote:
> > On 18/10/2010 19:21, Luis R. Rodriguez wrote:
> > >> Any help on that? Sorry but I'm somehow desesperate and don't know what to
> > >> do. Actually I'm thinking on not using compat-wireless and nl80211 and get
> > >> back to wireless-extensions.
>
> Getting back to wireless-extensions would certainly be a very desperate
> measure! :P
>
>
> > > Does your device use SDIO or SPI?
> > >
> > > Luis
> >
> > I have tried both and none of them have worked.
>
> On the N900 the wl1271 chip is connected via SPI.
>
> I'll re-read this thread more carefully to see if I can spot anything
> that could help you.

First thing that came to my mind after re-reading the thread... Does the
wl1251 driver work *without* compat-wireless? Where did you get the
kernel that you have compiled?

My initial guess is that the SPI is not configured correctly so the
probe function is never called in the wl1251_spi module and thus the
interface is never created...


--
Cheers,
Luca.


2010-10-18 18:20:57

by George News

[permalink] [raw]
Subject: Re: Compat-wireless N900

On 18/10/2010 19:21, Luis R. Rodriguez wrote:
> On Mon, Oct 18, 2010 at 9:34 AM, George<[email protected]> wrote:
>> On 17/10/2010 11:01, George wrote:
>>>
>>> On 15/10/2010 20:01, Luis R. Rodriguez wrote:
>>>>
>>>> On Thu, Oct 14, 2010 at 11:42 PM, George<[email protected]>
>>>> wrote:
>>>>>
>>>>> On 14/10/2010 20:03, Luis R. Rodriguez wrote:
>>>>>>
>>>>>> On Thu, Oct 14, 2010 at 11:09 AM, George<[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> I have tried using even insmod and the modules load perfectly
>>>>>>> but the wlan device doesn't show up.
>>>>>>
>>>>>> Then that likely means you are not loading the right module.
>>>>>>
>>>>>>> In dmesg nothing is displayed except for the cfg80211 and
>>>>>>> when I rmmod the module wl1251 (wl1251: removed or similar)
>>>>>>>
>>>>>>> I'm still wondering what the hell I have to do.
>>>>>>
>>>>>> Are you sure you have the right module?
>>>>>
>>>>> Yes. The driver is the wl1251 family. As I said in previous posts
>>>>> and from what some guys in the IRC channel tried to guess, it
>>>>> seems that the problem might be in that the spi interface is
>>>>> specific for any device, and in the n900 might be different from
>>>>> the one implemented in compat-wireless.
>>>>
>>>> Heh, nope.
>>>>
>>>>> I'm a bit suprised about this fact, but they know more than I.
>>>>
>>>> Or, we had not yet accommodated yet for the fact that the wl1251
>>>> driver was split out into its own directory from the original
>>>> wl12xx/ directory and no one ever sent a patch to fix this on
>>>> compat-wireless. I just fixed this on today's compat-wireless, so
>>>> you can try that around noon PST time when the new tarball will be
>>>> generated. Ah but there are some pcmcia crap compile issues, we
>>>> just have to remove pcmcia support, well not now, I have other
>>>> stuff to do.
>>
>> I have downloaded compat-wireless-2010-10-17.tar.bz2 and have compiled the
>> code with no problem. I have seen the changes you've made creating modules
>> wl1251, spi and sdio.
>>
>> I have run modprobe spi to upload the modules (also tried sdio) and no way.
>> dmesg doesn't include any message. Below is the one after unloading the
>> modules and uploading them again:
>> rmmod spi wl1251 mac80211 cfg80211 compat_firmware_class
>> modprobe spi
>>
>>>>
>> wl1251: unloaded
>> cfg80211: Calling CRDA to update world regulatory domain
>>>>
>>
>> Below is the output for lsmod. As you can see modules are up and running,
>> but when I execute ifconfig -a no wlan0 device shows up.
>>
>> Nokia-N900:~# lsmod | grep spi
>> spi 4352 0
>> wl1251 75840 1 spi
>> mac80211 212984 2 spi,wl1251
>> crc7 1216 1 spi
>> Nokia-N900:~# lsmod | grep compat
>> compat_firmware_class 8896 1 wl1251
>> compat 10496 2 mac80211,cfg80211
>> v4l1_compat 12100 1 videodev
>> compat_ioctl32 832 1 fmtx_si4713
>> Nokia-N900:~# lsmod | grep wl12
>> wl1251 75840 1 spi
>> compat_firmware_class 8896 1 wl1251
>> mac80211 212984 2 spi,wl1251
>> cfg80211 148904 2 wl1251,mac80211
>>
>> Any help on that? Sorry but I'm somehow desesperate and don't know what to
>> do. Actually I'm thinking on not using compat-wireless and nl80211 and get
>> back to wireless-extensions.
>
> Does your device use SDIO or SPI?
>
> Luis

I have tried both and none of them have worked.

Jorge



2010-10-19 15:19:05

by Grazvydas Ignotas

[permalink] [raw]
Subject: Re: Compat-wireless N900

> I have also set the debug ALL mode to see if I get something that can help
> you out on finding the problem.
>
> When uploading only wl1251 nothing appears in dmesg. But when uploading
> module spi, I got the following info: http://pastebin.com/ysdTSDnB

You need both wl1251 and spi. This is normal output, you should get
wlan0 interface at this point.