Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: [rt2x00] rt3070 fails to initialize with rt2800usb
From: Ivo van Doorn @ 2010-04-17 13:16 UTC (permalink / raw)
  To: Walter; +Cc: linux-wireless, users
In-Reply-To: <79834.90907.qm@web56804.mail.re3.yahoo.com>

On Saturday 17 April 2010, Walter wrote:
> > From: Ivo van Doorn <ivdoorn@gmail.com>
> > Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb
> > To: "Walter" <goldenstranger@yahoo.com>
> > Cc: linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com
> > Date: Saturday, April 17, 2010, 8:45 AM
> > On Saturday 17 April 2010, Walter
> > wrote:
> > > I've been monitoring the community's work for the
> > rt3070 chips and especially your recent success towards
> > improving the driver.
> > > 
> > > I would like to share something with the rt2x00
> > development team which may or may not be known.
> > > 
> > > The rt3070 card I own fails to initialize with the
> > latest (working) compat-wireless release. When I plug the
> > USB card, rt2800usb doesn't automatically load and when I
> > manually modprobe the driver it does not recognize it as
> > well.
> > > 
> > > Looking in to the rt2800usb.c file I found the
> > 'problem'. The VIDs aren't properly set. Mine shows
> > 148f:3070. Although a line is included in the "#ifdef
> > CONFIG_RT2800USB_RT30XX", the module won't initialize the
> > card.
> > > 
> > > I fixed the problem by adding my device here:
> > > 
> > >     /* Ralink */
> > >     { USB_DEVICE(0x148f, 0x2770),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > >     { USB_DEVICE(0x148f, 0x2870),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > >     /* Samsung */ 
> > > 
> > > which now looks like:
> > > 
> > >     /* Ralink */
> > >     { USB_DEVICE(0x148f, 0x2770),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > >     { USB_DEVICE(0x148f, 0x2870),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > >         {
> > USB_DEVICE(0x148f, 0x3070),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > >     /* Samsung */
> > > 
> > > This pertains to the rt3071 as well.
> > 
> > That USB ID is already known, did you compile the driver
> > with support
> > for CONFIG_RT2800USB_RT30XX enabled?
> > 
> > Ivo
> 
> Yes, compat-wireless ships with ''CONFIG_RT2800USB_RT30XX=y'' in config.mk, but the card's VIDs aren't shown in modinfo rt2800usb when compiled, thus the module doesn't recognize the card at all. The only workaround I rustled up is the above mentioned one. 

Thats odd, in compar-wireless, it already contains the lines:

#ifdef CONFIG_RT2800USB_RT30XX
	<..snip..>
	/* Ralink */
	{ USB_DEVICE(0x148f, 0x2070), USB_DEVICE_DATA(&rt2800usb_ops) },
	{ USB_DEVICE(0x148f, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) },
	{ USB_DEVICE(0x148f, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) },
	{ USB_DEVICE(0x148f, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) },
	<..snip..>
#endif

So adding the USB ID does not need to be added.

Ivo

^ permalink raw reply

* Re: [rt2x00] rt3070 fails to initialize with rt2800usb
From: Walter @ 2010-04-17 13:09 UTC (permalink / raw)
  To: Ivo van Doorn, linux-wireless, users
In-Reply-To: <201004171445.13785.IvDoorn@gmail.com>

> From: Ivo van Doorn <ivdoorn@gmail.com>
> Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb
> To: "Walter" <goldenstranger@yahoo.com>
> Cc: linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com
> Date: Saturday, April 17, 2010, 8:45 AM
> On Saturday 17 April 2010, Walter
> wrote:
> > I've been monitoring the community's work for the
> rt3070 chips and especially your recent success towards
> improving the driver.
> > 
> > I would like to share something with the rt2x00
> development team which may or may not be known.
> > 
> > The rt3070 card I own fails to initialize with the
> latest (working) compat-wireless release. When I plug the
> USB card, rt2800usb doesn't automatically load and when I
> manually modprobe the driver it does not recognize it as
> well.
> > 
> > Looking in to the rt2800usb.c file I found the
> 'problem'. The VIDs aren't properly set. Mine shows
> 148f:3070. Although a line is included in the "#ifdef
> CONFIG_RT2800USB_RT30XX", the module won't initialize the
> card.
> > 
> > I fixed the problem by adding my device here:
> > 
> >     /* Ralink */
> >     { USB_DEVICE(0x148f, 0x2770),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> >     { USB_DEVICE(0x148f, 0x2870),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> >     /* Samsung */ 
> > 
> > which now looks like:
> > 
> >     /* Ralink */
> >     { USB_DEVICE(0x148f, 0x2770),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> >     { USB_DEVICE(0x148f, 0x2870),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> >         {
> USB_DEVICE(0x148f, 0x3070),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> >     /* Samsung */
> > 
> > This pertains to the rt3071 as well.
> 
> That USB ID is already known, did you compile the driver
> with support
> for CONFIG_RT2800USB_RT30XX enabled?
> 
> Ivo

Yes, compat-wireless ships with ''CONFIG_RT2800USB_RT30XX=y'' in config.mk, but the card's VIDs aren't shown in modinfo rt2800usb when compiled, thus the module doesn't recognize the card at all. The only workaround I rustled up is the above mentioned one. 


      

^ permalink raw reply

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

On Saturday 17 April 2010, Walter wrote:
> I've been monitoring the community's work for the rt3070 chips and especially your recent success towards improving the driver.
> 
> I would like to share something with the rt2x00 development team which may or may not be known.
> 
> The rt3070 card I own fails to initialize with the latest (working) compat-wireless release. When I plug the USB card, rt2800usb doesn't automatically load and when I manually modprobe the driver it does not recognize it as well.
> 
> Looking in to the rt2800usb.c file I found the 'problem'. The VIDs aren't properly set. Mine shows 148f:3070. Although a line is included in the "#ifdef CONFIG_RT2800USB_RT30XX", the module won't initialize the card.
> 
> I fixed the problem by adding my device here:
> 
> 	/* Ralink */
> 	{ USB_DEVICE(0x148f, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) },
> 	{ USB_DEVICE(0x148f, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) },
> 	/* Samsung */ 
> 
> which now looks like:
> 
> 	/* Ralink */
> 	{ USB_DEVICE(0x148f, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) },
> 	{ USB_DEVICE(0x148f, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) },
>         { USB_DEVICE(0x148f, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) },
> 	/* Samsung */
> 
> This pertains to the rt3071 as well.

That USB ID is already known, did you compile the driver with support
for CONFIG_RT2800USB_RT30XX enabled?

Ivo

^ permalink raw reply

* [rt2x00] rt3070 fails to initialize with rt2800usb
From: Walter @ 2010-04-17 12:26 UTC (permalink / raw)
  To: linux-wireless, users

I've been monitoring the community's work for the rt3070 chips and especially your recent success towards improving the driver.

I would like to share something with the rt2x00 development team which may or may not be known.

The rt3070 card I own fails to initialize with the latest (working) compat-wireless release. When I plug the USB card, rt2800usb doesn't automatically load and when I manually modprobe the driver it does not recognize it as well.

Looking in to the rt2800usb.c file I found the 'problem'. The VIDs aren't properly set. Mine shows 148f:3070. Although a line is included in the "#ifdef CONFIG_RT2800USB_RT30XX", the module won't initialize the card.

I fixed the problem by adding my device here:

	/* Ralink */
	{ USB_DEVICE(0x148f, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) },
	{ USB_DEVICE(0x148f, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) },
	/* Samsung */ 

which now looks like:

	/* Ralink */
	{ USB_DEVICE(0x148f, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) },
	{ USB_DEVICE(0x148f, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) },
        { USB_DEVICE(0x148f, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) },
	/* Samsung */

This pertains to the rt3071 as well.

Regards.


      

^ permalink raw reply

* Re: [PATCH] wl1251: add support for dedicated IRQ line
From: Grazvydas Ignotas @ 2010-04-17 11:00 UTC (permalink / raw)
  To: Kalle Valo; +Cc: John W. Linville, linux-wireless, Bob Copeland
In-Reply-To: <87633qmylr.fsf@purkki.valot.fi>

On Sat, Apr 17, 2010 at 8:34 AM, Kalle Valo <kvalo@adurom.com> wrote:
> Grazvydas Ignotas <notasas@gmail.com> writes:
>
>> wl1251 has WLAN_IRQ pin for generating interrupts to host processor,
>> which is mandatory in SPI mode and optional in SDIO mode (which can
>> use SDIO interrupts instead). However TI recommends using deditated
>> IRQ line for SDIO too.
>>
>> Add support for using dedicated interrupt line with SDIO, but also leave
>> ability to switch to SDIO interrupts in case it's needed.
>
> For spi the irq number delivered through struct spi_device, I assume
> sdio didn't have any similar mechanism and that's why you added it to
> struct wl12xx_platform_data.

Yes, SDIO currently only reads the card itself for information and
doesn't use any board data at all. This is enough for typical SDIO
card but not in this case, where we have additional signals for power
control and IRQ.

> Only minor comment is that it would be better to mention also in the
> code that the gpio interrupt is the recommended method. But I can add
> that comment later.

Will have that in mind too if I send something more, thanks.

>> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
>
> Acked-by: Kalle Valo <kvalo@adurom.com>
>
> Thank you again.
>
> --
> Kalle Valo
>

^ permalink raw reply

* Re: [PATCH v2 resend 1/3] mac80211: explicitly disable/enable QoS
From: Johannes Berg @ 2010-04-17  9:04 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: linux-wireless, Reinette Chatre, John W. Linville, wey-yi.w.guy
In-Reply-To: <1271338982-3157-1-git-send-email-sgruszka@redhat.com>

On Thu, 2010-04-15 at 15:43 +0200, Stanislaw Gruszka wrote:

> @@ -609,6 +613,7 @@ enum ieee80211_conf_changed {
>  	IEEE80211_CONF_CHANGE_CHANNEL		= BIT(6),
>  	IEEE80211_CONF_CHANGE_RETRY_LIMITS	= BIT(7),
>  	IEEE80211_CONF_CHANGE_IDLE		= BIT(8),
> +	IEEE80211_CONF_CHANGE_QOS		= BIT(9),

Please send a doc change patch for this.

johannes


^ permalink raw reply

* Re: [PATCH 2/2] iwmc3200wifi: check sparse endianness annotations
From: Johannes Berg @ 2010-04-17  8:20 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Zhu Yi, linville, linux-wireless, Samuel Ortiz
In-Reply-To: <1271453698.16507.26.camel@mj>

On Fri, 2010-04-16 at 17:34 -0400, Pavel Roskin wrote:
> On Fri, 2010-04-16 at 22:57 +0200, Johannes Berg wrote:
> 
> > We've done it on other drivers -- we can't do it for all of the kernel
> > because that would drown people in warnings, but for those drivers that
> > _should_ be clean it ought to be fine to add it by default.
> 
> Oh, I see, there are several precedents.
> 
> That said, there are not many warnings added by __CHECK_ENDIAN__.  In my
> x86_64 configuration, sparse produces 2316 lines of output without
> __CHECK_ENDIAN__ and 3526 lines with __CHECK_ENDIAN__, a 52% increase.
> That's hardly "drowning".

Other people feel differently by that, evidenced by the "lack of
enthusiasm" for adding endian checking by default.

> Also, the warnings about endianess are perhaps the most useful of all
> sparse warnings.

I agree, so I want them whenever I run sparse on code I own.

However, I'm simply not willing to fight for making endian checking
default kernel-wide to achieve that goal. You may disagree, and you're
welcome to pick that fight. Until then, please let us do what gets our
job done.

johannes


^ permalink raw reply

* Resolved, was Re: Problem: Regression with iwl 4965 since 2.6.32.10
From: U Kuehn @ 2010-04-17  6:51 UTC (permalink / raw)
  To: reinette chatre; +Cc: Intel Linux Wireless, linux-wireless@vger.kernel.org
In-Reply-To: <1271195092.14052.8010.camel@rchatre-DESK>

Dear Reinette,

reinette chatre wrote:
>> In my usual setup, I connect to an WPA2-configured access point using
>> wpa_supplicant. Starting with 2.6.32.10 networking stops to work shortly
>> after the 4-way handshake. After the next re-keying it works again for a
>> short time.
>>
>> I tracked the problem down to commit
>> 44af042e42f2231579ea8ef7586d3789d198f609.
>>
> 
> Two more patches following up on the one you mention are on their way to
> stable. If you want to pick them up earlier they are:
> iwlwifi: counting number of tfds can be free for 4965
> iwlwifi: need check for valid qos packet before free
> 
> In fact ... I just checked and they are both already queued for 2.6.32
> so you can just pick them up from the 2.6.32 stable queue
> ( http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git;a=tree;f=queue-2.6.32;hb=HEAD )
> 
> ... in fact ... I suggest you take all the iwlwifi patches there.
> 
Thanks, that did indeed help. With the four patches
	iwlwifi-counting-number-of-tfds-can-be-free-for-4965.patch
	iwlwifi-fix-nfreed.patch
	iwlwifi-need-check-for-valid-qos-packet-before-free.patch
	iwlwifi-range-checking-issue.patch
applied, 2.6.32.11 works again reliably, as far as I could test so far.

Best regards,
Ulrich



^ permalink raw reply

* Re: [PATCH] wl1251: add support for dedicated IRQ line
From: Kalle Valo @ 2010-04-17  5:34 UTC (permalink / raw)
  To: Grazvydas Ignotas; +Cc: John W. Linville, linux-wireless, Bob Copeland
In-Reply-To: <1271413332-2979-1-git-send-email-notasas@gmail.com>

Grazvydas Ignotas <notasas@gmail.com> writes:

> wl1251 has WLAN_IRQ pin for generating interrupts to host processor,
> which is mandatory in SPI mode and optional in SDIO mode (which can
> use SDIO interrupts instead). However TI recommends using deditated
> IRQ line for SDIO too.
>
> Add support for using dedicated interrupt line with SDIO, but also leave
> ability to switch to SDIO interrupts in case it's needed.

For spi the irq number delivered through struct spi_device, I assume
sdio didn't have any similar mechanism and that's why you added it to
struct wl12xx_platform_data.

Only minor comment is that it would be better to mention also in the
code that the gpio interrupt is the recommended method. But I can add
that comment later.

> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>

Acked-by: Kalle Valo <kvalo@adurom.com>

Thank you again.

-- 
Kalle Valo

^ permalink raw reply

* IRQ debugging with ath9k
From: Luis R. Rodriguez @ 2010-04-17  2:34 UTC (permalink / raw)
  To: Felix Fietkau, Vasanth Thiagarajan; +Cc: linux-wireless

Often, the number of IRQs is not really something that will give you
good visibility to what's going on in the hardware. I typically want
to number of IRQs since my last monitor, the average and rate of
change. This is a pain in the ass to write in the driver so its better
to just suck out what you need from debugfs and then parse it at your
liking. I've written a perl script to do just this for IRQs for ath9k,
I figured I'll start stashing these things into a git repo for others
who might make some use of of this. Here it is:

git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/ath-utils.git

If you have something similar to parse debugfs send it my way, I can
stash it there. Similar scripts for parsing xmit stuff might come in
handy as well.

  Luis

^ permalink raw reply

* Re: compat-wireless doesn't compile against 2.6.32 on Ubuntu beta
From: Luis R. Rodriguez @ 2010-04-16 23:29 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Andrey Semyonov, linux-wireless
In-Reply-To: <1271454610.16507.33.camel@mj>

On Fri, Apr 16, 2010 at 2:50 PM, Pavel Roskin <proski@gnu.org> wrote:
> On Thu, 2010-04-15 at 21:11 +0400, Andrey Semyonov wrote:
>> I get this when trying to compile current drivers:
>>
>>
>> /usr/local/src/compat-wireless-2010-04-14# make
>> make -C /lib/modules/2.6.32-19-generic/build
>> M=/usr/local/src/compat-wireless-2010-04-14 modules
>> make[1]: Вход в каталог `/usr/src/linux-headers-2.6.32-19-generic'
>>  CC [M]  /usr/local/src/compat-wireless-2010-04-14/net/mac80211/main.o
>> /usr/local/src/compat-wireless-2010-04-14/net/mac80211/main.c: In
>> function 'ieee80211_alloc_hw':
>> /usr/local/src/compat-wireless-2010-04-14/net/mac80211/main.c:394:
>> error: implicit declaration of function '__hw_addr_init'
>
> I confirm the problem.  Basically, the bleeding edge compat-wireless is
> useless now.

Right, I've noted in other threads what needs backport:

22bedad3ce112d5ca1eaf043d4990fa2ed698c87 net: convert multicast list
to list_head
2f787b0b76bf5de2eaa3ca3a29d89123ae03c856 mac80211: Ensure initializing
private mc_list in prepare_multicast().

These just need to be reverted through an ifdef, just havent' had time
to do it yet.

> Perhaps we need a check to to prevent broken tarballs from
> being uploaded.  It's better than force users to search for the last
> working tarball.

Indeed, I once suggested to do this on johill's box but he had little
space, I now moved the tarball building to orbit and we have plenty of
space there so we could do the automatic compile checks against all
stable kernels we support prior to uploading. Just need to get that
done.

  Luis

^ permalink raw reply

* Re: [zd1211-devs] timeout in zd1211rw with zotac mini-itx (geforce 9300)
From: Tsuwei Chen @ 2010-04-16 22:38 UTC (permalink / raw)
  To: Hin-Tak Leung; +Cc: zd1211-devs, linux-wireless
In-Reply-To: <30211.6195.qm@web23101.mail.ird.yahoo.com>

Gábor and Hin-Tak,

Thanks for the quick reply. I thought about the current draw on the
USB bus so I did try using the hub that is built into my dell monitor
and had the same problem.

I am going to try out the 2.6.32 today. I would report back the result
once I got it.

Also, some time I notice there is an 'address leak' with da_user=1.
This happens when I unplugged the adapter. The systems seems still
holding up well. Just wonder if this would be a concern.

Thanks,
Tsuwei

On Fri, Apr 16, 2010 at 3:26 PM, Hin-Tak Leung <hintak_leung@yahoo.co.uk> wrote:
> I suspect it is just poor hardware. The more power-drawing devices you have got, the current/power available to each can drop, and some devices are more sensitive to drop in voltage than others. That seems to be the obvious conclusion - the more bus-powered devices plugged in, the more likely the wireless device fails to initialise.
>
> You probably would find that you will need a independently-powered hub (i.e. a USB hub which has its own power-plug that you need to plug into the mains) for it to work reliably, since your motherboard doesn't seem to be able to do it.
>
> --- On Fri, 16/4/10, Tsuwei Chen <tsuwei@gmail.com> wrote:
>
>> From: Tsuwei Chen <tsuwei@gmail.com>
>> Subject: [zd1211-devs] timeout in zd1211rw with zotac mini-itx (geforce 9300)
>> To: zd1211-devs@lists.sourceforge.net
>> Cc: linux-wireless@vger.kernel.org
>> Date: Friday, 16 April, 2010, 21:34
>> Has anyone use the zd1211 usb adapter
>> with mini-itx board based on
>> geforce 9300? I have been experience some annoying issues
>> ever since I
>> got this motherboard. The problem is that sometime the card
>> just
>> cannot be switched on. It complains about ioread32() error
>> -110. And I
>> have spent a few days and try a few different combination,
>> and here is
>> what I have found so far:
>>
>> 1, with 1 wifi adapter directly plugged into the board, the
>> wifi
>> adapter works fine most of the time (have seen a couple
>> failure, but
>> is hard to reproduce)
>> 2. with 1 wifi adapter, plugged in through a USB hub, the
>> driver
>> complains ioread32 error. I've try 2 USB hubs: a cheap
>> 4-port USB
>> dongle and also the USB hubs built into my DELL monitor.
>> Both showed
>> the same problem.
>> 3. If I plugged in 2 wifi adapters directly to the board,
>> more than
>> 50% of chance one of the wifi adapter would fail during the
>> 'ifconifg
>> up'.
>>
>> I tried to dig our more on this. I am using kernel
>> 2.6.24-26 (ubuntu).
>> I had turned on the debug message output and I have traced
>> out that
>> the failure was first detected in the zd_mac_open().
>> Probably around
>> the call to zd_chip_switch_radio_on(). The error message is
>> printed in
>> the zd_usb_ioread16v(), and probably indicate the driver
>> is
>> experiencing a timeout while it is trying to read the
>> register from
>> the adapter.
>>
>> What exactly does this mean? Why adding a usb hub cause
>> such a huge
>> differnce? Has anyone experienced similar problem before?
>> Any pointer
>> that can help me solve this problem is appreciated.
>>
>> BTW, I never had this problem before when I was still using
>> a regular
>> HP desktop PC, even with the same version of kernel and
>> same USB hub.
>> I switched to mini-itx because I am building a small
>> system. So if
>> anyone is currently using this adapter with a mini-ITX
>> board, please
>> also let me know which model you use.
>>
>> TIA,
>> Tsuwei
>>
>> ------------------------------------------------------------------------------
>> Download Intel® Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling,
>> find bugs
>> proactively, and fine-tune applications for parallel
>> performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> Zd1211-devs mailing list - http://zd1211.wiki.sourceforge.net/
>> Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs
>>
>
>
>
>

^ permalink raw reply

* Re: [zd1211-devs] timeout in zd1211rw with zotac mini-itx (geforce 9300)
From: Hin-Tak Leung @ 2010-04-16 22:26 UTC (permalink / raw)
  To: zd1211-devs, Tsuwei Chen; +Cc: linux-wireless
In-Reply-To: <k2r8108ad761004161334x894f9298xf3728846ff69b36b@mail.gmail.com>

I suspect it is just poor hardware. The more power-drawing devices you have got, the current/power available to each can drop, and some devices are more sensitive to drop in voltage than others. That seems to be the obvious conclusion - the more bus-powered devices plugged in, the more likely the wireless device fails to initialise.

You probably would find that you will need a independently-powered hub (i.e. a USB hub which has its own power-plug that you need to plug into the mains) for it to work reliably, since your motherboard doesn't seem to be able to do it. 

--- On Fri, 16/4/10, Tsuwei Chen <tsuwei@gmail.com> wrote:

> From: Tsuwei Chen <tsuwei@gmail.com>
> Subject: [zd1211-devs] timeout in zd1211rw with zotac mini-itx (geforce 9300)
> To: zd1211-devs@lists.sourceforge.net
> Cc: linux-wireless@vger.kernel.org
> Date: Friday, 16 April, 2010, 21:34
> Has anyone use the zd1211 usb adapter
> with mini-itx board based on
> geforce 9300? I have been experience some annoying issues
> ever since I
> got this motherboard. The problem is that sometime the card
> just
> cannot be switched on. It complains about ioread32() error
> -110. And I
> have spent a few days and try a few different combination,
> and here is
> what I have found so far:
> 
> 1, with 1 wifi adapter directly plugged into the board, the
> wifi
> adapter works fine most of the time (have seen a couple
> failure, but
> is hard to reproduce)
> 2. with 1 wifi adapter, plugged in through a USB hub, the
> driver
> complains ioread32 error. I've try 2 USB hubs: a cheap
> 4-port USB
> dongle and also the USB hubs built into my DELL monitor.
> Both showed
> the same problem.
> 3. If I plugged in 2 wifi adapters directly to the board,
> more than
> 50% of chance one of the wifi adapter would fail during the
> 'ifconifg
> up'.
> 
> I tried to dig our more on this. I am using kernel
> 2.6.24-26 (ubuntu).
> I had turned on the debug message output and I have traced
> out that
> the failure was first detected in the zd_mac_open().
> Probably around
> the call to zd_chip_switch_radio_on(). The error message is
> printed in
> the zd_usb_ioread16v(), and probably indicate the driver
> is
> experiencing a timeout while it is trying to read the
> register from
> the adapter.
> 
> What exactly does this mean? Why adding a usb hub cause
> such a huge
> differnce? Has anyone experienced similar problem before?
> Any pointer
> that can help me solve this problem is appreciated.
> 
> BTW, I never had this problem before when I was still using
> a regular
> HP desktop PC, even with the same version of kernel and
> same USB hub.
> I switched to mini-itx because I am building a small
> system. So if
> anyone is currently using this adapter with a mini-ITX
> board, please
> also let me know which model you use.
> 
> TIA,
> Tsuwei
> 
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling,
> find bugs
> proactively, and fine-tune applications for parallel
> performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Zd1211-devs mailing list - http://zd1211.wiki.sourceforge.net/
> Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs
> 


      

^ permalink raw reply

* Re: Compiling ar9170 on 2.6.30
From: Pavel Roskin @ 2010-04-16 22:10 UTC (permalink / raw)
  To: Eric Siegel; +Cc: linux-wireless
In-Reply-To: <4BC776F4.80600@gmail.com>

On Thu, 2010-04-15 at 16:28 -0400, Eric Siegel wrote:
> I was trying to compile ar9170 from today's tarball, and I got a compile
> error.
> ar9170/main.c:2060: error: expected ‘;’ before ‘mchash’

The bleeding edge compat-wireless is currently broken.  Please use
compat-wireless-2.6.34-rc4.tar.bz2 from
http://wireless.kernel.org/en/users/Download/stable/

-- 
Regards,
Pavel Roskin

^ permalink raw reply

* Re: [PATCH v3 42/97] ath9k: Make bf_desc of ath_buf opaque
From: Felix Fietkau @ 2010-04-16 22:09 UTC (permalink / raw)
  To: Pavel Roskin
  Cc: Luis R. Rodriguez, linville, linux-wireless,
	Vasanthakumar Thiagarajan
In-Reply-To: <1271455259.16507.43.camel@mj>

On 2010-04-17 12:00 AM, Pavel Roskin wrote:
> On Thu, 2010-04-15 at 17:38 -0400, Luis R. Rodriguez wrote:
>> From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
>> 
>> Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
> 
>> -	struct ath_desc *bf_desc;	/* virtual addr of desc */
>> +	void *bf_desc;			/* virtual addr of desc */
> 
> Why?
> 
> The obvious downside is that bf_desc becomes compatible with pointers of
> any type.
Because on AR9300 where it's used, it points to a struct ar9003_txc instead.

> The only upside I can think of is that bf_desc won't be dereferenced by
> accident.  The same could be done by using a scalar type or
> __attribute__((noderef)).
I don't think a scalar type makes any sense for this, because it is a
pointer, and it does get passed to functions that dereference it.
In cases where struct ar9003_txc is used, it'd have to pass through
either an explicit cast or an implicit one going through void* anyway,
so we might as well make it clear that while bf_desc is a valid pointer,
it does not always point to struct ath_desc

- Felix

^ permalink raw reply

* Re: [PATCH v3 42/97] ath9k: Make bf_desc of ath_buf opaque
From: Pavel Roskin @ 2010-04-16 22:00 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linville, linux-wireless, Vasanthakumar Thiagarajan
In-Reply-To: <1271367582-992-43-git-send-email-lrodriguez@atheros.com>

On Thu, 2010-04-15 at 17:38 -0400, Luis R. Rodriguez wrote:
> From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
> 
> Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>

> -	struct ath_desc *bf_desc;	/* virtual addr of desc */
> +	void *bf_desc;			/* virtual addr of desc */

Why?

The obvious downside is that bf_desc becomes compatible with pointers of
any type.

The only upside I can think of is that bf_desc won't be dereferenced by
accident.  The same could be done by using a scalar type or
__attribute__((noderef)).

I believe the downside outweighs the upside in absence of any
explanation.

-- 
Regards,
Pavel Roskin

^ permalink raw reply

* [PATCH 21/21] iwlwifi: make scan antenna forcing more generic
From: Reinette Chatre @ 2010-04-16 21:52 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Johannes Berg, Reinette Chatre
In-Reply-To: <1271454758-14351-1-git-send-email-reinette.chatre@intel.com>

From: Johannes Berg <johannes.berg@intel.com>

Some future hardware will also require some antenna
overrides so make the current logic more generic;
right now it is semantically based on a workaround
for off-channel reception but the reasons for the
new antenna overrides will be different.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-4965.c    |    7 ++++++-
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c |   10 +++-------
 drivers/net/wireless/iwlwifi/iwl-core.h    |    2 +-
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 2861819..136c290 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2261,8 +2261,13 @@ struct iwl_cfg iwl4965_agn_cfg = {
 	.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.temperature_kelvin = true,
-	.off_channel_workaround = true,
 	.max_event_log_size = 512,
+
+	/*
+	 * Force use of chains B and C for scan RX on 5 GHz band
+	 * because the device has off-channel reception on chain A.
+	 */
+	.scan_antennas[IEEE80211_BAND_5GHZ] = ANT_BC,
 };
 
 /* Module firmware */
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index ccf3357..4bd0aec 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1405,13 +1405,6 @@ void iwlagn_request_scan(struct iwl_priv *priv)
 		 * detect transmissions.
 		 */
 		scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH : 0;
-
-		/* Force use of chains B and C (0x6) for scan Rx
-		 * Avoid A (0x1) for the device has off-channel reception
-		 * on A-band.
-		 */
-		if (priv->cfg->off_channel_workaround)
-			rx_ant = ANT_BC;
 		break;
 	default:
 		IWL_WARN(priv, "Invalid scan band count\n");
@@ -1420,6 +1413,9 @@ void iwlagn_request_scan(struct iwl_priv *priv)
 
 	band = priv->scan_band;
 
+	if (priv->cfg->scan_antennas[band])
+		rx_ant = priv->cfg->scan_antennas[band];
+
 	priv->scan_tx_ant[band] =
 			iwl_toggle_tx_ant(priv, priv->scan_tx_ant[band]);
 	rate_flags |= iwl_ant_idx_to_flags(priv->scan_tx_ant[band]);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index e267a21..a0cc11e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -318,8 +318,8 @@ struct iwl_cfg {
 	/* timer period for monitor the driver queues */
 	u32 monitor_recover_period;
 	bool temperature_kelvin;
-	bool off_channel_workaround;
 	u32 max_event_log_size;
+	u8 scan_antennas[IEEE80211_NUM_BANDS];
 };
 
 /***************************
-- 
1.6.3.3


^ permalink raw reply related

* [PATCH 20/21] iwlwifi: remove monitor check
From: Reinette Chatre @ 2010-04-16 21:52 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Johannes Berg, Reinette Chatre
In-Reply-To: <1271454758-14351-1-git-send-email-reinette.chatre@intel.com>

From: Johannes Berg <johannes.berg@intel.com>

Off-channel reception is acceptable in monitor
mode, and checking for monitor mode this way is
not really correct anyway since it could be the
case while operating.

Now iwl_is_monitor_mode() is no longer used so
remove it completely.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-core.c |   25 -------------------------
 1 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index d282bef..7a82b1a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -828,18 +828,6 @@ static u8 iwl_count_chain_bitmap(u32 chain_bitmap)
 }
 
 /**
- * iwl_is_monitor_mode - Determine if interface in monitor mode
- *
- * priv->iw_mode is set in add_interface, but add_interface is
- * never called for monitor mode. The only way mac80211 informs us about
- * monitor mode is through configuring filters (call to configure_filter).
- */
-static bool iwl_is_monitor_mode(struct iwl_priv *priv)
-{
-	return !!(priv->staging_rxon.filter_flags & RXON_FILTER_PROMISC_MSK);
-}
-
-/**
  * iwl_set_rxon_chain - Set up Rx chain usage in "staging" RXON image
  *
  * Selects how many and which Rx receivers/antennas/chains to use.
@@ -882,19 +870,6 @@ void iwl_set_rxon_chain(struct iwl_priv *priv)
 	rx_chain |= active_rx_cnt << RXON_RX_CHAIN_MIMO_CNT_POS;
 	rx_chain |= idle_rx_cnt  << RXON_RX_CHAIN_CNT_POS;
 
-	/* copied from 'iwl_bg_request_scan()' */
-	/* Force use of chains B and C (0x6) for Rx
-	 * Avoid A (0x1) for the device has off-channel reception on A-band.
-	 * MIMO is not used here, but value is required */
-	if (iwl_is_monitor_mode(priv) &&
-	    !(priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK) &&
-	    priv->cfg->off_channel_workaround) {
-		rx_chain = ANT_ABC << RXON_RX_CHAIN_VALID_POS;
-		rx_chain |= ANT_BC << RXON_RX_CHAIN_FORCE_SEL_POS;
-		rx_chain |= ANT_ABC << RXON_RX_CHAIN_FORCE_MIMO_SEL_POS;
-		rx_chain |= 0x1 << RXON_RX_CHAIN_DRIVER_FORCE_POS;
-	}
-
 	priv->staging_rxon.rx_chain = cpu_to_le16(rx_chain);
 
 	if (!is_single && (active_rx_cnt >= IWL_NUM_RX_CHAINS_SINGLE) && is_cam)
-- 
1.6.3.3


^ permalink raw reply related

* [PATCH 19/21] iwlwifi: don't check monitor for scanning
From: Reinette Chatre @ 2010-04-16 21:52 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Johannes Berg, Reinette Chatre
In-Reply-To: <1271454758-14351-1-git-send-email-reinette.chatre@intel.com>

From: Johannes Berg <johannes.berg@intel.com>

Monitor mode operation need not (and probably should
not) affect scanning this way since real monitoring
can not properly happen while scanning anyway.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c  |    2 --
 drivers/net/wireless/iwlwifi/iwl-core.c     |    3 +--
 drivers/net/wireless/iwlwifi/iwl-core.h     |    1 -
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    3 ---
 4 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 2d00e83..ccf3357 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1458,8 +1458,6 @@ void iwlagn_request_scan(struct iwl_priv *priv)
 
 	}
 	scan->tx_cmd.len = cpu_to_le16(cmd_len);
-	if (iwl_is_monitor_mode(priv))
-		scan->filter_flags = RXON_FILTER_PROMISC_MSK;
 
 	scan->filter_flags |= (RXON_FILTER_ACCEPT_GRP_MSK |
 			       RXON_FILTER_BCON_AWARE_MSK);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index aa86ef9..d282bef 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -834,11 +834,10 @@ static u8 iwl_count_chain_bitmap(u32 chain_bitmap)
  * never called for monitor mode. The only way mac80211 informs us about
  * monitor mode is through configuring filters (call to configure_filter).
  */
-bool iwl_is_monitor_mode(struct iwl_priv *priv)
+static bool iwl_is_monitor_mode(struct iwl_priv *priv)
 {
 	return !!(priv->staging_rxon.filter_flags & RXON_FILTER_PROMISC_MSK);
 }
-EXPORT_SYMBOL(iwl_is_monitor_mode);
 
 /**
  * iwl_set_rxon_chain - Set up Rx chain usage in "staging" RXON image
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index d9ec030..e267a21 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -351,7 +351,6 @@ void iwl_configure_filter(struct ieee80211_hw *hw,
 			  unsigned int changed_flags,
 			  unsigned int *total_flags, u64 multicast);
 int iwl_set_hw_params(struct iwl_priv *priv);
-bool iwl_is_monitor_mode(struct iwl_priv *priv);
 void iwl_post_associate(struct iwl_priv *priv);
 void iwl_bss_info_changed(struct ieee80211_hw *hw,
 				     struct ieee80211_vif *vif,
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 64b20e7..e7263ed 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2963,9 +2963,6 @@ void iwl3945_request_scan(struct iwl_priv *priv)
 	/* select Rx antennas */
 	scan->flags |= iwl3945_get_antenna_flags(priv);
 
-	if (iwl_is_monitor_mode(priv))
-		scan->filter_flags = RXON_FILTER_PROMISC_MSK;
-
 	scan->channel_count =
 		iwl3945_get_channels_for_scan(priv, band, is_active, n_probes,
 			(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);
-- 
1.6.3.3


^ permalink raw reply related

* [PATCH 18/21] iwlwifi: rename TX_CMD_FLG_BT_DIS_MSK
From: Reinette Chatre @ 2010-04-16 21:52 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Johannes Berg, Reinette Chatre
In-Reply-To: <1271454758-14351-1-git-send-email-reinette.chatre@intel.com>

From: Johannes Berg <johannes.berg@intel.com>

The flag name is a little misleading, this
flag instructs the device to ignore bluetooth
messages for purposes of frame transmissions,
so rename the flag to TX_CMD_FLG_IGNORE_BT.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-commands.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index d830086..67c723c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
@@ -1443,7 +1443,7 @@ struct iwl4965_rx_mpdu_res_start {
 
 /* 1: Ignore Bluetooth priority for this frame.
  * 0: Delay Tx until Bluetooth device is done (normal usage). */
-#define TX_CMD_FLG_BT_DIS_MSK cpu_to_le32(1 << 12)
+#define TX_CMD_FLG_IGNORE_BT cpu_to_le32(1 << 12)
 
 /* 1: uCode overrides sequence control field in MAC header.
  * 0: Driver provides sequence control field in MAC header.
-- 
1.6.3.3


^ permalink raw reply related

* [PATCH 17/21] iwlwifi: make BT coex config a virtual method
From: Reinette Chatre @ 2010-04-16 21:52 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Johannes Berg, Reinette Chatre
In-Reply-To: <1271454758-14351-1-git-send-email-reinette.chatre@intel.com>

From: Johannes Berg <johannes.berg@intel.com>

Some future hardware will require a different command to
be sent for bluetooth coexist, so make this a virtual
method that can be changed on a per-device basis.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-3945.c     |    1 +
 drivers/net/wireless/iwlwifi/iwl-4965.c     |    1 +
 drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c |    1 +
 drivers/net/wireless/iwlwifi/iwl-agn.c      |    2 +-
 drivers/net/wireless/iwlwifi/iwl-core.c     |    7 ++++---
 drivers/net/wireless/iwlwifi/iwl-core.h     |    3 ++-
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    2 +-
 7 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 51f1895..d10e59d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -2687,6 +2687,7 @@ IWL3945_UCODE_GET(boot_size);
 static struct iwl_hcmd_ops iwl3945_hcmd = {
 	.rxon_assoc = iwl3945_send_rxon_assoc,
 	.commit_rxon = iwl3945_commit_rxon,
+	.send_bt_config = iwl_send_bt_config,
 };
 
 static struct iwl_ucode_ops iwl3945_ucode = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 8567297..2861819 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2144,6 +2144,7 @@ static struct iwl_hcmd_ops iwl4965_hcmd = {
 	.rxon_assoc = iwl4965_send_rxon_assoc,
 	.commit_rxon = iwl_commit_rxon,
 	.set_rxon_chain = iwl_set_rxon_chain,
+	.send_bt_config = iwl_send_bt_config,
 };
 
 static struct iwl_ucode_ops iwl4965_ucode = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
index 231d0e6..44ef5d9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
@@ -262,6 +262,7 @@ struct iwl_hcmd_ops iwlagn_hcmd = {
 	.commit_rxon = iwl_commit_rxon,
 	.set_rxon_chain = iwl_set_rxon_chain,
 	.set_tx_ant = iwlagn_send_tx_ant_config,
+	.send_bt_config = iwl_send_bt_config,
 };
 
 struct iwl_hcmd_utils_ops iwlagn_hcmd_utils = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 1f3c5d5..c22d3d8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2173,7 +2173,7 @@ static void iwl_alive_start(struct iwl_priv *priv)
 	}
 
 	/* Configure Bluetooth device coexistence support */
-	iwl_send_bt_config(priv);
+	priv->cfg->ops->hcmd->send_bt_config(priv);
 
 	iwl_reset_run_time_calib(priv);
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 9d300b2..aa86ef9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1479,7 +1479,7 @@ irqreturn_t iwl_isr_legacy(int irq, void *data)
 }
 EXPORT_SYMBOL(iwl_isr_legacy);
 
-int iwl_send_bt_config(struct iwl_priv *priv)
+void iwl_send_bt_config(struct iwl_priv *priv)
 {
 	struct iwl_bt_cmd bt_cmd = {
 		.lead_time = BT_LEAD_TIME_DEF,
@@ -1496,8 +1496,9 @@ int iwl_send_bt_config(struct iwl_priv *priv)
 	IWL_DEBUG_INFO(priv, "BT coex %s\n",
 		(bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active");
 
-	return iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG,
-				sizeof(struct iwl_bt_cmd), &bt_cmd);
+	if (iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG,
+			     sizeof(struct iwl_bt_cmd), &bt_cmd))
+		IWL_ERR(priv, "failed to send BT Coex Config\n");
 }
 EXPORT_SYMBOL(iwl_send_bt_config);
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 2a3b173..d9ec030 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -90,6 +90,7 @@ struct iwl_hcmd_ops {
 	int (*commit_rxon)(struct iwl_priv *priv);
 	void (*set_rxon_chain)(struct iwl_priv *priv);
 	int (*set_tx_ant)(struct iwl_priv *priv, u8 valid_tx_ant);
+	void (*send_bt_config)(struct iwl_priv *priv);
 };
 
 struct iwl_hcmd_utils_ops {
@@ -677,7 +678,7 @@ static inline int iwl_is_ready_rf(struct iwl_priv *priv)
 }
 
 extern void iwl_rf_kill_ct_config(struct iwl_priv *priv);
-extern int iwl_send_bt_config(struct iwl_priv *priv);
+extern void iwl_send_bt_config(struct iwl_priv *priv);
 extern int iwl_send_statistics_request(struct iwl_priv *priv,
 				       u8 flags, bool clear);
 extern int iwl_verify_ucode(struct iwl_priv *priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 8da3375..64b20e7 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2526,7 +2526,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv)
 	}
 
 	/* Configure Bluetooth device coexistence support */
-	iwl_send_bt_config(priv);
+	priv->cfg->ops->hcmd->send_bt_config(priv);
 
 	/* Configure the adapter for unassociated operation */
 	iwlcore_commit_rxon(priv);
-- 
1.6.3.3


^ permalink raw reply related

* [PATCH 16/21] iwlwifi: more code clean up for agn devices
From: Reinette Chatre @ 2010-04-16 21:52 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy, Reinette Chatre
In-Reply-To: <1271454758-14351-1-git-send-email-reinette.chatre@intel.com>

From: Wey-Yi Guy <wey-yi.w.guy@intel.com>

Since multiple new devices having similar uCode architecture and use same
registers address, remove more reference to 5000 series to eliminate the
confusion.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-tx.c    |   42 +++++++-------
 drivers/net/wireless/iwlwifi/iwl-agn-ucode.c |   34 ++++++------
 drivers/net/wireless/iwlwifi/iwl-prph.h      |   80 +++++++++++++-------------
 3 files changed, 78 insertions(+), 78 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 3077eac..11661fa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -167,7 +167,7 @@ static int iwlagn_tx_queue_set_q2ratid(struct iwl_priv *priv, u16 ra_tid,
 	scd_q2ratid = ra_tid & IWL_SCD_QUEUE_RA_TID_MAP_RATID_MSK;
 
 	tbl_dw_addr = priv->scd_base_addr +
-			IWL50_SCD_TRANSLATE_TBL_OFFSET_QUEUE(txq_id);
+			IWLAGN_SCD_TRANSLATE_TBL_OFFSET_QUEUE(txq_id);
 
 	tbl_dw = iwl_read_targ_mem(priv, tbl_dw_addr);
 
@@ -186,9 +186,9 @@ static void iwlagn_tx_queue_stop_scheduler(struct iwl_priv *priv, u16 txq_id)
 	/* Simply stop the queue, but don't change any configuration;
 	 * the SCD_ACT_EN bit is the write-enable mask for the ACTIVE bit. */
 	iwl_write_prph(priv,
-		IWL50_SCD_QUEUE_STATUS_BITS(txq_id),
-		(0 << IWL50_SCD_QUEUE_STTS_REG_POS_ACTIVE)|
-		(1 << IWL50_SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN));
+		IWLAGN_SCD_QUEUE_STATUS_BITS(txq_id),
+		(0 << IWLAGN_SCD_QUEUE_STTS_REG_POS_ACTIVE)|
+		(1 << IWLAGN_SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN));
 }
 
 void iwlagn_set_wr_ptrs(struct iwl_priv *priv,
@@ -196,7 +196,7 @@ void iwlagn_set_wr_ptrs(struct iwl_priv *priv,
 {
 	iwl_write_direct32(priv, HBUS_TARG_WRPTR,
 			(index & 0xff) | (txq_id << 8));
-	iwl_write_prph(priv, IWL50_SCD_QUEUE_RDPTR(txq_id), index);
+	iwl_write_prph(priv, IWLAGN_SCD_QUEUE_RDPTR(txq_id), index);
 }
 
 void iwlagn_tx_queue_set_status(struct iwl_priv *priv,
@@ -206,11 +206,11 @@ void iwlagn_tx_queue_set_status(struct iwl_priv *priv,
 	int txq_id = txq->q.id;
 	int active = test_bit(txq_id, &priv->txq_ctx_active_msk) ? 1 : 0;
 
-	iwl_write_prph(priv, IWL50_SCD_QUEUE_STATUS_BITS(txq_id),
-			(active << IWL50_SCD_QUEUE_STTS_REG_POS_ACTIVE) |
-			(tx_fifo_id << IWL50_SCD_QUEUE_STTS_REG_POS_TXF) |
-			(1 << IWL50_SCD_QUEUE_STTS_REG_POS_WSL) |
-			IWL50_SCD_QUEUE_STTS_REG_MSK);
+	iwl_write_prph(priv, IWLAGN_SCD_QUEUE_STATUS_BITS(txq_id),
+			(active << IWLAGN_SCD_QUEUE_STTS_REG_POS_ACTIVE) |
+			(tx_fifo_id << IWLAGN_SCD_QUEUE_STTS_REG_POS_TXF) |
+			(1 << IWLAGN_SCD_QUEUE_STTS_REG_POS_WSL) |
+			IWLAGN_SCD_QUEUE_STTS_REG_MSK);
 
 	txq->sched_retry = scd_retry;
 
@@ -250,10 +250,10 @@ int iwlagn_txq_agg_enable(struct iwl_priv *priv, int txq_id,
 	iwlagn_tx_queue_set_q2ratid(priv, ra_tid, txq_id);
 
 	/* Set this queue as a chain-building queue */
-	iwl_set_bits_prph(priv, IWL50_SCD_QUEUECHAIN_SEL, (1<<txq_id));
+	iwl_set_bits_prph(priv, IWLAGN_SCD_QUEUECHAIN_SEL, (1<<txq_id));
 
 	/* enable aggregations for the queue */
-	iwl_set_bits_prph(priv, IWL50_SCD_AGGR_SEL, (1<<txq_id));
+	iwl_set_bits_prph(priv, IWLAGN_SCD_AGGR_SEL, (1<<txq_id));
 
 	/* Place first TFD at index corresponding to start sequence number.
 	 * Assumes that ssn_idx is valid (!= 0xFFF) */
@@ -263,16 +263,16 @@ int iwlagn_txq_agg_enable(struct iwl_priv *priv, int txq_id,
 
 	/* Set up Tx window size and frame limit for this queue */
 	iwl_write_targ_mem(priv, priv->scd_base_addr +
-			IWL50_SCD_CONTEXT_QUEUE_OFFSET(txq_id) +
+			IWLAGN_SCD_CONTEXT_QUEUE_OFFSET(txq_id) +
 			sizeof(u32),
 			((SCD_WIN_SIZE <<
-			IWL50_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS) &
-			IWL50_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK) |
+			IWLAGN_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS) &
+			IWLAGN_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK) |
 			((SCD_FRAME_LIMIT <<
-			IWL50_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS) &
-			IWL50_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK));
+			IWLAGN_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS) &
+			IWLAGN_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK));
 
-	iwl_set_bits_prph(priv, IWL50_SCD_INTERRUPT_MASK, (1 << txq_id));
+	iwl_set_bits_prph(priv, IWLAGN_SCD_INTERRUPT_MASK, (1 << txq_id));
 
 	/* Set up Status area in SRAM, map to Tx DMA/FIFO, activate the queue */
 	iwlagn_tx_queue_set_status(priv, &priv->txq[txq_id], tx_fifo, 1);
@@ -298,14 +298,14 @@ int iwlagn_txq_agg_disable(struct iwl_priv *priv, u16 txq_id,
 
 	iwlagn_tx_queue_stop_scheduler(priv, txq_id);
 
-	iwl_clear_bits_prph(priv, IWL50_SCD_AGGR_SEL, (1 << txq_id));
+	iwl_clear_bits_prph(priv, IWLAGN_SCD_AGGR_SEL, (1 << txq_id));
 
 	priv->txq[txq_id].q.read_ptr = (ssn_idx & 0xff);
 	priv->txq[txq_id].q.write_ptr = (ssn_idx & 0xff);
 	/* supposes that ssn_idx is valid (!= 0xFFF) */
 	iwlagn_set_wr_ptrs(priv, txq_id, ssn_idx);
 
-	iwl_clear_bits_prph(priv, IWL50_SCD_INTERRUPT_MASK, (1 << txq_id));
+	iwl_clear_bits_prph(priv, IWLAGN_SCD_INTERRUPT_MASK, (1 << txq_id));
 	iwl_txq_ctx_deactivate(priv, txq_id);
 	iwlagn_tx_queue_set_status(priv, &priv->txq[txq_id], tx_fifo, 0);
 
@@ -318,7 +318,7 @@ int iwlagn_txq_agg_disable(struct iwl_priv *priv, u16 txq_id,
  */
 void iwlagn_txq_set_sched(struct iwl_priv *priv, u32 mask)
 {
-	iwl_write_prph(priv, IWL50_SCD_TXFACT, mask);
+	iwl_write_prph(priv, IWLAGN_SCD_TXFACT, mask);
 }
 
 static inline int get_queue_from_ac(u16 ac)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
index 059b70e..ae476c2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
@@ -329,19 +329,19 @@ int iwlagn_alive_notify(struct iwl_priv *priv)
 
 	spin_lock_irqsave(&priv->lock, flags);
 
-	priv->scd_base_addr = iwl_read_prph(priv, IWL50_SCD_SRAM_BASE_ADDR);
-	a = priv->scd_base_addr + IWL50_SCD_CONTEXT_DATA_OFFSET;
-	for (; a < priv->scd_base_addr + IWL50_SCD_TX_STTS_BITMAP_OFFSET;
+	priv->scd_base_addr = iwl_read_prph(priv, IWLAGN_SCD_SRAM_BASE_ADDR);
+	a = priv->scd_base_addr + IWLAGN_SCD_CONTEXT_DATA_OFFSET;
+	for (; a < priv->scd_base_addr + IWLAGN_SCD_TX_STTS_BITMAP_OFFSET;
 		a += 4)
 		iwl_write_targ_mem(priv, a, 0);
-	for (; a < priv->scd_base_addr + IWL50_SCD_TRANSLATE_TBL_OFFSET;
+	for (; a < priv->scd_base_addr + IWLAGN_SCD_TRANSLATE_TBL_OFFSET;
 		a += 4)
 		iwl_write_targ_mem(priv, a, 0);
 	for (; a < priv->scd_base_addr +
-	       IWL50_SCD_TRANSLATE_TBL_OFFSET_QUEUE(priv->hw_params.max_txq_num); a += 4)
+	       IWLAGN_SCD_TRANSLATE_TBL_OFFSET_QUEUE(priv->hw_params.max_txq_num); a += 4)
 		iwl_write_targ_mem(priv, a, 0);
 
-	iwl_write_prph(priv, IWL50_SCD_DRAM_BASE_ADDR,
+	iwl_write_prph(priv, IWLAGN_SCD_DRAM_BASE_ADDR,
 		       priv->scd_bc_tbls.dma >> 10);
 
 	/* Enable DMA channel */
@@ -355,28 +355,28 @@ int iwlagn_alive_notify(struct iwl_priv *priv)
 	iwl_write_direct32(priv, FH_TX_CHICKEN_BITS_REG,
 			   reg_val | FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN);
 
-	iwl_write_prph(priv, IWL50_SCD_QUEUECHAIN_SEL,
-		IWL50_SCD_QUEUECHAIN_SEL_ALL(priv->hw_params.max_txq_num));
-	iwl_write_prph(priv, IWL50_SCD_AGGR_SEL, 0);
+	iwl_write_prph(priv, IWLAGN_SCD_QUEUECHAIN_SEL,
+		IWLAGN_SCD_QUEUECHAIN_SEL_ALL(priv->hw_params.max_txq_num));
+	iwl_write_prph(priv, IWLAGN_SCD_AGGR_SEL, 0);
 
 	/* initiate the queues */
 	for (i = 0; i < priv->hw_params.max_txq_num; i++) {
-		iwl_write_prph(priv, IWL50_SCD_QUEUE_RDPTR(i), 0);
+		iwl_write_prph(priv, IWLAGN_SCD_QUEUE_RDPTR(i), 0);
 		iwl_write_direct32(priv, HBUS_TARG_WRPTR, 0 | (i << 8));
 		iwl_write_targ_mem(priv, priv->scd_base_addr +
-				IWL50_SCD_CONTEXT_QUEUE_OFFSET(i), 0);
+				IWLAGN_SCD_CONTEXT_QUEUE_OFFSET(i), 0);
 		iwl_write_targ_mem(priv, priv->scd_base_addr +
-				IWL50_SCD_CONTEXT_QUEUE_OFFSET(i) +
+				IWLAGN_SCD_CONTEXT_QUEUE_OFFSET(i) +
 				sizeof(u32),
 				((SCD_WIN_SIZE <<
-				IWL50_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS) &
-				IWL50_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK) |
+				IWLAGN_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS) &
+				IWLAGN_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK) |
 				((SCD_FRAME_LIMIT <<
-				IWL50_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS) &
-				IWL50_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK));
+				IWLAGN_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS) &
+				IWLAGN_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK));
 	}
 
-	iwl_write_prph(priv, IWL50_SCD_INTERRUPT_MASK,
+	iwl_write_prph(priv, IWLAGN_SCD_INTERRUPT_MASK,
 			IWL_MASK(0, priv->hw_params.max_txq_num));
 
 	/* Activate all Tx DMA/FIFO channels */
diff --git a/drivers/net/wireless/iwlwifi/iwl-prph.h b/drivers/net/wireless/iwlwifi/iwl-prph.h
index 5944de7..b1f101c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-prph.h
+++ b/drivers/net/wireless/iwlwifi/iwl-prph.h
@@ -529,48 +529,48 @@
 #define IWL_SCD_TXFIFO_POS_RA			(4)
 #define IWL_SCD_QUEUE_RA_TID_MAP_RATID_MSK	(0x01FF)
 
-/* 5000 SCD */
-#define IWL50_SCD_QUEUE_STTS_REG_POS_TXF	(0)
-#define IWL50_SCD_QUEUE_STTS_REG_POS_ACTIVE	(3)
-#define IWL50_SCD_QUEUE_STTS_REG_POS_WSL	(4)
-#define IWL50_SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN (19)
-#define IWL50_SCD_QUEUE_STTS_REG_MSK		(0x00FF0000)
-
-#define IWL50_SCD_QUEUE_CTX_REG1_CREDIT_POS		(8)
-#define IWL50_SCD_QUEUE_CTX_REG1_CREDIT_MSK		(0x00FFFF00)
-#define IWL50_SCD_QUEUE_CTX_REG1_SUPER_CREDIT_POS	(24)
-#define IWL50_SCD_QUEUE_CTX_REG1_SUPER_CREDIT_MSK	(0xFF000000)
-#define IWL50_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS		(0)
-#define IWL50_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK		(0x0000007F)
-#define IWL50_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS	(16)
-#define IWL50_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK	(0x007F0000)
-
-#define IWL50_SCD_CONTEXT_DATA_OFFSET		(0x600)
-#define IWL50_SCD_TX_STTS_BITMAP_OFFSET		(0x7B1)
-#define IWL50_SCD_TRANSLATE_TBL_OFFSET		(0x7E0)
-
-#define IWL50_SCD_CONTEXT_QUEUE_OFFSET(x)\
-	(IWL50_SCD_CONTEXT_DATA_OFFSET + ((x) * 8))
-
-#define IWL50_SCD_TRANSLATE_TBL_OFFSET_QUEUE(x) \
-	((IWL50_SCD_TRANSLATE_TBL_OFFSET + ((x) * 2)) & 0xfffc)
-
-#define IWL50_SCD_QUEUECHAIN_SEL_ALL(x)		(((1<<(x)) - 1) &\
+/* agn SCD */
+#define IWLAGN_SCD_QUEUE_STTS_REG_POS_TXF	(0)
+#define IWLAGN_SCD_QUEUE_STTS_REG_POS_ACTIVE	(3)
+#define IWLAGN_SCD_QUEUE_STTS_REG_POS_WSL	(4)
+#define IWLAGN_SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN (19)
+#define IWLAGN_SCD_QUEUE_STTS_REG_MSK		(0x00FF0000)
+
+#define IWLAGN_SCD_QUEUE_CTX_REG1_CREDIT_POS		(8)
+#define IWLAGN_SCD_QUEUE_CTX_REG1_CREDIT_MSK		(0x00FFFF00)
+#define IWLAGN_SCD_QUEUE_CTX_REG1_SUPER_CREDIT_POS	(24)
+#define IWLAGN_SCD_QUEUE_CTX_REG1_SUPER_CREDIT_MSK	(0xFF000000)
+#define IWLAGN_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS		(0)
+#define IWLAGN_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK		(0x0000007F)
+#define IWLAGN_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS	(16)
+#define IWLAGN_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK	(0x007F0000)
+
+#define IWLAGN_SCD_CONTEXT_DATA_OFFSET		(0x600)
+#define IWLAGN_SCD_TX_STTS_BITMAP_OFFSET		(0x7B1)
+#define IWLAGN_SCD_TRANSLATE_TBL_OFFSET		(0x7E0)
+
+#define IWLAGN_SCD_CONTEXT_QUEUE_OFFSET(x)\
+	(IWLAGN_SCD_CONTEXT_DATA_OFFSET + ((x) * 8))
+
+#define IWLAGN_SCD_TRANSLATE_TBL_OFFSET_QUEUE(x) \
+	((IWLAGN_SCD_TRANSLATE_TBL_OFFSET + ((x) * 2)) & 0xfffc)
+
+#define IWLAGN_SCD_QUEUECHAIN_SEL_ALL(x)		(((1<<(x)) - 1) &\
 	(~(1<<IWL_CMD_QUEUE_NUM)))
 
-#define IWL50_SCD_BASE			(PRPH_BASE + 0xa02c00)
-
-#define IWL50_SCD_SRAM_BASE_ADDR         (IWL50_SCD_BASE + 0x0)
-#define IWL50_SCD_DRAM_BASE_ADDR	 (IWL50_SCD_BASE + 0x8)
-#define IWL50_SCD_AIT                    (IWL50_SCD_BASE + 0x0c)
-#define IWL50_SCD_TXFACT                 (IWL50_SCD_BASE + 0x10)
-#define IWL50_SCD_ACTIVE		 (IWL50_SCD_BASE + 0x14)
-#define IWL50_SCD_QUEUE_WRPTR(x)         (IWL50_SCD_BASE + 0x18 + (x) * 4)
-#define IWL50_SCD_QUEUE_RDPTR(x)         (IWL50_SCD_BASE + 0x68 + (x) * 4)
-#define IWL50_SCD_QUEUECHAIN_SEL         (IWL50_SCD_BASE + 0xe8)
-#define IWL50_SCD_AGGR_SEL	     	 (IWL50_SCD_BASE + 0x248)
-#define IWL50_SCD_INTERRUPT_MASK         (IWL50_SCD_BASE + 0x108)
-#define IWL50_SCD_QUEUE_STATUS_BITS(x)   (IWL50_SCD_BASE + 0x10c + (x) * 4)
+#define IWLAGN_SCD_BASE			(PRPH_BASE + 0xa02c00)
+
+#define IWLAGN_SCD_SRAM_BASE_ADDR	(IWLAGN_SCD_BASE + 0x0)
+#define IWLAGN_SCD_DRAM_BASE_ADDR	(IWLAGN_SCD_BASE + 0x8)
+#define IWLAGN_SCD_AIT			(IWLAGN_SCD_BASE + 0x0c)
+#define IWLAGN_SCD_TXFACT		(IWLAGN_SCD_BASE + 0x10)
+#define IWLAGN_SCD_ACTIVE		(IWLAGN_SCD_BASE + 0x14)
+#define IWLAGN_SCD_QUEUE_WRPTR(x)	(IWLAGN_SCD_BASE + 0x18 + (x) * 4)
+#define IWLAGN_SCD_QUEUE_RDPTR(x)	(IWLAGN_SCD_BASE + 0x68 + (x) * 4)
+#define IWLAGN_SCD_QUEUECHAIN_SEL	(IWLAGN_SCD_BASE + 0xe8)
+#define IWLAGN_SCD_AGGR_SEL		(IWLAGN_SCD_BASE + 0x248)
+#define IWLAGN_SCD_INTERRUPT_MASK	(IWLAGN_SCD_BASE + 0x108)
+#define IWLAGN_SCD_QUEUE_STATUS_BITS(x)	(IWLAGN_SCD_BASE + 0x10c + (x) * 4)
 
 /*********************** END TX SCHEDULER *************************************/
 
-- 
1.6.3.3


^ permalink raw reply related

* [PATCH 15/21] iwlwifi: sanity check for turn on aggregation tid
From: Reinette Chatre @ 2010-04-16 21:52 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy, Reinette Chatre
In-Reply-To: <1271454758-14351-1-git-send-email-reinette.chatre@intel.com>

From: Wey-Yi Guy <wey-yi.w.guy@intel.com>

Perform sanity check for turn on aggregation tid. Also remove the
option for turn on all the aggregation tids at once since it is
deprecated function and not being used.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c |   34 ++++++++++++++--------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 5bc406c..8f8d5e3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -294,11 +294,11 @@ static u32 rs_tl_get_load(struct iwl_lq_sta *lq_data, u8 tid)
 	return tl->total;
 }
 
-static void rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
+static int rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
 				      struct iwl_lq_sta *lq_data, u8 tid,
 				      struct ieee80211_sta *sta)
 {
-	int ret;
+	int ret = -EAGAIN;
 
 	if (rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) {
 		IWL_DEBUG_HT(priv, "Starting Tx agg: STA: %pM tid: %d\n",
@@ -312,29 +312,29 @@ static void rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
 			 */
 			IWL_DEBUG_HT(priv, "Fail start Tx agg on tid: %d\n",
 				tid);
-			ret = ieee80211_stop_tx_ba_session(sta, tid,
+			ieee80211_stop_tx_ba_session(sta, tid,
 						WLAN_BACK_INITIATOR);
 		}
-	}
+	} else
+		IWL_ERR(priv, "Fail finding valid aggregation tid: %d\n", tid);
+	return ret;
 }
 
 static void rs_tl_turn_on_agg(struct iwl_priv *priv, u8 tid,
 			      struct iwl_lq_sta *lq_data,
 			      struct ieee80211_sta *sta)
 {
-	if ((tid < TID_MAX_LOAD_COUNT))
-		rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta);
-	else if (tid == IWL_AGG_ALL_TID)
-		for (tid = 0; tid < TID_MAX_LOAD_COUNT; tid++)
-			rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta);
-	if (priv->cfg->use_rts_for_ht) {
-		/*
-		 * switch to RTS/CTS if it is the prefer protection method
-		 * for HT traffic
-		 */
-		IWL_DEBUG_HT(priv, "use RTS/CTS protection for HT\n");
-		priv->staging_rxon.flags &= ~RXON_FLG_SELF_CTS_EN;
-		iwlcore_commit_rxon(priv);
+	if ((tid < TID_MAX_LOAD_COUNT) &&
+	    !rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta)) {
+		if (priv->cfg->use_rts_for_ht) {
+			/*
+			 * switch to RTS/CTS if it is the prefer protection
+			 * method for HT traffic
+			 */
+			IWL_DEBUG_HT(priv, "use RTS/CTS protection for HT\n");
+			priv->staging_rxon.flags &= ~RXON_FLG_SELF_CTS_EN;
+			iwlcore_commit_rxon(priv);
+		}
 	}
 }
 
-- 
1.6.3.3


^ permalink raw reply related

* [PATCH 14/21] iwlwifi: PA type for 6000g2 series
From: Reinette Chatre @ 2010-04-16 21:52 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy, Reinette Chatre
In-Reply-To: <1271454758-14351-1-git-send-email-reinette.chatre@intel.com>

From: Wey-Yi Guy <wey-yi.w.guy@intel.com>

For 6000g2 series of NICs, PA type is determined by uCode, driver do not
have to set the register for internal/external PA. It is a workaround
just for 6000 series NICs.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-6000.c |    4 ++--
 drivers/net/wireless/iwlwifi/iwl-agn.c  |    8 ++++----
 drivers/net/wireless/iwlwifi/iwl-dev.h  |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 7b695e7..7da23d3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -379,7 +379,7 @@ static const struct iwl_ops iwl6050_ops = {
 /*
  * "i": Internal configuration, use internal Power Amplifier
  */
-struct iwl_cfg iwl6000g2i_2agn_cfg = {
+struct iwl_cfg iwl6000g2_2agn_cfg = {
 	.name = "6000 Series 2x2 AGN Gen2",
 	.fw_name_pre = IWL6000G2_FW_PRE,
 	.ucode_api_max = IWL6000G2_UCODE_API_MAX,
@@ -397,7 +397,7 @@ struct iwl_cfg iwl6000g2i_2agn_cfg = {
 	.pll_cfg_val = 0,
 	.set_l0s = true,
 	.use_bsm = false,
-	.pa_type = IWL_PA_INTERNAL,
+	.pa_type = IWL_PA_SYSTEM,
 	.max_ll_items = OTP_MAX_LL_ITEMS_6x00,
 	.shadow_ram_support = true,
 	.ht_greenfield_support = true,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 8ac1546..1f3c5d5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3798,10 +3798,10 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
 	{IWL_PCI_DEVICE(0x4239, 0x1316, iwl6000i_2abg_cfg)},
 
 /* 6x00 Series Gen2 */
-	{IWL_PCI_DEVICE(0x0082, 0x1201, iwl6000g2i_2agn_cfg)},
-	{IWL_PCI_DEVICE(0x0082, 0x1301, iwl6000g2i_2agn_cfg)},
-	{IWL_PCI_DEVICE(0x0082, 0x1321, iwl6000g2i_2agn_cfg)},
-	{IWL_PCI_DEVICE(0x0085, 0x1311, iwl6000g2i_2agn_cfg)},
+	{IWL_PCI_DEVICE(0x0082, 0x1201, iwl6000g2_2agn_cfg)},
+	{IWL_PCI_DEVICE(0x0082, 0x1301, iwl6000g2_2agn_cfg)},
+	{IWL_PCI_DEVICE(0x0082, 0x1321, iwl6000g2_2agn_cfg)},
+	{IWL_PCI_DEVICE(0x0085, 0x1311, iwl6000g2_2agn_cfg)},
 
 /* 6x50 WiFi/WiMax Series */
 	{IWL_PCI_DEVICE(0x0087, 0x1301, iwl6050_2agn_cfg)},
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index ff4b47c..bdc60aa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -58,7 +58,7 @@ extern struct iwl_cfg iwl5100_abg_cfg;
 extern struct iwl_cfg iwl5150_agn_cfg;
 extern struct iwl_cfg iwl5150_abg_cfg;
 extern struct iwl_cfg iwl6000i_2agn_cfg;
-extern struct iwl_cfg iwl6000g2i_2agn_cfg;
+extern struct iwl_cfg iwl6000g2_2agn_cfg;
 extern struct iwl_cfg iwl6000i_2abg_cfg;
 extern struct iwl_cfg iwl6000i_2bg_cfg;
 extern struct iwl_cfg iwl6000_3agn_cfg;
-- 
1.6.3.3


^ permalink raw reply related

* [PATCH 13/21] iwlwifi: add hw revision for 6000g2 NIC
From: Reinette Chatre @ 2010-04-16 21:52 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy, Reinette Chatre
In-Reply-To: <1271454758-14351-1-git-send-email-reinette.chatre@intel.com>

From: Wey-Yi Guy <wey-yi.w.guy@intel.com>

Add hardware revision for 6000g2 series of NIC

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-csr.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h
index 808b714..254c35a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-csr.h
+++ b/drivers/net/wireless/iwlwifi/iwl-csr.h
@@ -298,6 +298,7 @@
 #define CSR_HW_REV_TYPE_1000           (0x0000060)
 #define CSR_HW_REV_TYPE_6x00           (0x0000070)
 #define CSR_HW_REV_TYPE_6x50           (0x0000080)
+#define CSR_HW_REV_TYPE_6x00g2         (0x00000B0)
 #define CSR_HW_REV_TYPE_NONE           (0x00000F0)
 
 /* EEPROM REG */
-- 
1.6.3.3


^ 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