Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: pull request: wireless-next-2.6 2009-08-28
From: David Miller @ 2009-08-29  6:06 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, netdev
In-Reply-To: <20090828191119.GD32694@tuxdriver.com>

From: "John W. Linville" <linville@tuxdriver.com>
Date: Fri, 28 Aug 2009 15:11:19 -0400

> Another huge batch of updates/changes/etc intended for 2.6.32...  This
> includes the usual driver updates and miscellaneous fixes, etc.
> Highlights in this batch include more LP-PHY support for b43 and the
> completion of the cfg80211 API conversion for rndis_wlan.

Pulled, thanks!

^ permalink raw reply

* Re: pull request: wireless-2.6 2009-08-28
From: David Miller @ 2009-08-29  6:05 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20090828191039.GC32694@tuxdriver.com>

From: "John W. Linville" <linville@tuxdriver.com>
Date: Fri, 28 Aug 2009 15:10:39 -0400

> Dave,
> 
> One more late-breaker for 2.6.31...
> 
> This patch is rather large for this stage of the cycle, but it
> corrects a regression disussed recently on LKML, documented in bug
> 14016 at bugzilla.kernel.org.  This jist of it is that the ipw2200
> firmware loading routine was using an order 6 memory allocation that was
> failing with newer allocators under some circumstances.

Pulled, thanks.

^ permalink raw reply

* Re: [PATCH 1/2] cfg80211: initialize rate control after station inserted
From: Kalle Valo @ 2009-08-29  5:22 UTC (permalink / raw)
  To: tim.gardner
  Cc: Johannes Berg, reinette chatre, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org
In-Reply-To: <4A984EBA.9040608@canonical.com>

Tim Gardner <tim.gardner@canonical.com> writes:

>> Interesting. I've been thinking about making it go the other way --
>> remove rate scaling hooks completely. wl1271 apparently has rate scaling
>> completely in the firmware, so the RS algorithm on the host is just
>> overhead. I've been thinking putting 4965+ RS into the _driver_ makes
>> more sense since it really does a lot in the firmware and not on the
>> host.
>>
>> Do you think we should try to go that route? I'd think it would probably
>> be a hardware flag ("no RS algo please") and then we'd skip all the
>> hooks and put things into the driver. The advantage is that we don't
>> care about the mac80211 API any more, things get cleaner and we can just
>> do all RS init from sta_notify().
>>
>
> Wouldn't that make it difficult to experiment with external rate
> scaling algorithms? Not that minstrel or the other in-driver rate
> scaling algorithms always get it right, but they are certainly more
> transparent (and changeable) then firmware.

In wl1271 you are forced to use the rate scaling algorithm from the
firmware. IIRC tx descriptor doesn't even have a field for the bitrate.

-- 
Kalle Valo

^ permalink raw reply

* Ath5k and proprietary extensions
From: Nick Kossifidis @ 2009-08-29  4:51 UTC (permalink / raw)
  To: John W. Linville
  Cc: Luis R. Rodriguez, Bob Copeland, proski, ath5k-devel,
	linux-wireless, ic.felix, Felix Fietkau

Since we started the discussion about ath5k and proprietary features i
started a new thread to continue.

So this is what we have...

a) X.R.: eXtended Range is a set of proprietary rates and some extra
techniques (various hw tweaks etc) to enable long distance, low
bandwidth links. This feature was never really supported on MadWiFi
(some code for sta mode is there but i don't think anyone used it) and
it's ugly (sends beacons on both 1Mbit and 250Kbit, has some sort of
polling mechanism etc). We should remove XR stuff since we all agree
that we won't support it + even if we want we don't have anything to
work with anyway, 5/10MHz channels should be enough for long distance
links. Just leave XR rate code definitions there for reference (in
case we get any of these from the card -normally we shouldn't but it's
good to know all hw rate code values).

b) OFDM-only g settings for AR5211: AR5211 chips have support for
draft-g (eg. no dynamic CCK/OFDM modulation, only OFDM). I don't know
if we want to support it or not, removing the settings will save us
some space and since it's a draft g implementation i don't think there
are many compatible APs out there. Is there any possibility to support
draft-g on mac80211/cfg80211 ? If not we can just drop it else it's
just some extra data, no big deal.

c) Half/quarter rate channels (10/5MHz width) and turbo mode (double
rate - 40MHz width): Hw can transmit with different channel width
allowing us to operate on half, quarter or double rate (also called
turbo mode). Half and quarter rates are straight forward (just
re-program pll/clock and tweak various phy/rf settings) and most chips
support it, turbo mode on the other hand has some extra parameters and
is supported only on super ag enabled (non-lite) chips
(5212,2414,5414,5424 etc). First we want to use it only on "middle"
channels so that we don't get outside band boundaries when changing
channel width, so we have to limit the available channels we can use
(check out super ag white paper), second we have the opportunity to
support both 20MHz and 40MHz at the same time by using "dynamic turbo"
feature on hw so if we are an AP we can deal both with turbo-enabled
clients and normal clients. I was thinking if we are going to have an
API to set channel width to 10 and 5 MHz for half and quarter rate
channels, we can use the same API to set channel width to 40MHz width
for double rate channels on cards that support it and when we are on
AP mode use the "dynamic turbo" stuff. We don't even have to call it
turbo mode, it's just double rate + some tweaks.

Most code is there for half/quarter and (static) turbo operation, we
just have to deal with pll programming, clock settings etc. Question
is how do we use it, NL80211_CMD_TESTMODE is an option i guess and in
case no one else thinks that we could use a channel width API (or
extend what we have) for setting 5/10/40MHz width through cfg80211, we
can just stick to NL80211_CMD_TESTMODE.

d) Fast frames: Hw can tx/rx jumbo frames of 3kbytes+ so fast frame
aggregation is a way to make use of that hw feature by sending 2
frames together (for more infos check out super ag white paper). On
FreeBSD fast frames aggregation is implemented on the protocol stack
(net80211) so that any hw that can tx/rx such jumbo frames can use
fast frame aggregation
(http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/net80211/ieee80211_superg.c?rev=1.7;content-type=text%2Fx-cvsweb-markup;sortby=rev)
but it still maintains atheros's format to be compatible with
commercial Atheros APs. We have talked about this and it seems no one
is willing to support fast frames aggregation so on ath5k we only use
single tx/rx descriptors and there is no related code for handling
multiple descriptors.

e) Compression: Hw can do on-chip compression/decompression using
standard Lempel Ziv algorithm per tx queue, MadWiFi implements this
and uses a vendor IE to let others know that it supports this feature
(same IE is used for all capabilities, fast frames, XR etc). I guess
this can also work for other cards by doing compression/decompression
on software since it's a standard algorithm (and i think kernel
already has code for it) but it's way outside cfg80211/mac80211's
scope. I think we can just use NL80211_CMD_TESTMODE to enable/disable
this on all data queues and skip the IE stuff (user will have to
enable it on both sides to make it work). There is no related code on
ath5k for compression/decompression at the moment.



-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

^ permalink raw reply

* Re: [ath5k-devel] [PATCH 1/2] ath5k: fix uninitialized value use in ath5k_eeprom_read_turbo_modes()
From: Felix Fietkau @ 2009-08-29  1:35 UTC (permalink / raw)
  To: John W. Linville; +Cc: Luis R. Rodriguez, ath5k-devel, linux-wireless, ic.felix
In-Reply-To: <20090828154410.GB32694@tuxdriver.com>

John W. Linville wrote:
> I think I am on the side of removing the non-standard extensions.
> FWIW, I'll need a patch posted with a proper Subject and
> Signed-off-by...
> 
> I think Nick has some valid points.  His position sounds similar to
> that expressed to me by Felix and some others that it would be nice
> if we could more easily accomodate some of the features of madwifi
> that have made it attractive to researchers and experimenters.
> Perhaps NL80211_CMD_TESTMODE relates to this desire?
Yes, that would be a good solution. I know a lot of people who are going
continue to stick with madwifi if they won't be able to use turbo mode
with ath5k. Since quite a few of those people are using OpenWrt, it
would also mean that I would have to continue to maintain my madwifi
semi-fork in OpenWrt even longer, and I definitely want to avoid that.

- Felix

^ permalink raw reply

* Re: ath9k DMA problems
From: Howard Chu @ 2009-08-29  1:06 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org
In-Reply-To: <4A958F45.40109@symas.com>

Am I the only one having these problems? ath9k hasn't worked well for me since 
2.6.29.4; every snapshot since then has suffered from random drops. In 
2.6.29.6 it at least would quickly reassociate. The current ones hang within 
20-30 minutes of use and never come back. The compat-wireless snapshots have 
all been equally unusable.

Howard Chu wrote:
> Still seeing occasional hangs using the ath9k in 2.6.31-rc6, and even worse
> using compat-wireless 2009-08-22. Today I got this which was even more
> interesting:
>
> [369014.776586] wlan0: associate with AP 00:12:17:26:56:10 (try 1)
> [369014.779197] wlan0: RX ReassocResp from 00:12:17:26:56:10 (capab=0x411
> status=0 aid=2)
> [369014.779197] wlan0: associated
> [369472.707961] ath9k: DMA failed to stop in 10 ms AR_CR=0xdeadbeef
> AR_DIAG_SW=0xdeadbeef
>
> This is on an HP dv5z laptop, it reports an AR9280 at boot.


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

^ permalink raw reply

* 2.6.31-rc8-wl-34750-gd2c67e1 suspected memory leaks
From: Davide Pesavento @ 2009-08-28 23:32 UTC (permalink / raw)
  To: linux-wireless

Hi,

with latest wireless-testing I'm seeing the following kmemleak's warnings.

unreferenced object 0xffff88007cb8cbd0 (size 96):
  comm "softirq", pid 0, jiffies 4294914587
  backtrace:
    [<ffffffff810e312c>] create_object+0x14c/0x2f0
    [<ffffffff810e3425>] kmemleak_alloc+0x35/0x80
    [<ffffffff810dd904>] kmem_cache_alloc+0xc4/0x150
    [<ffffffffa01c77eb>] 0xffffffffa01c77eb
    [<ffffffffa01c1616>] 0xffffffffa01c1616
    [<ffffffffa0156f43>] __ieee80211_tx+0x123/0x1c0 [mac80211]
    [<ffffffffa0157fef>] ieee80211_tx+0xef/0x2a0 [mac80211]
    [<ffffffffa0158287>] ieee80211_xmit+0xe7/0x280 [mac80211]
    [<ffffffffa015847f>] ieee80211_tx_skb+0x5f/0x90 [mac80211]
    [<ffffffffa015b164>] ieee80211_send_auth+0x164/0x1f0 [mac80211]
    [<ffffffffa014b1b6>] ieee80211_authenticate+0xf6/0x130 [mac80211]
    [<ffffffffa014bf1a>] ieee80211_rx_mgmt_probe_resp+0x1da/0x200 [mac80211]
    [<ffffffffa014cd95>] ieee80211_sta_work+0x9a5/0x1100 [mac80211]
    [<ffffffff81067478>] worker_thread+0x1c8/0x350
    [<ffffffff8106d066>] kthread+0xb6/0xc0
    [<ffffffff8100d35a>] child_rip+0xa/0x20
unreferenced object 0xffff88007cb8cd20 (size 96):
  comm "softirq", pid 0, jiffies 4294914588
  backtrace:
    [<ffffffff810e312c>] create_object+0x14c/0x2f0
    [<ffffffff810e3425>] kmemleak_alloc+0x35/0x80
    [<ffffffff810dd904>] kmem_cache_alloc+0xc4/0x150
    [<ffffffffa01c77eb>] 0xffffffffa01c77eb
    [<ffffffffa01c1616>] 0xffffffffa01c1616
    [<ffffffffa0156f43>] __ieee80211_tx+0x123/0x1c0 [mac80211]
    [<ffffffffa0157fef>] ieee80211_tx+0xef/0x2a0 [mac80211]
    [<ffffffffa0158287>] ieee80211_xmit+0xe7/0x280 [mac80211]
    [<ffffffffa015847f>] ieee80211_tx_skb+0x5f/0x90 [mac80211]
    [<ffffffffa014cb13>] ieee80211_sta_work+0x723/0x1100 [mac80211]
    [<ffffffff81067478>] worker_thread+0x1c8/0x350
    [<ffffffff8106d066>] kthread+0xb6/0xc0
    [<ffffffff8100d35a>] child_rip+0xa/0x20
    [<ffffffffffffffff>] 0xffffffffffffffff
unreferenced object 0xffff8800625d6c78 (size 96):
  comm "softirq", pid 0, jiffies 4295666572
  backtrace:
    [<ffffffff810e312c>] create_object+0x14c/0x2f0
    [<ffffffff810e3425>] kmemleak_alloc+0x35/0x80
    [<ffffffff810dd904>] kmem_cache_alloc+0xc4/0x150
    [<ffffffffa01c77eb>] 0xffffffffa01c77eb
    [<ffffffffa01c1616>] 0xffffffffa01c1616
    [<ffffffffa0156f43>] __ieee80211_tx+0x123/0x1c0 [mac80211]
    [<ffffffffa0157fef>] ieee80211_tx+0xef/0x2a0 [mac80211]
    [<ffffffffa0158287>] ieee80211_xmit+0xe7/0x280 [mac80211]
    [<ffffffffa015847f>] ieee80211_tx_skb+0x5f/0x90 [mac80211]
    [<ffffffffa014918b>] ieee80211_send_deauth_disassoc+0x12b/0x190 [mac80211]
    [<ffffffffa014d25f>] ieee80211_sta_work+0xe6f/0x1100 [mac80211]
    [<ffffffff81067478>] worker_thread+0x1c8/0x350
    [<ffffffff8106d066>] kthread+0xb6/0xc0
    [<ffffffff8100d35a>] child_rip+0xa/0x20
    [<ffffffffffffffff>] 0xffffffffffffffff
unreferenced object 0xffff88007e5de110 (size 64):
  comm "events/1", pid 11, jiffies 4295690130
  backtrace:
    [<ffffffff810e312c>] create_object+0x14c/0x2f0
    [<ffffffff810e3425>] kmemleak_alloc+0x35/0x80
    [<ffffffff810de1b2>] __kmalloc+0x122/0x1b0
    [<ffffffffa00a8739>] reg_copy_regd+0x39/0xc0 [cfg80211]
    [<ffffffffa00a8c5c>] reg_todo+0x49c/0x5f0 [cfg80211]
    [<ffffffff81067478>] worker_thread+0x1c8/0x350
    [<ffffffff8106d066>] kthread+0xb6/0xc0
    [<ffffffff8100d35a>] child_rip+0xa/0x20
    [<ffffffffffffffff>] 0xffffffffffffffff
unreferenced object 0xffff8800625d6bd0 (size 96):
  comm "softirq", pid 0, jiffies 4295700338
  backtrace:
    [<ffffffff810e312c>] create_object+0x14c/0x2f0
    [<ffffffff810e3425>] kmemleak_alloc+0x35/0x80
    [<ffffffff810dd904>] kmem_cache_alloc+0xc4/0x150
    [<ffffffffa03227eb>] ath_tx_start+0xbb/0x8b0 [ath9k]
    [<ffffffffa031c616>] ath9k_tx+0x156/0x2b0 [ath9k]
    [<ffffffffa0156f43>] __ieee80211_tx+0x123/0x1c0 [mac80211]
    [<ffffffffa0157fef>] ieee80211_tx+0xef/0x2a0 [mac80211]
    [<ffffffffa0158287>] ieee80211_xmit+0xe7/0x280 [mac80211]
    [<ffffffffa015847f>] ieee80211_tx_skb+0x5f/0x90 [mac80211]
    [<ffffffffa015b164>] ieee80211_send_auth+0x164/0x1f0 [mac80211]
    [<ffffffffa014b1b6>] ieee80211_authenticate+0xf6/0x130 [mac80211]
    [<ffffffffa014bf1a>] ieee80211_rx_mgmt_probe_resp+0x1da/0x200 [mac80211]
    [<ffffffffa014cd95>] ieee80211_sta_work+0x9a5/0x1100 [mac80211]
    [<ffffffff81067478>] worker_thread+0x1c8/0x350
    [<ffffffff8106d066>] kthread+0xb6/0xc0
    [<ffffffff8100d35a>] child_rip+0xa/0x20
unreferenced object 0xffff8800625d6888 (size 96):
  comm "softirq", pid 0, jiffies 4295700339
  backtrace:
    [<ffffffff810e312c>] create_object+0x14c/0x2f0
    [<ffffffff810e3425>] kmemleak_alloc+0x35/0x80
    [<ffffffff810dd904>] kmem_cache_alloc+0xc4/0x150
    [<ffffffffa03227eb>] ath_tx_start+0xbb/0x8b0 [ath9k]
    [<ffffffffa031c616>] ath9k_tx+0x156/0x2b0 [ath9k]
    [<ffffffffa0156f43>] __ieee80211_tx+0x123/0x1c0 [mac80211]
    [<ffffffffa0157fef>] ieee80211_tx+0xef/0x2a0 [mac80211]
    [<ffffffffa0158287>] ieee80211_xmit+0xe7/0x280 [mac80211]
    [<ffffffffa015847f>] ieee80211_tx_skb+0x5f/0x90 [mac80211]
    [<ffffffffa014cb13>] ieee80211_sta_work+0x723/0x1100 [mac80211]
    [<ffffffff81067478>] worker_thread+0x1c8/0x350
    [<ffffffff8106d066>] kthread+0xb6/0xc0
    [<ffffffff8100d35a>] child_rip+0xa/0x20
    [<ffffffffffffffff>] 0xffffffffffffffff


Regards,
Davide

^ permalink raw reply

* Re: [PATCH 1/2] cfg80211: initialize rate control after station inserted
From: reinette chatre @ 2009-08-28 22:18 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
In-Reply-To: <1251493298.3456.34.camel@johannes.local>

Hi Johannes,

On Fri, 2009-08-28 at 14:01 -0700, Johannes Berg wrote:
> > This work is motivated by an attempt to untangle the iwlwifi station
> > management to be able to use mac80211's sta notify callback. From 4965
> > and up the rate scaling in the device is done per station, so an entry
> > in the station table is required for the rate scaling initialization to
> > succeed. 
> 
> Interesting. I've been thinking about making it go the other way --
> remove rate scaling hooks completely. wl1271 apparently has rate scaling
> completely in the firmware, so the RS algorithm on the host is just
> overhead. I've been thinking putting 4965+ RS into the _driver_ makes
> more sense since it really does a lot in the firmware and not on the
> host.

Yes, it does do a lot in firmware. Unfortunately I am not too familiar
with the details (yet).

> Do you think we should try to go that route? I'd think it would probably
> be a hardware flag ("no RS algo please") and then we'd skip all the
> hooks and put things into the driver. The advantage is that we don't
> care about the mac80211 API any more, things get cleaner and we can just
> do all RS init from sta_notify().

It could do RS init from sta_notify and that would solve this problem. I
am not familiar with how the other hooks operate to know at this time
what it will take to do everything in the driver. Come to think of it,
as a test over here I can just make our RS init routine a no-op and then
do the init from sta notify. 

> 
> I've also been thinking if there's a way to make sta_notify() able to
> sleep but so far I don't see one unfortunately.

Having it sleep will help a lot. When a station is added we need to tell
the device about it. Since the call cannot sleep we cannot really tell
mac80211 if this failed because the failure will only be known at a
later time. I have not yet figured out how to deal with this case.


> > Right now iwlwifi is adding stations inside the rate scaling code in
> > order to work around this issue. I'd like to clean this up and only use
> > the sta notify callback.
> 
> Makes sense, thanks, I appreciate that -- should be a good cleanup to
> the driver and reduce the number of places that try to add a station and
> make the driver more streamlined.

Exactly.

> > >  -- all that seems to do is add race conditions,
> > > allowing other code to find not-yet-initialised stations.
> > 
> > I did not realize that this can happen. Can you please elaborate?
> 
> As soon as sta_insert() got called, a packet transmitted to that station
> can be processed, find the sta info, and it seems we could end up
> calling rate_control_get_rate() before the init was done, through a race
> condition.

oh - I see - that's bad. Although, that may explain why iwlwifi is
adding stations in get_rate() also. 

Reinette




^ permalink raw reply

* Re: [PATCH 1/2] cfg80211: initialize rate control after station inserted
From: Tim Gardner @ 2009-08-28 21:40 UTC (permalink / raw)
  To: Johannes Berg
  Cc: reinette chatre, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org
In-Reply-To: <1251493298.3456.34.camel@johannes.local>

Johannes Berg wrote:
> Hi Reinette,
> 
>> This work is motivated by an attempt to untangle the iwlwifi station
>> management to be able to use mac80211's sta notify callback. From 4965
>> and up the rate scaling in the device is done per station, so an entry
>> in the station table is required for the rate scaling initialization to
>> succeed. 
> 
> Interesting. I've been thinking about making it go the other way --
> remove rate scaling hooks completely. wl1271 apparently has rate scaling
> completely in the firmware, so the RS algorithm on the host is just
> overhead. I've been thinking putting 4965+ RS into the _driver_ makes
> more sense since it really does a lot in the firmware and not on the
> host.
> 
> Do you think we should try to go that route? I'd think it would probably
> be a hardware flag ("no RS algo please") and then we'd skip all the
> hooks and put things into the driver. The advantage is that we don't
> care about the mac80211 API any more, things get cleaner and we can just
> do all RS init from sta_notify().
> 

Wouldn't that make it difficult to experiment with external rate scaling 
algorithms? Not that minstrel or the other in-driver rate scaling 
algorithms always get it right, but they are certainly more transparent 
(and changeable) then firmware.

rtg
-- 
Tim Gardner tim.gardner@canonical.com

^ permalink raw reply

* Re: [PATCH 1/2] cfg80211: initialize rate control after station inserted
From: Luis R. Rodriguez @ 2009-08-28 21:26 UTC (permalink / raw)
  To: Johannes Berg
  Cc: reinette chatre, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org
In-Reply-To: <1251493298.3456.34.camel@johannes.local>

On Fri, Aug 28, 2009 at 2:01 PM, Johannes Berg<johannes@sipsolutions.net> wrote:
> Interesting. I've been thinking about making it go the other way --
> remove rate scaling hooks completely. wl1271 apparently has rate scaling
> completely in the firmware,

Just FYI -- ar9271 seems to also do this in firmware, haven't gotten
to that part yet but so I'm told.

  Luis

^ permalink raw reply

* Re: [PATCH 1/2] cfg80211: initialize rate control after station inserted
From: Johannes Berg @ 2009-08-28 21:01 UTC (permalink / raw)
  To: reinette chatre; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
In-Reply-To: <1251474321.3805.73.camel@rc-desk>

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

Hi Reinette,

> This work is motivated by an attempt to untangle the iwlwifi station
> management to be able to use mac80211's sta notify callback. From 4965
> and up the rate scaling in the device is done per station, so an entry
> in the station table is required for the rate scaling initialization to
> succeed. 

Interesting. I've been thinking about making it go the other way --
remove rate scaling hooks completely. wl1271 apparently has rate scaling
completely in the firmware, so the RS algorithm on the host is just
overhead. I've been thinking putting 4965+ RS into the _driver_ makes
more sense since it really does a lot in the firmware and not on the
host.

Do you think we should try to go that route? I'd think it would probably
be a hardware flag ("no RS algo please") and then we'd skip all the
hooks and put things into the driver. The advantage is that we don't
care about the mac80211 API any more, things get cleaner and we can just
do all RS init from sta_notify().

I've also been thinking if there's a way to make sta_notify() able to
sleep but so far I don't see one unfortunately.

Thoughts?

Anyhow, thanks for the explanation.

> > > @@ -742,13 +740,17 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
> > >  		if (err == -EEXIST && layer2_update) {
> > >  			/* Need to update layer 2 devices on reassociation */
> > >  			sta = sta_info_get(local, mac);
> > > -			if (sta)
> > > +			if (sta) {
> > > +				rate_control_rate_init(sta);
> > >  				ieee80211_send_layer2_update(sta);
> > > +			}
> > >  		}
> > 
> > Why is this necessary? It should already have been called for this
> > station earlier?
> 
> maybe - I just tried to have the code behave exactly as before, just
> with the rate scale initialization called later. Even before this patch,
> rate scaling initialization would be called if the station already
> exists. 
> 
> If it is not necessary I can remove it.

No, right, I understand now.

> Right now iwlwifi is adding stations inside the rate scaling code in
> order to work around this issue. I'd like to clean this up and only use
> the sta notify callback.

Makes sense, thanks, I appreciate that -- should be a good cleanup to
the driver and reduce the number of places that try to add a station and
make the driver more streamlined.

> > Same in ibss.c (not quoting it here) where you're only moving it to
> > after sta_info_insert()
> 
> This was my goal actually.

Yeah, I finally understood :)

> >  -- all that seems to do is add race conditions,
> > allowing other code to find not-yet-initialised stations.
> 
> I did not realize that this can happen. Can you please elaborate?

As soon as sta_insert() got called, a packet transmitted to that station
can be processed, find the sta info, and it seems we could end up
calling rate_control_get_rate() before the init was done, through a race
condition.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: b43: LP-PHY: Fix TX gain tables
From: Michael Buesch @ 2009-08-28 20:39 UTC (permalink / raw)
  To: Gábor Stefanik
  Cc: John Linville, Larry Finger, Mark Huijgen, Broadcom Wireless,
	linux-wireless
In-Reply-To: <4A983FB2.2020509@gmail.com>

On Friday 28 August 2009 22:36:02 Gábor Stefanik wrote:
> The rev1 2GHz and rev2 5GHz gain tables were incorrectly documented
> on the specs originally. Update these gaintables to match the cor-
> rected specs.
> 
> Signed-off-by: Gábor Stefanik <netroller.3d@gmail.com>

ack

-- 
Greetings, Michael.

^ permalink raw reply

* [PATCH] b43: LP-PHY: Fix TX gain tables
From: Gábor Stefanik @ 2009-08-28 20:37 UTC (permalink / raw)
  To: John Linville, Michael Buesch, Larry Finger
  Cc: Mark Huijgen, Broadcom Wireless, linux-wireless
In-Reply-To: <4A983FB2.2020509@gmail.com>

Just noticed that the [PATCH] tag is accidentally missing on this one
- I hope you can still apply it.

2009/8/28 Gábor Stefanik <netrolller.3d@gmail.com>:
> The rev1 2GHz and rev2 5GHz gain tables were incorrectly documented
> on the specs originally. Update these gaintables to match the cor-
> rected specs.
>
> Signed-off-by: Gábor Stefanik <netroller.3d@gmail.com>
> ---
> drivers/net/wireless/b43/tables_lpphy.c |  306
> +++++++++++++++---------------
> 1 files changed, 153 insertions(+), 153 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/tables_lpphy.c
> b/drivers/net/wireless/b43/tables_lpphy.c
> index b24521c..0312b31 100644
> --- a/drivers/net/wireless/b43/tables_lpphy.c
> +++ b/drivers/net/wireless/b43/tables_lpphy.c
> @@ -1613,11 +1613,62 @@ static struct lpphy_tx_gain_table_entry
> lpphy_rev1_nopa_tx_gain_table[] = {
> };
>
> static struct lpphy_tx_gain_table_entry lpphy_rev1_2ghz_tx_gain_table[] = {
> -       { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 85, },
> -       { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 81, },
> -       { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 78, },
> -       { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 76, },
> -       { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 74, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 90, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 88, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 85, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 83, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 81, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 78, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 76, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 74, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 72, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 70, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 68, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 66, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 64, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 62, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 60, },
> +       { .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 59, },
> +       { .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 72, },
> +       { .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 70, },
> +       { .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 68, },
> +       { .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 66, },
> +       { .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 64, },
> +       { .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 62, },
> +       { .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 60, },
> +       { .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 59, },
> +       { .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 72, },
> +       { .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 70, },
> +       { .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 68, },
> +       { .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 66, },
> +       { .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 64, },
> +       { .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 62, },
> +       { .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 60, },
> +       { .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 59, },
> +       { .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 72, },
> +       { .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 70, },
> +       { .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 68, },
> +       { .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 66, },
> +       { .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 64, },
> +       { .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 62, },
> +       { .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 60, },
> +       { .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 59, },
> +       { .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 72, },
> +       { .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 70, },
> +       { .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 68, },
> +       { .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 66, },
> +       { .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 64, },
> +       { .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 62, },
> +       { .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 60, },
> +       { .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 59, },
> +       { .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 72, },
> +       { .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 70, },
> +       { .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 68, },
> +       { .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 66, },
> +       { .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 64, },
> +       { .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 62, },
> +       { .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 60, },
> +       { .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 59, },
>        { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 72, },
>        { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 70, },
>        { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 68, },
> @@ -1690,57 +1741,6 @@ static struct lpphy_tx_gain_table_entry
> lpphy_rev1_2ghz_tx_gain_table[] = {
>        { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 64, },
>        { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 62, },
>        { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 60, },
> -       { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 59, },
> -       { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 72, },
> -       { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 70, },
> -       { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 68, },
> -       { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 66, },
> -       { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 64, },
> -       { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 62, },
> -       { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 60, },
> -       { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 59, },
> -       { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 70, },
> -       { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 68, },
> -       { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 66, },
> -       { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 64, },
> -       { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 63, },
> -       { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 61, },
> -       { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 59, },
> -       { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 71, },
> -       { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 69, },
> -       { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 67, },
> -       { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 65, },
> -       { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 63, },
> -       { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 62, },
> -       { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 60, },
> -       { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 58, },
> -       { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 70, },
> -       { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 68, },
> -       { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 66, },
> -       { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 65, },
> -       { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 63, },
> -       { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 61, },
> -       { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 59, },
> -       { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 68, },
> -       { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 66, },
> -       { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 64, },
> -       { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 62, },
> -       { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 61, },
> -       { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 59, },
> -       { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 67, },
> -       { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 65, },
> -       { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 63, },
> -       { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 62, },
> -       { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 60, },
> -       { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 65, },
> -       { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 63, },
> -       { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 61, },
> -       { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 60, },
> -       { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 58, },
> -       { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 68, },
> -       { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 66, },
> -       { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 64, },
> -       { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 62, },
> };
>
> static struct lpphy_tx_gain_table_entry lpphy_rev1_5ghz_tx_gain_table[] = {
> @@ -2168,103 +2168,103 @@ static struct lpphy_tx_gain_table_entry
> lpphy_rev2_5ghz_tx_gain_table[] = {
>        { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 68, },
>        { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 66, },
>        { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 248, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 241, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 234, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 227, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 221, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 215, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 208, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 203, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 197, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 191, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 186, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 181, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 175, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 170, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 166, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 161, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 156, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 152, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 148, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 143, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 139, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 135, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 132, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 128, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 124, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 121, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 117, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 114, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 111, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 108, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 104, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 102, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 99, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 96, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 93, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 90, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 88, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 85, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 83, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 81, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 78, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 76, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 74, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 72, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 70, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 68, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 66, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 64, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 64, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 62, .pad = 255, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 62, .pad = 248, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 60, .pad = 248, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 60, .pad = 241, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 59, .pad = 241, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 59, .pad = 234, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 57, .pad = 234, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 57, .pad = 227, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 55, .pad = 227, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 55, .pad = 221, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 54, .pad = 221, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 54, .pad = 215, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 52, .pad = 215, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 52, .pad = 208, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 51, .pad = 208, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 51, .pad = 203, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 49, .pad = 203, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 49, .pad = 197, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 48, .pad = 197, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 48, .pad = 191, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 47, .pad = 191, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 47, .pad = 186, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 45, .pad = 186, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 45, .pad = 181, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 44, .pad = 181, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 44, .pad = 175, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 43, .pad = 175, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 43, .pad = 170, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 42, .pad = 170, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 42, .pad = 166, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 40, .pad = 166, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 40, .pad = 161, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 39, .pad = 161, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 39, .pad = 156, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 38, .pad = 156, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 38, .pad = 152, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 37, .pad = 152, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 37, .pad = 148, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 36, .pad = 148, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 36, .pad = 143, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 35, .pad = 143, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 35, .pad = 139, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 34, .pad = 139, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 34, .pad = 135, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 33, .pad = 135, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 33, .pad = 132, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 32, .pad = 132, .dac = 0, .bb_mult = 64, },
> -       { .gm = 255, .pga = 32, .pad = 128, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 248, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 241, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 234, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 227, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 221, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 215, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 208, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 197, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 191, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 186, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 181, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 175, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 170, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 166, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 161, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 156, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 152, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 148, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 143, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 139, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 135, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 132, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 128, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 124, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 121, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 117, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 114, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 111, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 108, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 104, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 102, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 99, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 96, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 93, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 90, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 88, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 85, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 83, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 81, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 78, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 76, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 74, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 72, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 70, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 68, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 66, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 64, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 64, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 255, .pad = 62, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 248, .pad = 62, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 248, .pad = 60, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 241, .pad = 60, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 241, .pad = 59, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 234, .pad = 59, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 234, .pad = 57, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 227, .pad = 57, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 227, .pad = 55, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 221, .pad = 55, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 221, .pad = 54, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 215, .pad = 54, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 215, .pad = 52, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 208, .pad = 52, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 208, .pad = 51, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 203, .pad = 51, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 203, .pad = 49, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 197, .pad = 49, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 197, .pad = 48, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 191, .pad = 48, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 191, .pad = 47, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 186, .pad = 47, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 186, .pad = 45, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 181, .pad = 45, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 181, .pad = 44, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 175, .pad = 44, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 175, .pad = 43, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 170, .pad = 43, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 170, .pad = 42, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 166, .pad = 42, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 166, .pad = 40, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 161, .pad = 40, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 161, .pad = 39, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 156, .pad = 39, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 156, .pad = 38, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 152, .pad = 38, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 152, .pad = 37, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 148, .pad = 37, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 148, .pad = 36, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 143, .pad = 36, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 143, .pad = 35, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 139, .pad = 35, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 139, .pad = 34, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 135, .pad = 34, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 135, .pad = 33, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 132, .pad = 33, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 132, .pad = 32, .dac = 0, .bb_mult = 64, },
> +       { .gm = 255, .pga = 128, .pad = 32, .dac = 0, .bb_mult = 64, },
> };
>
> void lpphy_rev0_1_table_init(struct b43_wldev *dev)
> --
> 1.6.2.4
>
>
>
>



-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

^ permalink raw reply

* b43: LP-PHY: Fix TX gain tables
From: Gábor Stefanik @ 2009-08-28 20:36 UTC (permalink / raw)
  To: John Linville, Michael Buesch, Larry Finger
  Cc: Mark Huijgen, Broadcom Wireless, linux-wireless

The rev1 2GHz and rev2 5GHz gain tables were incorrectly documented
on the specs originally. Update these gaintables to match the cor-
rected specs.

Signed-off-by: Gábor Stefanik <netroller.3d@gmail.com>
---
 drivers/net/wireless/b43/tables_lpphy.c |  306 +++++++++++++++---------------
 1 files changed, 153 insertions(+), 153 deletions(-)

diff --git a/drivers/net/wireless/b43/tables_lpphy.c b/drivers/net/wireless/b43/tables_lpphy.c
index b24521c..0312b31 100644
--- a/drivers/net/wireless/b43/tables_lpphy.c
+++ b/drivers/net/wireless/b43/tables_lpphy.c
@@ -1613,11 +1613,62 @@ static struct lpphy_tx_gain_table_entry lpphy_rev1_nopa_tx_gain_table[] = {
 };
 
 static struct lpphy_tx_gain_table_entry lpphy_rev1_2ghz_tx_gain_table[] = {
-	{ .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 85, },
-	{ .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 81, },
-	{ .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 78, },
-	{ .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 76, },
-	{ .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 74, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 90, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 88, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 85, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 83, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 81, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 78, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 76, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 74, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 72, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 70, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 68, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 66, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 64, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 62, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 60, },
+	{ .gm = 4, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 59, },
+	{ .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 72, },
+	{ .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 70, },
+	{ .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 68, },
+	{ .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 66, },
+	{ .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 64, },
+	{ .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 62, },
+	{ .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 60, },
+	{ .gm = 4, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 59, },
+	{ .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 72, },
+	{ .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 70, },
+	{ .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 68, },
+	{ .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 66, },
+	{ .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 64, },
+	{ .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 62, },
+	{ .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 60, },
+	{ .gm = 4, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 59, },
+	{ .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 72, },
+	{ .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 70, },
+	{ .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 68, },
+	{ .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 66, },
+	{ .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 64, },
+	{ .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 62, },
+	{ .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 60, },
+	{ .gm = 4, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 59, },
+	{ .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 72, },
+	{ .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 70, },
+	{ .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 68, },
+	{ .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 66, },
+	{ .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 64, },
+	{ .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 62, },
+	{ .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 60, },
+	{ .gm = 4, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 59, },
+	{ .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 72, },
+	{ .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 70, },
+	{ .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 68, },
+	{ .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 66, },
+	{ .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 64, },
+	{ .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 62, },
+	{ .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 60, },
+	{ .gm = 4, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 59, },
 	{ .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 72, },
 	{ .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 70, },
 	{ .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 68, },
@@ -1690,57 +1741,6 @@ static struct lpphy_tx_gain_table_entry lpphy_rev1_2ghz_tx_gain_table[] = {
 	{ .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 64, },
 	{ .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 62, },
 	{ .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 60, },
-	{ .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 59, },
-	{ .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 72, },
-	{ .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 70, },
-	{ .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 68, },
-	{ .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 66, },
-	{ .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 64, },
-	{ .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 62, },
-	{ .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 60, },
-	{ .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 59, },
-	{ .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 70, },
-	{ .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 68, },
-	{ .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 66, },
-	{ .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 64, },
-	{ .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 63, },
-	{ .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 61, },
-	{ .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 59, },
-	{ .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 71, },
-	{ .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 69, },
-	{ .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 67, },
-	{ .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 65, },
-	{ .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 63, },
-	{ .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 62, },
-	{ .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 60, },
-	{ .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 58, },
-	{ .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 70, },
-	{ .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 68, },
-	{ .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 66, },
-	{ .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 65, },
-	{ .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 63, },
-	{ .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 61, },
-	{ .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 59, },
-	{ .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 68, },
-	{ .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 66, },
-	{ .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 64, },
-	{ .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 62, },
-	{ .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 61, },
-	{ .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 59, },
-	{ .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 67, },
-	{ .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 65, },
-	{ .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 63, },
-	{ .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 62, },
-	{ .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 60, },
-	{ .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 65, },
-	{ .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 63, },
-	{ .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 61, },
-	{ .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 60, },
-	{ .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 58, },
-	{ .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 68, },
-	{ .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 66, },
-	{ .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 64, },
-	{ .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 62, },
 };
 
 static struct lpphy_tx_gain_table_entry lpphy_rev1_5ghz_tx_gain_table[] = {
@@ -2168,103 +2168,103 @@ static struct lpphy_tx_gain_table_entry lpphy_rev2_5ghz_tx_gain_table[] = {
 	{ .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 68, },
 	{ .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 66, },
 	{ .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 248, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 241, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 234, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 227, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 221, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 215, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 208, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 203, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 197, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 191, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 186, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 181, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 175, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 170, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 166, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 161, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 156, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 152, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 148, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 143, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 139, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 135, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 132, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 128, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 124, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 121, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 117, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 114, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 111, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 108, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 104, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 102, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 99, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 96, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 93, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 90, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 88, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 85, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 83, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 81, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 78, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 76, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 74, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 72, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 70, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 68, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 66, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 64, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 64, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 62, .pad = 255, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 62, .pad = 248, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 60, .pad = 248, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 60, .pad = 241, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 59, .pad = 241, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 59, .pad = 234, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 57, .pad = 234, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 57, .pad = 227, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 55, .pad = 227, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 55, .pad = 221, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 54, .pad = 221, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 54, .pad = 215, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 52, .pad = 215, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 52, .pad = 208, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 51, .pad = 208, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 51, .pad = 203, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 49, .pad = 203, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 49, .pad = 197, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 48, .pad = 197, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 48, .pad = 191, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 47, .pad = 191, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 47, .pad = 186, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 45, .pad = 186, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 45, .pad = 181, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 44, .pad = 181, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 44, .pad = 175, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 43, .pad = 175, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 43, .pad = 170, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 42, .pad = 170, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 42, .pad = 166, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 40, .pad = 166, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 40, .pad = 161, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 39, .pad = 161, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 39, .pad = 156, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 38, .pad = 156, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 38, .pad = 152, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 37, .pad = 152, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 37, .pad = 148, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 36, .pad = 148, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 36, .pad = 143, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 35, .pad = 143, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 35, .pad = 139, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 34, .pad = 139, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 34, .pad = 135, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 33, .pad = 135, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 33, .pad = 132, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 32, .pad = 132, .dac = 0, .bb_mult = 64, },
-	{ .gm = 255, .pga = 32, .pad = 128, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 248, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 241, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 234, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 227, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 221, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 215, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 208, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 197, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 191, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 186, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 181, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 175, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 170, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 166, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 161, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 156, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 152, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 148, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 143, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 139, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 135, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 132, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 128, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 124, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 121, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 117, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 114, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 111, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 108, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 104, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 102, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 99, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 96, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 93, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 90, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 88, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 85, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 83, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 81, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 78, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 76, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 74, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 72, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 70, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 68, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 66, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 64, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 64, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 255, .pad = 62, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 248, .pad = 62, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 248, .pad = 60, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 241, .pad = 60, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 241, .pad = 59, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 234, .pad = 59, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 234, .pad = 57, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 227, .pad = 57, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 227, .pad = 55, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 221, .pad = 55, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 221, .pad = 54, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 215, .pad = 54, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 215, .pad = 52, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 208, .pad = 52, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 208, .pad = 51, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 203, .pad = 51, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 203, .pad = 49, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 197, .pad = 49, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 197, .pad = 48, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 191, .pad = 48, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 191, .pad = 47, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 186, .pad = 47, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 186, .pad = 45, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 181, .pad = 45, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 181, .pad = 44, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 175, .pad = 44, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 175, .pad = 43, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 170, .pad = 43, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 170, .pad = 42, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 166, .pad = 42, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 166, .pad = 40, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 161, .pad = 40, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 161, .pad = 39, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 156, .pad = 39, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 156, .pad = 38, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 152, .pad = 38, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 152, .pad = 37, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 148, .pad = 37, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 148, .pad = 36, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 143, .pad = 36, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 143, .pad = 35, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 139, .pad = 35, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 139, .pad = 34, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 135, .pad = 34, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 135, .pad = 33, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 132, .pad = 33, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 132, .pad = 32, .dac = 0, .bb_mult = 64, },
+	{ .gm = 255, .pga = 128, .pad = 32, .dac = 0, .bb_mult = 64, },
 };
 
 void lpphy_rev0_1_table_init(struct b43_wldev *dev)
-- 
1.6.2.4




^ permalink raw reply related

* [PATCH] b43: Fix typo in modparam_btcoex description
From: Gábor Stefanik @ 2009-08-28 20:34 UTC (permalink / raw)
  To: John Linville, Michael Buesch
  Cc: Larry Finger, Broadcom Wireless, linux-wireless, trivial

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
 drivers/net/wireless/b43/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 1263f4b..f2c5b2d 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -91,7 +91,7 @@ MODULE_PARM_DESC(qos, "Enable QOS support (default on)");
 
 static int modparam_btcoex = 1;
 module_param_named(btcoex, modparam_btcoex, int, 0444);
-MODULE_PARM_DESC(btcoex, "Enable Bluetooth coexistance (default on)");
+MODULE_PARM_DESC(btcoex, "Enable Bluetooth coexistence (default on)");
 
 int b43_modparam_verbose = B43_VERBOSITY_DEFAULT;
 module_param_named(verbose, b43_modparam_verbose, int, 0644);
-- 
1.6.2.4




^ permalink raw reply related

* [PATCH] b43: Add myself to module authors & to LP-PHY file copyright notices
From: Gábor Stefanik @ 2009-08-28 20:32 UTC (permalink / raw)
  To: John Linville, Michael Buesch
  Cc: Larry Finger, Broadcom Wireless, linux-wireless

Also mark the LP-PHY driver "802.11a/g" instead of "802.11g",
as LP-PHY is capable of both 2GHz and 5GHz operation.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
 drivers/net/wireless/b43/main.c         |    1 +
 drivers/net/wireless/b43/phy_lp.c       |    3 ++-
 drivers/net/wireless/b43/tables_lpphy.c |    3 ++-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 5cc90a2..f2c5b2d 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -58,6 +58,7 @@ MODULE_DESCRIPTION("Broadcom B43 wireless driver");
 MODULE_AUTHOR("Martin Langer");
 MODULE_AUTHOR("Stefano Brivio");
 MODULE_AUTHOR("Michael Buesch");
+MODULE_AUTHOR("Gábor Stefanik");
 MODULE_LICENSE("GPL");
 
 MODULE_FIRMWARE(B43_SUPPORTED_FIRMWARE_ID);
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index fded6e5..5fff30a 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -1,9 +1,10 @@
 /*
 
   Broadcom B43 wireless driver
-  IEEE 802.11g LP-PHY driver
+  IEEE 802.11a/g LP-PHY driver
 
   Copyright (c) 2008-2009 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2009 Gábor Stefanik <netrolller.3d@gmail.com>
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43/tables_lpphy.c b/drivers/net/wireless/b43/tables_lpphy.c
index 3464ac0..61027ee 100644
--- a/drivers/net/wireless/b43/tables_lpphy.c
+++ b/drivers/net/wireless/b43/tables_lpphy.c
@@ -1,9 +1,10 @@
 /*
 
   Broadcom B43 wireless driver
-  IEEE 802.11g LP-PHY and radio device data tables
+  IEEE 802.11a/g LP-PHY and radio device data tables
 
   Copyright (c) 2009 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2009 Gábor Stefanik <netrolller.3d@gmail.com>
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
-- 
1.6.2.4




^ permalink raw reply related

* [PATCH] b43: Refactor and update antenna diversity for A/G-PHY
From: Gábor Stefanik @ 2009-08-28 19:37 UTC (permalink / raw)
  To: John Linville, Michael Buesch
  Cc: Larry Finger, Broadcom Wireless, linux-wireless

-Make use of the b43_phy_set/mask/maskset helpers.
-Fix a few errors in the code.
-Make the code more readable.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
The "phy->analog == 3" to "phy->rev == 3" change in A-PHY is intentional,
it's a bugfix/spec conformance fix.

 drivers/net/wireless/b43/phy_a.c |   48 ++++++++++----------------------
 drivers/net/wireless/b43/phy_g.c |   55 +++++++++++++++----------------------
 2 files changed, 37 insertions(+), 66 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_a.c b/drivers/net/wireless/b43/phy_a.c
index 809ec97..d90217c 100644
--- a/drivers/net/wireless/b43/phy_a.c
+++ b/drivers/net/wireless/b43/phy_a.c
@@ -518,58 +518,40 @@ static unsigned int b43_aphy_op_get_default_chan(struct b43_wldev *dev)
 static void b43_aphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
 {//TODO
 	struct b43_phy *phy = &dev->phy;
-	u64 hf;
 	u16 tmp;
 	int autodiv = 0;
 
 	if (antenna == B43_ANTENNA_AUTO0 || antenna == B43_ANTENNA_AUTO1)
 		autodiv = 1;
 
-	hf = b43_hf_read(dev);
-	hf &= ~B43_HF_ANTDIVHELP;
-	b43_hf_write(dev, hf);
+	b43_hf_write(dev, b43_hf_read(dev) & ~B43_HF_ANTDIVHELP);
 
-	tmp = b43_phy_read(dev, B43_PHY_BBANDCFG);
-	tmp &= ~B43_PHY_BBANDCFG_RXANT;
-	tmp |= (autodiv ? B43_ANTENNA_AUTO1 : antenna)
-	    << B43_PHY_BBANDCFG_RXANT_SHIFT;
-	b43_phy_write(dev, B43_PHY_BBANDCFG, tmp);
+	b43_phy_maskset(dev, B43_PHY_BBANDCFG, ~B43_PHY_BBANDCFG_RXANT,
+			(autodiv ? B43_ANTENNA_AUTO1 : antenna) <<
+			B43_PHY_BBANDCFG_RXANT_SHIFT);
 
 	if (autodiv) {
 		tmp = b43_phy_read(dev, B43_PHY_ANTDWELL);
-		if (antenna == B43_ANTENNA_AUTO0)
+		if (antenna == B43_ANTENNA_AUTO1)
 			tmp &= ~B43_PHY_ANTDWELL_AUTODIV1;
 		else
 			tmp |= B43_PHY_ANTDWELL_AUTODIV1;
 		b43_phy_write(dev, B43_PHY_ANTDWELL, tmp);
 	}
-	if (phy->rev < 3) {
-		tmp = b43_phy_read(dev, B43_PHY_ANTDWELL);
-		tmp = (tmp & 0xFF00) | 0x24;
-		b43_phy_write(dev, B43_PHY_ANTDWELL, tmp);
-	} else {
-		tmp = b43_phy_read(dev, B43_PHY_OFDM61);
-		tmp |= 0x10;
-		b43_phy_write(dev, B43_PHY_OFDM61, tmp);
-		if (phy->analog == 3) {
-			b43_phy_write(dev, B43_PHY_CLIPPWRDOWNT,
-				      0x1D);
-			b43_phy_write(dev, B43_PHY_ADIVRELATED,
-				      8);
+	if (phy->rev < 3)
+		b43_phy_maskset(dev, B43_PHY_ANTDWELL, 0xFF00, 0x24);
+	else {
+		b43_phy_set(dev, B43_PHY_OFDM61, 0x10);
+		if (phy->rev == 3) {
+			b43_phy_write(dev, B43_PHY_CLIPPWRDOWNT, 0x1D);
+			b43_phy_write(dev, B43_PHY_ADIVRELATED, 8);
 		} else {
-			b43_phy_write(dev, B43_PHY_CLIPPWRDOWNT,
-				      0x3A);
-			tmp =
-			    b43_phy_read(dev,
-					 B43_PHY_ADIVRELATED);
-			tmp = (tmp & 0xFF00) | 8;
-			b43_phy_write(dev, B43_PHY_ADIVRELATED,
-				      tmp);
+			b43_phy_write(dev, B43_PHY_CLIPPWRDOWNT, 0x3A);
+			b43_phy_maskset(dev, B43_PHY_ADIVRELATED, 0xFF00, 8);
 		}
 	}
 
-	hf |= B43_HF_ANTDIVHELP;
-	b43_hf_write(dev, hf);
+	b43_hf_write(dev, b43_hf_read(dev) | B43_HF_ANTDIVHELP);
 }
 
 static void b43_aphy_op_adjust_txpower(struct b43_wldev *dev)
diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
index c6d639d..4b6154b 100644
--- a/drivers/net/wireless/b43/phy_g.c
+++ b/drivers/net/wireless/b43/phy_g.c
@@ -2638,65 +2638,54 @@ static unsigned int b43_gphy_op_get_default_chan(struct b43_wldev *dev)
 static void b43_gphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
 {
 	struct b43_phy *phy = &dev->phy;
-	u64 hf;
 	u16 tmp;
 	int autodiv = 0;
 
 	if (antenna == B43_ANTENNA_AUTO0 || antenna == B43_ANTENNA_AUTO1)
 		autodiv = 1;
 
-	hf = b43_hf_read(dev);
-	hf &= ~B43_HF_ANTDIVHELP;
-	b43_hf_write(dev, hf);
-
-	tmp = b43_phy_read(dev, B43_PHY_BBANDCFG);
-	tmp &= ~B43_PHY_BBANDCFG_RXANT;
-	tmp |= (autodiv ? B43_ANTENNA_AUTO1 : antenna)
-			<< B43_PHY_BBANDCFG_RXANT_SHIFT;
-	b43_phy_write(dev, B43_PHY_BBANDCFG, tmp);
+	b43_hf_write(dev, b43_hf_read(dev) & ~B43_HF_ANTDIVHELP);
 
+	b43_phy_maskset(dev, B43_PHY_BBANDCFG, ~B43_PHY_BBANDCFG_RXANT,
+			(autodiv ? B43_ANTENNA_AUTO1 : antenna) <<
+			B43_PHY_BBANDCFG_RXANT_SHIFT);
+			
 	if (autodiv) {
 		tmp = b43_phy_read(dev, B43_PHY_ANTDWELL);
-		if (antenna == B43_ANTENNA_AUTO0)
+		if (antenna == B43_ANTENNA_AUTO1)
 			tmp &= ~B43_PHY_ANTDWELL_AUTODIV1;
 		else
 			tmp |= B43_PHY_ANTDWELL_AUTODIV1;
 		b43_phy_write(dev, B43_PHY_ANTDWELL, tmp);
 	}
+
 	tmp = b43_phy_read(dev, B43_PHY_ANTWRSETT);
 	if (autodiv)
 		tmp |= B43_PHY_ANTWRSETT_ARXDIV;
 	else
 		tmp &= ~B43_PHY_ANTWRSETT_ARXDIV;
 	b43_phy_write(dev, B43_PHY_ANTWRSETT, tmp);
-	if (phy->rev >= 2) {
-		tmp = b43_phy_read(dev, B43_PHY_OFDM61);
-		tmp |= B43_PHY_OFDM61_10;
-		b43_phy_write(dev, B43_PHY_OFDM61, tmp);
 
-		tmp =
-		    b43_phy_read(dev, B43_PHY_DIVSRCHGAINBACK);
-		tmp = (tmp & 0xFF00) | 0x15;
-		b43_phy_write(dev, B43_PHY_DIVSRCHGAINBACK,
-			      tmp);
+	if (autodiv)
+		b43_phy_set(dev, B43_PHY_ANTWRSETT, B43_PHY_ANTWRSETT_ARXDIV);
+	else {
+		b43_phy_mask(dev, B43_PHY_ANTWRSETT,
+			     B43_PHY_ANTWRSETT_ARXDIV);
+	}
 
-		if (phy->rev == 2) {
-			b43_phy_write(dev, B43_PHY_ADIVRELATED,
-				      8);
-		} else {
-			tmp =
-			    b43_phy_read(dev,
-					 B43_PHY_ADIVRELATED);
-			tmp = (tmp & 0xFF00) | 8;
-			b43_phy_write(dev, B43_PHY_ADIVRELATED,
-				      tmp);
-		}
+	if (phy->rev >= 2) {
+		b43_phy_set(dev, B43_PHY_OFDM61, B43_PHY_OFDM61_10);
+		b43_phy_maskset(dev, B43_PHY_DIVSRCHGAINBACK, 0xFF00, 0x15);
+
+		if (phy->rev == 2)
+			b43_phy_write(dev, B43_PHY_ADIVRELATED, 8);
+		else
+			b43_phy_maskset(dev, B43_PHY_ADIVRELATED, 0xFF00, 8);
 	}
 	if (phy->rev >= 6)
 		b43_phy_write(dev, B43_PHY_OFDM9B, 0xDC);
 
-	hf |= B43_HF_ANTDIVHELP;
-	b43_hf_write(dev, hf);
+	b43_hf_write(dev, b43_hf_read(dev) | B43_HF_ANTDIVHELP);
 }
 
 static int b43_gphy_op_interf_mitigation(struct b43_wldev *dev,
-- 
1.6.2.4




^ permalink raw reply related

* pull request: wireless-2.6 2009-08-28
From: John W. Linville @ 2009-08-28 19:10 UTC (permalink / raw)
  To: davem; +Cc: linux-wireless, netdev, linux-kernel

Dave,

One more late-breaker for 2.6.31...

This patch is rather large for this stage of the cycle, but it
corrects a regression disussed recently on LKML, documented in bug
14016 at bugzilla.kernel.org.  This jist of it is that the ipw2200
firmware loading routine was using an order 6 memory allocation that was
failing with newer allocators under some circumstances.

Please let me know if there are problems!

Thanks,

John

---

Individual patch is available here:

	http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/

---

The following changes since commit 8ff499e43c537648399fca8ba39d24c0768b3fab:
  Dongdong Deng (1):
        smc91x: let smc91x work well under netpoll

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master

Zhu Yi (1):
      ipw2200: firmware DMA loading rework

 drivers/net/wireless/ipw2x00/ipw2200.c |  120 ++++++++++++++++++--------------
 1 files changed, 67 insertions(+), 53 deletions(-)

diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index 6dcac73..f593fbb 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -2874,45 +2874,27 @@ static int ipw_fw_dma_add_command_block(struct ipw_priv *priv,
 	return 0;
 }
 
-static int ipw_fw_dma_add_buffer(struct ipw_priv *priv,
-				 u32 src_phys, u32 dest_address, u32 length)
+static int ipw_fw_dma_add_buffer(struct ipw_priv *priv, dma_addr_t *src_address,
+				 int nr, u32 dest_address, u32 len)
 {
-	u32 bytes_left = length;
-	u32 src_offset = 0;
-	u32 dest_offset = 0;
-	int status = 0;
+	int ret, i;
+	u32 size;
+
 	IPW_DEBUG_FW(">> \n");
-	IPW_DEBUG_FW_INFO("src_phys=0x%x dest_address=0x%x length=0x%x\n",
-			  src_phys, dest_address, length);
-	while (bytes_left > CB_MAX_LENGTH) {
-		status = ipw_fw_dma_add_command_block(priv,
-						      src_phys + src_offset,
-						      dest_address +
-						      dest_offset,
-						      CB_MAX_LENGTH, 0, 0);
-		if (status) {
+	IPW_DEBUG_FW_INFO("nr=%d dest_address=0x%x len=0x%x\n",
+			  nr, dest_address, len);
+
+	for (i = 0; i < nr; i++) {
+		size = min_t(u32, len - i * CB_MAX_LENGTH, CB_MAX_LENGTH);
+		ret = ipw_fw_dma_add_command_block(priv, src_address[i],
+						   dest_address +
+						   i * CB_MAX_LENGTH, size,
+						   0, 0);
+		if (ret) {
 			IPW_DEBUG_FW_INFO(": Failed\n");
 			return -1;
 		} else
 			IPW_DEBUG_FW_INFO(": Added new cb\n");
-
-		src_offset += CB_MAX_LENGTH;
-		dest_offset += CB_MAX_LENGTH;
-		bytes_left -= CB_MAX_LENGTH;
-	}
-
-	/* add the buffer tail */
-	if (bytes_left > 0) {
-		status =
-		    ipw_fw_dma_add_command_block(priv, src_phys + src_offset,
-						 dest_address + dest_offset,
-						 bytes_left, 0, 0);
-		if (status) {
-			IPW_DEBUG_FW_INFO(": Failed on the buffer tail\n");
-			return -1;
-		} else
-			IPW_DEBUG_FW_INFO
-			    (": Adding new cb - the buffer tail\n");
 	}
 
 	IPW_DEBUG_FW("<< \n");
@@ -3160,59 +3142,91 @@ static int ipw_load_ucode(struct ipw_priv *priv, u8 * data, size_t len)
 
 static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len)
 {
-	int rc = -1;
+	int ret = -1;
 	int offset = 0;
 	struct fw_chunk *chunk;
-	dma_addr_t shared_phys;
-	u8 *shared_virt;
+	int total_nr = 0;
+	int i;
+	struct pci_pool *pool;
+	u32 *virts[CB_NUMBER_OF_ELEMENTS_SMALL];
+	dma_addr_t phys[CB_NUMBER_OF_ELEMENTS_SMALL];
 
 	IPW_DEBUG_TRACE("<< : \n");
-	shared_virt = pci_alloc_consistent(priv->pci_dev, len, &shared_phys);
 
-	if (!shared_virt)
+	pool = pci_pool_create("ipw2200", priv->pci_dev, CB_MAX_LENGTH, 0, 0);
+	if (!pool) {
+		IPW_ERROR("pci_pool_create failed\n");
 		return -ENOMEM;
-
-	memmove(shared_virt, data, len);
+	}
 
 	/* Start the Dma */
-	rc = ipw_fw_dma_enable(priv);
+	ret = ipw_fw_dma_enable(priv);
 
 	/* the DMA is already ready this would be a bug. */
 	BUG_ON(priv->sram_desc.last_cb_index > 0);
 
 	do {
+		u32 chunk_len;
+		u8 *start;
+		int size;
+		int nr = 0;
+
 		chunk = (struct fw_chunk *)(data + offset);
 		offset += sizeof(struct fw_chunk);
+		chunk_len = le32_to_cpu(chunk->length);
+		start = data + offset;
+
+		nr = (chunk_len + CB_MAX_LENGTH - 1) / CB_MAX_LENGTH;
+		for (i = 0; i < nr; i++) {
+			virts[total_nr] = pci_pool_alloc(pool, GFP_KERNEL,
+							 &phys[total_nr]);
+			if (!virts[total_nr]) {
+				ret = -ENOMEM;
+				goto out;
+			}
+			size = min_t(u32, chunk_len - i * CB_MAX_LENGTH,
+				     CB_MAX_LENGTH);
+			memcpy(virts[total_nr], start, size);
+			start += size;
+			total_nr++;
+			/* We don't support fw chunk larger than 64*8K */
+			BUG_ON(total_nr > CB_NUMBER_OF_ELEMENTS_SMALL);
+		}
+
 		/* build DMA packet and queue up for sending */
 		/* dma to chunk->address, the chunk->length bytes from data +
 		 * offeset*/
 		/* Dma loading */
-		rc = ipw_fw_dma_add_buffer(priv, shared_phys + offset,
-					   le32_to_cpu(chunk->address),
-					   le32_to_cpu(chunk->length));
-		if (rc) {
+		ret = ipw_fw_dma_add_buffer(priv, &phys[total_nr - nr],
+					    nr, le32_to_cpu(chunk->address),
+					    chunk_len);
+		if (ret) {
 			IPW_DEBUG_INFO("dmaAddBuffer Failed\n");
 			goto out;
 		}
 
-		offset += le32_to_cpu(chunk->length);
+		offset += chunk_len;
 	} while (offset < len);
 
 	/* Run the DMA and wait for the answer */
-	rc = ipw_fw_dma_kick(priv);
-	if (rc) {
+	ret = ipw_fw_dma_kick(priv);
+	if (ret) {
 		IPW_ERROR("dmaKick Failed\n");
 		goto out;
 	}
 
-	rc = ipw_fw_dma_wait(priv);
-	if (rc) {
+	ret = ipw_fw_dma_wait(priv);
+	if (ret) {
 		IPW_ERROR("dmaWaitSync Failed\n");
 		goto out;
 	}
-      out:
-	pci_free_consistent(priv->pci_dev, len, shared_virt, shared_phys);
-	return rc;
+ out:
+	for (i = 0; i < total_nr; i++)
+		pci_pool_free(pool, virts[i], phys[i]);
+
+	pci_pool_destroy(pool);
+
+	return ret;
 }
 
 /* stop nic */
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply related

* pull request: wireless-next-2.6 2009-08-28
From: John W. Linville @ 2009-08-28 19:11 UTC (permalink / raw)
  To: davem; +Cc: linux-wireless, netdev

Dave,

Another huge batch of updates/changes/etc intended for 2.6.32...  This
includes the usual driver updates and miscellaneous fixes, etc.
Highlights in this batch include more LP-PHY support for b43 and the
completion of the cfg80211 API conversion for rndis_wlan.

Please let me know if there are problems!

Thanks,

John

---

Individual patches are available here:

	http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6/

---

The following changes since commit 7c6a3ed5bd61ec981c8a0d0111cfd435adf3f2b7:
  Ursula Braun (1):
        qeth: display "undefined" value of sysfs-attribute "layer2"

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git master

Abhijeet Kolekar (1):
      iwlwifi: fix remove key error

Arnd Hannemann (2):
      mac80211: Remove unnused throughput field from minstrel_rate.
      mac80211: Fix output of minstrels rc_stats

Bob Copeland (4):
      ath5k: clean up filter flags setting
      ath5k: use the skb->cb directly for RX status
      ath5k: add hardware CCMP encyption support
      ath5k: clarify srev comparison for CCMP check

Christian Lamparter (1):
      p54: fix broadcast buffering in AP mode

Dan Williams (1):
      libertas: clean up and clarify get_common_rates

Daniel C Halperin (2):
      iwlwifi: clear rate control flags on non-HT packet
      iwlwifi: set HT flags in ieee80211_rx_status for received packets

Gábor Stefanik (8):
      iwlwifi: Make injection of non-broadcast frames work again
      b43: LP-PHY: Fix a few typos in the RC calibration code
      b43: LP-PHY: Fix and simplify Qdiv roundup
      b43: Fix and update LP-PHY code
      ssb: Implement PMU LDO control and use it in b43
      b43: LP-PHY: Revert to the original PHY register write routine
      b43: Enable LP-PHY support by default and remove Kconfig warning
      b43: Implement antenna diversity support for LP-PHY

Herton Ronaldo Krzesinski (2):
      rtl8187: fix circular locking (rtl8187_stop/rtl8187_work)
      rtl8187: Implement rfkill support

Ivo van Doorn (1):
      rt2x00: Cleanup rt2x00mac_bss_info_changed()

Jaswinder Singh Rajput (1):
      PRISM54: fix compilation warning

Javier Cardona (2):
      mac80211: Update mesh config IE to 11s draft 3.02
      ath9k: Add support FIF_OTHER_BSS filtering mode.

Joerg Albert (2):
      ar9170: cleanup of bss_info_changed and beacon config
      ar9170: remove unnecessary call to ar9170_set_beacon_timers

Johannes Berg (8):
      mac80211: fix configure_filter invocation after stop
      cfg80211: check lost scans later, fix bug
      cfg80211: make spurious warnings less likely, configurable
      cfg80211: clean up properly on interface type change
      mac80211: remove tasklet enable/disable
      mac80211: fix RX skb leaks
      mac80211: fix scan cancel on ifdown
      iwlwifi: fix ICT irq table endianness

John W. Linville (3):
      libipw: switch from ieee80211_* to libipw_* naming policy
      mac80211: remove ieee80211_rx namespace hack
      libipw: initiate cfg80211 API conversion

Jouni Malinen (1):
      mac80211: Check pending scan request after having processed mgd work

Jussi Kivilinna (20):
      rndis_wlan: fix broken logic in add_wep_key()
      rndis_wlan: set cipher suites for cfg80211
      rndis_wlan: ignore OID_802_11_ADD_KEY triggered media connect indications
      rndis_wlan: get bssid scan list before new scan
      rndis_wlan: resize bssid list if too small
      rndis_wlan: increase scan timer delay
      rndis_wlan: move link up/down work to separate functions
      rndis_wlan: use is_zero_ether_addr() and is_broadcast_ether_addr()
      rndis_wlan: set ieee80211_ptr->iftype in rndis_change_virtual_intf
      rndis_wlan: enable infrastructure before setting random essid
      rndis_wlan: add cfg80211 connect, disconnect, join_ibss and leave_ibss
      rndis_wlan: add cfg80211 set_channel
      rndis_wlan: add cfg80211 key handling
      rndis_wlan: add cfg80211 get_station
      rndis_wlan: add cfg80211 dump_station
      rndis_wlan: rename wireless stats worker to device poller
      rndis_wlan: remove unneeded SIOCSIWCOMMIT
      rndis_wlan: convert mic failure wireless event to cfg80211
      rndis_wlan: disable IWEVPMKIDCAND wireless event
      rndis_wlan: use cfg80211_wext_handler

Kiran Divekar (1):
      libertas: add NULL check on return value of get_zeroed_page

Lennert Buytenhek (4):
      mwl8k: fix inverted error test in mwl8k_bss_info_changed()
      mwl8k: fix pci dma mapping leak in mwl8k_post_cmd() error path
      mwl8k: missing endian conversion when printing firmware command result
      mwl8k: separate driver and device info reporting during probe

Marcos Chaparro (1):
      ath5k: add led pin configuration for compaq c700 laptop

Marek Vasut (1):
      libertas: Add support for Marvell Libertas CF8305

Pavel Roskin (2):
      ath5k: fix uninitialized value use in ath5k_eeprom_read_turbo_modes()
      ath5k: don't use PCI ID to find the chip revision

Reinette Chatre (2):
      ipw2x00: update contact information
      MAINTAINERS: Update ipw2x00 and iwlwifi entries

Roel Kluin (3):
      libertas: Read buffer overflow
      nl80211: jump to out_err upon unsupported iftype
      ath9k: Fix read buffer overflow

Sujith (6):
      ath9k: Fix chainmask selection during scanning
      ath9k: Reduce the frequency of PA offset calibration
      ath9k: Fix bugs in programming registers during PA CAL
      ath9k: Handle PA cal usage properly
      ath9k: Update INITVALs for AR9285
      ath9k: Wrap DMA dump function with PS wakeup/restore

Vasanthakumar Thiagarajan (8):
      ath9k: Split ath9k_hw_btcoex_enable() into two logical pieces
      ath9k: Move btcoex stuff from hw.[ch] to new btcoex.[ch]
      ath9k: Configure btcoex register during every reset
      ath9k: Move btcoex related data to a separate struct
      ath9k: Determine btcoex scheme type based on chip version
      ath9k: Remove hw capability bit meant for btcoex
      ath9k: Add infrastructure for generic hw timers
      ath9k: Add Bluetooth Coexistence 3-wire support

Wey-Yi Guy (9):
      iwlwifi: set default tx power user limit to minimal
      iwlwifi: do not allow set tx power over channel power limit
      iwlwifi: name changes from "tx_power_channel_lmt" to "tx_power_device_lmt"
      iwlwifi: error checking for setting tx_power in sysfs
      iwlwifi: change IWL6000_UCODE_API_MAX to v4
      iwlwifi: show current tx power
      iwlwifi: remove duplicated define
      iwlwifi: read enhanced tx power info from EEPROM image
      iwlwifi: fix unloading driver while scanning

 MAINTAINERS                                        |   14 +-
 drivers/net/wireless/ath/ar9170/ar9170.h           |    1 +
 drivers/net/wireless/ath/ar9170/mac.c              |   24 +-
 drivers/net/wireless/ath/ar9170/main.c             |   20 +-
 drivers/net/wireless/ath/ath5k/ath5k.h             |    4 +-
 drivers/net/wireless/ath/ath5k/attach.c            |   21 +-
 drivers/net/wireless/ath/ath5k/base.c              |  121 +-
 drivers/net/wireless/ath/ath5k/eeprom.c            |   29 +-
 drivers/net/wireless/ath/ath5k/led.c               |    2 +
 drivers/net/wireless/ath/ath9k/Makefile            |    3 +-
 drivers/net/wireless/ath/ath9k/ath9k.h             |    5 +
 drivers/net/wireless/ath/ath9k/btcoex.c            |  319 +++++
 drivers/net/wireless/ath/ath9k/btcoex.h            |   98 ++
 drivers/net/wireless/ath/ath9k/calib.c             |   35 +-
 drivers/net/wireless/ath/ath9k/calib.h             |    7 +
 drivers/net/wireless/ath/ath9k/debug.c             |    4 +
 drivers/net/wireless/ath/ath9k/debug.h             |    2 +
 drivers/net/wireless/ath/ath9k/eeprom.c            |   16 +-
 drivers/net/wireless/ath/ath9k/hw.c                |  239 +++-
 drivers/net/wireless/ath/ath9k/hw.h                |   58 +-
 drivers/net/wireless/ath/ath9k/initvals.h          |   10 +-
 drivers/net/wireless/ath/ath9k/main.c              |   40 +-
 drivers/net/wireless/ath/ath9k/recv.c              |    7 +-
 drivers/net/wireless/ath/ath9k/reg.h               |   64 +-
 drivers/net/wireless/ath/ath9k/xmit.c              |    9 +-
 drivers/net/wireless/b43/Kconfig                   |    4 +-
 drivers/net/wireless/b43/main.c                    |    3 +-
 drivers/net/wireless/b43/phy_a.c                   |    2 +-
 drivers/net/wireless/b43/phy_common.c              |   27 +-
 drivers/net/wireless/b43/phy_common.h              |   13 +-
 drivers/net/wireless/b43/phy_g.c                   |    2 +-
 drivers/net/wireless/b43/phy_lp.c                  |  129 +-
 drivers/net/wireless/b43/phy_lp.h                  |    3 +
 drivers/net/wireless/b43/tables_lpphy.c            |   79 +-
 drivers/net/wireless/ipw2x00/ipw2100.c             |  206 ++--
 drivers/net/wireless/ipw2x00/ipw2100.h             |   16 +-
 drivers/net/wireless/ipw2x00/ipw2200.c             | 1043 ++++++++-------
 drivers/net/wireless/ipw2x00/ipw2200.h             |   16 +-
 .../net/wireless/ipw2x00/{ieee80211.h => libipw.h} |  666 +++++-----
 drivers/net/wireless/ipw2x00/libipw_geo.c          |   82 +-
 drivers/net/wireless/ipw2x00/libipw_module.c       |  124 ++-
 drivers/net/wireless/ipw2x00/libipw_rx.c           |  403 +++---
 drivers/net/wireless/ipw2x00/libipw_tx.c           |   70 +-
 drivers/net/wireless/ipw2x00/libipw_wx.c           |   94 +-
 drivers/net/wireless/iwlwifi/iwl-6000.c            |    5 +-
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c          |    1 +
 drivers/net/wireless/iwlwifi/iwl-agn.c             |   15 +-
 drivers/net/wireless/iwlwifi/iwl-commands.h        |   19 +-
 drivers/net/wireless/iwlwifi/iwl-core.c            |   55 +-
 drivers/net/wireless/iwlwifi/iwl-debug.h           |    1 +
 drivers/net/wireless/iwlwifi/iwl-debugfs.c         |   54 +
 drivers/net/wireless/iwlwifi/iwl-dev.h             |    4 +-
 drivers/net/wireless/iwlwifi/iwl-eeprom.c          |  252 ++++
 drivers/net/wireless/iwlwifi/iwl-eeprom.h          |   80 ++-
 drivers/net/wireless/iwlwifi/iwl-rx.c              |   10 +
 drivers/net/wireless/iwlwifi/iwl-scan.c            |    3 +-
 drivers/net/wireless/iwlwifi/iwl-sta.c             |    2 +-
 drivers/net/wireless/iwlwifi/iwl-tx.c              |   10 +-
 drivers/net/wireless/iwlwifi/iwl3945-base.c        |    9 +-
 drivers/net/wireless/libertas/assoc.c              |   57 +-
 drivers/net/wireless/libertas/debugfs.c            |   28 +
 drivers/net/wireless/libertas/if_cs.c              |   39 +-
 drivers/net/wireless/mwl8k.c                       |   30 +-
 drivers/net/wireless/p54/txrx.c                    |    3 +
 drivers/net/wireless/prism54/islpci_eth.c          |    4 +-
 drivers/net/wireless/rndis_wlan.c                  | 1411 +++++++++-----------
 drivers/net/wireless/rt2x00/rt2x00mac.c            |    8 -
 drivers/net/wireless/rtl818x/Makefile              |    2 +-
 drivers/net/wireless/rtl818x/rtl8187.h             |    1 +
 drivers/net/wireless/rtl818x/rtl8187_dev.c         |   31 +-
 drivers/net/wireless/rtl818x/rtl8187_leds.c        |    4 +-
 drivers/net/wireless/rtl818x/rtl8187_rfkill.c      |   63 +
 drivers/net/wireless/rtl818x/rtl8187_rfkill.h      |    8 +
 drivers/net/wireless/rtl818x/rtl818x.h             |    5 +-
 drivers/ssb/driver_chipcommon_pmu.c                |   94 ++
 include/linux/ieee80211.h                          |    2 +-
 include/linux/ssb/ssb_driver_chipcommon.h          |   10 +
 include/net/iw_handler.h                           |    6 +-
 include/net/mac80211.h                             |   11 +-
 net/mac80211/driver-ops.h                          |   14 +-
 net/mac80211/ieee80211_i.h                         |    8 +
 net/mac80211/iface.c                               |   41 +-
 net/mac80211/main.c                                |    2 -
 net/mac80211/mesh.c                                |   49 +-
 net/mac80211/mlme.c                                |   28 +-
 net/mac80211/pm.c                                  |   13 +-
 net/mac80211/rc80211_minstrel.h                    |    1 -
 net/mac80211/rc80211_minstrel_debugfs.c            |    2 +-
 net/mac80211/rx.c                                  |   39 +-
 net/mac80211/scan.c                                |    9 +-
 net/mac80211/util.c                                |   10 +
 net/wireless/Kconfig                               |   17 +
 net/wireless/core.c                                |   58 +-
 net/wireless/core.h                                |   17 +-
 net/wireless/ibss.c                                |    4 +-
 net/wireless/nl80211.c                             |   18 +-
 net/wireless/scan.c                                |   21 +-
 net/wireless/sme.c                                 |   12 +-
 net/wireless/util.c                                |  108 ++
 net/wireless/wext-compat.c                         |   16 +-
 100 files changed, 4299 insertions(+), 2659 deletions(-)
 create mode 100644 drivers/net/wireless/ath/ath9k/btcoex.c
 create mode 100644 drivers/net/wireless/ath/ath9k/btcoex.h
 rename drivers/net/wireless/ipw2x00/{ieee80211.h => libipw.h} (54%)
 create mode 100644 drivers/net/wireless/rtl818x/rtl8187_rfkill.c
 create mode 100644 drivers/net/wireless/rtl818x/rtl8187_rfkill.h

Omnibus patch available here:

	http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2009-08-20.patch.bz2

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: Nokia N900 running mac80211
From: Luis R. Rodriguez @ 2009-08-28 17:08 UTC (permalink / raw)
  To: Paresh Sawant; +Cc: linux-wireless
In-Reply-To: <683e2de40908280821v70ab4ab1id9555ccc98ba4fc5@mail.gmail.com>

On Fri, Aug 28, 2009 at 8:21 AM, Paresh Sawant<paresh.sawant@gmail.com> wrote:
> Is this information officially published that N900 uses mac80211 with
> kernel 2.6.28 ?

It seems to be officially unofficial.

  Luis

^ permalink raw reply

* [PATCH] iwl3945: reduce debug noise when default debug flags used
From: Reinette Chatre @ 2009-08-28 16:58 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Reinette Chatre

From: Reinette Chatre <reinette.chatre@intel.com>

Significant literature suggests users use debug flags 0x43fff - this causes
the debug flags to be set that causes information to be printed for every
received frame - including beacons. In the best case it fills up the logs,
at worst it slows driver down and causes failures due to timeouts.

In the RX handler, print debugging only if user requested RX debugging.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 3479041..2238c9f 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1373,7 +1373,7 @@ static void iwl3945_rx_handle(struct iwl_priv *priv)
 		fill_rx = 1;
 	/* Rx interrupt, but nothing sent from uCode */
 	if (i == r)
-		IWL_DEBUG(priv, IWL_DL_RX | IWL_DL_ISR, "r = %d, i = %d\n", r, i);
+		IWL_DEBUG_RX(priv, "r = %d, i = %d\n", r, i);
 
 	while (i != r) {
 		rxb = rxq->queue[i];
@@ -1404,15 +1404,13 @@ static void iwl3945_rx_handle(struct iwl_priv *priv)
 		 *   handle those that need handling via function in
 		 *   rx_handlers table.  See iwl3945_setup_rx_handlers() */
 		if (priv->rx_handlers[pkt->hdr.cmd]) {
-			IWL_DEBUG(priv, IWL_DL_HCMD | IWL_DL_RX | IWL_DL_ISR,
-				"r = %d, i = %d, %s, 0x%02x\n", r, i,
+			IWL_DEBUG_RX(priv, "r = %d, i = %d, %s, 0x%02x\n", r, i,
 				get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd);
 			priv->rx_handlers[pkt->hdr.cmd] (priv, rxb);
 			priv->isr_stats.rx_handlers[pkt->hdr.cmd]++;
 		} else {
 			/* No handling needed */
-			IWL_DEBUG(priv, IWL_DL_HCMD | IWL_DL_RX | IWL_DL_ISR,
-				"r %d i %d No handler needed for %s, 0x%02x\n",
+			IWL_DEBUG_RX(priv, "r %d i %d No handler needed for %s, 0x%02x\n",
 				r, i, get_cmd_string(pkt->hdr.cmd),
 				pkt->hdr.cmd);
 		}
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH 4/5] iwlwifi: use sleep interval succession
From: Reinette Chatre @ 2009-08-28 16:44 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Johannes Berg, Reinette Chatre
In-Reply-To: <1251477889-13732-1-git-send-email-reinette.chatre@intel.com>

From: Johannes Berg <johannes@sipsolutions.net>

Some concerns were raised about the automatic adjustment
of sleep intervals to all the same, potentially high,
value, and I can imagine the hardware behaving better
when we don't ask too much of it.

So let's convert to use a succession of sleep levels
when requesting to go to deeper sleeps (which can only
happen with large DTIM intervals), using the succession
values from power level three, which have the benefit of
also having been tested extensively already.

As a result, the automatic sleep level adjustment will
now be mostly equivalent to power level three, except
for the RX/TX timeouts and possibly using smaller sleep
vectors to account for networking latency.

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

diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c
index 0b16841..081a7ea 100644
--- a/drivers/net/wireless/iwlwifi/iwl-power.c
+++ b/drivers/net/wireless/iwlwifi/iwl-power.c
@@ -216,8 +216,27 @@ static void iwl_power_fill_sleep_cmd(struct iwl_priv *priv,
 				     struct iwl_powertable_cmd *cmd,
 				     int dynps_ms, int wakeup_period)
 {
+	/*
+	 * These are the original power level 3 sleep successions. The
+	 * device may behave better with such succession and was also
+	 * only tested with that. Just like the original sleep commands,
+	 * also adjust the succession here to the wakeup_period below.
+	 * The ranges are the same as for the sleep commands, 0-2, 3-9
+	 * and >10, which is selected based on the DTIM interval for
+	 * the sleep index but here we use the wakeup period since that
+	 * is what we need to do for the latency requirements.
+	 */
+	static const u8 slp_succ_r0[IWL_POWER_VEC_SIZE] = { 2, 2, 2, 2, 2 };
+	static const u8 slp_succ_r1[IWL_POWER_VEC_SIZE] = { 2, 4, 6, 7, 9 };
+	static const u8 slp_succ_r2[IWL_POWER_VEC_SIZE] = { 2, 7, 9, 9, 0xFF };
+	const u8 *slp_succ = slp_succ_r0;
 	int i;
 
+	if (wakeup_period > IWL_DTIM_RANGE_0_MAX)
+		slp_succ = slp_succ_r1;
+	if (wakeup_period > IWL_DTIM_RANGE_1_MAX)
+		slp_succ = slp_succ_r2;
+
 	memset(cmd, 0, sizeof(*cmd));
 
 	cmd->flags = IWL_POWER_DRIVER_ALLOW_SLEEP_MSK |
@@ -230,7 +249,8 @@ static void iwl_power_fill_sleep_cmd(struct iwl_priv *priv,
 	cmd->tx_data_timeout = cpu_to_le32(1000 * dynps_ms);
 
 	for (i = 0; i < IWL_POWER_VEC_SIZE; i++)
-		cmd->sleep_interval[i] = cpu_to_le32(wakeup_period);
+		cmd->sleep_interval[i] =
+			cpu_to_le32(min_t(int, slp_succ[i], wakeup_period));
 
 	IWL_DEBUG_POWER(priv, "Automatic sleep command\n");
 }
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH 5/5] iwlwifi: fix situation in which debug message is printed
From: Reinette Chatre @ 2009-08-28 16:44 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Reinette Chatre
In-Reply-To: <1251477889-13732-1-git-send-email-reinette.chatre@intel.com>

From: Reinette Chatre <reinette.chatre@intel.com>

3945 does not have update_chain_flags defined and because if this we always
see the debug message that does not apply to it. Add a check to be specific
about what is actually happening.

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

diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c
index 081a7ea..4ec6a83 100644
--- a/drivers/net/wireless/iwlwifi/iwl-power.c
+++ b/drivers/net/wireless/iwlwifi/iwl-power.c
@@ -321,7 +321,7 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force)
 			if (priv->cfg->ops->lib->update_chain_flags &&
 			    update_chains)
 				priv->cfg->ops->lib->update_chain_flags(priv);
-			else
+			else if (priv->cfg->ops->lib->update_chain_flags)
 				IWL_DEBUG_POWER(priv,
 					"Cannot update the power, chain noise "
 					"calibration running: %d\n",
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH 2/5] iwlwifi: remove incorrect uses of ieee80211_get_tx_rate to prevent TX stall
From: Reinette Chatre @ 2009-08-28 16:44 UTC (permalink / raw)
  To: linville
  Cc: linux-wireless, ipw3945-devel, Daniel C Halperin, Reinette Chatre
In-Reply-To: <1251477889-13732-1-git-send-email-reinette.chatre@intel.com>

From: Daniel C Halperin <daniel.c.halperin@intel.com>

Refactor and correct rate selection for outgoing transmitted
packets.

First, note that HT rates in the mac80211 rate table do not provide valid
indices when ieee80211_get_tx_rate is called; the check to see if we could to
abort a transmission early in iwl_tx_skb() would thus occasionally read invalid
memory and occasionally stall transmission (if the erroneous byte was 0xff).
We remove that code; the check wasn't valid anyway.

Second, iwl_tx_cmd_build_rate() also called ieee80211_get_tx_rate to be used
for sending management packets, which do not use the uCode station table.  This
patch refactors that function and adds comments to enhance legibility, replaces
the call to ieee80211_get_tx_rate() with a direct lookup, and adds error
handling in case the table entry is invalid.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-tx.c |  111 ++++++++++++++++++--------------
 1 files changed, 62 insertions(+), 49 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 7bc9c00..a7422e5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -566,62 +566,81 @@ static void iwl_tx_cmd_build_basic(struct iwl_priv *priv,
 static void iwl_tx_cmd_build_rate(struct iwl_priv *priv,
 			      struct iwl_tx_cmd *tx_cmd,
 			      struct ieee80211_tx_info *info,
-			      __le16 fc, int sta_id,
-			      int is_hcca)
+			      __le16 fc, int is_hcca)
 {
-	u32 rate_flags = 0;
+	u32 rate_flags;
 	int rate_idx;
-	u8 rts_retry_limit = 0;
-	u8 data_retry_limit = 0;
+	u8 rts_retry_limit;
+	u8 data_retry_limit;
 	u8 rate_plcp;
 
-	rate_idx = min(ieee80211_get_tx_rate(priv->hw, info)->hw_value & 0xffff,
-			IWL_RATE_COUNT - 1);
-
-	rate_plcp = iwl_rates[rate_idx].plcp;
-
-	rts_retry_limit = (is_hcca) ?
-	    RTS_HCCA_RETRY_LIMIT : RTS_DFAULT_RETRY_LIMIT;
-
-	if ((rate_idx >= IWL_FIRST_CCK_RATE) && (rate_idx <= IWL_LAST_CCK_RATE))
-		rate_flags |= RATE_MCS_CCK_MSK;
-
-
-	if (ieee80211_is_probe_resp(fc)) {
-		data_retry_limit = 3;
-		if (data_retry_limit < rts_retry_limit)
-			rts_retry_limit = data_retry_limit;
-	} else
-		data_retry_limit = IWL_DEFAULT_TX_RETRY;
-
+	/* Set retry limit on DATA packets and Probe Responses*/
 	if (priv->data_retry_limit != -1)
 		data_retry_limit = priv->data_retry_limit;
+	else if (ieee80211_is_probe_resp(fc))
+		data_retry_limit = 3;
+	else
+		data_retry_limit = IWL_DEFAULT_TX_RETRY;
+	tx_cmd->data_retry_limit = data_retry_limit;
 
+	/* Set retry limit on RTS packets */
+	rts_retry_limit = (is_hcca) ?  RTS_HCCA_RETRY_LIMIT :
+		RTS_DFAULT_RETRY_LIMIT;
+	if (data_retry_limit < rts_retry_limit)
+		rts_retry_limit = data_retry_limit;
+	tx_cmd->rts_retry_limit = rts_retry_limit;
 
+	/* DATA packets will use the uCode station table for rate/antenna
+	 * selection */
 	if (ieee80211_is_data(fc)) {
 		tx_cmd->initial_rate_index = 0;
 		tx_cmd->tx_flags |= TX_CMD_FLG_STA_RATE_MSK;
-	} else {
-		switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) {
-		case cpu_to_le16(IEEE80211_STYPE_AUTH):
-		case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
-		case cpu_to_le16(IEEE80211_STYPE_ASSOC_REQ):
-		case cpu_to_le16(IEEE80211_STYPE_REASSOC_REQ):
-			if (tx_cmd->tx_flags & TX_CMD_FLG_RTS_MSK) {
-				tx_cmd->tx_flags &= ~TX_CMD_FLG_RTS_MSK;
-				tx_cmd->tx_flags |= TX_CMD_FLG_CTS_MSK;
-			}
-			break;
-		default:
-			break;
-		}
+		return;
+	}
+
+	/**
+	 * If the current TX rate stored in mac80211 has the MCS bit set, it's
+	 * not really a TX rate.  Thus, we use the lowest supported rate for
+	 * this band.  Also use the lowest supported rate if the stored rate
+	 * index is invalid.
+	 */
+	rate_idx = info->control.rates[0].idx;
+	if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS ||
+			(rate_idx < 0) || (rate_idx > IWL_RATE_COUNT_LEGACY))
+		rate_idx = rate_lowest_index(&priv->bands[info->band],
+				info->control.sta);
+	/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
+	if (info->band == IEEE80211_BAND_5GHZ)
+		rate_idx += IWL_FIRST_OFDM_RATE;
+	/* Get PLCP rate for tx_cmd->rate_n_flags */
+	rate_plcp = iwl_rates[rate_idx].plcp;
+	/* Zero out flags for this packet */
+	rate_flags = 0;
 
-		priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant);
-		rate_flags |= iwl_ant_idx_to_flags(priv->mgmt_tx_ant);
+	/* Set CCK flag as needed */
+	if ((rate_idx >= IWL_FIRST_CCK_RATE) && (rate_idx <= IWL_LAST_CCK_RATE))
+		rate_flags |= RATE_MCS_CCK_MSK;
+
+	/* Set up RTS and CTS flags for certain packets */
+	switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) {
+	case cpu_to_le16(IEEE80211_STYPE_AUTH):
+	case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
+	case cpu_to_le16(IEEE80211_STYPE_ASSOC_REQ):
+	case cpu_to_le16(IEEE80211_STYPE_REASSOC_REQ):
+		if (tx_cmd->tx_flags & TX_CMD_FLG_RTS_MSK) {
+			tx_cmd->tx_flags &= ~TX_CMD_FLG_RTS_MSK;
+			tx_cmd->tx_flags |= TX_CMD_FLG_CTS_MSK;
+		}
+		break;
+	default:
+		break;
 	}
 
-	tx_cmd->rts_retry_limit = rts_retry_limit;
-	tx_cmd->data_retry_limit = data_retry_limit;
+	/* Set up antennas */
+	priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant);
+	rate_flags |= iwl_ant_idx_to_flags(priv->mgmt_tx_ant);
+
+	/* Set the rate in the TX cmd */
 	tx_cmd->rate_n_flags = iwl_hw_set_rate_n_flags(rate_plcp, rate_flags);
 }
 
@@ -701,12 +720,6 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 		goto drop_unlock;
 	}
 
-	if ((ieee80211_get_tx_rate(priv->hw, info)->hw_value & 0xFF) ==
-	     IWL_INVALID_RATE) {
-		IWL_ERR(priv, "ERROR: No TX rate available.\n");
-		goto drop_unlock;
-	}
-
 	fc = hdr->frame_control;
 
 #ifdef CONFIG_IWLWIFI_DEBUG
@@ -807,7 +820,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 	iwl_dbg_log_tx_data_frame(priv, len, hdr);
 
 	/* set is_hcca to 0; it probably will never be implemented */
-	iwl_tx_cmd_build_rate(priv, tx_cmd, info, fc, sta_id, 0);
+	iwl_tx_cmd_build_rate(priv, tx_cmd, info, fc, 0);
 
 	iwl_update_stats(priv, true, fc, len);
 	/*
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH 3/5] iwlwifi: use iwl_hwrate_get_mac80211_idx where appropriate
From: Reinette Chatre @ 2009-08-28 16:44 UTC (permalink / raw)
  To: linville
  Cc: linux-wireless, ipw3945-devel, Daniel C Halperin, Reinette Chatre
In-Reply-To: <1251477889-13732-1-git-send-email-reinette.chatre@intel.com>

From: Daniel C Halperin <daniel.c.halperin@intel.com>

For HT packets, mac80211 expects the rate_idx to be an MCS number, which is the
lower byte of rate_n_flags.  However, iwl_hwrate_to_plcp_idx takes the MCS
number and reduces it down to the range 0-8 (6 to 60 Mbps), removing the bits
that signify multiply streams, HT40 Duplicate mode, or unequal modulation.
This version is used for various internal purposes through the driver.

Add the function iwl_hwrate_get_mac80211_idx, an alternate version which takes
the rate and the band and returns the mac80211 index (MCS, for HT packets, and
PLCP rate, for legacy packets).

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c |   10 ++++++++--
 drivers/net/wireless/iwlwifi/iwl-core.c   |   27 ++++++++++++++++++++++-----
 drivers/net/wireless/iwlwifi/iwl-core.h   |    1 +
 drivers/net/wireless/iwlwifi/iwl-rx.c     |    9 ++++-----
 4 files changed, 35 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 8239e55..40b207a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -878,6 +878,12 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
 		rs_index -= IWL_FIRST_OFDM_RATE;
 	mac_flags = info->status.rates[0].flags;
 	mac_index = info->status.rates[0].idx;
+	/* For HT packets, map MCS to PLCP */
+	if (mac_flags & IEEE80211_TX_RC_MCS) {
+		mac_index &= RATE_MCS_CODE_MSK;	/* Remove # of streams */
+		if (mac_index >= (IWL_RATE_9M_INDEX - IWL_FIRST_OFDM_RATE))
+			mac_index++;
+	}
 
 	if ((mac_index < 0) ||
 	    (tbl_type.is_SGI != !!(mac_flags & IEEE80211_TX_RC_SHORT_GI)) ||
@@ -886,8 +892,8 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
 	    (tbl_type.ant_type != info->antenna_sel_tx) ||
 	    (!!(tx_rate & RATE_MCS_HT_MSK) != !!(mac_flags & IEEE80211_TX_RC_MCS)) ||
 	    (!!(tx_rate & RATE_MCS_GF_MSK) != !!(mac_flags & IEEE80211_TX_RC_GREEN_FIELD)) ||
-	    rs_index != mac_index) {
-		IWL_DEBUG_RATE(priv, "initial rate does not match 0x%x\n", tx_rate);
+	    (rs_index != mac_index)) {
+		IWL_DEBUG_RATE(priv, "initial rate %d does not match %d (0x%x)\n", mac_index, rs_index, tx_rate);
 		/* the last LQ command could failed so the LQ in ucode not
 		 * the same in driver sync up
 		 */
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index ad32a11..d9b5f35 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -96,7 +96,6 @@ EXPORT_SYMBOL(iwl_rates);
 void iwl_hwrate_to_tx_control(struct iwl_priv *priv, u32 rate_n_flags,
 				  struct ieee80211_tx_info *info)
 {
-	int rate_index;
 	struct ieee80211_tx_rate *r = &info->control.rates[0];
 
 	info->antenna_sel_tx =
@@ -111,10 +110,7 @@ void iwl_hwrate_to_tx_control(struct iwl_priv *priv, u32 rate_n_flags,
 		r->flags |= IEEE80211_TX_RC_DUP_DATA;
 	if (rate_n_flags & RATE_MCS_SGI_MSK)
 		r->flags |= IEEE80211_TX_RC_SHORT_GI;
-	rate_index = iwl_hwrate_to_plcp_idx(rate_n_flags);
-	if (info->band == IEEE80211_BAND_5GHZ)
-		rate_index -= IWL_FIRST_OFDM_RATE;
-	r->idx = rate_index;
+	r->idx = iwl_hwrate_to_mac80211_idx(rate_n_flags, info->band);
 }
 EXPORT_SYMBOL(iwl_hwrate_to_tx_control);
 
@@ -149,6 +145,27 @@ int iwl_hwrate_to_plcp_idx(u32 rate_n_flags)
 }
 EXPORT_SYMBOL(iwl_hwrate_to_plcp_idx);
 
+int iwl_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band)
+{
+	int idx = 0;
+	int band_offset = 0;
+
+	/* HT rate format: mac80211 wants an MCS number, which is just LSB */
+	if (rate_n_flags & RATE_MCS_HT_MSK) {
+		idx = (rate_n_flags & 0xff);
+		return idx;
+	/* Legacy rate format, search for match in table */
+	} else {
+		if (band == IEEE80211_BAND_5GHZ)
+			band_offset = IWL_FIRST_OFDM_RATE;
+		for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++)
+			if (iwl_rates[idx].plcp == (rate_n_flags & 0xFF))
+				return idx - band_offset;
+	}
+
+	return -1;
+}
+
 u8 iwl_toggle_tx_ant(struct iwl_priv *priv, u8 ant)
 {
 	int i;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 62d9036..c04d2a2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -423,6 +423,7 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force);
 void iwl_hwrate_to_tx_control(struct iwl_priv *priv, u32 rate_n_flags,
 			      struct ieee80211_tx_info *info);
 int iwl_hwrate_to_plcp_idx(u32 rate_n_flags);
+int iwl_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band);
 
 u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv);
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index e34d3fc..8150c5c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -962,6 +962,9 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
 		return;
 	}
 
+	/* This will be used in several places later */
+	rate_n_flags = le32_to_cpu(phy_res->rate_n_flags);
+
 	/* rx_status carries information about the packet to mac80211 */
 	rx_status.mactime = le64_to_cpu(phy_res->timestamp);
 	rx_status.freq =
@@ -969,10 +972,7 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
 	rx_status.band = (phy_res->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ?
 				IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
 	rx_status.rate_idx =
-		iwl_hwrate_to_plcp_idx(le32_to_cpu(phy_res->rate_n_flags));
-	if (rx_status.band == IEEE80211_BAND_5GHZ)
-		rx_status.rate_idx -= IWL_FIRST_OFDM_RATE;
-
+		iwl_hwrate_to_mac80211_idx(rate_n_flags, rx_status.band);
 	rx_status.flag = 0;
 
 	/* TSF isn't reliable. In order to allow smooth user experience,
@@ -1034,7 +1034,6 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
 		rx_status.flag |= RX_FLAG_SHORTPRE;
 
 	/* Set up the HT phy flags */
-	rate_n_flags = le32_to_cpu(phy_res->rate_n_flags);
 	if (rate_n_flags & RATE_MCS_HT_MSK)
 		rx_status.flag |= RX_FLAG_HT;
 	if (rate_n_flags & RATE_MCS_HT40_MSK)
-- 
1.5.6.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