Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: [PATCH] compat: fix uevent_suppress on 2.6.29 or older kernels
From: Grazvydas Ignotas @ 2010-04-22 20:47 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Pavel Roskin, linux-wireless
In-Reply-To: <x2l43e72e891004221333he942ee92u3ef4c6994d769694@mail.gmail.com>

On Thu, Apr 22, 2010 at 11:33 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> On Thu, Apr 22, 2010 at 9:42 AM, Pavel Roskin <proski@gnu.org> wrote:
>> On Thu, 2010-04-22 at 09:33 -0700, Luis R. Rodriguez wrote:
>>
>>> How was this compiling for older kernels before then?
>>
>> Compiling was fine, but loading the firmware was failing sometimes.  I'm
>> glad somebody figured it out.  Thank you, Grazvydas!
>
> OK Applied. I'm still puzzled, if it compiled, then that means
> dev_set_uevent_suppress() was being defined somehow for older kernels.

there was already ifdef, old code:
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30))
       dev_set_uevent_suppress(f_dev, 1);
 #endif

new code:
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30))
       dev_set_uevent_suppress(f_dev, 1);
#else
       f_dev->uevent_suppress = 1;
 #endif

>> I would prefer to have replacement functions in compat-2.6.30.h rather
>> than ifdefs in the code.  We might want to resync compat_firmware with
>> the kernel one day, and ifdefs would stand in the way.
>
> Good point, I merged the patch for now given that that file does't
> change that often upstream.
>
>  Luis
>

^ permalink raw reply

* Re: [PATCH] compat: fix uevent_suppress on 2.6.29 or older kernels
From: Pavel Roskin @ 2010-04-22 20:50 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Grazvydas Ignotas, linux-wireless
In-Reply-To: <x2l43e72e891004221333he942ee92u3ef4c6994d769694@mail.gmail.com>

On Thu, 2010-04-22 at 13:33 -0700, Luis R. Rodriguez wrote:
> On Thu, Apr 22, 2010 at 9:42 AM, Pavel Roskin <proski@gnu.org> wrote:
> > On Thu, 2010-04-22 at 09:33 -0700, Luis R. Rodriguez wrote:
> >
> >> How was this compiling for older kernels before then?
> >
> > Compiling was fine, but loading the firmware was failing sometimes.  I'm
> > glad somebody figured it out.  Thank you, Grazvydas!
> 
> OK Applied. I'm still puzzled, if it compiled, then that means
> dev_set_uevent_suppress() was being defined somehow for older kernels.

It's wasn't defined.  The function just wasn't called for older kernels.
"#if" was there; the patch added "#else".

It's a great example how simply-minded commenting out missing functions
can lead to a hard problem, a race condition.

-- 
Regards,
Pavel Roskin

^ permalink raw reply

* Re: [rt2x00] rt3070 fails to initialize with rt2800usb
From: Gertjan van Wingerde @ 2010-04-22 20:51 UTC (permalink / raw)
  To: Walter Goldens; +Cc: Ivo van Doorn, linux-wireless, users
In-Reply-To: <165038.86952.qm@web56808.mail.re3.yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 2839 bytes --]

On 04/22/10 11:05, Walter Goldens wrote:
>>> I think I spoke too early. Must have been a snarl up
>> at my end, because even removing the "#" comment sign before
>> "CONFIG_RT2800USB_RT30XX=y" in config.mk doesn't solve the
>> detection problem.
>>>
>>> I just concluded a test with today's compat-wireless
>> /April 20/, enabled "CONFIG_RT2800USB_RT30XX=y" in
>> config.mk, but rt2800usb doesn't detect the VIDs and
>> subsequently fails to initialize the device. Adding, however
>> the card's VIDs in the upper portion of code appears to
>> solve the case. I welcome you to test yourself.
>>>
>>> The good news is, once we get past the detection
>> debacle the device seems to finally show some life.
>>>
>>
>> I just checked with the compat-wireless of April 18, and
>> with me removing the '#' sign in config.mk does the trick.
>> I can't explain why it doesn't work for you, but I cannot
>> see anything wrong with compat-wireless or with rt2x00
>> inside compat-wireless.
>>
>> --
>> Gertjan.
> 
> The problem remains. I have two cards: rt3070 and rt3071, their respective VIDs are 148f:3070 and 148f:3071. They are both undetected. Just tried "compat-wireless-2010-04-21.tar.bz2" with enabled "CONFIG_RT2800PCI_RT30XX=y" in config.mk - no go.
> 
> The rt2800usb does not pick the VIDs, here is the log from modinfo rt2800usb:
> 

<snip long modinfo output>

> 
> no "3070" or "3071" at all.
> 
> The closest to my VIDs are these here:
> alias:          usb:v148Fp2870d*dc*dsc*dp*ic*isc*ip*
> alias:          usb:v148Fp2770d*dc*dsc*dp*ic*isc*ip*
> 
> So basically the driver only works if I manually add them to code above. Config.mk doesn't seem to change anything.
> 
> The problem as I recall first occurred in late January or some time in February when  someone decided to remove large portion of the VIDs from the code because of driver collisions and I suppose the purpose of it was to reshuffle VID tables and insert some sort of order. Since then, compat-wireless does not automatically provide drivers for the rt307x via rt2800usb. To this point, only manual modification and inserting of the VIDs above solves the problem.
> 
> I'm a 100% certain of this. Even if your cards have different VIDs /not 148f:3070/, just install compat-wireless with enabled rt307X support and see if "modinfo rt2800usb |grep 3070" returns something. Then you'll be able to verify my reports.
> 

As I mentioned, I am not experiencing this. See attached the modinfo output for the modules that I built with a clean compat-wireless package.

The only way I can explain this is that on your system, for some reason, changes to config.mk are not picked up by the build system.

Can you try removing the include/linux/compat_autoconf.h file (from the root of the compat-wireless tree), and then run a make clean, followed by a make.

---
Gertjan.


[-- Attachment #2: modinfo.output --]
[-- Type: text/plain, Size: 10875 bytes --]

filename:       /lib/modules/2.6.32.11-99.fc12.i686.PAE/updates/drivers/net/wireless/rt2x00/rt2800usb.ko
license:        GPL
firmware:       rt2870.bin
description:    Ralink RT2800 USB Wireless LAN driver.
version:        2.3.0
author:         http://rt2x00.serialmonkey.com
srcversion:     C6D05D1B5089EFD2447D150
alias:          usb:v0586p341Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v177Fp0313d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v177Fp0153d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApD522d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApC522d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApA512d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v18E8p6259d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v2019pAB24d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1D4Dp0010d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1D4Dp0002d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v05A6p0101d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1B75p3072d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v100Dp9032d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1737p0079d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1737p0078d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1737p0077d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p0615d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p0605d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1044p800Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v15A9p0010d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v203Dp14A1d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C15d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C13d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C0Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v18C5p0008d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07AAp0042d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07AAp0041d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C11d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C08d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0411p015Dd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0411p0150d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0411p0148d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0411p012Ed*dc*dsc*dp*ic*isc*ip*
alias:          usb:v050Dp825Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3284d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3262d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1761p0B05d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1790d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1761d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1760d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E0Bp9041d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E0Bp9031d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p3572d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p3072d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p3071d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p3070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p2870d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p2770d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p2070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v5A57p0284d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0050d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0041d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp8070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp3572d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp3370d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v04BBp0944d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9801d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v167Bp4001d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1690p0744d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v5A57p5257d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v5A57p0283d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApA703d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApA702d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApA701d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083Ap7511d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0048d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0047d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0042d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0040d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p003Ed*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp3072d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp3071d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp3070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp2070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1A32p0304d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v2019pAB25d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1D4Dp000Ed*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1D4Dp000Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v20B8p8888d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p899Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p871Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p871Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p871Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p870Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p822Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p822Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p822Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p821Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p3871d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p3870d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p3822d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p3821d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p3820d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0789p0166d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v04BBp0948d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v04BBp0947d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v04BBp0945d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1044p800Dd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9709d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9708d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9707d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9706d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9705d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9703d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v203Dp14A9d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v203Dp1480d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v7392p7711d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07FAp7712d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C16d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C0Fd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C0Ed*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C0Dd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C0Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v18C5p0012d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C12d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3321d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3307d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3305d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3273d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1784d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1EDAp2310d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07B8p3072d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07B8p3071d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07B8p3070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0586p3416d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v5A57p0282d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v5A57p0280d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0CDEp0025d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0CDEp0022d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v157Ep300Ed*dc*dsc*dp*ic*isc*ip*
alias:          usb:v177Fp0302d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v15A9p0006d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApB522d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApA618d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083Ap8522d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083Ap7522d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083Ap7512d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083Ap6618d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p003Fd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p003Dd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p003Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0039d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p002Dd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p002Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p002Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0017d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v129Bp1828d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v04E8p2018d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp2870d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp2770d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v2019pED06d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0471p200Fd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p6899d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v100Dp9031d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0789p0164d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0789p0163d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0789p0162d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1737p0071d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1737p0070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p0018d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p0017d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p0013d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p000Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p0009d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p0003d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p0001d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1044p800Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9702d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9701d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v7392p7718d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v7392p7717d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C11d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C09d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07AAp003Fd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07AAp003Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07AAp002Fd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C28d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C27d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C25d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C23d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C09d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C07d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C06d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0411p00E8d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v050Dp815Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v050Dp805Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v050Dp8053d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3247d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1742d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1732d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1731d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1690p0740d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v15C5p0008d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1482p3C09d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07B8p2770d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07B8p2870d*dc*dsc*dp*ic*isc*ip*
depends:        rt2800lib,rt2x00usb,crc-ccitt
vermagic:       2.6.32.11-99.fc12.i686.PAE SMP mod_unload 686 
parm:           nohwcrypt:Disable hardware encryption. (bool)

^ permalink raw reply

* Re: rc80211_minstrel.c:70 WARNING with 2.6.34-rc4
From: Pavel Roskin @ 2010-04-22 21:38 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: Richard Zidlicky, linux-wireless
In-Reply-To: <4BCC9A27.9000104@openwrt.org>

On Mon, 2010-04-19 at 20:00 +0200, Felix Fietkau wrote:

> > can that happen when both ends are configured to a fixed rate of 11M?
> No idea. I've never used fixed-rate. I guess it could, if it uses 11M
> for communicating with a peer that it for some reason did not enable
> this rate for.

I think if there is a legitimate condition when it can happen, we should
not be using WARN_ON.

-- 
Regards,
Pavel Roskin

^ permalink raw reply

* Re: rc80211_minstrel.c:70 WARNING with 2.6.34-rc4
From: Richard Zidlicky @ 2010-04-22 22:15 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Felix Fietkau, linux-wireless
In-Reply-To: <1271972321.12589.2.camel@mj>

On Thu, Apr 22, 2010 at 05:38:41PM -0400, Pavel Roskin wrote:
> On Mon, 2010-04-19 at 20:00 +0200, Felix Fietkau wrote:
> 
> > > can that happen when both ends are configured to a fixed rate of 11M?
> > No idea. I've never used fixed-rate. I guess it could, if it uses 11M
> > for communicating with a peer that it for some reason did not enable
> > this rate for.
> 
> I think if there is a legitimate condition when it can happen, we should
> not be using WARN_ON.

certainly there must be rate limitting before it hits any stable kernel.

Richard


^ permalink raw reply

* update compat drivers,adpter can not be work,4 help.tks
From: SECO @ 2010-04-22 23:25 UTC (permalink / raw)
  To: linux-wireless

Hi,Sir.

   I use BT4,after Updated drivers, the original adpter bcm4311 can not be work.
Not mention WN721 and WN821N .
& log here

root@bt:~# ln -s /usr/src/linux /lib/modules/2.6.30.9/build
root@bt:~# wget
http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2010-04-21.tar.bz2
--2010-04-22 21:21:31--
http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2010-04-21.tar.bz2
Resolving wireless.kernel.org... 78.46.109.217
Connecting to wireless.kernel.org|78.46.109.217|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2424098 (2.3M) [application/octet-stream]
Saving to: `compat-wireless-2010-04-21.tar.bz2'

100%[==================================================================================================================>]
2,424,098   44.0K/s   in 56s

2010-04-22 21:22:29 (42.1 KB/s) - `compat-wireless-2010-04-21.tar.bz2'
saved [2424098/2424098]

root@bt:~# tar -xf compat-wireless-2010-04-21.tar.bz2
root@bt:~# cd compat-wireless-2010-04-21.tar.bz22.make & make install

Code:
oot@bt:~/compat-wireless-2010-04-21# sudo make && sudo make install
make -C /lib/modules/2.6.30.9/build M=/root/compat-wireless-2010-04-21 modules
make[1]: Entering directory `/usr/src/linux-source-2.6.30.9'
....
CC [M]  /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/main.o
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43/main.c: In
function ‘b43_request_firmware’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43/main.c:2271:
warning: format not a string literal and no format arguments
....
root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:465:
warning: ‘b43_nphy_rx_cal_phy_cleanup’ defined but not used
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:488:
warning: ‘b43_nphy_rx_cal_phy_setup’ defined but not used
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:1574:
warning: ‘b43_nphy_bphy_init’ defined but not used
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c: In
function ‘b43_nphy_set_chanspec’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:3376:
warning: ‘tabent_r3’ may be used uninitialized in this function
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c: In
function ‘b43_nphy_cal_tx_iq_lo’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:2631:
warning: ‘last’ may be used uninitialized in this function
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c: In
function ‘b43_nphy_rev2_cal_rx_iq’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:2886:
warning: ‘cur_hpf2’ may be used uninitialized in this function
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:2886:
warning: ‘cur_hpf1’ may be used uninitialized in this function
...
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43/xmit.c: In
function ‘b43_rx’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43/xmit.c:613:
warning: ‘noise’ is deprecated (declared at
/root/compat-wireless-2010-04-21/include/net/mac80211.h:564)
...
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43legacy/xmit.c:
In function ‘b43legacy_rx’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/b43legacy/xmit.c:551:
warning: ‘noise’ is deprecated (declared at
/root/compat-wireless-2010-04-21/include/net/mac80211.h:564)
...
/root/compat-wireless-2010-04-21/drivers/net/wireless/ipw2x00/libipw_wx.c:
In function ‘libipw_wx_set_encodeext’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/ipw2x00/libipw_wx.c:623:
warning: format not a string literal and no format arguments
...
/root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c:
In function ‘iwlagn_gain_computation’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c:145:
warning: comparison of distinct pointer types lacks a cast
...
root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-core.c:
In function ‘__check_bt_coex_active’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-core.c:68:
warning: return from incompatible pointer type
  CC [M]  /root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-eeprom.o
  CC [M]  /root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-hcmd.o
  CC [M]  /root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-power.o
/root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-power.c:
In function ‘__check_no_sleep_autoadjust’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-power.c:58:
warning: return from incompatible pointer type
....
root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/if_sdio.c:
In function ‘if_sdio_probe’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/if_sdio.c:948:
warning: unused variable ‘host’
  CC [M]  /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/if_usb.o
  LD [M]  /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/libertas.o
  LD [M]  /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/usb8xxx.o
  LD [M]  /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/libertas_cs.o
  LD [M]  /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/libertas_sdio.o
  CC [M]  /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas_tf/main.o
/root/compat-wireless-2010-04-21/drivers/net/wireless/libertas_tf/main.c:
In function ‘lbtf_rx’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/libertas_tf/main.c:513:
warning: ‘noise’ is deprecated (declared at
/root/compat-wireless-2010-04-21/include/net/mac80211.h:564)
  CC [M]  /root/compat-wireless-2010-
...
root/compat-wireless-2010-04-21/drivers/net/wireless/p54/txrx.c: In
function ‘p54_rx_data’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/p54/txrx.c:353:
warning: ‘noise’ is deprecated (declared at
/root/compat-wireless-2010-04-21/include/net/mac80211.h:564)
...
/root/compat-wireless-2010-04-21/drivers/net/wireless/rt2x00/rt2x00dev.c:
In function ‘rt2x00lib_rxdone’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/rt2x00/rt2x00dev.c:438:
warning: ‘noise’ is deprecated (declared at
/root/compat-wireless-2010-04-21/include/net/mac80211.h:564)
...
/root/compat-wireless-2010-04-21/drivers/net/wireless/wl12xx/wl1251_rx.c:
In function ‘wl1251_rx_status’:
/root/compat-wireless-2010-04-21/drivers/net/wireless/wl12xx/wl1251_rx.c:81:
warning: ‘noise’ is deprecated (declared at
/root/compat-wireless-2010-04-21/include/net/mac80211.h:564)
...
root/compat-wireless-2010-04-21/net/bluetooth/hidp/core.c: In function
‘hidp_setup_hid’:
/root/compat-wireless-2010-04-21/net/bluetooth/hidp/core.c:872:
warning: assignment from incompatible pointer type
....
/root/compat-wireless-2010-04-21/net/mac80211/main.c: In function
‘__check_ieee80211_disable_40mhz_24ghz’:
/root/compat-wireless-2010-04-21/net/mac80211/main.c:37: warning:
return from incompatible pointer type
...& download ar9271.fw form herer
'[PATCH 0/3] ath9k: add initial ar9271 support' - MARC

Code:

root@bt:~/compat-wireless-2010-04-21# make load
Stoping bluetooth service..
Stopping bluetooth: bluetoothd.
* bluetooth is not running.
Unloading b43...
Unloading ar9170usb...
Unloading lib80211...
FATAL: Module lib80211 is in use.
Unloading btusb...
Loading ipw2100...
Loading ipw2200...
Loading libertas_cs...
Loading usb8xxx...
Loading p54pci...
Loading p54usb...
Loading adm8211...
Loading zd1211rw...
Loading rtl8180...
Loading rtl8187...
Loading p54pci...
Loading p54usb...
Loading iwl3945...
Loading iwlagn...
Loading ath...
Loading ar9170usb...
Loading rtl8180...
Loading rtl8187...
Loading rt2400pci...
Loading rt2500pci...
Loading rt61pci...
Loading rt2500usb...
Loading rt73usb...
Loading rndis_wlan...
Loading at76_usb...
FATAL: Module at76_usb not found.
Loading mwl8k...
Loading mac80211_hwsim...
Loading at76c50x_usb...
Loading bluetooth...
Loading btusb...
Loading l2cap...
Loading sco...
Loading hidp...
Loading rfcomm...
Loading bnep...
Module ath_pci not detected -- this is fine
ath5k loaded successfully
ath9k loaded successfully
Module bcm43xx not detected -- this is fine
Disabling wl ...        [OK]    Module disabled:
/lib/modules/2.6.30.9/kernel/net/wireless/wl.ko
FATAL: Error inserting b43
(/lib/modules/2.6.30.9/updates/drivers/net/wireless/b43/b43.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
b43 loaded successfully
b43legacy loaded successfully
Starting bluetooth service..
Starting bluetooth: bluetoothd.
bluetooth is running.
root@bt:~/compat-wireless-2010-04-21# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:2a:4b:18:68:99
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:16

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:218 errors:0 dropped:0 overruns:0 frame:0
          TX packets:218 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10928 (10.9 KB)  TX bytes:10928 (10.9 KB)

wlan0     Link encap:Ethernet  HWaddr 02:01:20:00:60:00
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@bt:~/compat-wireless-2010-04-21# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11abgn  Mode:Managed  Access Point: Not-Associated
          Tx-Power=20 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

wlan1     IEEE 802.11abgn  Mode:Managed  Access Point: Not-Associated
          Tx-Power=0 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

hwsim0    no wireless extensions.

pan0      no wireless extensions.

root@bt:~/compat-wireless-2010-04-21# ifconfig wlan0 up
root@bt:~/compat-wireless-2010-04-21# iwlist wlan0 scan
wlan0     No scan results

root@bt:~/compat-wireless-2010-04-21# iwlist wlan1 scan
wlan1     Interface doesn't support scanning : Network is down

root@bt:~/compat-wireless-2010-04-21# ifconfig wlan1 up
root@bt:~/compat-wireless-2010-04-21# iwlist wlan1 scan
wlan1     No scan results
root@bt:~/compat-wireless-2010-04-21/scripts# ./wlload.sh
Loading ipw2100...
Loading ipw2200...
Loading libertas_cs...
Loading usb8xxx...
Loading p54pci...
Loading p54usb...
Loading adm8211...
Loading zd1211rw...
Loading rtl8180...
Loading rtl8187...
Loading p54pci...
Loading p54usb...
Loading iwl3945...
Loading iwlagn...
Loading ath...
Loading ar9170usb...
Loading rtl8180...
Loading rtl8187...
Loading rt2400pci...
Loading rt2500pci...
Loading rt61pci...
Loading rt2500usb...
Loading rt73usb...
Loading rndis_wlan...
Loading at76_usb...
FATAL: Module at76_usb not found.
Loading mwl8k...
Loading mac80211_hwsim...
Loading at76c50x_usb...
Module ath_pci not detected -- this is fine
ath5k loaded successfully
ath9k loaded successfully
Module bcm43xx not detected -- this is fine
Module wl not detected -- this is fine
FATAL: Error inserting b43
(/lib/modules/2.6.30.9/updates/drivers/net/wireless/b43/b43.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
b43 loaded successfully
b43legacy loaded successfully
root@bt:~/compat-wireless-2010-04-21# rebootbcm4311 can not be work
after update comapt-wireless u nder bt4 final.
Last edited by Archangel-Amael; Today at 02:49 PM.
 Edit Post    Reply    Reply With Quote
--------------------------------------------------------------------------------
-- 
Best Regards
--------------------
SECO

--------------------------------------------------------------------------------
This information in this e-mail is confidential and may well also be
legally privileged. It is intended solely for the addressee. If you
have received it in error, you are on notice of its status. Please
notify us immediately and then destroy this message. Please do not
copy it or use it for any purposes, or disclose its contents to any
other person: to do so could be a breach of confidence. Thank you for
your co-operation.
--------------------------------------------------------------------------------

^ permalink raw reply

* Re: update compat drivers,adpter can not be work,4 help.tks
From: SECO @ 2010-04-23  0:20 UTC (permalink / raw)
  To: linux-wireless
In-Reply-To: <v2ne4fca08d1004221625o4eb31e79ke1043f0c9a8e686f@mail.gmail.com>

& this is the full log


./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
make -C /lib/modules/2.6.30.9/build M=/root/compat-wireless-2.6.34-rc4 modules
make[1]: Entering directory `/usr/src/linux-source-2.6.30.9'

  WARNING: Symbol version dump /usr/src/linux-source-2.6.30.9/Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /root/compat-wireless-2.6.34-rc4/compat/main.o
....
  CC [M]  /root/compat-wireless-2.6.34-rc4/drivers/net/wireless/mac80211_hwsim.o
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/mac80211_hwsim.c: In funct
ion ‘__check_fake_hw_scan’:
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/mac80211_hwsim.c:37: warni
ng: return from incompatible pointer type
...
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/b43/main.c: In
function ‘b43_request_firmware’:
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/b43/main.c:2271:
warning: format not a string literal and no format
 arguments
...
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/b43/phy_n.c:442:
warning: ‘b43_nphy_rx_cal_phy_cleanup’ defined but
 not used
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/b43/phy_n.c:465:
warning: ‘b43_nphy_rx_cal_phy_setup’ defined but n
ot used
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/b43/phy_n.c:1462:
warning: ‘b43_nphy_bphy_init’ defined but not use
d
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/b43/phy_n.c: In
function ‘b43_nphy_spur_workaround’:
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/b43/phy_n.c:739:
warning: ‘channel’ may be used uninitialized in th
is function
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/b43/phy_n.c: In
function ‘b43_nphy_cal_tx_iq_lo’:
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/b43/phy_n.c:2519:
warning: ‘last’ may be used uninitialized in this
 function
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/b43/phy_n.c: In
function ‘b43_nphy_rev2_cal_rx_iq’:
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/b43/phy_n.c:2774:
warning: ‘cur_hpf2’ may be used uninitialized in
this function
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/b43/phy_n.c:2774:
warning: ‘cur_hpf1’ may be used uninitialized in
this function
...
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/ipw2x00/libipw_wx.c:
In function ‘libipw_wx_set_encodeext’:
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/ipw2x00/libipw_wx.c:623:
warning: format not a string literal and n
o format arguments
  CC [M]  /root/compat-wireless-2.6.34-rc4/drivers/net/wireless/ipw2x00/libipw_geo.o
 ...
  CC [M]  /root/compat-wireless-2.6.34-rc4/drivers/net/wireless/iwlwifi/iwl-5000.o
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/iwlwifi/iwl-5000.c:
In function ‘iwl5000_gain_computation’:
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/iwlwifi/iwl-5000.c:189:
warning: comparison of distinct pointer typ
es lacks a cast
  CC [M]  /root/compat-wireless-2.6.34-rc4/drivers/net/wireless/iwlwifi/iwl-6000.o
  CC [M]  /root/compat-wireless-2.6.34-rc4/drivers/net/wireless/iwlwifi/iwl-1000.o
  CC [M]  /root/compat-wireless-2.6.34-rc4/drivers/net/wireless/iwlwifi/iwl-core.o
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/iwlwifi/iwl-core.c:
In function ‘__check_bt_coex_active’:
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/iwlwifi/iwl-core.c:68:
warning: return from incompatible pointer ty
pe
  CC [M]  /root/compat-wireless-2.6.34-rc4/drivers/net/wireless/iwlwifi/iwl-eeprom.o
  CC [M]  /root/compat-wireless-2.6.34-rc4/drivers/net/wireless/iwlwifi/iwl-hcmd.o
  CC [M]  /root/compat-wireless-2.6.34-rc4/drivers/net/wireless/iwlwifi/iwl-power.o
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/iwlwifi/iwl-power.c:
In function ‘__check_no_sleep_autoadjust’:
/root/compat-wireless-2.6.34-rc4/drivers/net/wireless/iwlwifi/iwl-power.c:58:
warning: return from incompatible pointer t
ype
...
  CC [M]  /root/compat-wireless-2.6.34-rc4/net/bluetooth/hidp/core.o
/root/compat-wireless-2.6.34-rc4/net/bluetooth/hidp/core.c: In
function ‘hidp_setup_hid’:
/root/compat-wireless-2.6.34-rc4/net/bluetooth/hidp/core.c:872:
warning: assignment from incompatible pointer type
  CC [M]  /root/compat-wireless-2.6.34-rc4/net/bluetooth/hidp/sock.o
...
  CC [M]  /root/compat-wireless-2.6.34-rc4/net/mac80211/main.o
/root/compat-wireless-2.6.34-rc4/net/mac80211/main.c: In function
‘__check_ieee80211_disable_40mhz_24ghz’:
/root/compat-wireless-2.6.34-rc4/net/mac80211/main.c:39: warning:
return from incompatible pointer type
  CC [M]  /root/compat-wireless-2.6.34-rc4/net/mac80211/status.o

sudo make install
...
make -C /lib/modules/2.6.30.9/build M=/root/compat-wireless-2.6.34-rc4 modules
make[1]: Entering directory `/usr/src/linux-source-2.6.30.9'

  WARNING: Symbol version dump /usr/src/linux-source-2.6.30.9/Module.symvers
           is missing; modules will have no dependencies and modversions.

.......
 INSTALL /root/compat-wireless-2.6.34-rc4/net/wireless/lib80211_crypt_wep.ko
  DEPMOD  2.6.30.9
make[1]: Leaving directory `/usr/src/linux-source-2.6.30.9'
Updating Ubuntu's initramfs for 2.6.31-wl under /boot/ ...
Cannot find /lib/modules/2.6.31-wl
Will now run update-grub to ensure grub will find the new initramfs ...
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... found: /boot/grub/splash.xpm.gz
Found kernel: /boot/vmlinuz-2.6.30.9
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

depmod will prefer updates/ over kernel/ -- OK!

Currently detected wireless subsystem modules:

/lib/modules/2.6.30.9/updates/net/mac80211/mac80211.ko
/lib/modules/2.6.30.9/updates/net/wireless/cfg80211.ko
/lib/modules/2.6.30.9/updates/net/wireless/lib80211.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/adm8211.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ath/ar9170/ar9170usb.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/at76c50x-usb.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ath/ath.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ath/ath5k/ath5k.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ath/ath9k/ath9k.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/b43/b43.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/b43legacy/b43legacy.ko
/lib/modules/2.6.30.9/updates/drivers/net/usb/cdc_ether.ko
/lib/modules/2.6.30.9/updates/drivers/misc/eeprom/eeprom_93cx6.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ipw2x00/ipw2100.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ipw2x00/ipw2200.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/iwlwifi/iwl3945.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/iwlwifi/iwlagn.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/iwlwifi/iwlcore.ko
/lib/modules/2.6.30.9/updates/net/wireless/lib80211_crypt_ccmp.ko
/lib/modules/2.6.30.9/updates/net/wireless/lib80211_crypt_tkip.ko
/lib/modules/2.6.30.9/updates/net/wireless/lib80211_crypt_wep.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/libertas/libertas.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/libertas/libertas_cs.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/libertas/libertas_sdio.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/libertas_tf/libertas_tf.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/libertas_tf/libertas_tf_usb.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ipw2x00/libipw.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/mac80211_hwsim.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/mwl8k.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/p54/p54common.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/p54/p54pci.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/p54/p54usb.ko
/lib/modules/2.6.30.9/updates/drivers/net/usb/rndis_host.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/rndis_wlan.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/rt2x00/rt2400pci.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/rt2x00/rt2500pci.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/rt2x00/rt2500usb.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/rt2x00/rt2x00lib.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/rt2x00/rt2x00pci.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/rt2x00/rt2x00usb.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/rt2x00/rt61pci.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/rt2x00/rt73usb.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/rtl818x/rtl8180.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/rtl818x/rtl8187.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/libertas/usb8xxx.ko
/lib/modules/2.6.30.9/updates/drivers/net/usb/usbnet.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/zd1211rw/zd1211rw.ko

Currently detected bluetooth subsystem modules:

/lib/modules/2.6.30.9/updates/net/bluetooth/sco.ko
/lib/modules/2.6.30.9/updates/net/bluetooth/l2cap.ko
/lib/modules/2.6.30.9/updates/net/bluetooth/hidp/hidp.ko
/lib/modules/2.6.30.9/updates/net/bluetooth/rfcomm/rfcomm.ko
/lib/modules/2.6.30.9/updates/net/bluetooth/bnep/bnep.ko
/lib/modules/2.6.30.9/updates/drivers/bluetooth/btusb.ko
/lib/modules/2.6.30.9/updates/net/bluetooth/bluetooth.ko

Now run:

sudo make unload to unload both wireless and bluetooth modules
sudo make wlunload to unload wireless modules
sudo make btunload to unload bluetooth modules

And then load the wireless or bluetooth module you need. If unsure reboot.
Alternatively use sudo make load/wlload/btload to load modules

root@bt:~/compat-wireless-2.6.34-rc4#
root@bt:~/compat-wireless-2.6.34-rc4# sudo make unload
Stoping bluetooth service..
Stopping bluetooth: bluetoothd.
* bluetooth is not running.
Unloading ar9170usb...
Unloading rfcomm...
Unloading btusb...
root@bt:~/compat-wireless-2.6.34-rc4# sudo make wlunload
root@bt:~/compat-wireless-2.6.34-rc4# sudo make btunload
Stoping bluetooth service..
Stopping bluetooth: bluetoothd.
* bluetooth is not running.
Unloading rfcomm...
root@bt:~/compat-wireless-2.6.34-rc4#
root@bt:~/compat-wireless-2.6.34-rc4# sudo make load
Stoping bluetooth service..
Stopping bluetooth: bluetoothd.
* bluetooth is not running.
Unloading rfcomm...
Loading ipw2100...
Loading ipw2200...
Loading libertas_cs...
Loading usb8xxx...
Loading p54pci...
Loading p54usb...
Loading adm8211...
Loading zd1211rw...
Loading rtl8180...
Loading rtl8187...
Loading p54pci...
Loading p54usb...
Loading iwl3945...
Loading iwlagn...
Loading ath...
Loading ar9170usb...
Loading rtl8180...
Loading rtl8187...
Loading rt2400pci...
Loading rt2500pci...
Loading rt61pci...
Loading rt2500usb...
Loading rt73usb...
Loading rndis_wlan...
Loading at76_usb...
FATAL: Module at76_usb not found.
Loading mwl8k...
Loading mac80211_hwsim...
Loading at76c50x_usb...
Loading bluetooth...
Loading btusb...
Loading l2cap...
Loading sco...
Loading hidp...
Loading rfcomm...
Loading bnep...
Module ath_pci not detected -- this is fine
ath5k loaded successfully
ath9k loaded successfully
Module bcm43xx not detected -- this is fine
Module wl not detected -- this is fine
FATAL: Error inserting b43
(/lib/modules/2.6.30.9/updates/drivers/net/wireless/b43/b43.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
b43 loaded successfully
b43legacy loaded successfully
Starting bluetooth service..
Starting bluetooth: bluetoothd.
bluetooth is running.


2010/4/23, SECO <secowu@gmail.com>:
> Hi,Sir.
>
>    I use BT4,after Updated drivers, the original adpter bcm4311 can not be
> work.
> Not mention WN721 and WN821N .
> & log here
>
> root@bt:~# ln -s /usr/src/linux /lib/modules/2.6.30.9/build
> root@bt:~# wget
> http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2010-04-21.tar.bz2
> --2010-04-22 21:21:31--
> http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2010-04-21.tar.bz2
> Resolving wireless.kernel.org... 78.46.109.217
> Connecting to wireless.kernel.org|78.46.109.217|:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 2424098 (2.3M) [application/octet-stream]
> Saving to: `compat-wireless-2010-04-21.tar.bz2'
>
> 100%[==================================================================================================================>]
> 2,424,098   44.0K/s   in 56s
>
> 2010-04-22 21:22:29 (42.1 KB/s) - `compat-wireless-2010-04-21.tar.bz2'
> saved [2424098/2424098]
>
> root@bt:~# tar -xf compat-wireless-2010-04-21.tar.bz2
> root@bt:~# cd compat-wireless-2010-04-21.tar.bz22.make & make install
>
> Code:
> oot@bt:~/compat-wireless-2010-04-21# sudo make && sudo make install
> make -C /lib/modules/2.6.30.9/build M=/root/compat-wireless-2010-04-21
> modules
> make[1]: Entering directory `/usr/src/linux-source-2.6.30.9'
> ....
> CC [M]  /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/main.o
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/main.c: In
> function ‘b43_request_firmware’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/main.c:2271:
> warning: format not a string literal and no format arguments
> ....
> root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:465:
> warning: ‘b43_nphy_rx_cal_phy_cleanup’ defined but not used
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:488:
> warning: ‘b43_nphy_rx_cal_phy_setup’ defined but not used
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:1574:
> warning: ‘b43_nphy_bphy_init’ defined but not used
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c: In
> function ‘b43_nphy_set_chanspec’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:3376:
> warning: ‘tabent_r3’ may be used uninitialized in this function
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c: In
> function ‘b43_nphy_cal_tx_iq_lo’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:2631:
> warning: ‘last’ may be used uninitialized in this function
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c: In
> function ‘b43_nphy_rev2_cal_rx_iq’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:2886:
> warning: ‘cur_hpf2’ may be used uninitialized in this function
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/phy_n.c:2886:
> warning: ‘cur_hpf1’ may be used uninitialized in this function
> ...
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/xmit.c: In
> function ‘b43_rx’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43/xmit.c:613:
> warning: ‘noise’ is deprecated (declared at
> /root/compat-wireless-2010-04-21/include/net/mac80211.h:564)
> ...
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43legacy/xmit.c:
> In function ‘b43legacy_rx’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/b43legacy/xmit.c:551:
> warning: ‘noise’ is deprecated (declared at
> /root/compat-wireless-2010-04-21/include/net/mac80211.h:564)
> ...
> /root/compat-wireless-2010-04-21/drivers/net/wireless/ipw2x00/libipw_wx.c:
> In function ‘libipw_wx_set_encodeext’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/ipw2x00/libipw_wx.c:623:
> warning: format not a string literal and no format arguments
> ...
> /root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c:
> In function ‘iwlagn_gain_computation’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c:145:
> warning: comparison of distinct pointer types lacks a cast
> ...
> root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-core.c:
> In function ‘__check_bt_coex_active’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-core.c:68:
> warning: return from incompatible pointer type
>   CC [M]
> /root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-eeprom.o
>   CC [M]
> /root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-hcmd.o
>   CC [M]
> /root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-power.o
> /root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-power.c:
> In function ‘__check_no_sleep_autoadjust’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/iwlwifi/iwl-power.c:58:
> warning: return from incompatible pointer type
> ....
> root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/if_sdio.c:
> In function ‘if_sdio_probe’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/if_sdio.c:948:
> warning: unused variable ‘host’
>   CC [M]
> /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/if_usb.o
>   LD [M]
> /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/libertas.o
>   LD [M]
> /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/usb8xxx.o
>   LD [M]
> /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/libertas_cs.o
>   LD [M]
> /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas/libertas_sdio.o
>   CC [M]
> /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas_tf/main.o
> /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas_tf/main.c:
> In function ‘lbtf_rx’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/libertas_tf/main.c:513:
> warning: ‘noise’ is deprecated (declared at
> /root/compat-wireless-2010-04-21/include/net/mac80211.h:564)
>   CC [M]  /root/compat-wireless-2010-
> ...
> root/compat-wireless-2010-04-21/drivers/net/wireless/p54/txrx.c: In
> function ‘p54_rx_data’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/p54/txrx.c:353:
> warning: ‘noise’ is deprecated (declared at
> /root/compat-wireless-2010-04-21/include/net/mac80211.h:564)
> ...
> /root/compat-wireless-2010-04-21/drivers/net/wireless/rt2x00/rt2x00dev.c:
> In function ‘rt2x00lib_rxdone’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/rt2x00/rt2x00dev.c:438:
> warning: ‘noise’ is deprecated (declared at
> /root/compat-wireless-2010-04-21/include/net/mac80211.h:564)
> ...
> /root/compat-wireless-2010-04-21/drivers/net/wireless/wl12xx/wl1251_rx.c:
> In function ‘wl1251_rx_status’:
> /root/compat-wireless-2010-04-21/drivers/net/wireless/wl12xx/wl1251_rx.c:81:
> warning: ‘noise’ is deprecated (declared at
> /root/compat-wireless-2010-04-21/include/net/mac80211.h:564)
> ...
> root/compat-wireless-2010-04-21/net/bluetooth/hidp/core.c: In function
> ‘hidp_setup_hid’:
> /root/compat-wireless-2010-04-21/net/bluetooth/hidp/core.c:872:
> warning: assignment from incompatible pointer type
> ....
> /root/compat-wireless-2010-04-21/net/mac80211/main.c: In function
> ‘__check_ieee80211_disable_40mhz_24ghz’:
> /root/compat-wireless-2010-04-21/net/mac80211/main.c:37: warning:
> return from incompatible pointer type
> ...& download ar9271.fw form herer
> '[PATCH 0/3] ath9k: add initial ar9271 support' - MARC
>
> Code:
>
> root@bt:~/compat-wireless-2010-04-21# make load
> Stoping bluetooth service..
> Stopping bluetooth: bluetoothd.
> * bluetooth is not running.
> Unloading b43...
> Unloading ar9170usb...
> Unloading lib80211...
> FATAL: Module lib80211 is in use.
> Unloading btusb...
> Loading ipw2100...
> Loading ipw2200...
> Loading libertas_cs...
> Loading usb8xxx...
> Loading p54pci...
> Loading p54usb...
> Loading adm8211...
> Loading zd1211rw...
> Loading rtl8180...
> Loading rtl8187...
> Loading p54pci...
> Loading p54usb...
> Loading iwl3945...
> Loading iwlagn...
> Loading ath...
> Loading ar9170usb...
> Loading rtl8180...
> Loading rtl8187...
> Loading rt2400pci...
> Loading rt2500pci...
> Loading rt61pci...
> Loading rt2500usb...
> Loading rt73usb...
> Loading rndis_wlan...
> Loading at76_usb...
> FATAL: Module at76_usb not found.
> Loading mwl8k...
> Loading mac80211_hwsim...
> Loading at76c50x_usb...
> Loading bluetooth...
> Loading btusb...
> Loading l2cap...
> Loading sco...
> Loading hidp...
> Loading rfcomm...
> Loading bnep...
> Module ath_pci not detected -- this is fine
> ath5k loaded successfully
> ath9k loaded successfully
> Module bcm43xx not detected -- this is fine
> Disabling wl ...        [OK]    Module disabled:
> /lib/modules/2.6.30.9/kernel/net/wireless/wl.ko
> FATAL: Error inserting b43
> (/lib/modules/2.6.30.9/updates/drivers/net/wireless/b43/b43.ko):
> Unknown symbol in module, or unknown parameter (see dmesg)
> b43 loaded successfully
> b43legacy loaded successfully
> Starting bluetooth service..
> Starting bluetooth: bluetoothd.
> bluetooth is running.
> root@bt:~/compat-wireless-2010-04-21# ifconfig
> eth0      Link encap:Ethernet  HWaddr 00:2a:4b:18:68:99
>           UP BROADCAST MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>           Interrupt:16
>
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           inet6 addr: ::1/128 Scope:Host
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>           RX packets:218 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:218 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:10928 (10.9 KB)  TX bytes:10928 (10.9 KB)
>
> wlan0     Link encap:Ethernet  HWaddr 02:01:20:00:60:00
>           UP BROADCAST MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>
> root@bt:~/compat-wireless-2010-04-21# iwconfig
> lo        no wireless extensions.
>
> eth0      no wireless extensions.
>
> wlan0     IEEE 802.11abgn  Mode:Managed  Access Point: Not-Associated
>           Tx-Power=20 dBm
>           Retry  long limit:7   RTS thr:off   Fragment thr:off
>           Encryption key:off
>           Power Management:off
>
> wlan1     IEEE 802.11abgn  Mode:Managed  Access Point: Not-Associated
>           Tx-Power=0 dBm
>           Retry  long limit:7   RTS thr:off   Fragment thr:off
>           Encryption key:off
>           Power Management:off
>
> hwsim0    no wireless extensions.
>
> pan0      no wireless extensions.
>
> root@bt:~/compat-wireless-2010-04-21# ifconfig wlan0 up
> root@bt:~/compat-wireless-2010-04-21# iwlist wlan0 scan
> wlan0     No scan results
>
> root@bt:~/compat-wireless-2010-04-21# iwlist wlan1 scan
> wlan1     Interface doesn't support scanning : Network is down
>
> root@bt:~/compat-wireless-2010-04-21# ifconfig wlan1 up
> root@bt:~/compat-wireless-2010-04-21# iwlist wlan1 scan
> wlan1     No scan results
> root@bt:~/compat-wireless-2010-04-21/scripts# ./wlload.sh
> Loading ipw2100...
> Loading ipw2200...
> Loading libertas_cs...
> Loading usb8xxx...
> Loading p54pci...
> Loading p54usb...
> Loading adm8211...
> Loading zd1211rw...
> Loading rtl8180...
> Loading rtl8187...
> Loading p54pci...
> Loading p54usb...
> Loading iwl3945...
> Loading iwlagn...
> Loading ath...
> Loading ar9170usb...
> Loading rtl8180...
> Loading rtl8187...
> Loading rt2400pci...
> Loading rt2500pci...
> Loading rt61pci...
> Loading rt2500usb...
> Loading rt73usb...
> Loading rndis_wlan...
> Loading at76_usb...
> FATAL: Module at76_usb not found.
> Loading mwl8k...
> Loading mac80211_hwsim...
> Loading at76c50x_usb...
> Module ath_pci not detected -- this is fine
> ath5k loaded successfully
> ath9k loaded successfully
> Module bcm43xx not detected -- this is fine
> Module wl not detected -- this is fine
> FATAL: Error inserting b43
> (/lib/modules/2.6.30.9/updates/drivers/net/wireless/b43/b43.ko):
> Unknown symbol in module, or unknown parameter (see dmesg)
> b43 loaded successfully
> b43legacy loaded successfully
> root@bt:~/compat-wireless-2010-04-21# rebootbcm4311 can not be work
> after update comapt-wireless u nder bt4 final.
> Last edited by Archangel-Amael; Today at 02:49 PM.
>  Edit Post    Reply    Reply With Quote
> --------------------------------------------------------------------------------
> --
> Best Regards
> --------------------
> SECO
>
> --------------------------------------------------------------------------------
> This information in this e-mail is confidential and may well also be
> legally privileged. It is intended solely for the addressee. If you
> have received it in error, you are on notice of its status. Please
> notify us immediately and then destroy this message. Please do not
> copy it or use it for any purposes, or disclose its contents to any
> other person: to do so could be a breach of confidence. Thank you for
> your co-operation.
> --------------------------------------------------------------------------------
>


-- 
Best Regards
--------------------
SECO

--------------------------------------------------------------------------------
This information in this e-mail is confidential and may well also be
legally privileged. It is intended solely for the addressee. If you
have received it in error, you are on notice of its status. Please
notify us immediately and then destroy this message. Please do not
copy it or use it for any purposes, or disclose its contents to any
other person: to do so could be a breach of confidence. Thank you for
your co-operation.
--------------------------------------------------------------------------------

^ permalink raw reply

* Re: bug report: potential ERR_PTR dereference in iwm_debugfs_init()
From: Zhu Yi @ 2010-04-23  2:48 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Intel Linux Wireless, linux-wireless@vger.kernel.org
In-Reply-To: <20100422095929.GS29647@bicker>

On Thu, 2010-04-22 at 17:59 +0800, Dan Carpenter wrote:
> Hi Zhu Yi,
> 
> This is a Smatch bug that has me a little puzzled.
> 
> drivers/net/wireless/iwmc3200wifi/debugfs.c +447 iwm_debugfs_init(26) 
> 	warn: 'iwm->dbg.devdir' dereferencing possible ERR_PTR()
> 
>    440          iwm->dbg.devdir = debugfs_create_dir(devdir, iwm->dbg.rootdir);
>    441          result = PTR_ERR(iwm->dbg.devdir);
>    442          if (IS_ERR(iwm->dbg.devdir) && (result != -ENODEV)) {
>    443                  IWM_ERR(iwm, "Couldn't create devdir: %d\n", result);
>    444                  goto error;
>    445          }
>    446
>    447          iwm->dbg.dbgdir = debugfs_create_dir("debug", iwm->dbg.devdir);
> 
> It looks like "iwm->dbg.devdir" could be ERR_PTR(-ENODEV) on line 447 and 
> that would cause a problem inside debugfs_create_dir().  But at the same 
> time -ENODEV was deliberately singled out as OK from other possible errors 
> that debugfs_create_dir() can return.

We take -ENODEV for debugfs_create_dir if CONFIG_DEBUG_FS is not
enabled. We returns 0 deliberately in this case for rootdir create. I
agree we don't need to check it for the subdirs like we did now. But I
found lots of code don't even check (or don't use IS_ERR to check) the
return value of debugfs_create_dir. Maybe that's more problematic?

Thanks,
-yi


^ permalink raw reply

* Re: [PATCH] mac80211: Fix sta->last_tx_rate setting with no-op rate control devices
From: Juuso Oikarinen @ 2010-04-23  4:51 UTC (permalink / raw)
  To: ext Luis R. Rodriguez
  Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
In-Reply-To: <v2k43e72e891004220928lb5acefbch8397c6a9a56047b5@mail.gmail.com>

Hi,

On Thu, 2010-04-22 at 18:28 +0200, ext Luis R. Rodriguez wrote:
> On Thu, Apr 22, 2010 at 12:27 AM, Juuso Oikarinen
> <juuso.oikarinen@nokia.com> wrote:
> > The sta->last_tx_rate is traditionally updated just before transmitting a
> > frame based on information from the rate control algorithm. However, for
> > hardware drivers with IEEE80211_HW_HAS_RATE_CONTROL this is not performed,
> > as the rate control algorithm is not executed, and because the used rate is
> > not known before the frame has actually been transmitted.
> >
> > This causes atleast a fixed 1Mb/s to be reported to user space. A few other
> > instances of code also rely on this information.
> >
> > Fix this by setting the sta->last_tx_rate in tx_status handling. There, look
> > for last rates entry set by the driver, and use that as value for
> > sta->last_tx_rate.
> >
> > Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
> 
> But the actual rate used is not known, or is it? In those cases would
> it not be better to inform userspace that the information is not
> available?

The point here is to set the last_tx_rate with the actual used rate, as
reported by the hardware (and reported to mac80211 by the driver.)

In case of hardware rate control, mac80211 sets the skb's
info->status.rates array to rates indexes "-1".

The driver sets the rate actually used to transmit the frame into the
same array before calling tx_status, along with retry etc info, and
mac80211 then uses this info to update the sta->last_tx_rate.

So by all means, the actual rate is getting set. Opposite to host
rate-control, the sta->last_tx_rate field is just updated right after
transmitting the frame, instead of just before.

-Juuso

>   Luis



^ permalink raw reply

* Re: [PATCH 7/9] ath9k_htc: Use USB reboot
From: Sujith @ 2010-04-23  4:53 UTC (permalink / raw)
  To: Ming Lei; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
In-Reply-To: <j2nd82e647a1004220721n4668229l51c6e27a21ec9f8c@mail.gmail.com>

Ming Lei wrote:
> The buffer passed to usb hcd should not be allocated from stack since
> it will be DMAed to usb host controller. The 'cmd' should be allocated by
> kmalloc even though it is only 4byte.

Indeed, I'll send an updated patch.

Sujith

^ permalink raw reply

* [PATCH 00/11] ath9k_htc fixes
From: Sujith @ 2010-04-23  4:57 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

John,

This series contains a bunch of fixes for ath9k_htc.
Ming Lei's comment about "ath9k_htc: Use USB reboot"
has also been addressed in this series.

Sujith

Sujith (11):
  ath9k_htc: Simplify TX URB management
  ath9k_htc: Handle device unplug properly
  ath9k_htc: Use multiple register writes
  ath9k_htc: Cancel running timers before disabling HW
  ath9k_hw: Remove pointless ANI deinit
  ath9k_htc: Pass correct private pointer
  ath9k_htc: Use USB reboot
  ath9k_htc: Process command data properly
  ath9k_htc: Increase WMI timeout value
  ath9k_htc: Fix WMI command race
  ath9k_htc: Really fix device hotunplug

 drivers/net/wireless/ath/ath9k/ani.c          |    9 --
 drivers/net/wireless/ath/ath9k/ani.h          |    1 -
 drivers/net/wireless/ath/ath9k/ar9002_hw.c    |    5 +
 drivers/net/wireless/ath/ath9k/hif_usb.c      |  149 ++++++++++++++-----------
 drivers/net/wireless/ath/ath9k/hif_usb.h      |    1 -
 drivers/net/wireless/ath/ath9k/htc.h          |    1 +
 drivers/net/wireless/ath/ath9k/htc_drv_init.c |    8 ++
 drivers/net/wireless/ath/ath9k/htc_drv_main.c |   12 +-
 drivers/net/wireless/ath/ath9k/htc_hst.c      |    5 +-
 drivers/net/wireless/ath/ath9k/hw.c           |    3 -
 drivers/net/wireless/ath/ath9k/wmi.c          |   11 +-
 drivers/net/wireless/ath/ath9k/wmi.h          |    4 +-
 12 files changed, 117 insertions(+), 92 deletions(-)


^ permalink raw reply

* [PATCH 01/11] ath9k_htc: Simplify TX URB management
From: Sujith @ 2010-04-23  4:58 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

This patch simplifies URB management for transmission,
by removing the 'FLUSH' variable (which is not needed,
since we can determine if the URB has been killed by
looking at the URB status), and also handling the STOP
case properly.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/hif_usb.c |  100 ++++++++++++++----------------
 drivers/net/wireless/ath/ath9k/hif_usb.h |    1 -
 2 files changed, 46 insertions(+), 55 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 3091bb3..cee5feb 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -93,14 +93,24 @@ static int hif_usb_send_regout(struct hif_device_usb *hif_dev,
 	return ret;
 }
 
+static inline void ath9k_skb_queue_purge(struct hif_device_usb *hif_dev,
+					 struct sk_buff_head *list)
+{
+	struct sk_buff *skb;
+
+	while ((skb = __skb_dequeue(list)) != NULL) {
+		dev_kfree_skb_any(skb);
+		TX_STAT_INC(skb_dropped);
+	}
+}
+
 static void hif_usb_tx_cb(struct urb *urb)
 {
 	struct tx_buf *tx_buf = (struct tx_buf *) urb->context;
 	struct hif_device_usb *hif_dev = tx_buf->hif_dev;
 	struct sk_buff *skb;
-	bool drop, flush;
 
-	if (!hif_dev)
+	if (!hif_dev || !tx_buf)
 		return;
 
 	switch (urb->status) {
@@ -108,57 +118,47 @@ static void hif_usb_tx_cb(struct urb *urb)
 		break;
 	case -ENOENT:
 	case -ECONNRESET:
-		break;
 	case -ENODEV:
 	case -ESHUTDOWN:
+		/*
+		 * The URB has been killed, free the SKBs
+		 * and return.
+		 */
+		ath9k_skb_queue_purge(hif_dev, &tx_buf->skb_queue);
 		return;
 	default:
 		break;
 	}
 
-	if (tx_buf) {
-		spin_lock(&hif_dev->tx.tx_lock);
-		drop = !!(hif_dev->tx.flags & HIF_USB_TX_STOP);
-		flush = !!(hif_dev->tx.flags & HIF_USB_TX_FLUSH);
-		spin_unlock(&hif_dev->tx.tx_lock);
-
-		while ((skb = __skb_dequeue(&tx_buf->skb_queue)) != NULL) {
-			if (!drop && !flush) {
-				ath9k_htc_txcompletion_cb(hif_dev->htc_handle,
-							  skb, 1);
-				TX_STAT_INC(skb_completed);
-			} else {
-				dev_kfree_skb_any(skb);
-				TX_STAT_INC(skb_dropped);
-			}
-		}
-
-		if (flush)
-			return;
-
-		tx_buf->len = tx_buf->offset = 0;
-		__skb_queue_head_init(&tx_buf->skb_queue);
-
-		spin_lock(&hif_dev->tx.tx_lock);
-		list_del(&tx_buf->list);
-		list_add_tail(&tx_buf->list, &hif_dev->tx.tx_buf);
-		hif_dev->tx.tx_buf_cnt++;
-		if (!drop)
-			__hif_usb_tx(hif_dev); /* Check for pending SKBs */
-		TX_STAT_INC(buf_completed);
+	/* Check if TX has been stopped */
+	spin_lock(&hif_dev->tx.tx_lock);
+	if (hif_dev->tx.flags & HIF_USB_TX_STOP) {
 		spin_unlock(&hif_dev->tx.tx_lock);
-	}
-}
-
-static inline void ath9k_skb_queue_purge(struct hif_device_usb *hif_dev,
-					 struct sk_buff_head *list)
-{
-	struct sk_buff *skb;
-
-	while ((skb = __skb_dequeue(list)) != NULL) {
-		dev_kfree_skb_any(skb);
-		TX_STAT_INC(skb_dropped);
-	}
+		ath9k_skb_queue_purge(hif_dev, &tx_buf->skb_queue);
+		goto add_free;
+	}
+	spin_unlock(&hif_dev->tx.tx_lock);
+
+	/* Complete the queued SKBs. */
+	while ((skb = __skb_dequeue(&tx_buf->skb_queue)) != NULL) {
+		ath9k_htc_txcompletion_cb(hif_dev->htc_handle,
+					  skb, 1);
+		TX_STAT_INC(skb_completed);
+	}
+
+add_free:
+	/* Re-initialize the SKB queue */
+	tx_buf->len = tx_buf->offset = 0;
+	__skb_queue_head_init(&tx_buf->skb_queue);
+
+	/* Add this TX buffer to the free list */
+	spin_lock(&hif_dev->tx.tx_lock);
+	list_move_tail(&tx_buf->list, &hif_dev->tx.tx_buf);
+	hif_dev->tx.tx_buf_cnt++;
+	if (!(hif_dev->tx.flags & HIF_USB_TX_STOP))
+		__hif_usb_tx(hif_dev); /* Check for pending SKBs */
+	TX_STAT_INC(buf_completed);
+	spin_unlock(&hif_dev->tx.tx_lock);
 }
 
 /* TX lock has to be taken */
@@ -178,8 +178,7 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev)
 		return 0;
 
 	tx_buf = list_first_entry(&hif_dev->tx.tx_buf, struct tx_buf, list);
-	list_del(&tx_buf->list);
-	list_add_tail(&tx_buf->list, &hif_dev->tx.tx_pending);
+	list_move_tail(&tx_buf->list, &hif_dev->tx.tx_pending);
 	hif_dev->tx.tx_buf_cnt--;
 
 	tx_skb_cnt = min_t(u16, hif_dev->tx.tx_skb_cnt, MAX_TX_AGGR_NUM);
@@ -548,20 +547,17 @@ free:
 
 static void ath9k_hif_usb_dealloc_tx_urbs(struct hif_device_usb *hif_dev)
 {
-	unsigned long flags;
 	struct tx_buf *tx_buf = NULL, *tx_buf_tmp = NULL;
 
-	list_for_each_entry_safe(tx_buf, tx_buf_tmp, &hif_dev->tx.tx_buf, list) {
+	list_for_each_entry_safe(tx_buf, tx_buf_tmp,
+				 &hif_dev->tx.tx_buf, list) {
+		usb_kill_urb(tx_buf->urb);
 		list_del(&tx_buf->list);
 		usb_free_urb(tx_buf->urb);
 		kfree(tx_buf->buf);
 		kfree(tx_buf);
 	}
 
-	spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
-	hif_dev->tx.flags |= HIF_USB_TX_FLUSH;
-	spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags);
-
 	list_for_each_entry_safe(tx_buf, tx_buf_tmp,
 				 &hif_dev->tx.tx_pending, list) {
 		usb_kill_urb(tx_buf->urb);
@@ -570,10 +566,6 @@ static void ath9k_hif_usb_dealloc_tx_urbs(struct hif_device_usb *hif_dev)
 		kfree(tx_buf->buf);
 		kfree(tx_buf);
 	}
-
-	spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
-	hif_dev->tx.flags &= ~HIF_USB_TX_FLUSH;
-	spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags);
 }
 
 static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev)
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.h b/drivers/net/wireless/ath/ath9k/hif_usb.h
index 7d49a8a..0aca49b 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.h
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.h
@@ -61,7 +61,6 @@ struct tx_buf {
 };
 
 #define HIF_USB_TX_STOP  BIT(0)
-#define HIF_USB_TX_FLUSH BIT(1)
 
 struct hif_usb_tx {
 	u8 flags;
-- 
1.7.0.5


^ permalink raw reply related

* [PATCH 02/11] ath9k_htc: Handle device unplug properly
From: Sujith @ 2010-04-23  4:58 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

When the USB device has been unplugged, there is
no point in trying to send commands to the target.
Fix this by denying all WMI commands in such a case.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/htc.h          |    1 +
 drivers/net/wireless/ath/ath9k/htc_drv_init.c |    8 ++++++++
 drivers/net/wireless/ath/ath9k/wmi.c          |    3 +++
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index c765ff4..b771e20 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -329,6 +329,7 @@ struct htc_beacon_config {
 #define OP_ASSOCIATED     BIT(8)
 #define OP_ENABLE_BEACON  BIT(9)
 #define OP_LED_DEINIT     BIT(10)
+#define OP_UNPLUGGED      BIT(11)
 
 struct ath9k_htc_priv {
 	struct device *dev;
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index a861896..701f2ef 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -744,6 +744,9 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,
 	if (ret)
 		goto err_init;
 
+	/* The device may have been unplugged earlier. */
+	priv->op_flags &= ~OP_UNPLUGGED;
+
 	ret = ath9k_init_device(priv, devid);
 	if (ret)
 		goto err_init;
@@ -760,6 +763,11 @@ err_free:
 void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug)
 {
 	if (htc_handle->drv_priv) {
+
+		/* Check if the device has been yanked out. */
+		if (hotunplug)
+			htc_handle->drv_priv->op_flags |= OP_UNPLUGGED;
+
 		ath9k_deinit_device(htc_handle->drv_priv);
 		ath9k_deinit_wmi(htc_handle->drv_priv);
 		ieee80211_free_hw(htc_handle->drv_priv->hw);
diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c
index dc6c6fc..c688545 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.c
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
@@ -276,6 +276,9 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
 	int time_left, ret = 0;
 	unsigned long flags;
 
+	if (wmi->drv_priv->op_flags & OP_UNPLUGGED)
+		return 0;
+
 	if (!wmi)
 		return -EINVAL;
 
-- 
1.7.0.5


^ permalink raw reply related

* [PATCH 04/11] ath9k_htc: Cancel running timers before disabling HW
From: Sujith @ 2010-04-23  4:58 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/htc_drv_main.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index ec7bcc8..9c9f3e0 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1178,6 +1178,13 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
 		return;
 	}
 
+	/* Cancel all the running timers/work .. */
+	cancel_work_sync(&priv->ps_work);
+	cancel_delayed_work_sync(&priv->ath9k_ani_work);
+	cancel_delayed_work_sync(&priv->ath9k_aggr_work);
+	cancel_delayed_work_sync(&priv->ath9k_led_blink_work);
+	ath9k_led_stop_brightness(priv);
+
 	ath9k_htc_ps_wakeup(priv);
 	htc_stop(priv->htc);
 	WMI_CMD(WMI_DISABLE_INTR_CMDID);
@@ -1189,11 +1196,6 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
 	ath9k_htc_ps_restore(priv);
 	ath9k_htc_setpower(priv, ATH9K_PM_FULL_SLEEP);
 
-	cancel_work_sync(&priv->ps_work);
-	cancel_delayed_work_sync(&priv->ath9k_ani_work);
-	cancel_delayed_work_sync(&priv->ath9k_aggr_work);
-	cancel_delayed_work_sync(&priv->ath9k_led_blink_work);
-	ath9k_led_stop_brightness(priv);
 	skb_queue_purge(&priv->tx_queue);
 
 	/* Remove monitor interface here */
-- 
1.7.0.5


^ permalink raw reply related

* [PATCH 03/11] ath9k_htc: Use multiple register writes
From: Sujith @ 2010-04-23  4:58 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

This patch fixes a code segment in configpciepowersave()
to make use of multiple register writes.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/ar9002_hw.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
index adb33b3..a8a8cdc 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
@@ -408,6 +408,8 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah,
 			REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);
 
 		} else {
+			ENABLE_REGWRITE_BUFFER(ah);
+
 			REG_WRITE(ah, AR_PCIE_SERDES, 0x9248fc00);
 			REG_WRITE(ah, AR_PCIE_SERDES, 0x24924924);
 
@@ -428,6 +430,9 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah,
 
 			/* Load the new settings */
 			REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);
+
+			REGWRITE_BUFFER_FLUSH(ah);
+			DISABLE_REGWRITE_BUFFER(ah);
 		}
 
 		udelay(1000);
-- 
1.7.0.5


^ permalink raw reply related

* [PATCH 05/11] ath9k_hw: Remove pointless ANI deinit
From: Sujith @ 2010-04-23  4:58 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

There is no reason to disable the PHY Error / MIB counters
when the module is being unloaded.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/ani.c |    9 ---------
 drivers/net/wireless/ath/ath9k/ani.h |    1 -
 drivers/net/wireless/ath/ath9k/hw.c  |    3 ---
 3 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index cec62d3..ba8b20f 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -657,12 +657,3 @@ void ath9k_hw_ani_init(struct ath_hw *ah)
 	if (ah->config.enable_ani)
 		ah->proc_phyerr |= HAL_PROCESS_ANI;
 }
-
-void ath9k_hw_ani_disable(struct ath_hw *ah)
-{
-	ath_print(ath9k_hw_common(ah), ATH_DBG_ANI, "Disabling ANI\n");
-
-	ath9k_hw_disable_mib_counters(ah);
-	REG_WRITE(ah, AR_PHY_ERR_1, 0);
-	REG_WRITE(ah, AR_PHY_ERR_2, 0);
-}
diff --git a/drivers/net/wireless/ath/ath9k/ani.h b/drivers/net/wireless/ath/ath9k/ani.h
index 4e1ab94..3356762 100644
--- a/drivers/net/wireless/ath/ath9k/ani.h
+++ b/drivers/net/wireless/ath/ath9k/ani.h
@@ -118,6 +118,5 @@ u32 ath9k_hw_GetMibCycleCountsPct(struct ath_hw *ah, u32 *rxc_pcnt,
 void ath9k_hw_procmibevent(struct ath_hw *ah);
 void ath9k_hw_ani_setup(struct ath_hw *ah);
 void ath9k_hw_ani_init(struct ath_hw *ah);
-void ath9k_hw_ani_disable(struct ath_hw *ah);
 
 #endif /* ANI_H */
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 5a29048..2d18892 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -819,9 +819,6 @@ void ath9k_hw_deinit(struct ath_hw *ah)
 	if (common->state < ATH_HW_INITIALIZED)
 		goto free_hw;
 
-	if (!AR_SREV_9100(ah))
-		ath9k_hw_ani_disable(ah);
-
 	ath9k_hw_setpower(ah, ATH9K_PM_FULL_SLEEP);
 
 free_hw:
-- 
1.7.0.5


^ permalink raw reply related

* [PATCH 07/11] ath9k_htc: Use USB reboot
From: Sujith @ 2010-04-23  4:58 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

So, apparently there is a USB reboot command
that the target accepts. Using this instead of
usb_reset_device() fixes the issue of "descriptor read error"
that pops up on repeated load/unload.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/hif_usb.c |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index cee5feb..31665c5 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -889,6 +889,26 @@ err_alloc:
 	return ret;
 }
 
+static void ath9k_hif_usb_reboot(struct usb_device *udev)
+{
+	u32 reboot_cmd = 0xffffffff;
+	void *buf;
+	int ret;
+
+	buf = kmalloc(4, GFP_KERNEL);
+	if (!buf)
+		return;
+
+	memcpy(buf, &reboot_cmd, 4);
+
+	ret = usb_bulk_msg(udev, usb_sndbulkpipe(udev, USB_REG_OUT_PIPE),
+			   buf, 4, NULL, HZ);
+	if (ret)
+		dev_err(&udev->dev, "ath9k_htc: USB reboot failed\n");
+
+	kfree(buf);
+}
+
 static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
 {
 	struct usb_device *udev = interface_to_usbdev(interface);
@@ -903,7 +923,7 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
 	}
 
 	if (hif_dev->flags & HIF_USB_START)
-		usb_reset_device(udev);
+		ath9k_hif_usb_reboot(udev);
 
 	kfree(hif_dev);
 	dev_info(&udev->dev, "ath9k_htc: USB layer deinitialized\n");
-- 
1.7.0.5


^ permalink raw reply related

* [PATCH 06/11] ath9k_htc: Pass correct private pointer
From: Sujith @ 2010-04-23  4:58 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

In the TX callback, the HTC layer has to pass the
priv pointer that was registered during service initialization.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/htc_hst.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c
index f2dca25..7bf6ce1 100644
--- a/drivers/net/wireless/ath/ath9k/htc_hst.c
+++ b/drivers/net/wireless/ath/ath9k/htc_hst.c
@@ -341,8 +341,9 @@ void ath9k_htc_txcompletion_cb(struct htc_target *htc_handle,
 		skb_pull(skb, sizeof(struct htc_frame_hdr));
 
 		if (endpoint->ep_callbacks.tx) {
-			endpoint->ep_callbacks.tx(htc_handle->drv_priv, skb,
-						  htc_hdr->endpoint_id, txok);
+			endpoint->ep_callbacks.tx(endpoint->ep_callbacks.priv,
+						  skb, htc_hdr->endpoint_id,
+						  txok);
 		}
 	}
 
-- 
1.7.0.5


^ permalink raw reply related

* [PATCH 08/11] ath9k_htc: Process command data properly
From: Sujith @ 2010-04-23  4:58 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

When handling the REGIN callback, processing
the incoming data first should be the preferred
mode of operation. Allocation of a new SKB may fail,
in which case, the URB will not be resubmitted.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/hif_usb.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 31665c5..49b7a89 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -510,9 +510,18 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb)
 	if (likely(urb->actual_length != 0)) {
 		skb_put(skb, urb->actual_length);
 
+		/* Process the command first */
+		ath9k_htc_rx_msg(hif_dev->htc_handle, skb,
+				 skb->len, USB_REG_IN_PIPE);
+
+
 		nskb = alloc_skb(MAX_REG_IN_BUF_SIZE, GFP_ATOMIC);
-		if (!nskb)
-			goto resubmit;
+		if (!nskb) {
+			dev_err(&hif_dev->udev->dev,
+				"ath9k_htc: REG_IN memory allocation failure\n");
+			urb->context = NULL;
+			return;
+		}
 
 		usb_fill_int_urb(urb, hif_dev->udev,
 				 usb_rcvintpipe(hif_dev->udev, USB_REG_IN_PIPE),
@@ -522,12 +531,9 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb)
 		ret = usb_submit_urb(urb, GFP_ATOMIC);
 		if (ret) {
 			kfree_skb(nskb);
-			goto free;
+			urb->context = NULL;
 		}
 
-		ath9k_htc_rx_msg(hif_dev->htc_handle, skb,
-				 skb->len, USB_REG_IN_PIPE);
-
 		return;
 	}
 
-- 
1.7.0.5


^ permalink raw reply related

* [PATCH 09/11] ath9k_htc: Increase WMI timeout value
From: Sujith @ 2010-04-23  4:58 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

Completion of WMI commands take a longer time
on some platforms. Increase the timeout value
to handle this.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/wmi.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/wmi.h b/drivers/net/wireless/ath/ath9k/wmi.h
index 167e15c..765db5f 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.h
+++ b/drivers/net/wireless/ath/ath9k/wmi.h
@@ -126,14 +126,14 @@ void ath9k_wmi_tasklet(unsigned long data);
 	do {								\
 		ret = ath9k_wmi_cmd(priv->wmi, _wmi_cmd, NULL, 0,	\
 				    (u8 *) &cmd_rsp,			\
-				    sizeof(cmd_rsp), HZ);		\
+				    sizeof(cmd_rsp), HZ*2);		\
 	} while (0)
 
 #define WMI_CMD_BUF(_wmi_cmd, _buf)					\
 	do {								\
 		ret = ath9k_wmi_cmd(priv->wmi, _wmi_cmd,		\
 				    (u8 *) _buf, sizeof(*_buf),		\
-				    &cmd_rsp, sizeof(cmd_rsp), HZ);	\
+				    &cmd_rsp, sizeof(cmd_rsp), HZ*2);	\
 	} while (0)
 
 #endif /* WMI_H */
-- 
1.7.0.5


^ permalink raw reply related

* [PATCH 10/11] ath9k_htc: Fix WMI command race
From: Sujith @ 2010-04-23  5:00 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

My patch "ath9k_htc: Handle WMI timeouts properly" introduced
a race condition in WMI command processing. The last issued command
should be stored _before_ issuing a WMI command. Not doing this
would result in the WMI event IRQ dropping correct command responses
as invalid.

Fix this race by storing the command id correctly.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/wmi.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c
index c688545..e23172c 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.c
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
@@ -305,14 +305,14 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
 	wmi->cmd_rsp_buf = rsp_buf;
 	wmi->cmd_rsp_len = rsp_len;
 
-	ret = ath9k_wmi_cmd_issue(wmi, skb, cmd_id, cmd_len);
-	if (ret)
-		goto out;
-
 	spin_lock_irqsave(&wmi->wmi_lock, flags);
 	wmi->last_cmd_id = cmd_id;
 	spin_unlock_irqrestore(&wmi->wmi_lock, flags);
 
+	ret = ath9k_wmi_cmd_issue(wmi, skb, cmd_id, cmd_len);
+	if (ret)
+		goto out;
+
 	time_left = wait_for_completion_timeout(&wmi->cmd_wait, timeout);
 	if (!time_left) {
 		ath_print(common, ATH_DBG_WMI,
-- 
1.7.0.5


^ permalink raw reply related

* [PATCH 11/11] ath9k_htc: Really fix device hotunplug
From: Sujith @ 2010-04-23  5:01 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

All commands to the target are disabled when the device
is unplugged, but a normal module unload has to be
differentiated from this case, as we could still receive
data in the RX endpoint. Fix this by checking if the
device is attached or not.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/hif_usb.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 49b7a89..74872ca 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -922,7 +922,8 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
 		(struct hif_device_usb *) usb_get_intfdata(interface);
 
 	if (hif_dev) {
-		ath9k_htc_hw_deinit(hif_dev->htc_handle, true);
+		ath9k_htc_hw_deinit(hif_dev->htc_handle,
+		    (udev->state == USB_STATE_NOTATTACHED) ? true : false);
 		ath9k_htc_hw_free(hif_dev->htc_handle);
 		ath9k_hif_usb_dev_deinit(hif_dev);
 		usb_set_intfdata(interface, NULL);
-- 
1.7.0.5


^ permalink raw reply related

* Re: [PATCH] compat: fix uevent_suppress on 2.6.29 or older kernels
From: Johannes Berg @ 2010-04-23  5:57 UTC (permalink / raw)
  To: Grazvydas Ignotas; +Cc: Luis R. Rodriguez, Pavel Roskin, linux-wireless
In-Reply-To: <u2j6ed0b2681004221347z78c15832z3e0ff3ea51b4a5a8@mail.gmail.com>

On Thu, 2010-04-22 at 23:47 +0300, Grazvydas Ignotas wrote:
> On Thu, Apr 22, 2010 at 11:33 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> > On Thu, Apr 22, 2010 at 9:42 AM, Pavel Roskin <proski@gnu.org> wrote:
> >> On Thu, 2010-04-22 at 09:33 -0700, Luis R. Rodriguez wrote:
> >>
> >>> How was this compiling for older kernels before then?
> >>
> >> Compiling was fine, but loading the firmware was failing sometimes.  I'm
> >> glad somebody figured it out.  Thank you, Grazvydas!
> >
> > OK Applied. I'm still puzzled, if it compiled, then that means
> > dev_set_uevent_suppress() was being defined somehow for older kernels.
> 
> there was already ifdef, old code:
>  #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30))
>        dev_set_uevent_suppress(f_dev, 1);
>  #endif
> 
> new code:
>  #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30))
>        dev_set_uevent_suppress(f_dev, 1);
> #else
>        f_dev->uevent_suppress = 1;
>  #endif

And the argument is that the new code should be

	dev_set_uevent_suppress(f_dev, 1);

and some header file should provide

static inline void dev_set_uevent_suppress(...)
{
	f_dev->uevent_suppress = 1;
}

which makes perfect sense. Although Luis merged it, a fix would be
useful.

Luis, a patch changing firmware_class.c just entered the tree :P I made
it.

johannes


^ permalink raw reply

* Re: [PATCH] compat: fix uevent_suppress on 2.6.29 or older kernels
From: Luis R. Rodriguez @ 2010-04-23  6:01 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Grazvydas Ignotas, Pavel Roskin, linux-wireless
In-Reply-To: <1272002241.3737.1.camel@jlt3.sipsolutions.net>

On Thu, Apr 22, 2010 at 10:57 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Thu, 2010-04-22 at 23:47 +0300, Grazvydas Ignotas wrote:
>> On Thu, Apr 22, 2010 at 11:33 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
>> > On Thu, Apr 22, 2010 at 9:42 AM, Pavel Roskin <proski@gnu.org> wrote:
>> >> On Thu, 2010-04-22 at 09:33 -0700, Luis R. Rodriguez wrote:
>> >>
>> >>> How was this compiling for older kernels before then?
>> >>
>> >> Compiling was fine, but loading the firmware was failing sometimes.  I'm
>> >> glad somebody figured it out.  Thank you, Grazvydas!
>> >
>> > OK Applied. I'm still puzzled, if it compiled, then that means
>> > dev_set_uevent_suppress() was being defined somehow for older kernels.
>>
>> there was already ifdef, old code:
>>  #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30))
>>        dev_set_uevent_suppress(f_dev, 1);
>>  #endif
>>
>> new code:
>>  #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30))
>>        dev_set_uevent_suppress(f_dev, 1);
>> #else
>>        f_dev->uevent_suppress = 1;
>>  #endif
>
> And the argument is that the new code should be
>
>        dev_set_uevent_suppress(f_dev, 1);
>
> and some header file should provide
>
> static inline void dev_set_uevent_suppress(...)
> {
>        f_dev->uevent_suppress = 1;
> }
>
> which makes perfect sense. Although Luis merged it, a fix would be
> useful.
>
> Luis, a patch changing firmware_class.c just entered the tree :P I made
> it.

Damn you, had to be you :)

  Luis

^ permalink raw reply

* [PATCH] ath9k: Avoid corrupt frames being forwarded to mac80211.
From: Vivek Natarajan @ 2010-04-23  7:10 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Ranga Rao Ravuri

If bit 29 is set, MAC H/W can attempt to decrypt the received aggregate
with WEP or TKIP, eventhough the received frame may be a CRC failed
corrupted frame.

Reported-by: Johan Hovold <johan.hovold@lundinova.se>
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: Ranga Rao Ravuri <ranga.ravuri@atheros.com>
---
 drivers/net/wireless/ath/ath9k/ar5008_initvals.h |    2 +-
 drivers/net/wireless/ath/ath9k/ar9002_initvals.h |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar5008_initvals.h b/drivers/net/wireless/ath/ath9k/ar5008_initvals.h
index cd953f6..025c31a 100644
--- a/drivers/net/wireless/ath/ath9k/ar5008_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar5008_initvals.h
@@ -249,7 +249,7 @@ static const u32 ar5416Common[][2] = {
     { 0x00008258, 0x00000000 },
     { 0x0000825c, 0x400000ff },
     { 0x00008260, 0x00080922 },
-    { 0x00008264, 0xa8000010 },
+    { 0x00008264, 0x88000010 },
     { 0x00008270, 0x00000000 },
     { 0x00008274, 0x40000000 },
     { 0x00008278, 0x003e4180 },
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_initvals.h b/drivers/net/wireless/ath/ath9k/ar9002_initvals.h
index f06313d..dae7f33 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9002_initvals.h
@@ -793,7 +793,7 @@ static const u32 ar9280Common_9280_2[][2] = {
     { 0x00008258, 0x00000000 },
     { 0x0000825c, 0x400000ff },
     { 0x00008260, 0x00080922 },
-    { 0x00008264, 0xa8a00010 },
+    { 0x00008264, 0x88a00010 },
     { 0x00008270, 0x00000000 },
     { 0x00008274, 0x40000000 },
     { 0x00008278, 0x003e4180 },
@@ -1963,7 +1963,7 @@ static const u32 ar9285Common_9285[][2] = {
     { 0x00008258, 0x00000000 },
     { 0x0000825c, 0x400000ff },
     { 0x00008260, 0x00080922 },
-    { 0x00008264, 0xa8a00010 },
+    { 0x00008264, 0x88a00010 },
     { 0x00008270, 0x00000000 },
     { 0x00008274, 0x40000000 },
     { 0x00008278, 0x003e4180 },
@@ -3185,7 +3185,7 @@ static const u32 ar9287Common_9287_1_0[][2] = {
     { 0x00008258, 0x00000000 },
     { 0x0000825c, 0x400000ff },
     { 0x00008260, 0x00080922 },
-    { 0x00008264, 0xa8a00010 },
+    { 0x00008264, 0x88a00010 },
     { 0x00008270, 0x00000000 },
     { 0x00008274, 0x40000000 },
     { 0x00008278, 0x003e4180 },
@@ -4973,7 +4973,7 @@ static const u32 ar9271Common_9271[][2] = {
     { 0x00008258, 0x00000000 },
     { 0x0000825c, 0x400000ff },
     { 0x00008260, 0x00080922 },
-    { 0x00008264, 0xa8a00010 },
+    { 0x00008264, 0x88a00010 },
     { 0x00008270, 0x00000000 },
     { 0x00008274, 0x40000000 },
     { 0x00008278, 0x003e4180 },
-- 
1.7.0.5


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox