* Re: [PATCH 4/5]pci:setup_bus.c Fix warning: variable 'retval' set but not used
From: Justin P. Mattock @ 2010-06-18 20:26 UTC (permalink / raw)
To: Jesse Barnes
Cc: Yinghai Lu, linux-kernel, linux-wireless, linux-pci, linux-scsi
In-Reply-To: <20100618130538.0fc562ee@virtuousgeek.org>
On 06/18/2010 01:05 PM, Jesse Barnes wrote:
> On Fri, 18 Jun 2010 12:59:32 -0700
> "Justin P. Mattock"<justinmattock@gmail.com> wrote:
>> just added this in(as a test), and the retval warning still shows up.
>> with the last post I just added a printk was that legit, and if so what
>> else might be added to it to make it complete and proper?
>
> What's the full warning? Seems like printing the value should have
> been enough to shut up gcc...
>
this is the warning messg after applying yinghai's patch:
CC drivers/pci/setup-bus.o
drivers/pci/setup-bus.c: In function
'pci_assign_unassigned_bridge_resources':
drivers/pci/setup-bus.c:868:6: warning: variable 'retval' set but not used
if I add a printk then gcc is content.. patch below, but not the best at
creating printk's(the whole % thing messes me up) but here goes:
From 48e15b87072c6b4286d943c55bfe2ae26d358795 Mon Sep 17 00:00:00 2001
From: Justin P. Mattock <justinmattock@gmail.com>
Date: Fri, 18 Jun 2010 13:23:27 -0700
Subject: [PATCH 4/4] bus.c_add_print
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
---
drivers/pci/setup-bus.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 66cb8f4..806b766 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -919,6 +919,7 @@ again:
enable_all:
retval = pci_reenable_device(bridge);
+ printk(KERN_DEBUG "PCI%d: re-enabling device\n", retval);
pci_set_master(bridge);
pci_enable_bridges(parent);
}
--
1.7.1.rc1.21.gf3bd6
^ permalink raw reply related
* Re: [PATCH 4/5]pci:setup_bus.c Fix warning: variable 'retval' set but not used
From: Jesse Barnes @ 2010-06-18 20:46 UTC (permalink / raw)
To: Justin P. Mattock
Cc: Yinghai Lu, linux-kernel, linux-wireless, linux-pci, linux-scsi
In-Reply-To: <4C1BD678.1020405@gmail.com>
On Fri, 18 Jun 2010 13:26:32 -0700
"Justin P. Mattock" <justinmattock@gmail.com> wrote:
> On 06/18/2010 01:05 PM, Jesse Barnes wrote:
> > On Fri, 18 Jun 2010 12:59:32 -0700
> > "Justin P. Mattock"<justinmattock@gmail.com> wrote:
> >> just added this in(as a test), and the retval warning still shows up.
> >> with the last post I just added a printk was that legit, and if so what
> >> else might be added to it to make it complete and proper?
> >
> > What's the full warning? Seems like printing the value should have
> > been enough to shut up gcc...
> >
>
> this is the warning messg after applying yinghai's patch:
>
> CC drivers/pci/setup-bus.o
> drivers/pci/setup-bus.c: In function
> 'pci_assign_unassigned_bridge_resources':
> drivers/pci/setup-bus.c:868:6: warning: variable 'retval' set but not used
Right because Yinghai's patch just sets retval but doesn't actually use
it anywhere.
> if I add a printk then gcc is content.. patch below, but not the best at
> creating printk's(the whole % thing messes me up) but here goes:
>
> From 48e15b87072c6b4286d943c55bfe2ae26d358795 Mon Sep 17 00:00:00 2001
> From: Justin P. Mattock <justinmattock@gmail.com>
> Date: Fri, 18 Jun 2010 13:23:27 -0700
> Subject: [PATCH 4/4] bus.c_add_print
> Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
>
> ---
> drivers/pci/setup-bus.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
> index 66cb8f4..806b766 100644
> --- a/drivers/pci/setup-bus.c
> +++ b/drivers/pci/setup-bus.c
> @@ -919,6 +919,7 @@ again:
>
> enable_all:
> retval = pci_reenable_device(bridge);
> + printk(KERN_DEBUG "PCI%d: re-enabling device\n", retval);
> pci_set_master(bridge);
> pci_enable_bridges(parent);
> }
Again, this doesn't have the if (retval) condition around the printk; I
don't want to see this message everytime regardless. Also the message
is misleading, it should be something like:
dev_err(&bridge->dev, "failed to re-enable device: %d\n", retval)
instead. PCI%d makes it look like we're talking about a specific bus
or something and not an error code.
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply
* Re: [PATCH 4/5]pci:setup_bus.c Fix warning: variable 'retval' set but not used
From: Justin P. Mattock @ 2010-06-18 21:12 UTC (permalink / raw)
To: Jesse Barnes
Cc: Yinghai Lu, linux-kernel, linux-wireless, linux-pci, linux-scsi
In-Reply-To: <20100618134622.7db9f913@virtuousgeek.org>
On 06/18/2010 01:46 PM, Jesse Barnes wrote:
> On Fri, 18 Jun 2010 13:26:32 -0700
> "Justin P. Mattock"<justinmattock@gmail.com> wrote:
>
>> On 06/18/2010 01:05 PM, Jesse Barnes wrote:
>>> On Fri, 18 Jun 2010 12:59:32 -0700
>>> "Justin P. Mattock"<justinmattock@gmail.com> wrote:
>>>> just added this in(as a test), and the retval warning still shows up.
>>>> with the last post I just added a printk was that legit, and if so what
>>>> else might be added to it to make it complete and proper?
>>>
>>> What's the full warning? Seems like printing the value should have
>>> been enough to shut up gcc...
>>>
>>
>> this is the warning messg after applying yinghai's patch:
>>
>> CC drivers/pci/setup-bus.o
>> drivers/pci/setup-bus.c: In function
>> 'pci_assign_unassigned_bridge_resources':
>> drivers/pci/setup-bus.c:868:6: warning: variable 'retval' set but not used
>
> Right because Yinghai's patch just sets retval but doesn't actually use
> it anywhere.
>
that's what is confusing..(not being used, but is being used, but gcc
says it's not used..) :-)
>> if I add a printk then gcc is content.. patch below, but not the best at
>> creating printk's(the whole % thing messes me up) but here goes:
>>
>> From 48e15b87072c6b4286d943c55bfe2ae26d358795 Mon Sep 17 00:00:00 2001
>> From: Justin P. Mattock<justinmattock@gmail.com>
>> Date: Fri, 18 Jun 2010 13:23:27 -0700
>> Subject: [PATCH 4/4] bus.c_add_print
>> Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
>>
>> ---
>> drivers/pci/setup-bus.c | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
>> index 66cb8f4..806b766 100644
>> --- a/drivers/pci/setup-bus.c
>> +++ b/drivers/pci/setup-bus.c
>> @@ -919,6 +919,7 @@ again:
>>
>> enable_all:
>> retval = pci_reenable_device(bridge);
>> + printk(KERN_DEBUG "PCI%d: re-enabling device\n", retval);
>> pci_set_master(bridge);
>> pci_enable_bridges(parent);
>> }
>
> Again, this doesn't have the if (retval) condition around the printk; I
> don't want to see this message everytime regardless. Also the message
> is misleading, it should be something like:
> dev_err(&bridge->dev, "failed to re-enable device: %d\n", retval)
> instead. PCI%d makes it look like we're talking about a specific bus
> or something and not an error code.
>
o.k. I admit I looked at other printk's in this file to get an idea of
what I might do.. saw PCI%d and figured it would print
"PCI: re-enabling device"
but didnt think it was an error... reason for putting KERN_DEBUG.
here is what the new patch looks like:
From f910375438be06497d0524bff146c26cafca272b Mon Sep 17 00:00:00 2001
From: Justin P. Mattock <justinmattock@gmail.com>
Date: Fri, 18 Jun 2010 14:08:37 -0700
Subject: [PATCH 4/4] setup-pci_test
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
---
drivers/pci/setup-bus.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 66cb8f4..2ab5f1e 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -919,6 +919,9 @@ again:
enable_all:
retval = pci_reenable_device(bridge);
+ if (retval) {
+ dev_err(&bridge->dev, "failed to re-enable device: %d\n", retval);
+ }
pci_set_master(bridge);
pci_enable_bridges(parent);
}
--
1.7.1.rc1.21.gf3bd6
should I have put if (!retval) instead
should I put "failed to re-enable bridge device"
is there an exit code needed?
if not and all is good then I can resend this out..
Justin P. Mattock
^ permalink raw reply related
* Re: [PATCH] p54usb: Drop duplicate USBID 0xcde:0x0006
From: Ozan Çağlayan @ 2010-06-18 21:20 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, linux-wireless
In-Reply-To: <20100618185713.GG6282@tuxdriver.com>
John W. Linville wrote:
> On Thu, Jun 17, 2010 at 01:37:29PM +0300, Ozan Çağlayan wrote:
>> Drop the duplicate USB ID 0xcde:0x0006 which is written at two
>> different places in p54usb.c
>>
>> Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
>
> Someone beat you to it already...
Ah, no problem ;)
Regards,
Ozan Caglayan
^ permalink raw reply
* new iwlwifi 6000 uCode available
From: Guy, Wey-Yi @ 2010-06-18 22:51 UTC (permalink / raw)
To: linux-wireless
Hi,
Version 9.221.4.1 of uCode for Intel® 6000 Series Wi-Fi Adapters is now
available for download from http://intellinuxwireless.org/?n=Downloads
Changes:
- Sync firmware with Intel 6200/6300 Wireless Windows 13.2 firmware
release
- Fixed firmware SW NMI_INTERRUP_TRM error which were occurring under
various configurations
Wey-Yi
^ permalink raw reply
* [PATCH v2] ath5k: disable ASPM
From: Maxim Levitsky @ 2010-06-19 7:49 UTC (permalink / raw)
To: Bob Copeland
Cc: Jussi Kivilinna, ath5k-devel, linux-wireless, Luis R. Rodriguez,
linux-kernel
In-Reply-To: <1276870309.23783.3.camel@maxim-laptop>
On Fri, 2010-06-18 at 17:11 +0300, Maxim Levitsky wrote:
> On Fri, 2010-06-18 at 09:59 -0400, Bob Copeland wrote:
> > On Fri, Jun 18, 2010 at 7:05 AM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > >> Patch I made uses GPL code from e1000e, but since ath5k is
> > >> dual-licensed so patch can't be accepted. So if I got it right, patch
> > >> has to be remade from scratch by someone who really knows about pci
> > >> registers etc. I don't, and learning this to fix something that is
> > >> already fixed in my point of view is waste of (my) time.
> > > Sure, regardless of licensing, this patch has to be redone (and e1000
> > > with it)
> >
> > At any rate, Jussi, thanks a bundle for tracking it down. I owe you a
> > beer, lots of bugs have been reported on these devices.
> >
> > Maxim, this device was always broken in the same way, right? Just
> > curious if anything made it worse recently.
>
> Always was broken, of course even with madwifi.
>
> Recently I think driver stopped doing reset on RXORN, which sometimes
> helped. This did made things a bit worse.
>
> Anyway, just disable L0S, and card works perfectly.
How this patch?
Its same patch but without open coded ASPM disabler.
Of course to work therefore you need CONFIG_PCIEASPM.
Without it, this reduces to noop.
However I asked at linux-pci, and they said that its not a bad idea to
just remove CONFIG_PCIEASPM and make it default.
I hope there won't be a silly GPL vs BSD debate over one line of code...
commit ac5de416f822917b927958b21186a82141550da7
Author: Maxim Levitsky <maximlevitsky@gmail.com>
Date: Thu Jun 17 23:21:42 2010 +0300
ath5k: disable ASPM
Atheros card on Acer Aspire One (AOA150, Atheros Communications Inc. AR5001
Wireless Network Adapter [168c:001c] (rev 01)) doesn't work well with ASPM
enabled. With ASPM ath5k will eventually stall on heavy traffic with often
'unsupported jumbo' warnings appearing. Disabling ASPM L0s in ath5k fixes
these problems.
Reproduced with pcie_aspm=force and by using 'nc < /dev/zero > /dev/null' at
both ends (usually stalls within seconds).
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 3abbe75..e7a189a 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -48,6 +48,7 @@
#include <linux/netdevice.h>
#include <linux/cache.h>
#include <linux/pci.h>
+#include <linux/pci-aspm.h>
#include <linux/ethtool.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
@@ -469,6 +470,9 @@ ath5k_pci_probe(struct pci_dev *pdev,
int ret;
u8 csz;
+ /* Disable PCIE ASPM L0S. It is never enabled by windows driver */
+ pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
+
ret = pci_enable_device(pdev);
if (ret) {
dev_err(&pdev->dev, "can't enable device\n");
@@ -722,6 +726,8 @@ static int ath5k_pci_resume(struct device *dev)
struct ieee80211_hw *hw = pci_get_drvdata(pdev);
struct ath5k_softc *sc = hw->priv;
+ pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
+
/*
* Suspend/Resume resets the PCI configuration space, so we have to
* re-disable the RETRY_TIMEOUT register (0x41) to keep
^ permalink raw reply related
* Re: [PATCH v2] ath5k: disable ASPM
From: Bob Copeland @ 2010-06-19 12:38 UTC (permalink / raw)
To: Maxim Levitsky
Cc: Jussi Kivilinna, ath5k-devel, linux-wireless, Luis R. Rodriguez,
linux-kernel
In-Reply-To: <1276933774.16697.11.camel@maxim-laptop>
On Sat, Jun 19, 2010 at 10:49:34AM +0300, Maxim Levitsky wrote:
> How this patch?
Looks fine to me. Some nitpicking below but feel free to add my
Acked-by: Bob Copeland <me@bobcopeland.com>
to this or a later version.
> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
> Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
I believe maintaining the s-o-b is usually reserved for the case when the
patch only has minor edits; here your patch while same in spirit has
some 30 fewer lines. Maybe should use "From:" or mention Jussi in the
commit log to maintain attribution instead?
> + /* Disable PCIE ASPM L0S. It is never enabled by windows driver */
> + pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
> +
Would be good to expand this comment as to why (just copy another
sentence from the commit log or so).
> ret = pci_enable_device(pdev);
> if (ret) {
> dev_err(&pdev->dev, "can't enable device\n");
> @@ -722,6 +726,8 @@ static int ath5k_pci_resume(struct device *dev)
> struct ieee80211_hw *hw = pci_get_drvdata(pdev);
> struct ath5k_softc *sc = hw->priv;
>
> + pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
> +
Did you test that it did get lost over suspend/resume? A glance at
pci_save_pcie_state seems to indicate it's saved.
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply
* Re: [PATCH v2] ath5k: disable ASPM
From: Maxim Levitsky @ 2010-06-19 13:02 UTC (permalink / raw)
To: Bob Copeland
Cc: Jussi Kivilinna, ath5k-devel, linux-wireless, Luis R. Rodriguez,
linux-kernel
In-Reply-To: <20100619123841.GA31838@hash.localnet>
On Sat, 2010-06-19 at 08:38 -0400, Bob Copeland wrote:
> On Sat, Jun 19, 2010 at 10:49:34AM +0300, Maxim Levitsky wrote:
> > How this patch?
>
> Looks fine to me. Some nitpicking below but feel free to add my
>
> Acked-by: Bob Copeland <me@bobcopeland.com>
>
> to this or a later version.
>
> > Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
> > Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
>
> I believe maintaining the s-o-b is usually reserved for the case when the
> patch only has minor edits; here your patch while same in spirit has
> some 30 fewer lines. Maybe should use "From:" or mention Jussi in the
> commit log to maintain attribution instead?
OK
>
> > + /* Disable PCIE ASPM L0S. It is never enabled by windows driver */
> > + pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
> > +
>
> Would be good to expand this comment as to why (just copy another
> sentence from the commit log or so).
OK
>
> > ret = pci_enable_device(pdev);
> > if (ret) {
> > dev_err(&pdev->dev, "can't enable device\n");
> > @@ -722,6 +726,8 @@ static int ath5k_pci_resume(struct device *dev)
> > struct ieee80211_hw *hw = pci_get_drvdata(pdev);
> > struct ath5k_softc *sc = hw->priv;
> >
> > + pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
> > +
>
> Did you test that it did get lost over suspend/resume? A glance at
> pci_save_pcie_state seems to indicate it's saved.
Will test.
Best regards,
Maxim Levitsky
^ permalink raw reply
* Re: Problems with b43 wirelesss
From: Larry Finger @ 2010-06-19 13:26 UTC (permalink / raw)
To: Magnus Therning; +Cc: Rafał Miłecki, b43-dev, wireless
In-Reply-To: <AANLkTimxOgQySTag7u4DlZugbveWr7csDSAERkewAYhp@mail.gmail.com>
On 06/19/2010 07:35 AM, Magnus Therning wrote:
> 2010/6/19 Rafał Miłecki <zajec5@gmail.com>:
>> You can Google for b43 & DMA errors. Simply try "pio" option for b43
>> module. Or switch to newer kernel, which will pick up pio for you
>> after first DMA error.
>
> Given the following messages in dmesg, I thought this was already happening:
>
> b43-phy0 ERROR: Fatal DMA error: 0x00000800, 0x00000000, 0x00000000,
> 0x00000000, 0x00000000, 0x00000000
> b43-phy0 ERROR: This device does not support DMA on your system.
> Please use PIO instead.
> b43-phy0: Controller RESET (DMA error) ...
> b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)
> b43-phy0: Controller restarted
>
> I'm running the 2.6.33 (latest stable is 2.6.34), but I am using the
> latest daily (2010-06-17) from compat-wireless[1], so unless I'm
> missing something there isn't much to be gained from switching to the
> latest kernel. In any case I will try it to see if that improves the
> situation.
>
> My naive reading of the messages tells me that this *isn't* a DMA
> error... I also don't really understand how I could ever get an
> initial connection, which I do, if that were the problem I'm having.
No, it is a fatal DMA error and your device did switch to PIO mode. The
dmesg output does not make that clear. I'm sending a patch to change the
logged message.
> It looks like the following is more relevant to my problem:
>
> No probe response from AP 00:22:3f:c3:99:a8 after 500ms, disconnecting.
> cfg80211: Calling CRDA to update world regulatory domain
> wlan0: authenticate with 00:22:3f:c3:99:a8 (try 1)
> wlan0: authenticated
> wlan0: associate with 00:22:3f:c3:99:a8 (try 1)
> wlan0: RX AssocResp from 00:22:3f:c3:99:a8 (capab=0x431 status=0 aid=1)
> wlan0: associated
> wlan0: deauthenticated from 00:22:3f:c3:99:a8 (Reason: 15)
>
> Especially since that sequence of messages is repeated over an over.
>
> My next test will be to turn off all security on the wireless, just to
> rule out WPA completley.
I looked for an explanation of Reason 15 deauthentications. Perhaps
someone on the wireless ML will know the answer.
Larry
^ permalink raw reply
* [PATCH] b43: Clarify logged message after fatal DMA error and switch to PIO mode
From: Larry Finger @ 2010-06-19 13:29 UTC (permalink / raw)
To: John W Linville, Michael Buesch; +Cc: b43-dev, linux-wireless
The message following fatal DMA errors fails to indicate properly that the
driver has switched to PIO mode.
Signed-off-by: Larry Finger <Larry.Finger@wfinger.net>
---
Index: wireless-testing/drivers/net/wireless/b43/main.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/main.c
+++ wireless-testing/drivers/net/wireless/b43/main.c
@@ -1804,7 +1804,7 @@ static void b43_do_interrupt_thread(stru
dma_reason[2], dma_reason[3],
dma_reason[4], dma_reason[5]);
b43err(dev->wl, "This device does not support DMA "
- "on your system. Please use PIO instead.\n");
+ "on your system. It will now be switched to PIO.\n");
/* Fall back to PIO transfers if we get fatal DMA errors! */
dev->use_pio = 1;
b43_controller_restart(dev, "DMA error");
^ permalink raw reply
* Bad performance for libertas on Murata combo.
From: Enric Balletbò i Serra @ 2010-06-19 13:53 UTC (permalink / raw)
To: linux-wireless
Hi all,
Maybe someone can help me ...
I am in the process of enabling WLAN for a target board. It has a WLAN
Bluetooth (WLAN-BT) combo module from MuRata which has a Marvell WLAN
(88W8686) + CSR Bluetooth chipset.
I can connect to an AP, but the performance is too low. Pinging my AP
I see a lot of 'Rx invalid crypt' and 'Invalid misc' packets.
I'm using the libertas driver from mainline kernel (2.6.35-rc3) with
SDIO interface and these errors are reported using the iwconfig
command.
I also tested with 2.6.34 and 2.6.33 with same result.
Any idea about what this means ? What could be wrong? Or how can I
investigate more ?
Thanks in advance,
Enric
^ permalink raw reply
* Re: [PATCH] b43: Clarify logged message after fatal DMA error and switch to PIO mode
From: Michael Büsch @ 2010-06-19 14:01 UTC (permalink / raw)
To: Larry Finger; +Cc: John W Linville, b43-dev, linux-wireless
In-Reply-To: <4c1cc624.Whz955JR9XYzqjst%Larry.Finger@lwfinger.net>
On 06/19/2010 03:29 PM, Larry Finger wrote:
> The message following fatal DMA errors fails to indicate properly that the
> driver has switched to PIO mode.
>
> Signed-off-by: Larry Finger<Larry.Finger@wfinger.net>
> ---
>
> Index: wireless-testing/drivers/net/wireless/b43/main.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/b43/main.c
> +++ wireless-testing/drivers/net/wireless/b43/main.c
> @@ -1804,7 +1804,7 @@ static void b43_do_interrupt_thread(stru
> dma_reason[2], dma_reason[3],
> dma_reason[4], dma_reason[5]);
> b43err(dev->wl, "This device does not support DMA "
> - "on your system. Please use PIO instead.\n");
> + "on your system. It will now be switched to PIO.\n");
> /* Fall back to PIO transfers if we get fatal DMA errors! */
> dev->use_pio = 1;
> b43_controller_restart(dev, "DMA error");
>
Ack.
But what's the current status of the debugging of the PCI-core code
w.r.t DMA?
--
Greetings Michael.
^ permalink raw reply
* [PATCH v3] ath5k: disable ASPM
From: Maxim Levitsky @ 2010-06-19 15:32 UTC (permalink / raw)
To: Bob Copeland
Cc: Jussi Kivilinna, ath5k-devel, linux-wireless, Luis R. Rodriguez,
linux-kernel
In-Reply-To: <1276952554.3332.3.camel@maxim-laptop>
On Sat, 2010-06-19 at 16:02 +0300, Maxim Levitsky wrote:
> On Sat, 2010-06-19 at 08:38 -0400, Bob Copeland wrote:
> > On Sat, Jun 19, 2010 at 10:49:34AM +0300, Maxim Levitsky wrote:
> > > How this patch?
> >
> > Looks fine to me. Some nitpicking below but feel free to add my
> >
> > Acked-by: Bob Copeland <me@bobcopeland.com>
> >
Done.
Best regards,
Maxim Levitsky
---
commit 616afa397b3e843f2aba06be12a30e72dfff7740
Author: Maxim Levitsky <maximlevitsky@gmail.com>
Date: Thu Jun 17 23:21:42 2010 +0300
ath5k: disable ASPM
Atheros card on Acer Aspire One (AOA150, Atheros Communications Inc. AR5001
Wireless Network Adapter [168c:001c] (rev 01)) doesn't work well with ASPM
enabled. With ASPM ath5k will eventually stall on heavy traffic with often
'unsupported jumbo' warnings appearing. Disabling ASPM L0s in ath5k fixes
these problems.
Also card sends a storm of RXORN interrupts even though medium is idle.
Reproduced with pcie_aspm=force and by using 'nc < /dev/zero > /dev/null' at
both ends (usually stalls within seconds).
Unfortunately BIOS enables ASPM on this card by default on these machines
This means that, problem shows up (less often) without pcie_aspm=force too.
Therefore to benefit from this fix you need to _enable_ CONFIG_PCIEASPM
All credit for this patch goes to Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
for finding and fixing this bug.
Based on patch that is
From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 3abbe75..4f6bd7c 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -48,6 +48,7 @@
#include <linux/netdevice.h>
#include <linux/cache.h>
#include <linux/pci.h>
+#include <linux/pci-aspm.h>
#include <linux/ethtool.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
@@ -469,6 +470,19 @@ ath5k_pci_probe(struct pci_dev *pdev,
int ret;
u8 csz;
+ /*
+ * Disable PCIE ASPM L0S on the card.
+ * ASPM triggers hardware bug, that makes card stall transmission
+ * untill reset, and even that doesn't always help.
+ * This happens on meduim to heavy transmit utilization.
+ * In addition to stall, hardware usually gives a storm of
+ * RXORN interrupts, despite idle channel, and otherwise doesn't work.
+ * Windows driver also disables the L0s ASPM,
+ * probably due to same reason
+ * Note: to benefit from this fix, please _enable_ CONFIG_PCIEASPM
+ */
+ pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
+
ret = pci_enable_device(pdev);
if (ret) {
dev_err(&pdev->dev, "can't enable device\n");
^ permalink raw reply related
* Re: [PATCH]: ath: Fix uninitialized variable warnings
From: Pavel Roskin @ 2010-06-19 17:33 UTC (permalink / raw)
To: Prarit Bhargava; +Cc: linux-wireless, John W. Linville, ath9k-devel
In-Reply-To: <4C1AA4AF.8040306@redhat.com>
On Thu, 2010-06-17 at 18:41 -0400, Prarit Bhargava wrote:
...
> New linux-2.6 patch using Pavel's suggestion.
>
>
> Fix "make -j32 CONFIG_DEBUG_SECTION_MISMATCH=y" warning:
>
> drivers/net/wireless/ath/ath9k/eeprom_9287.c: In function ‘ath9k_hw_get_AR9287_gain_boundaries_pdadcs’:
> drivers/net/wireless/ath/ath9k/eeprom_9287.c:301: warning: ‘minPwrT4’ may be used uninitialized in this function
> drivers/net/wireless/ath/ath9k/eeprom_4k.c: In function ‘ath9k_hw_get_4k_gain_boundaries_pdadcs.clone.1’:
> drivers/net/wireless/ath/ath9k/eeprom_4k.c:310: warning: ‘minPwrT4’ may be used uninitialized in this function
> drivers/net/wireless/ath/ath9k/eeprom_def.c: In function ‘ath9k_hw_get_def_gain_boundaries_pdadcs.clone.0’:
> drivers/net/wireless/ath/ath9k/eeprom_def.c:677: warning: ‘minPwrT4’ may be used uninitialized in this function
>
> Remove tMinCalPower and the corresponding function arguments as it is not
> used.
>
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Pavel Roskin <proski@gnu.org>
--
Regards,
Pavel Roskin
^ permalink raw reply
* Compat-wireless release for 2010-06-19 is baked
From: Compat-wireless cronjob account @ 2010-06-19 19:02 UTC (permalink / raw)
To: linux-wireless, linux-bluetooth
compat-wireless code metrics
498472 - Total upstream lines of code being pulled
1410 - backport code changes
1177 - backport code additions
233 - backport code deletions
5748 - backport from compat module
7158 - total backport code
1.4360 - % of code consists of backport work
1218 - Crap changes not yet posted
1179 - Crap additions not yet merged
39 - Crap deletions not yet posted
0.2443 - % of crap code
Base tree: linux-next.git
Base tree version: next-20100618
compat-wireless release: compat-wireless-2010-06-17-1-g75bb510
^ permalink raw reply
* [PATCH 0/3] b43: logging cleanups
From: Joe Perches @ 2010-06-19 23:30 UTC (permalink / raw)
To: Stefano Brivio; +Cc: John W. Linville, linux-wireless, netdev, linux-kernel
Just some small cleanups
Joe Perches (3):
drivers/net/wireless/b43: Use local ratelimit_state
drivers/net/wireless/b43: Logging cleanups
drivers/net/wireless/b43: Rename b43_debug to b43_debugging
drivers/net/wireless/b43/b43.h | 17 +--
drivers/net/wireless/b43/debugfs.c | 16 +-
drivers/net/wireless/b43/debugfs.h | 4 +-
drivers/net/wireless/b43/dma.c | 125 ++++++++---------
drivers/net/wireless/b43/leds.c | 6 +-
drivers/net/wireless/b43/lo.c | 37 +++---
drivers/net/wireless/b43/main.c | 252 +++++++++++++++++----------------
drivers/net/wireless/b43/pcmcia.c | 3 +-
drivers/net/wireless/b43/phy_a.c | 11 +-
drivers/net/wireless/b43/phy_common.c | 7 +-
drivers/net/wireless/b43/phy_g.c | 62 ++++----
drivers/net/wireless/b43/phy_lp.c | 17 ++-
drivers/net/wireless/b43/phy_n.c | 30 ++--
drivers/net/wireless/b43/pio.c | 12 +-
drivers/net/wireless/b43/rfkill.c | 4 +-
drivers/net/wireless/b43/sysfs.c | 3 +-
drivers/net/wireless/b43/xmit.c | 10 +-
17 files changed, 304 insertions(+), 312 deletions(-)
^ permalink raw reply
* [PATCH 1/3] drivers/net/wireless/b43: Use local ratelimit_state
From: Joe Perches @ 2010-06-19 23:30 UTC (permalink / raw)
To: Stefano Brivio; +Cc: John W. Linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1276988387.git.joe@perches.com>
Avoid limiting the logging output of other networking devices
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/wireless/b43/main.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 7965b70..8031f24 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -311,13 +311,15 @@ static int b43_wireless_core_start(struct b43_wldev *dev);
static int b43_ratelimit(struct b43_wl *wl)
{
+ static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 10);
+
if (!wl || !wl->current_dev)
return 1;
if (b43_status(wl->current_dev) < B43_STAT_STARTED)
return 1;
/* We are up and running.
* Ratelimit the messages to avoid DoS over the net. */
- return net_ratelimit();
+ return __ratelimit(&ratelimit);
}
void b43info(struct b43_wl *wl, const char *fmt, ...)
--
1.7.1.337.g6068.dirty
^ permalink raw reply related
* [PATCH 2/3] drivers/net/wireless/b43: Logging cleanups
From: Joe Perches @ 2010-06-19 23:30 UTC (permalink / raw)
To: Stefano Brivio; +Cc: John W. Linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1276988387.git.joe@perches.com>
Convert the logging macros and printks to a more standardized style.
Add underscores to b43 logging macros:
b43info -> b43_info
b43err -> b43_err
b43warn -> b43_warn
b43dbg -> b43_dbg
Use pr_<level> in a few places.
Add KERN_<level> in a few places.
Coalesced some format strings.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/wireless/b43/b43.h | 17 +--
drivers/net/wireless/b43/debugfs.c | 14 +-
drivers/net/wireless/b43/dma.c | 115 ++++++++---------
drivers/net/wireless/b43/leds.c | 6 +-
drivers/net/wireless/b43/lo.c | 31 ++---
drivers/net/wireless/b43/main.c | 232 ++++++++++++++++----------------
drivers/net/wireless/b43/pcmcia.c | 3 +-
drivers/net/wireless/b43/phy_a.c | 11 +-
drivers/net/wireless/b43/phy_common.c | 7 +-
drivers/net/wireless/b43/phy_g.c | 54 ++++----
drivers/net/wireless/b43/phy_lp.c | 17 ++-
drivers/net/wireless/b43/phy_n.c | 30 ++--
drivers/net/wireless/b43/pio.c | 12 +-
drivers/net/wireless/b43/rfkill.c | 4 +-
drivers/net/wireless/b43/sysfs.c | 3 +-
drivers/net/wireless/b43/xmit.c | 10 +-
16 files changed, 278 insertions(+), 288 deletions(-)
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index 8674a99..28bf8f2 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -895,15 +895,14 @@ static inline bool b43_using_pio_transfers(struct b43_wldev *dev)
#endif
/* Message printing */
-void b43info(struct b43_wl *wl, const char *fmt, ...)
- __attribute__ ((format(printf, 2, 3)));
-void b43err(struct b43_wl *wl, const char *fmt, ...)
- __attribute__ ((format(printf, 2, 3)));
-void b43warn(struct b43_wl *wl, const char *fmt, ...)
- __attribute__ ((format(printf, 2, 3)));
-void b43dbg(struct b43_wl *wl, const char *fmt, ...)
- __attribute__ ((format(printf, 2, 3)));
-
+void b43_info(struct b43_wl *wl, const char *fmt, ...)
+ __attribute__ ((format(printf, 2, 3)));
+void b43_err(struct b43_wl *wl, const char *fmt, ...)
+ __attribute__ ((format(printf, 2, 3)));
+void b43_warn(struct b43_wl *wl, const char *fmt, ...)
+ __attribute__ ((format(printf, 2, 3)));
+void b43_dbg(struct b43_wl *wl, const char *fmt, ...)
+ __attribute__ ((format(printf, 2, 3)));
/* A WARN_ON variant that vanishes when b43 debugging is disabled.
* This _also_ evaluates the arg with debugging disabled. */
diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/b43/debugfs.c
index 80b19a4..307802c 100644
--- a/drivers/net/wireless/b43/debugfs.c
+++ b/drivers/net/wireless/b43/debugfs.c
@@ -68,7 +68,7 @@ struct b43_dfs_file *fops_to_dfs_file(struct b43_wldev *dev,
bufsize - count, \
fmt , ##x); \
else \
- printk(KERN_ERR "b43: fappend overflow\n"); \
+ pr_err("b43: fappend overflow\n"); \
} while (0)
@@ -703,7 +703,7 @@ void b43_debugfs_add_device(struct b43_wldev *dev)
B43_WARN_ON(!dev);
e = kzalloc(sizeof(*e), GFP_KERNEL);
if (!e) {
- b43err(dev->wl, "debugfs: add device OOM\n");
+ b43_err(dev->wl, "debugfs: add device OOM\n");
return;
}
e->dev = dev;
@@ -711,7 +711,7 @@ void b43_debugfs_add_device(struct b43_wldev *dev)
log->log = kcalloc(B43_NR_LOGGED_TXSTATUS,
sizeof(struct b43_txstatus), GFP_KERNEL);
if (!log->log) {
- b43err(dev->wl, "debugfs: add device txstatus OOM\n");
+ b43_err(dev->wl, "debugfs: add device txstatus OOM\n");
kfree(e);
return;
}
@@ -723,11 +723,11 @@ void b43_debugfs_add_device(struct b43_wldev *dev)
e->subdir = debugfs_create_dir(devdir, rootdir);
if (!e->subdir || IS_ERR(e->subdir)) {
if (e->subdir == ERR_PTR(-ENODEV)) {
- b43dbg(dev->wl, "DebugFS (CONFIG_DEBUG_FS) not "
- "enabled in kernel config\n");
+ b43_dbg(dev->wl,
+ "DebugFS (CONFIG_DEBUG_FS) not enabled in kernel config\n");
} else {
- b43err(dev->wl, "debugfs: cannot create %s directory\n",
- devdir);
+ b43_err(dev->wl, "debugfs: cannot create %s directory\n",
+ devdir);
}
dev->dfsentry = NULL;
kfree(log->log);
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c
index 10d0aaf..a6d15c4 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -266,10 +266,10 @@ static void update_max_used_slots(struct b43_dmaring *ring,
return;
ring->max_used_slots = current_used_slots;
if (b43_debug(ring->dev, B43_DBG_DMAVERBOSE)) {
- b43dbg(ring->dev->wl,
- "max_used_slots increased to %d on %s ring %d\n",
- ring->max_used_slots,
- ring->tx ? "TX" : "RX", ring->index);
+ b43_dbg(ring->dev->wl,
+ "max_used_slots increased to %d on %s ring %d\n",
+ ring->max_used_slots,
+ ring->tx ? "TX" : "RX", ring->index);
}
}
#else
@@ -405,7 +405,7 @@ static int alloc_ringmemory(struct b43_dmaring *ring)
B43_DMA_RINGMEMSIZE,
&(ring->dmabase), flags);
if (!ring->descbase) {
- b43err(ring->dev->wl, "DMA ringmemory allocation failed\n");
+ b43_err(ring->dev->wl, "DMA ringmemory allocation failed\n");
return -ENOMEM;
}
memset(ring->descbase, 0, B43_DMA_RINGMEMSIZE);
@@ -456,7 +456,7 @@ static int b43_dmacontroller_rx_reset(struct b43_wldev *dev, u16 mmio_base,
msleep(1);
}
if (i != -1) {
- b43err(dev->wl, "DMA RX reset timed out\n");
+ b43_err(dev->wl, "DMA RX reset timed out\n");
return -ENODEV;
}
@@ -514,7 +514,7 @@ static int b43_dmacontroller_tx_reset(struct b43_wldev *dev, u16 mmio_base,
msleep(1);
}
if (i != -1) {
- b43err(dev->wl, "DMA TX reset timed out\n");
+ b43_err(dev->wl, "DMA TX reset timed out\n");
return -ENODEV;
}
/* ensure the reset is completed. */
@@ -605,7 +605,7 @@ static int setup_rx_descbuffer(struct b43_dmaring *ring,
dmaaddr = map_descbuffer(ring, skb->data,
ring->rx_buffersize, 0);
if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) {
- b43err(ring->dev->wl, "RX DMA buffer allocation failed\n");
+ b43_err(ring->dev->wl, "RX DMA buffer allocation failed\n");
dev_kfree_skb_any(skb);
return -EIO;
}
@@ -633,8 +633,8 @@ static int alloc_initial_descbuffers(struct b43_dmaring *ring)
err = setup_rx_descbuffer(ring, desc, meta, GFP_KERNEL);
if (err) {
- b43err(ring->dev->wl,
- "Failed to allocate initial descbuffers\n");
+ b43_err(ring->dev->wl,
+ "Failed to allocate initial descbuffers\n");
goto err_unwind;
}
}
@@ -897,8 +897,8 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
if (b43_dma_mapping_error(ring, dma_test,
b43_txhdr_size(dev), 1)) {
- b43err(dev->wl,
- "TXHDR DMA allocation failed\n");
+ b43_err(dev->wl,
+ "TXHDR DMA allocation failed\n");
goto err_kfree_txhdr_cache;
}
}
@@ -961,18 +961,18 @@ static void b43_destroy_dmaring(struct b43_dmaring *ring,
if (nr_packets)
average_tries = divide(ring->nr_total_packet_tries * 100, nr_packets);
- b43dbg(ring->dev->wl, "DMA-%u %s: "
- "Used slots %d/%d, Failed frames %llu/%llu = %llu.%01llu%%, "
- "Average tries %llu.%02llu\n",
- (unsigned int)(ring->type), ringname,
- ring->max_used_slots,
- ring->nr_slots,
- (unsigned long long)failed_packets,
- (unsigned long long)nr_packets,
- (unsigned long long)divide(permille_failed, 10),
- (unsigned long long)modulo(permille_failed, 10),
- (unsigned long long)divide(average_tries, 100),
- (unsigned long long)modulo(average_tries, 100));
+ b43_dbg(ring->dev->wl, "DMA-%u %s: "
+ "Used slots %d/%d, Failed frames %llu/%llu = %llu.%01llu%%, "
+ "Average tries %llu.%02llu\n",
+ (unsigned int)(ring->type), ringname,
+ ring->max_used_slots,
+ ring->nr_slots,
+ (unsigned long long)failed_packets,
+ (unsigned long long)nr_packets,
+ (unsigned long long)divide(permille_failed, 10),
+ (unsigned long long)modulo(permille_failed, 10),
+ (unsigned long long)divide(average_tries, 100),
+ (unsigned long long)modulo(average_tries, 100));
}
#endif /* DEBUG */
@@ -1034,15 +1034,14 @@ static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask)
fallback = 1;
continue;
}
- b43err(dev->wl, "The machine/kernel does not support "
- "the required %u-bit DMA mask\n",
- (unsigned int)dma_mask_to_engine_type(orig_mask));
+ b43_err(dev->wl, "The machine/kernel does not support the required %u-bit DMA mask\n",
+ (unsigned int)dma_mask_to_engine_type(orig_mask));
return -EOPNOTSUPP;
}
if (fallback) {
- b43info(dev->wl, "DMA mask fallback from %u-bit to %u-bit\n",
- (unsigned int)dma_mask_to_engine_type(orig_mask),
- (unsigned int)dma_mask_to_engine_type(mask));
+ b43_info(dev->wl, "DMA mask fallback from %u-bit to %u-bit\n",
+ (unsigned int)dma_mask_to_engine_type(orig_mask),
+ (unsigned int)dma_mask_to_engine_type(mask));
}
return 0;
@@ -1091,8 +1090,7 @@ int b43_dma_init(struct b43_wldev *dev)
/* No support for the TX status DMA ring. */
B43_WARN_ON(dev->dev->id.revision < 5);
- b43dbg(dev->wl, "%u-bit DMA initialized\n",
- (unsigned int)type);
+ b43_dbg(dev->wl, "%u-bit DMA initialized\n", (unsigned int)type);
err = 0;
out:
return err;
@@ -1156,8 +1154,8 @@ struct b43_dmaring *parse_cookie(struct b43_wldev *dev, u16 cookie, int *slot)
}
*slot = (cookie & 0x0FFF);
if (unlikely(!ring || *slot < 0 || *slot >= ring->nr_slots)) {
- b43dbg(dev->wl, "TX-status contains "
- "invalid cookie: 0x%04X\n", cookie);
+ b43_dbg(dev->wl, "TX-status contains invalid cookie: 0x%04X\n",
+ cookie);
return NULL;
}
@@ -1274,9 +1272,9 @@ static inline int should_inject_overflow(struct b43_dmaring *ring)
next_overflow = ring->last_injected_overflow + HZ;
if (time_after(jiffies, next_overflow)) {
ring->last_injected_overflow = jiffies;
- b43dbg(ring->dev->wl,
- "Injecting TX ring overflow on "
- "DMA controller %d\n", ring->index);
+ b43_dbg(ring->dev->wl,
+ "Injecting TX ring overflow on DMA controller %d\n",
+ ring->index);
return 1;
}
}
@@ -1343,7 +1341,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb)
* the queue is stopped, thus we got called when we shouldn't.
* For now, just refuse the transmit. */
if (b43_debug(dev, B43_DBG_DMAVERBOSE))
- b43err(dev->wl, "Packet after queue stopped\n");
+ b43_err(dev->wl, "Packet after queue stopped\n");
err = -ENOSPC;
goto out;
}
@@ -1351,7 +1349,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb)
if (unlikely(WARN_ON(free_slots(ring) < TX_SLOTS_PER_FRAME))) {
/* If we get here, we have a real error with the queue
* full, but queues not stopped. */
- b43err(dev->wl, "DMA queue overflow\n");
+ b43_err(dev->wl, "DMA queue overflow\n");
err = -ENOSPC;
goto out;
}
@@ -1370,7 +1368,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb)
goto out;
}
if (unlikely(err)) {
- b43err(dev->wl, "DMA tx mapping failure\n");
+ b43_err(dev->wl, "DMA tx mapping failure\n");
goto out;
}
if ((free_slots(ring) < TX_SLOTS_PER_FRAME) ||
@@ -1379,7 +1377,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb)
ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb));
ring->stopped = 1;
if (b43_debug(dev, B43_DBG_DMAVERBOSE)) {
- b43dbg(dev->wl, "Stopped TX ring %d\n", ring->index);
+ b43_dbg(dev->wl, "Stopped TX ring %d\n", ring->index);
}
}
out:
@@ -1411,9 +1409,9 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
if (unlikely(slot != firstused)) {
/* This possibly is a firmware bug and will result in
* malfunction, memory leaks and/or stall of DMA functionality. */
- b43dbg(dev->wl, "Out of order TX status report on DMA ring %d. "
- "Expected %d, but got %d\n",
- ring->index, firstused, slot);
+ b43_dbg(dev->wl, "Out of order TX status report on DMA ring %d. "
+ "Expected %d, but got %d\n",
+ ring->index, firstused, slot);
return;
}
@@ -1423,9 +1421,8 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
desc = ops->idx2desc(ring, slot, &meta);
if (b43_dma_ptr_is_poisoned(meta->skb)) {
- b43dbg(dev->wl, "Poisoned TX slot %d (first=%d) "
- "on ring %d\n",
- slot, firstused, ring->index);
+ b43_dbg(dev->wl, "Poisoned TX slot %d (first=%d) on ring %d\n",
+ slot, firstused, ring->index);
break;
}
if (meta->skb) {
@@ -1446,9 +1443,9 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
if (unlikely(!meta->skb)) {
/* This is a scatter-gather fragment of a frame, so
* the skb pointer must not be NULL. */
- b43dbg(dev->wl, "TX status unexpected NULL skb "
- "at slot %d (first=%d) on ring %d\n",
- slot, firstused, ring->index);
+ b43_dbg(dev->wl,
+ "TX status unexpected NULL skb at slot %d (first=%d) on ring %d\n",
+ slot, firstused, ring->index);
break;
}
@@ -1476,9 +1473,9 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
* this is only the txhdr, which is not allocated.
*/
if (unlikely(meta->skb)) {
- b43dbg(dev->wl, "TX status unexpected non-NULL skb "
- "at slot %d (first=%d) on ring %d\n",
- slot, firstused, ring->index);
+ b43_dbg(dev->wl,
+ "TX status unexpected non-NULL skb at slot %d (first=%d) on ring %d\n",
+ slot, firstused, ring->index);
break;
}
}
@@ -1498,7 +1495,7 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
ieee80211_wake_queue(dev->wl->hw, ring->queue_prio);
ring->stopped = 0;
if (b43_debug(dev, B43_DBG_DMAVERBOSE)) {
- b43dbg(dev->wl, "Woke up TX ring %d\n", ring->index);
+ b43_dbg(dev->wl, "Woke up TX ring %d\n", ring->index);
}
}
}
@@ -1537,7 +1534,7 @@ static void dma_rx(struct b43_dmaring *ring, int *slot)
if (unlikely(b43_rx_buffer_is_poisoned(ring, skb))) {
/* Something went wrong with the DMA.
* The device did not touch the buffer and did not overwrite the poison. */
- b43dbg(ring->dev->wl, "DMA RX: Dropping poisoned buffer.\n");
+ b43_dbg(ring->dev->wl, "DMA RX: Dropping poisoned buffer\n");
dmaaddr = meta->dmaaddr;
goto drop_recycle_buffer;
}
@@ -1562,16 +1559,16 @@ static void dma_rx(struct b43_dmaring *ring, int *slot)
if (tmp <= 0)
break;
}
- b43err(ring->dev->wl, "DMA RX buffer too small "
- "(len: %u, buffer: %u, nr-dropped: %d)\n",
- len, ring->rx_buffersize, cnt);
+ b43_err(ring->dev->wl, "DMA RX buffer too small "
+ "(len: %u, buffer: %u, nr-dropped: %d)\n",
+ len, ring->rx_buffersize, cnt);
goto drop;
}
dmaaddr = meta->dmaaddr;
err = setup_rx_descbuffer(ring, desc, meta, GFP_ATOMIC);
if (unlikely(err)) {
- b43dbg(ring->dev->wl, "DMA RX: setup_rx_descbuffer() failed\n");
+ b43_dbg(ring->dev->wl, "DMA RX: setup_rx_descbuffer() failed\n");
goto drop_recycle_buffer;
}
diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c
index c587115..4bf526e 100644
--- a/drivers/net/wireless/b43/leds.c
+++ b/drivers/net/wireless/b43/leds.c
@@ -140,7 +140,7 @@ static int b43_register_led(struct b43_wldev *dev, struct b43_led *led,
err = led_classdev_register(dev->dev->dev, &led->led_dev);
if (err) {
- b43warn(dev->wl, "LEDs: Failed to register %s\n", name);
+ b43_warn(dev->wl, "LEDs: Failed to register %s\n", name);
led->wl = NULL;
return err;
}
@@ -204,8 +204,8 @@ static void b43_map_led(struct b43_wldev *dev,
led_index, activelow);
break;
default:
- b43warn(dev->wl, "LEDs: Unknown behaviour 0x%02X\n",
- behaviour);
+ b43_warn(dev->wl, "LEDs: Unknown behaviour 0x%02X\n",
+ behaviour);
break;
}
}
diff --git a/drivers/net/wireless/b43/lo.c b/drivers/net/wireless/b43/lo.c
index 94e4f13..c16c35c 100644
--- a/drivers/net/wireless/b43/lo.c
+++ b/drivers/net/wireless/b43/lo.c
@@ -62,8 +62,8 @@ static void b43_lo_write(struct b43_wldev *dev, struct b43_loctl *control)
if (B43_DEBUG) {
if (unlikely(abs(control->i) > 16 || abs(control->q) > 16)) {
- b43dbg(dev->wl, "Invalid LO control pair "
- "(I: %d, Q: %d)\n", control->i, control->q);
+ b43_dbg(dev->wl, "Invalid LO control pair "
+ "(I: %d, Q: %d)\n", control->i, control->q);
dump_stack();
return;
}
@@ -775,15 +775,15 @@ struct b43_lo_calib *b43_calibrate_lo_setting(struct b43_wldev *dev,
b43_mac_enable(dev);
if (b43_debug(dev, B43_DBG_LO)) {
- b43dbg(dev->wl, "LO: Calibrated for BB(%u), RF(%u,%u) "
- "=> I=%d Q=%d\n",
- bbatt->att, rfatt->att, rfatt->with_padmix,
- loctl.i, loctl.q);
+ b43_dbg(dev->wl, "LO: Calibrated for BB(%u), RF(%u,%u) "
+ "=> I=%d Q=%d\n",
+ bbatt->att, rfatt->att, rfatt->with_padmix,
+ loctl.i, loctl.q);
}
cal = kmalloc(sizeof(*cal), GFP_KERNEL);
if (!cal) {
- b43warn(dev->wl, "LO calib: out of memory\n");
+ b43_warn(dev->wl, "LO calib: out of memory\n");
return NULL;
}
memcpy(&cal->bbatt, bbatt, sizeof(*bbatt));
@@ -857,8 +857,7 @@ void b43_gphy_dc_lt_init(struct b43_wldev *dev, bool update_all)
cal = b43_calibrate_lo_setting(dev, bbatt, rfatt);
if (!cal) {
- b43warn(dev->wl, "LO: Could not "
- "calibrate DC table entry\n");
+ b43_warn(dev->wl, "LO: Could not calibrate DC table entry\n");
continue;
}
/*FIXME: Is Q really in the low nibble? */
@@ -973,11 +972,11 @@ void b43_lo_g_maintanance_work(struct b43_wldev *dev)
current_item_expired = 1;
}
if (b43_debug(dev, B43_DBG_LO)) {
- b43dbg(dev->wl, "LO: Item BB(%u), RF(%u,%u), "
- "I=%d, Q=%d expired\n",
- cal->bbatt.att, cal->rfatt.att,
- cal->rfatt.with_padmix,
- cal->ctl.i, cal->ctl.q);
+ b43_dbg(dev->wl, "LO: Item BB(%u), RF(%u,%u), "
+ "I=%d, Q=%d expired\n",
+ cal->bbatt.att, cal->rfatt.att,
+ cal->rfatt.with_padmix,
+ cal->ctl.i, cal->ctl.q);
}
list_del(&cal->list);
kfree(cal);
@@ -985,13 +984,13 @@ void b43_lo_g_maintanance_work(struct b43_wldev *dev)
if (current_item_expired || unlikely(list_empty(&lo->calib_list))) {
/* Recalibrate currently used LO setting. */
if (b43_debug(dev, B43_DBG_LO))
- b43dbg(dev->wl, "LO: Recalibrating current LO setting\n");
+ b43_dbg(dev->wl, "LO: Recalibrating current LO setting\n");
cal = b43_calibrate_lo_setting(dev, &gphy->bbatt, &gphy->rfatt);
if (cal) {
list_add(&cal->list, &lo->calib_list);
b43_lo_write(dev, &cal->ctl);
} else
- b43warn(dev->wl, "Failed to recalibrate current LO setting\n");
+ b43_warn(dev->wl, "Failed to recalibrate current LO setting\n");
}
}
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 8031f24..6343873 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -331,13 +331,13 @@ void b43info(struct b43_wl *wl, const char *fmt, ...)
if (!b43_ratelimit(wl))
return;
va_start(args, fmt);
- printk(KERN_INFO "b43-%s: ",
- (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
+ pr_info("b43-%s: ",
+ (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
vprintk(fmt, args);
va_end(args);
}
-void b43err(struct b43_wl *wl, const char *fmt, ...)
+void b43_err(struct b43_wl *wl, const char *fmt, ...)
{
va_list args;
@@ -346,13 +346,13 @@ void b43err(struct b43_wl *wl, const char *fmt, ...)
if (!b43_ratelimit(wl))
return;
va_start(args, fmt);
- printk(KERN_ERR "b43-%s ERROR: ",
+ pr_err("b43-%s ERROR: ",
(wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
vprintk(fmt, args);
va_end(args);
}
-void b43warn(struct b43_wl *wl, const char *fmt, ...)
+void b43_warn(struct b43_wl *wl, const char *fmt, ...)
{
va_list args;
@@ -361,13 +361,13 @@ void b43warn(struct b43_wl *wl, const char *fmt, ...)
if (!b43_ratelimit(wl))
return;
va_start(args, fmt);
- printk(KERN_WARNING "b43-%s warning: ",
- (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
+ pr_warning("b43-%s warning: ",
+ (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
vprintk(fmt, args);
va_end(args);
}
-void b43dbg(struct b43_wl *wl, const char *fmt, ...)
+void b43_dbg(struct b43_wl *wl, const char *fmt, ...)
{
va_list args;
@@ -840,7 +840,7 @@ static void rx_tkip_phase1_write(struct b43_wldev *dev, u8 index, u32 iv32,
B43_WARN_ON(index >= B43_NR_PAIRWISE_KEYS);
if (b43_debug(dev, B43_DBG_KEYS)) {
- b43dbg(dev->wl, "rx_tkip_phase1_write : idx 0x%x, iv32 0x%x\n",
+ b43_dbg(dev->wl, "rx_tkip_phase1_write : idx 0x%x, iv32 0x%x\n",
index, iv32);
}
/* Write the key to the RX tkip shared mem */
@@ -959,7 +959,7 @@ static int b43_key_write(struct b43_wldev *dev,
}
}
if (index < 0) {
- b43warn(dev->wl, "Out of hardware key memory\n");
+ b43_warn(dev->wl, "Out of hardware key memory\n");
return -ENOSPC;
}
} else
@@ -1018,7 +1018,7 @@ static void b43_dump_keymemory(struct b43_wldev *dev)
return;
hf = b43_hf_read(dev);
- b43dbg(dev->wl, "Hardware key memory dump: USEDEFKEYS=%u\n",
+ b43_dbg(dev->wl, "Hardware key memory dump: USEDEFKEYS=%u\n",
!!(hf & B43_HF_USEDEFKEYS));
if (b43_new_kidx_api(dev)) {
pairwise_keys_start = B43_NR_GROUP_KEYS;
@@ -1034,20 +1034,20 @@ static void b43_dump_keymemory(struct b43_wldev *dev)
offset = dev->ktp + (index * B43_SEC_KEYSIZE);
for (i = 0; i < B43_SEC_KEYSIZE; i += 2) {
u16 tmp = b43_shm_read16(dev, B43_SHM_SHARED, offset + i);
- printk("%02X%02X", (tmp & 0xFF), ((tmp >> 8) & 0xFF));
+ pr_cont("%02X%02X", (tmp & 0xFF), ((tmp >> 8) & 0xFF));
}
algo = b43_shm_read16(dev, B43_SHM_SHARED,
B43_SHM_SH_KEYIDXBLOCK + (index * 2));
- printk(" Algo: %04X/%02X", algo, key->algorithm);
+ pr_cont(" Algo: %04X/%02X", algo, key->algorithm);
if (index >= pairwise_keys_start) {
if (key->algorithm == B43_SEC_ALGO_TKIP) {
- printk(" TKIP: ");
+ pr_cont(" TKIP: ");
offset = B43_SHM_SH_TKIPTSCTTAK + (index - 4) * (10 + 4);
for (i = 0; i < 14; i += 2) {
u16 tmp = b43_shm_read16(dev, B43_SHM_SHARED, offset + i);
- printk("%02X%02X", (tmp & 0xFF), ((tmp >> 8) & 0xFF));
+ pr_cont("%02X%02X", (tmp & 0xFF), ((tmp >> 8) & 0xFF));
}
}
rcmta0 = b43_shm_read32(dev, B43_SHM_RCMTA,
@@ -1056,10 +1056,9 @@ static void b43_dump_keymemory(struct b43_wldev *dev)
((index - pairwise_keys_start) * 2) + 1);
*((__le32 *)(&mac[0])) = cpu_to_le32(rcmta0);
*((__le16 *)(&mac[4])) = cpu_to_le16(rcmta1);
- printk(" MAC: %pM", mac);
+ pr_cont(" MAC: %pM\n", mac);
} else
- printk(" DEFAULT KEY");
- printk("\n");
+ pr_cont(" DEFAULT KEY\n");
}
}
@@ -1511,7 +1510,7 @@ static void b43_write_beacon_template(struct b43_wldev *dev,
b43_shm_write16(dev, B43_SHM_SHARED,
B43_SHM_SH_DTIMPER, 0);
}
- b43dbg(dev->wl, "Updated beacon template at 0x%x\n", ram_offset);
+ b43_dbg(dev->wl, "Updated beacon template at 0x%x\n", ram_offset);
}
static void b43_upload_beacon0(struct b43_wldev *dev)
@@ -1666,7 +1665,7 @@ static void b43_set_beacon_int(struct b43_wldev *dev, u16 beacon_int)
b43_write16(dev, 0x610, beacon_int);
}
b43_time_unlock(dev);
- b43dbg(dev->wl, "Set beacon interval to %u\n", beacon_int);
+ b43_dbg(dev->wl, "Set beacon interval to %u\n", beacon_int);
}
static void b43_handle_firmware_panic(struct b43_wldev *dev)
@@ -1675,11 +1674,11 @@ static void b43_handle_firmware_panic(struct b43_wldev *dev)
/* Read the register that contains the reason code for the panic. */
reason = b43_shm_read16(dev, B43_SHM_SCRATCH, B43_FWPANIC_REASON_REG);
- b43err(dev->wl, "Whoopsy, firmware panic! Reason: %u\n", reason);
+ b43_err(dev->wl, "Whoopsy, firmware panic! Reason: %u\n", reason);
switch (reason) {
default:
- b43dbg(dev->wl, "The panic reason is unknown.\n");
+ b43_dbg(dev->wl, "The panic reason is unknown\n");
/* fallthrough */
case B43_FWPANIC_DIE:
/* Do not restart the controller or firmware.
@@ -1715,14 +1714,14 @@ static void handle_irq_ucode_debug(struct b43_wldev *dev)
break; /* Only with driver debugging enabled. */
buf = kmalloc(4096, GFP_ATOMIC);
if (!buf) {
- b43dbg(dev->wl, "SHM-dump: Failed to allocate memory\n");
+ b43_dbg(dev->wl, "SHM-dump: Failed to allocate memory\n");
goto out;
}
for (i = 0; i < 4096; i += 2) {
u16 tmp = b43_shm_read16(dev, B43_SHM_SHARED, i);
buf[i / 2] = cpu_to_le16(tmp);
}
- b43info(dev->wl, "Shared memory dump:\n");
+ b43_info(dev->wl, "Shared memory dump:\n");
print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET,
16, 2, buf, 4096, 1);
kfree(buf);
@@ -1730,19 +1729,20 @@ static void handle_irq_ucode_debug(struct b43_wldev *dev)
case B43_DEBUGIRQ_DUMP_REGS:
if (!B43_DEBUG)
break; /* Only with driver debugging enabled. */
- b43info(dev->wl, "Microcode register dump:\n");
+ b43_info(dev->wl, "Microcode register dump:\n");
for (i = 0, cnt = 0; i < 64; i++) {
u16 tmp = b43_shm_read16(dev, B43_SHM_SCRATCH, i);
- if (cnt == 0)
- printk(KERN_INFO);
- printk("r%02u: 0x%04X ", i, tmp);
+ printk("%sr%02u: 0x%04X ",
+ cnt == 0 ? KERN_INFO : KERN_CONT,
+ i, tmp);
cnt++;
if (cnt == 6) {
- printk("\n");
+ pr_cont("\n");
cnt = 0;
}
}
- printk("\n");
+ if (cnt)
+ pr_cont("\n");
break;
case B43_DEBUGIRQ_MARKER:
if (!B43_DEBUG)
@@ -1751,12 +1751,12 @@ static void handle_irq_ucode_debug(struct b43_wldev *dev)
B43_MARKER_ID_REG);
marker_line = b43_shm_read16(dev, B43_SHM_SCRATCH,
B43_MARKER_LINE_REG);
- b43info(dev->wl, "The firmware just executed the MARKER(%u) "
+ b43_info(dev->wl, "The firmware just executed the MARKER(%u) "
"at line number %u\n",
marker_id, marker_line);
break;
default:
- b43dbg(dev->wl, "Debug-IRQ triggered for unknown reason: %u\n",
+ b43_dbg(dev->wl, "Debug-IRQ triggered for unknown reason: %u\n",
reason);
}
out:
@@ -1782,15 +1782,15 @@ static void b43_do_interrupt_thread(struct b43_wldev *dev)
}
if (unlikely(reason & B43_IRQ_MAC_TXERR))
- b43err(dev->wl, "MAC transmission error\n");
+ b43_err(dev->wl, "MAC transmission error\n");
if (unlikely(reason & B43_IRQ_PHY_TXERR)) {
- b43err(dev->wl, "PHY transmission error\n");
+ b43_err(dev->wl, "PHY transmission error\n");
rmb();
if (unlikely(atomic_dec_and_test(&dev->phy.txerr_cnt))) {
atomic_set(&dev->phy.txerr_cnt,
B43_PHY_TX_BADNESS_LIMIT);
- b43err(dev->wl, "Too many PHY TX errors, "
+ b43_err(dev->wl, "Too many PHY TX errors, "
"restarting the controller\n");
b43_controller_restart(dev, "PHY TX errors");
}
@@ -1799,13 +1799,13 @@ static void b43_do_interrupt_thread(struct b43_wldev *dev)
if (unlikely(merged_dma_reason & (B43_DMAIRQ_FATALMASK |
B43_DMAIRQ_NONFATALMASK))) {
if (merged_dma_reason & B43_DMAIRQ_FATALMASK) {
- b43err(dev->wl, "Fatal DMA error: "
+ b43_err(dev->wl, "Fatal DMA error: "
"0x%08X, 0x%08X, 0x%08X, "
"0x%08X, 0x%08X, 0x%08X\n",
dma_reason[0], dma_reason[1],
dma_reason[2], dma_reason[3],
dma_reason[4], dma_reason[5]);
- b43err(dev->wl, "This device does not support DMA "
+ b43_err(dev->wl, "This device does not support DMA "
"on your system. Please use PIO instead.\n");
/* Fall back to PIO transfers if we get fatal DMA errors! */
dev->use_pio = 1;
@@ -1813,7 +1813,7 @@ static void b43_do_interrupt_thread(struct b43_wldev *dev)
return;
}
if (merged_dma_reason & B43_DMAIRQ_NONFATALMASK) {
- b43err(dev->wl, "DMA error: "
+ b43_err(dev->wl, "DMA error: "
"0x%08X, 0x%08X, 0x%08X, "
"0x%08X, 0x%08X, 0x%08X\n",
dma_reason[0], dma_reason[1],
@@ -1978,15 +1978,15 @@ static void b43_release_firmware(struct b43_wldev *dev)
static void b43_print_fw_helptext(struct b43_wl *wl, bool error)
{
const char text[] =
- "You must go to " \
- "http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware " \
- "and download the correct firmware for this driver version. " \
+ "You must go to "
+ "http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware "
+ "and download the correct firmware for this driver version. "
"Please carefully read all instructions on this website.\n";
if (error)
- b43err(wl, text);
+ b43_err(wl, text);
else
- b43warn(wl, text);
+ b43_warn(wl, text);
}
int b43_do_request_fw(struct b43_request_fw_context *ctx,
@@ -2072,7 +2072,7 @@ int b43_do_request_fw(struct b43_request_fw_context *ctx,
err_format:
snprintf(ctx->errors[ctx->req_type],
sizeof(ctx->errors[ctx->req_type]),
- "Firmware file \"%s\" format error.\n", ctx->fwname);
+ "Firmware file \"%s\" format error\n", ctx->fwname);
release_firmware(blob);
return -EPROTO;
@@ -2211,19 +2211,19 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx)
err_no_ucode:
err = ctx->fatal_failure = -EOPNOTSUPP;
- b43err(dev->wl, "The driver does not know which firmware (ucode) "
+ b43_err(dev->wl, "The driver does not know which firmware (ucode) "
"is required for your device (wl-core rev %u)\n", rev);
goto error;
err_no_pcm:
err = ctx->fatal_failure = -EOPNOTSUPP;
- b43err(dev->wl, "The driver does not know which firmware (PCM) "
+ b43_err(dev->wl, "The driver does not know which firmware (PCM) "
"is required for your device (wl-core rev %u)\n", rev);
goto error;
err_no_initvals:
err = ctx->fatal_failure = -EOPNOTSUPP;
- b43err(dev->wl, "The driver does not know which firmware (initvals) "
+ b43_err(dev->wl, "The driver does not know which firmware (initvals) "
"is required for your device (wl-core rev %u)\n", rev);
goto error;
@@ -2270,7 +2270,7 @@ static int b43_request_firmware(struct b43_wldev *dev)
for (i = 0; i < B43_NR_FWTYPES; i++) {
errmsg = ctx->errors[i];
if (strlen(errmsg))
- b43err(dev->wl, errmsg);
+ b43_err(dev->wl, errmsg);
}
b43_print_fw_helptext(dev->wl, 1);
err = -ENOENT;
@@ -2339,7 +2339,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
break;
i++;
if (i >= 20) {
- b43err(dev->wl, "Microcode not responding\n");
+ b43_err(dev->wl, "Microcode not responding\n");
b43_print_fw_helptext(dev->wl, 1);
err = -ENODEV;
goto error;
@@ -2355,7 +2355,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
fwtime = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_UCODETIME);
if (fwrev <= 0x128) {
- b43err(dev->wl, "YOUR FIRMWARE IS TOO OLD. Firmware from "
+ b43_err(dev->wl, "YOUR FIRMWARE IS TOO OLD. Firmware from "
"binary drivers older than version 4.x is unsupported. "
"You must upgrade your firmware files.\n");
b43_print_fw_helptext(dev->wl, 1);
@@ -2377,17 +2377,17 @@ static int b43_upload_microcode(struct b43_wldev *dev)
/* Patchlevel info is encoded in the "time" field. */
dev->fw.patch = fwtime;
- b43info(dev->wl, "Loading OpenSource firmware version %u.%u\n",
+ b43_info(dev->wl, "Loading OpenSource firmware version %u.%u\n",
dev->fw.rev, dev->fw.patch);
fwcapa = b43_fwcapa_read(dev);
if (!(fwcapa & B43_FWCAPA_HWCRYPTO) || dev->fw.pcm_request_failed) {
- b43info(dev->wl, "Hardware crypto acceleration not supported by firmware\n");
+ b43_info(dev->wl, "Hardware crypto acceleration not supported by firmware\n");
/* Disable hardware crypto and fall back to software crypto. */
dev->hwcrypto_enabled = 0;
}
if (!(fwcapa & B43_FWCAPA_QOS)) {
- b43info(dev->wl, "QoS not supported by firmware\n");
+ b43_info(dev->wl, "QoS not supported by firmware\n");
/* Disable QoS. Tweak hw->queues to 1. It will be restored before
* ieee80211_unregister to make sure the networking core can
* properly free possible resources. */
@@ -2395,13 +2395,13 @@ static int b43_upload_microcode(struct b43_wldev *dev)
dev->qos_enabled = 0;
}
} else {
- b43info(dev->wl, "Loading firmware version %u.%u "
+ b43_info(dev->wl, "Loading firmware version %u.%u "
"(20%.2i-%.2i-%.2i %.2i:%.2i:%.2i)\n",
fwrev, fwpatch,
(fwdate >> 12) & 0xF, (fwdate >> 8) & 0xF, fwdate & 0xFF,
(fwtime >> 11) & 0x1F, (fwtime >> 5) & 0x3F, fwtime & 0x1F);
if (dev->fw.pcm_request_failed) {
- b43warn(dev->wl, "No \"pcm5.fw\" firmware file found. "
+ b43_warn(dev->wl, "No \"pcm5.fw\" firmware file found. "
"Hardware accelerated cryptography is disabled.\n");
b43_print_fw_helptext(dev->wl, 0);
}
@@ -2410,7 +2410,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
if (b43_is_old_txhdr_format(dev)) {
/* We're over the deadline, but we keep support for old fw
* until it turns out to be in major conflict with something new. */
- b43warn(dev->wl, "You are using an old firmware image. "
+ b43_warn(dev->wl, "You are using an old firmware image. "
"Support for old firmware will be removed soon "
"(official deadline was July 2008).\n");
b43_print_fw_helptext(dev->wl, 0);
@@ -2482,7 +2482,7 @@ static int b43_write_initvals(struct b43_wldev *dev,
return 0;
err_format:
- b43err(dev->wl, "Initial Values Firmware file-format error.\n");
+ b43_err(dev->wl, "Initial Values Firmware file-format error\n");
b43_print_fw_helptext(dev->wl, 1);
return -EPROTO;
@@ -2594,7 +2594,7 @@ void b43_mac_enable(struct b43_wldev *dev)
B43_SHM_SH_UCODESTAT);
if ((fwstate != B43_SHM_SH_UCODESTAT_SUSP) &&
(fwstate != B43_SHM_SH_UCODESTAT_SLEEP)) {
- b43err(dev->wl, "b43_mac_enable(): The firmware "
+ b43_err(dev->wl, "b43_mac_enable(): The firmware "
"should be suspended, but current state is %u\n",
fwstate);
}
@@ -2644,7 +2644,7 @@ void b43_mac_suspend(struct b43_wldev *dev)
goto out;
msleep(1);
}
- b43err(dev->wl, "MAC suspend failed\n");
+ b43_err(dev->wl, "MAC suspend failed\n");
}
out:
dev->mac_suspended++;
@@ -2892,7 +2892,7 @@ static int b43_chip_init(struct b43_wldev *dev)
dev->dev->bus->chipco.fast_pwrup_delay);
err = 0;
- b43dbg(dev->wl, "Chip initialized\n");
+ b43_dbg(dev->wl, "Chip initialized\n");
out:
return err;
@@ -2928,7 +2928,7 @@ static void b43_periodic_every15sec(struct b43_wldev *dev)
* It will reset the watchdog counter to 0 in its idle loop. */
wdr = b43_shm_read16(dev, B43_SHM_SCRATCH, B43_WATCHDOG_REG);
if (unlikely(wdr)) {
- b43err(dev->wl, "Firmware watchdog: The firmware died!\n");
+ b43_err(dev->wl, "Firmware watchdog: The firmware died!\n");
b43_controller_restart(dev, "Firmware watchdog");
return;
} else {
@@ -2947,7 +2947,7 @@ static void b43_periodic_every15sec(struct b43_wldev *dev)
if (b43_debug(dev, B43_DBG_VERBOSESTATS)) {
unsigned int i;
- b43dbg(dev->wl, "Stats: %7u IRQs/sec, %7u TX/sec, %7u RX/sec\n",
+ b43_dbg(dev->wl, "Stats: %7u IRQs/sec, %7u TX/sec, %7u RX/sec\n",
dev->irq_count / 15,
dev->tx_count / 15,
dev->rx_count / 15);
@@ -2956,7 +2956,7 @@ static void b43_periodic_every15sec(struct b43_wldev *dev)
dev->rx_count = 0;
for (i = 0; i < ARRAY_SIZE(dev->irq_bit_count); i++) {
if (dev->irq_bit_count[i]) {
- b43dbg(dev->wl, "Stats: %7u IRQ-%02u/sec (0x%08X)\n",
+ b43_dbg(dev->wl, "Stats: %7u IRQ-%02u/sec (0x%08X)\n",
dev->irq_bit_count[i] / 15, i, (1 << i));
dev->irq_bit_count[i] = 0;
}
@@ -3041,13 +3041,13 @@ static int b43_validate_chipaccess(struct b43_wldev *dev)
b43_shm_write16(dev, B43_SHM_SHARED, 4, 0x5566);
b43_shm_write16(dev, B43_SHM_SHARED, 6, 0x7788);
if (b43_shm_read32(dev, B43_SHM_SHARED, 2) != 0x55663344)
- b43warn(dev->wl, "Unaligned 32bit SHM read access is broken\n");
+ b43_warn(dev->wl, "Unaligned 32bit SHM read access is broken\n");
b43_shm_write32(dev, B43_SHM_SHARED, 2, 0xAABBCCDD);
if (b43_shm_read16(dev, B43_SHM_SHARED, 0) != 0x1122 ||
b43_shm_read16(dev, B43_SHM_SHARED, 2) != 0xCCDD ||
b43_shm_read16(dev, B43_SHM_SHARED, 4) != 0xAABB ||
b43_shm_read16(dev, B43_SHM_SHARED, 6) != 0x7788)
- b43warn(dev->wl, "Unaligned 32bit SHM write access is broken\n");
+ b43_warn(dev->wl, "Unaligned 32bit SHM write access is broken\n");
b43_shm_write32(dev, B43_SHM_SHARED, 0, backup0);
b43_shm_write32(dev, B43_SHM_SHARED, 4, backup4);
@@ -3071,7 +3071,7 @@ static int b43_validate_chipaccess(struct b43_wldev *dev)
return 0;
error:
- b43err(dev->wl, "Failed to validate the chipaccess\n");
+ b43_err(dev->wl, "Failed to validate the chipaccess\n");
return -ENODEV;
}
@@ -3129,7 +3129,7 @@ static int b43_rng_init(struct b43_wl *wl)
err = hwrng_register(&wl->rng);
if (err) {
wl->rng_initialized = 0;
- b43err(wl, "Failed to register the random "
+ b43_err(wl, "Failed to register the random "
"number generator (%d)\n", err);
}
#endif /* CONFIG_B43_HWRNG */
@@ -3310,7 +3310,7 @@ static void b43_qos_init(struct b43_wldev *dev)
b43_write16(dev, B43_MMIO_IFSCTL,
b43_read16(dev, B43_MMIO_IFSCTL)
& ~B43_MMIO_IFSCTL_USE_EDCF);
- b43dbg(dev->wl, "QoS disabled\n");
+ b43_dbg(dev->wl, "QoS disabled\n");
return;
}
@@ -3322,7 +3322,7 @@ static void b43_qos_init(struct b43_wldev *dev)
b43_write16(dev, B43_MMIO_IFSCTL,
b43_read16(dev, B43_MMIO_IFSCTL)
| B43_MMIO_IFSCTL_USE_EDCF);
- b43dbg(dev->wl, "QoS enabled\n");
+ b43_dbg(dev->wl, "QoS enabled\n");
}
static int b43_op_conf_tx(struct ieee80211_hw *hw, u16 _queue,
@@ -3471,7 +3471,7 @@ static int b43_switch_band(struct b43_wl *wl, struct ieee80211_channel *chan)
break;
}
if (!up_dev) {
- b43err(wl, "Could not find a device for %s-GHz band operation\n",
+ b43_err(wl, "Could not find a device for %s-GHz band operation\n",
band_to_string(chan->band));
return -ENODEV;
}
@@ -3480,7 +3480,7 @@ static int b43_switch_band(struct b43_wl *wl, struct ieee80211_channel *chan)
/* This device is already running. */
return 0;
}
- b43dbg(wl, "Switching to %s-GHz band\n",
+ b43_dbg(wl, "Switching to %s-GHz band\n",
band_to_string(chan->band));
down_dev = wl->current_dev;
@@ -3502,18 +3502,18 @@ static int b43_switch_band(struct b43_wl *wl, struct ieee80211_channel *chan)
if (prev_status >= B43_STAT_INITIALIZED) {
err = b43_wireless_core_init(up_dev);
if (err) {
- b43err(wl, "Fatal: Could not initialize device for "
- "selected %s-GHz band\n",
- band_to_string(chan->band));
+ b43_err(wl, "Fatal: Could not initialize device for "
+ "selected %s-GHz band\n",
+ band_to_string(chan->band));
goto init_failure;
}
}
if (prev_status >= B43_STAT_STARTED) {
err = b43_wireless_core_start(up_dev);
if (err) {
- b43err(wl, "Fatal: Coult not start device for "
- "selected %s-GHz band\n",
- band_to_string(chan->band));
+ b43_err(wl, "Fatal: Coult not start device for "
+ "selected %s-GHz band\n",
+ band_to_string(chan->band));
b43_wireless_core_exit(up_dev);
goto init_failure;
}
@@ -3604,15 +3604,15 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
if (wl->radio_enabled != phy->radio_on) {
if (wl->radio_enabled) {
b43_software_rfkill(dev, false);
- b43info(dev->wl, "Radio turned on by software\n");
+ b43_info(dev->wl, "Radio turned on by software\n");
if (!dev->radio_hw_enable) {
- b43info(dev->wl, "The hardware RF-kill button "
- "still turns the radio physically off. "
- "Press the button to turn it on.\n");
+ b43_info(dev->wl, "The hardware RF-kill button "
+ "still turns the radio physically off. "
+ "Press the button to turn it on.\n");
}
} else {
b43_software_rfkill(dev, true);
- b43info(dev->wl, "Radio turned off by software\n");
+ b43_info(dev->wl, "Radio turned off by software\n");
}
}
@@ -3827,10 +3827,10 @@ static int b43_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
out_unlock:
if (!err) {
- b43dbg(wl, "%s hardware based encryption for keyidx: %d, "
- "mac: %pM\n",
- cmd == SET_KEY ? "Using" : "Disabling", key->keyidx,
- sta ? sta->addr : bcast_addr);
+ b43_dbg(wl, "%s hardware based encryption for keyidx: %d, "
+ "mac: %pM\n",
+ cmd == SET_KEY ? "Using" : "Disabling", key->keyidx,
+ sta ? sta->addr : bcast_addr);
b43_dump_keymemory(dev);
}
mutex_unlock(&wl->mutex);
@@ -3940,7 +3940,7 @@ redo:
b43_mac_suspend(dev);
b43_leds_exit(dev);
- b43dbg(wl, "Wireless interface stopped\n");
+ b43_dbg(wl, "Wireless interface stopped\n");
return dev;
}
@@ -3956,7 +3956,7 @@ static int b43_wireless_core_start(struct b43_wldev *dev)
if (dev->dev->bus->bustype == SSB_BUSTYPE_SDIO) {
err = b43_sdio_request_irq(dev, b43_sdio_interrupt_handler);
if (err) {
- b43err(dev->wl, "Cannot request SDIO IRQ\n");
+ b43_err(dev->wl, "Cannot request SDIO IRQ\n");
goto out;
}
} else {
@@ -3964,7 +3964,8 @@ static int b43_wireless_core_start(struct b43_wldev *dev)
b43_interrupt_thread_handler,
IRQF_SHARED, KBUILD_MODNAME, dev);
if (err) {
- b43err(dev->wl, "Cannot request IRQ-%d\n", dev->dev->irq);
+ b43_err(dev->wl, "Cannot request IRQ-%d\n",
+ dev->dev->irq);
goto out;
}
}
@@ -3982,7 +3983,7 @@ static int b43_wireless_core_start(struct b43_wldev *dev)
b43_leds_init(dev);
- b43dbg(dev->wl, "Wireless interface started\n");
+ b43_dbg(dev->wl, "Wireless interface started\n");
out:
return err;
}
@@ -4035,13 +4036,12 @@ static int b43_phy_versioning(struct b43_wldev *dev)
unsupported = 1;
};
if (unsupported) {
- b43err(dev->wl, "FOUND UNSUPPORTED PHY "
- "(Analog %u, Type %u, Revision %u)\n",
- analog_type, phy_type, phy_rev);
+ b43_err(dev->wl, "FOUND UNSUPPORTED PHY (Analog %u, Type %u, Revision %u)\n",
+ analog_type, phy_type, phy_rev);
return -EOPNOTSUPP;
}
- b43dbg(dev->wl, "Found PHY: Analog %u, Type %u, Revision %u\n",
- analog_type, phy_type, phy_rev);
+ b43_dbg(dev->wl, "Found PHY: Analog %u, Type %u, Revision %u\n",
+ analog_type, phy_type, phy_rev);
/* Get RADIO versioning */
if (dev->dev->bus->chip_id == 0x4317) {
@@ -4091,13 +4091,13 @@ static int b43_phy_versioning(struct b43_wldev *dev)
B43_WARN_ON(1);
}
if (unsupported) {
- b43err(dev->wl, "FOUND UNSUPPORTED RADIO "
- "(Manuf 0x%X, Version 0x%X, Revision %u)\n",
- radio_manuf, radio_ver, radio_rev);
+ b43_err(dev->wl, "FOUND UNSUPPORTED RADIO "
+ "(Manuf 0x%X, Version 0x%X, Revision %u)\n",
+ radio_manuf, radio_ver, radio_rev);
return -EOPNOTSUPP;
}
- b43dbg(dev->wl, "Found Radio: Manuf 0x%X, Version 0x%X, Revision %u\n",
- radio_manuf, radio_ver, radio_rev);
+ b43_dbg(dev->wl, "Found Radio: Manuf 0x%X, Version 0x%X, Revision %u\n",
+ radio_manuf, radio_ver, radio_rev);
phy->radio_manuf = radio_manuf;
phy->radio_ver = radio_ver;
@@ -4412,7 +4412,7 @@ static int b43_op_add_interface(struct ieee80211_hw *hw,
if (wl->operating)
goto out_mutex_unlock;
- b43dbg(wl, "Adding Interface type %d\n", vif->type);
+ b43_dbg(wl, "Adding Interface type %d\n", vif->type);
dev = wl->current_dev;
wl->operating = 1;
@@ -4438,7 +4438,7 @@ static void b43_op_remove_interface(struct ieee80211_hw *hw,
struct b43_wl *wl = hw_to_b43_wl(hw);
struct b43_wldev *dev = wl->current_dev;
- b43dbg(wl, "Removing Interface type %d\n", vif->type);
+ b43_dbg(wl, "Removing Interface type %d\n", vif->type);
mutex_lock(&wl->mutex);
@@ -4656,9 +4656,9 @@ out:
wl->current_dev = NULL; /* Failed to init the dev. */
mutex_unlock(&wl->mutex);
if (err)
- b43err(wl, "Controller restart FAILED\n");
+ b43_err(wl, "Controller restart FAILED\n");
else
- b43info(wl, "Controller restarted\n");
+ b43_info(wl, "Controller restarted\n");
}
static int b43_setup_bands(struct b43_wldev *dev,
@@ -4708,7 +4708,7 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
err = ssb_bus_powerup(bus, 0);
if (err) {
- b43err(wl, "Bus powerup failed\n");
+ b43_err(wl, "Bus powerup failed\n");
goto out;
}
/* Get the PHY type. */
@@ -4754,7 +4754,7 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
}
if (dev->phy.type == B43_PHYTYPE_A) {
/* FIXME */
- b43err(wl, "IEEE 802.11a devices are unsupported\n");
+ b43_err(wl, "IEEE 802.11a devices are unsupported\n");
err = -EOPNOTSUPP;
goto err_powerdown;
}
@@ -4836,7 +4836,7 @@ static int b43_one_core_attach(struct ssb_device *dev, struct b43_wl *wl)
if (!pdev ||
((pdev->device != 0x4321) &&
(pdev->device != 0x4313) && (pdev->device != 0x431A))) {
- b43dbg(wl, "Ignoring unconnected 802.11 core\n");
+ b43_dbg(wl, "Ignoring unconnected 802.11 core\n");
return -ENODEV;
}
}
@@ -4918,7 +4918,7 @@ static int b43_wireless_init(struct ssb_device *dev)
hw = ieee80211_alloc_hw(sizeof(*wl), &b43_hw_ops);
if (!hw) {
- b43err(NULL, "Could not allocate ieee80211 device\n");
+ b43_err(NULL, "Could not allocate ieee80211 device\n");
goto out;
}
wl = hw_to_b43_wl(hw);
@@ -4954,8 +4954,8 @@ static int b43_wireless_init(struct ssb_device *dev)
skb_queue_head_init(&wl->tx_queue);
ssb_set_devtypedata(dev, wl);
- b43info(wl, "Broadcom %04X WLAN found (core revision %u)\n",
- dev->bus->chip_id, dev->id.revision);
+ b43_info(wl, "Broadcom %04X WLAN found (core revision %u)\n",
+ dev->bus->chip_id, dev->id.revision);
err = 0;
out:
return err;
@@ -5037,7 +5037,7 @@ void b43_controller_restart(struct b43_wldev *dev, const char *reason)
/* Must avoid requeueing, if we are in shutdown. */
if (b43_status(dev) < B43_STAT_INITIALIZED)
return;
- b43info(dev->wl, "Controller RESET (%s) ...\n", reason);
+ b43_info(dev->wl, "Controller RESET (%s) ...\n", reason);
ieee80211_queue_work(dev->wl->hw, &dev->restart_work);
}
@@ -5068,11 +5068,11 @@ static void b43_print_driverinfo(void)
#ifdef CONFIG_B43_SDIO
feat_sdio = "S";
#endif
- printk(KERN_INFO "Broadcom 43xx driver loaded "
- "[ Features: %s%s%s%s%s, Firmware-ID: "
- B43_SUPPORTED_FIRMWARE_ID " ]\n",
- feat_pci, feat_pcmcia, feat_nphy,
- feat_leds, feat_sdio);
+ pr_info("Broadcom 43xx driver loaded "
+ "[ Features: %s%s%s%s%s, Firmware-ID: "
+ B43_SUPPORTED_FIRMWARE_ID " ]\n",
+ feat_pci, feat_pcmcia, feat_nphy,
+ feat_leds, feat_sdio);
}
static int __init b43_init(void)
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c
index 0e99b63..9dafa68 100644
--- a/drivers/net/wireless/b43/pcmcia.c
+++ b/drivers/net/wireless/b43/pcmcia.c
@@ -117,8 +117,7 @@ err_disable:
err_kfree_ssb:
kfree(ssb);
out_error:
- printk(KERN_ERR "b43-pcmcia: Initialization failed (%d, %d)\n",
- res, err);
+ pr_err("b43-pcmcia: Initialization failed (%d, %d)\n", res, err);
return err;
}
diff --git a/drivers/net/wireless/b43/phy_a.c b/drivers/net/wireless/b43/phy_a.c
index b6428ec..11062b7 100644
--- a/drivers/net/wireless/b43/phy_a.c
+++ b/drivers/net/wireless/b43/phy_a.c
@@ -344,8 +344,7 @@ static int b43_aphy_init_tssi2dbm_table(struct b43_wldev *dev)
/* pabX values not set in SPROM,
* but APHY needs a generated table. */
aphy->tssi2dbm = NULL;
- b43err(dev->wl, "Could not generate tssi2dBm "
- "table (wrong SPROM info)!\n");
+ b43_err(dev->wl, "Could not generate tssi2dBm table (wrong SPROM info)!\n");
return -ENODEV;
}
@@ -427,14 +426,14 @@ static inline u16 adjust_phyreg(struct b43_wldev *dev, u16 offset)
#if B43_DEBUG
if ((offset & B43_PHYROUTE) == B43_PHYROUTE_EXT_GPHY) {
/* Ext-G registers are only available on G-PHYs */
- b43err(dev->wl, "Invalid EXT-G PHY access at "
- "0x%04X on A-PHY\n", offset);
+ b43_err(dev->wl, "Invalid EXT-G PHY access at "
+ "0x%04X on A-PHY\n", offset);
dump_stack();
}
if ((offset & B43_PHYROUTE) == B43_PHYROUTE_N_BMODE) {
/* N-BMODE registers are only available on N-PHYs */
- b43err(dev->wl, "Invalid N-BMODE PHY access at "
- "0x%04X on A-PHY\n", offset);
+ b43_err(dev->wl, "Invalid N-BMODE PHY access at "
+ "0x%04X on A-PHY\n", offset);
dump_stack();
}
#endif /* B43_DEBUG */
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index 8f7d7ef..128ffff 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -87,14 +87,14 @@ int b43_phy_init(struct b43_wldev *dev)
ops->software_rfkill(dev, false);
err = ops->init(dev);
if (err) {
- b43err(dev->wl, "PHY init failed\n");
+ b43_err(dev->wl, "PHY init failed\n");
goto err_block_rf;
}
/* Make sure to switch hardware and firmware (SHM) to
* the default channel. */
err = b43_switch_channel(dev, ops->get_default_chan(dev));
if (err) {
- b43err(dev->wl, "PHY init: Channel switch to default failed\n");
+ b43_err(dev->wl, "PHY init: Channel switch to default failed\n");
goto err_phy_exit;
}
@@ -192,8 +192,7 @@ static inline void assert_mac_suspended(struct b43_wldev *dev)
return;
if ((b43_status(dev) >= B43_STAT_INITIALIZED) &&
(dev->mac_suspended <= 0)) {
- b43dbg(dev->wl, "PHY/RADIO register access with "
- "enabled MAC.\n");
+ b43_dbg(dev->wl, "PHY/RADIO register access with enabled MAC\n");
dump_stack();
}
}
diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
index 29bf34c..acadae6 100644
--- a/drivers/net/wireless/b43/phy_g.c
+++ b/drivers/net/wireless/b43/phy_g.c
@@ -237,10 +237,10 @@ static void b43_set_txpower_g(struct b43_wldev *dev,
memmove(&gphy->bbatt, bbatt, sizeof(*bbatt));
if (b43_debug(dev, B43_DBG_XMITPOWER)) {
- b43dbg(dev->wl, "Tuning TX-power to bbatt(%u), "
- "rfatt(%u), tx_control(0x%02X), "
- "tx_bias(0x%02X), tx_magn(0x%02X)\n",
- bb, rf, tx_control, tx_bias, tx_magn);
+ b43_dbg(dev->wl, "Tuning TX-power to bbatt(%u), "
+ "rfatt(%u), tx_control(0x%02X), "
+ "tx_bias(0x%02X), tx_magn(0x%02X)\n",
+ bb, rf, tx_control, tx_bias, tx_magn);
}
b43_gphy_set_baseband_attenuation(dev, bb);
@@ -1970,11 +1970,12 @@ static void b43_phy_init_pctl(struct b43_wldev *dev)
if (B43_DEBUG) {
/* Current-Idle-TSSI sanity check. */
if (abs(gphy->cur_idle_tssi - gphy->tgt_idle_tssi) >= 20) {
- b43dbg(dev->wl,
- "!WARNING! Idle-TSSI phy->cur_idle_tssi "
- "measuring failed. (cur=%d, tgt=%d). Disabling TX power "
- "adjustment.\n", gphy->cur_idle_tssi,
- gphy->tgt_idle_tssi);
+ b43_dbg(dev->wl,
+ "!WARNING! Idle-TSSI phy->cur_idle_tssi "
+ "measuring failed. (cur=%d, tgt=%d). "
+ "Disabling TX power adjustment.\n",
+ gphy->cur_idle_tssi,
+ gphy->tgt_idle_tssi);
gphy->cur_idle_tssi = 0;
}
}
@@ -2360,15 +2361,13 @@ u8 *b43_generate_dyn_tssi2dbm_tab(struct b43_wldev *dev,
tab = kmalloc(64, GFP_KERNEL);
if (!tab) {
- b43err(dev->wl, "Could not allocate memory "
- "for tssi2dbm table\n");
+ b43_err(dev->wl, "Could not allocate memory for tssi2dbm table\n");
return NULL;
}
for (i = 0; i < 64; i++) {
err = b43_tssi2dbm_entry(tab, i, pab0, pab1, pab2);
if (err) {
- b43err(dev->wl, "Could not generate "
- "tssi2dBm table\n");
+ b43_err(dev->wl, "Could not generate tssi2dBm table\n");
kfree(tab);
return NULL;
}
@@ -2864,7 +2863,7 @@ static void b43_gphy_op_adjust_txpower(struct b43_wldev *dev)
gphy->bbatt.att = bbatt;
if (b43_debug(dev, B43_DBG_XMITPOWER))
- b43dbg(dev->wl, "Adjusting TX power\n");
+ b43_dbg(dev->wl, "Adjusting TX power\n");
/* Adjust the hardware */
b43_phy_lock(dev);
@@ -2918,8 +2917,7 @@ static enum b43_txpwr_result b43_gphy_op_recalc_txpower(struct b43_wldev *dev,
if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_PACTRL)
max_pwr -= 3; /* minus 0.75 */
if (unlikely(max_pwr >= INT_TO_Q52(30/*dBm*/))) {
- b43warn(dev->wl,
- "Invalid max-TX-power value in SPROM.\n");
+ b43_warn(dev->wl, "Invalid max-TX-power value in SPROM\n");
max_pwr = INT_TO_Q52(20); /* fake it */
dev->dev->bus->sprom.maxpwr_bg = max_pwr;
}
@@ -2932,13 +2930,13 @@ static enum b43_txpwr_result b43_gphy_op_recalc_txpower(struct b43_wldev *dev,
/* And limit it. max_pwr already is Q5.2 */
desired_pwr = clamp_val(desired_pwr, 0, max_pwr);
if (b43_debug(dev, B43_DBG_XMITPOWER)) {
- b43dbg(dev->wl,
- "[TX power] current = " Q52_FMT
- " dBm, desired = " Q52_FMT
- " dBm, max = " Q52_FMT "\n",
- Q52_ARG(estimated_pwr),
- Q52_ARG(desired_pwr),
- Q52_ARG(max_pwr));
+ b43_dbg(dev->wl,
+ "[TX power] current = " Q52_FMT
+ " dBm, desired = " Q52_FMT
+ " dBm, max = " Q52_FMT "\n",
+ Q52_ARG(estimated_pwr),
+ Q52_ARG(desired_pwr),
+ Q52_ARG(max_pwr));
}
/* Calculate the adjustment delta. */
@@ -2962,11 +2960,11 @@ static enum b43_txpwr_result b43_gphy_op_recalc_txpower(struct b43_wldev *dev,
#if B43_DEBUG
if (b43_debug(dev, B43_DBG_XMITPOWER)) {
int dbm = pwr_adjust < 0 ? -pwr_adjust : pwr_adjust;
- b43dbg(dev->wl,
- "[TX power deltas] %s" Q52_FMT " dBm => "
- "bbatt-delta = %d, rfatt-delta = %d\n",
- (pwr_adjust < 0 ? "-" : ""), Q52_ARG(dbm),
- bbatt_delta, rfatt_delta);
+ b43_dbg(dev->wl,
+ "[TX power deltas] %s" Q52_FMT " dBm => "
+ "bbatt-delta = %d, rfatt-delta = %d\n",
+ (pwr_adjust < 0 ? "-" : ""), Q52_ARG(dbm),
+ bbatt_delta, rfatt_delta);
}
#endif /* DEBUG */
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index c6afe9d..2b706a8 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -594,8 +594,9 @@ static void lpphy_2062_init(struct b43_wldev *dev)
}
if (!fd)
fd = &freqdata_tab[ARRAY_SIZE(freqdata_tab) - 1];
- b43dbg(dev->wl, "b2062: Using crystal tab entry %u kHz.\n",
- fd->freq); /* FIXME: Keep this printk until the code is fully debugged. */
+
+ /* FIXME: Keep this printk until the code is fully debugged. */
+ b43_dbg(dev->wl, "b2062: Using crystal tab entry %u kHz\n", fd->freq);
b43_radio_write(dev, B2062_S_RFPLL_CTL8,
((u16)(fd->data[1]) << 4) | fd->data[0]);
@@ -1210,9 +1211,9 @@ static void lpphy_rev0_1_rc_calib(struct b43_wldev *dev)
err = b43_lpphy_op_switch_channel(dev, 7);
if (err) {
- b43dbg(dev->wl,
- "RC calib: Failed to switch to channel 7, error = %d\n",
- err);
+ b43_dbg(dev->wl,
+ "RC calib: Failed to switch to channel 7, error = %d\n",
+ err);
}
old_txg_ovr = !!(b43_phy_read(dev, B43_LPPHY_AFE_CTL_OVR) & 0x40);
old_bbmult = lpphy_get_bb_mult(dev);
@@ -1590,7 +1591,7 @@ static void lpphy_pr41573_workaround(struct b43_wldev *dev)
saved_tab = kcalloc(saved_tab_size, sizeof(saved_tab[0]), GFP_KERNEL);
if (!saved_tab) {
- b43err(dev->wl, "PR41573 failed. Out of memory!\n");
+ b43_err(dev->wl, "PR41573 failed. Out of memory!\n");
return;
}
@@ -2676,8 +2677,8 @@ static int b43_lpphy_op_init(struct b43_wldev *dev)
lpphy_calibrate_rc(dev);
err = b43_lpphy_op_switch_channel(dev, 7);
if (err) {
- b43dbg(dev->wl, "Switch to channel 7 failed, error = %d.\n",
- err);
+ b43_dbg(dev->wl, "Switch to channel 7 failed, error = %d\n",
+ err);
}
lpphy_tx_pctl_init(dev);
lpphy_calibration(dev);
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 3d6b337..3da6b59 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -221,7 +221,7 @@ static void b43_radio_init2055_post(struct b43_wldev *dev)
udelay(10);
}
if (i)
- b43err(dev->wl, "radio post init timeout\n");
+ b43_err(dev->wl, "radio post init timeout\n");
b43_radio_mask(dev, B2055_CAL_LPOCTL, 0xFF7F);
nphy_channel_switch(dev, dev->phy.channel);
b43_radio_write(dev, B2055_C1_RX_BB_LPF, 0x9);
@@ -1139,7 +1139,7 @@ static int b43_nphy_load_samples(struct b43_wldev *dev,
data = kzalloc(len * sizeof(u32), GFP_KERNEL);
if (!data) {
- b43err(dev->wl, "allocation for samples loading failed\n");
+ b43_err(dev->wl, "allocation for samples loading failed\n");
return -ENOMEM;
}
if (nphy->hang_avoid)
@@ -1183,7 +1183,7 @@ static u16 b43_nphy_gen_load_samples(struct b43_wldev *dev, u32 freq, u16 max,
samples = kzalloc(len * sizeof(struct b43_c32), GFP_KERNEL);
if (!samples) {
- b43err(dev->wl, "allocation for samples generation failed\n");
+ b43_err(dev->wl, "allocation for samples generation failed\n");
return 0;
}
rot = (((freq * 36) / bw) << 16) / 100;
@@ -1256,7 +1256,7 @@ static void b43_nphy_run_samples(struct b43_wldev *dev, u16 samps, u16 loops,
udelay(10);
}
if (i)
- b43err(dev->wl, "run samples timeout\n");
+ b43_err(dev->wl, "run samples timeout\n");
b43_phy_write(dev, B43_NPHY_RFSEQMODE, seq_mode);
}
@@ -1391,7 +1391,7 @@ static void b43_nphy_force_rf_sequence(struct b43_wldev *dev,
goto ok;
msleep(1);
}
- b43err(dev->wl, "RF sequence status timeout\n");
+ b43_err(dev->wl, "RF sequence status timeout\n");
ok:
b43_phy_write(dev, B43_NPHY_RFSEQMODE, seq_mode);
}
@@ -1410,7 +1410,7 @@ static void b43_nphy_rf_control_override(struct b43_wldev *dev, u16 field,
const struct nphy_rf_control_override_rev3 *rf_ctrl;
for (i = 0; i < 2; i++) {
if (index == 0 || index == 16) {
- b43err(dev->wl,
+ b43_err(dev->wl,
"Unsupported RF Ctrl Override call\n");
return;
}
@@ -1445,7 +1445,7 @@ static void b43_nphy_rf_control_override(struct b43_wldev *dev, u16 field,
for (i = 0; i < 2; i++) {
if (index <= 1 || index == 16) {
- b43err(dev->wl,
+ b43_err(dev->wl,
"Unsupported RF Ctrl Override call\n");
return;
}
@@ -1511,7 +1511,7 @@ static void b43_nphy_rf_control_intc_override(struct b43_wldev *dev, u8 field,
udelay(10);
}
if (j)
- b43err(dev->wl,
+ b43_err(dev->wl,
"intc override timeout\n");
b43_phy_mask(dev, B43_NPHY_TXF_40CO_B1S1,
0xFFFE);
@@ -1530,7 +1530,7 @@ static void b43_nphy_rf_control_intc_override(struct b43_wldev *dev, u8 field,
udelay(10);
}
if (j)
- b43err(dev->wl,
+ b43_err(dev->wl,
"intc override timeout\n");
b43_phy_mask(dev, B43_NPHY_RFCTL_OVER,
0xFFFE);
@@ -3265,7 +3265,7 @@ int b43_phy_initn(struct b43_wldev *dev)
if (phy->rev >= 3)
b43_nphy_spur_workaround(dev);
- b43err(dev->wl, "IEEE 802.11n devices are not supported, yet.\n");
+ b43_err(dev->wl, "IEEE 802.11n devices are not supported yet\n");
return 0;
}
@@ -3437,14 +3437,14 @@ static inline void check_phyreg(struct b43_wldev *dev, u16 offset)
#if B43_DEBUG
if ((offset & B43_PHYROUTE) == B43_PHYROUTE_OFDM_GPHY) {
/* OFDM registers are onnly available on A/G-PHYs */
- b43err(dev->wl, "Invalid OFDM PHY access at "
- "0x%04X on N-PHY\n", offset);
+ b43_err(dev->wl, "Invalid OFDM PHY access at "
+ "0x%04X on N-PHY\n", offset);
dump_stack();
}
if ((offset & B43_PHYROUTE) == B43_PHYROUTE_EXT_GPHY) {
/* Ext-G registers are only available on G-PHYs */
- b43err(dev->wl, "Invalid EXT-G PHY access at "
- "0x%04X on N-PHY\n", offset);
+ b43_err(dev->wl, "Invalid EXT-G PHY access at "
+ "0x%04X on N-PHY\n", offset);
dump_stack();
}
#endif /* B43_DEBUG */
@@ -3491,7 +3491,7 @@ static void b43_nphy_op_software_rfkill(struct b43_wldev *dev,
struct b43_phy_n *nphy = dev->phy.n;
if (b43_read32(dev, B43_MMIO_MACCTL) & B43_MACCTL_ENABLED)
- b43err(dev->wl, "MAC not suspended\n");
+ b43_err(dev->wl, "MAC not suspended\n");
if (blocked) {
b43_phy_mask(dev, B43_NPHY_RFCTL_CMD,
diff --git a/drivers/net/wireless/b43/pio.c b/drivers/net/wireless/b43/pio.c
index aa12273..3a7b487 100644
--- a/drivers/net/wireless/b43/pio.c
+++ b/drivers/net/wireless/b43/pio.c
@@ -278,7 +278,7 @@ int b43_pio_init(struct b43_wldev *dev)
if (!pio->rx_queue)
goto err_destroy_mcast;
- b43dbg(dev->wl, "PIO initialized\n");
+ b43_dbg(dev->wl, "PIO initialized\n");
err = 0;
out:
return err;
@@ -525,12 +525,12 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb)
if (unlikely(total_len > q->buffer_size)) {
err = -ENOBUFS;
- b43dbg(dev->wl, "PIO: TX packet longer than queue.\n");
+ b43_dbg(dev->wl, "PIO: TX packet longer than queue\n");
goto out;
}
if (unlikely(q->free_packet_slots == 0)) {
err = -ENOBUFS;
- b43warn(dev->wl, "PIO: TX packet overflow.\n");
+ b43_warn(dev->wl, "PIO: TX packet overflow\n");
goto out;
}
B43_WARN_ON(q->buffer_used > q->buffer_size);
@@ -557,7 +557,7 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb)
goto out;
}
if (unlikely(err)) {
- b43err(dev->wl, "PIO transmission failure\n");
+ b43_err(dev->wl, "PIO transmission failure\n");
goto out;
}
@@ -651,7 +651,7 @@ static bool pio_rx_frame(struct b43_pio_rxqueue *q)
udelay(10);
}
}
- b43dbg(q->dev->wl, "PIO RX timed out\n");
+ b43_dbg(q->dev->wl, "PIO RX timed out\n");
return 1;
data_ready:
@@ -745,7 +745,7 @@ data_ready:
rx_error:
if (err_msg)
- b43dbg(q->dev->wl, "PIO RX error: %s\n", err_msg);
+ b43_dbg(q->dev->wl, "PIO RX error: %s\n", err_msg);
if (q->rev >= 8)
b43_piorx_write32(q, B43_PIO8_RXCTL, B43_PIO8_RXCTL_DATARDY);
else
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c
index 78016ae..2a532a3 100644
--- a/drivers/net/wireless/b43/rfkill.c
+++ b/drivers/net/wireless/b43/rfkill.c
@@ -70,8 +70,8 @@ void b43_rfkill_poll(struct ieee80211_hw *hw)
if (unlikely(enabled != dev->radio_hw_enable)) {
dev->radio_hw_enable = enabled;
- b43info(wl, "Radio hardware status changed to %s\n",
- enabled ? "ENABLED" : "DISABLED");
+ b43_info(wl, "Radio hardware status changed to %s\n",
+ enabled ? "ENABLED" : "DISABLED");
wiphy_rfkill_set_hw_state(hw->wiphy, !enabled);
if (enabled != dev->phy.radio_on)
b43_software_rfkill(dev, !enabled);
diff --git a/drivers/net/wireless/b43/sysfs.c b/drivers/net/wireless/b43/sysfs.c
index f1ae4e0..b949e91 100644
--- a/drivers/net/wireless/b43/sysfs.c
+++ b/drivers/net/wireless/b43/sysfs.c
@@ -123,8 +123,7 @@ static ssize_t b43_attr_interfmode_store(struct device *dev,
if (wldev->phy.ops->interf_mitigation) {
err = wldev->phy.ops->interf_mitigation(wldev, mode);
if (err) {
- b43err(wldev->wl, "Interference Mitigation not "
- "supported by device\n");
+ b43_err(wldev->wl, "Interference Mitigation not supported by device\n");
}
} else
err = -ENOSYS;
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index e6b0528..3e416f3 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -573,14 +573,14 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
/* Skip PLCP and padding */
padding = (macstat & B43_RX_MAC_PADDING) ? 2 : 0;
if (unlikely(skb->len < (sizeof(struct b43_plcp_hdr6) + padding))) {
- b43dbg(dev->wl, "RX: Packet size underrun (1)\n");
+ b43_dbg(dev->wl, "RX: Packet size underrun (1)\n");
goto drop;
}
plcp = (struct b43_plcp_hdr6 *)(skb->data + padding);
skb_pull(skb, sizeof(struct b43_plcp_hdr6) + padding);
/* The skb contains the Wireless Header + payload data now */
if (unlikely(skb->len < (2 + 2 + 6 /*minimum hdr */ + FCS_LEN))) {
- b43dbg(dev->wl, "RX: Packet size underrun (2)\n");
+ b43_dbg(dev->wl, "RX: Packet size underrun (2)\n");
goto drop;
}
wlhdr = (struct ieee80211_hdr *)(skb->data);
@@ -601,8 +601,8 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
if (dev->key[keyidx].algorithm != B43_SEC_ALGO_NONE) {
wlhdr_len = ieee80211_hdrlen(fctl);
if (unlikely(skb->len < (wlhdr_len + 3))) {
- b43dbg(dev->wl,
- "RX: Packet size underrun (3)\n");
+ b43_dbg(dev->wl,
+ "RX: Packet size underrun (3)\n");
goto drop;
}
status.flag |= RX_FLAG_DECRYPTED;
@@ -695,7 +695,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
#endif
return;
drop:
- b43dbg(dev->wl, "RX: Packet dropped\n");
+ b43_dbg(dev->wl, "RX: Packet dropped\n");
dev_kfree_skb_any(skb);
}
--
1.7.1.337.g6068.dirty
^ permalink raw reply related
* [PATCH 3/3] drivers/net/wireless/b43: Rename b43_debug to b43_debugging
From: Joe Perches @ 2010-06-19 23:30 UTC (permalink / raw)
To: Stefano Brivio; +Cc: John W. Linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1276988387.git.joe@perches.com>
Avoid using <foo>_debug function name because that is most commonly
used to emit logging messages.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/wireless/b43/debugfs.c | 2 +-
drivers/net/wireless/b43/debugfs.h | 4 ++--
drivers/net/wireless/b43/dma.c | 10 +++++-----
drivers/net/wireless/b43/lo.c | 6 +++---
drivers/net/wireless/b43/main.c | 16 ++++++++--------
drivers/net/wireless/b43/phy_g.c | 8 ++++----
6 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/b43/debugfs.c
index 307802c..a9f8d48 100644
--- a/drivers/net/wireless/b43/debugfs.c
+++ b/drivers/net/wireless/b43/debugfs.c
@@ -645,7 +645,7 @@ B43_DEBUGFS_FOPS(restart, NULL, restart_write_file);
B43_DEBUGFS_FOPS(loctls, loctls_read_file, NULL);
-bool b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature)
+bool b43_debugging(struct b43_wldev *dev, enum b43_dyndbg feature)
{
bool enabled;
diff --git a/drivers/net/wireless/b43/debugfs.h b/drivers/net/wireless/b43/debugfs.h
index 822aad8..f34da88 100644
--- a/drivers/net/wireless/b43/debugfs.h
+++ b/drivers/net/wireless/b43/debugfs.h
@@ -73,7 +73,7 @@ struct b43_dfsentry {
struct dentry *dyn_debug_dentries[__B43_NR_DYNDBG];
};
-bool b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature);
+bool b43_debugging(struct b43_wldev *dev, enum b43_dyndbg feature);
void b43_debugfs_init(void);
void b43_debugfs_exit(void);
@@ -84,7 +84,7 @@ void b43_debugfs_log_txstat(struct b43_wldev *dev,
#else /* CONFIG_B43_DEBUG */
-static inline bool b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature)
+static inline bool b43_debugging(struct b43_wldev *dev, enum b43_dyndbg feature)
{
return 0;
}
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c
index a6d15c4..6343378 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -265,7 +265,7 @@ static void update_max_used_slots(struct b43_dmaring *ring,
if (current_used_slots <= ring->max_used_slots)
return;
ring->max_used_slots = current_used_slots;
- if (b43_debug(ring->dev, B43_DBG_DMAVERBOSE)) {
+ if (b43_debugging(ring->dev, B43_DBG_DMAVERBOSE)) {
b43_dbg(ring->dev->wl,
"max_used_slots increased to %d on %s ring %d\n",
ring->max_used_slots,
@@ -1264,7 +1264,7 @@ out_unmap_hdr:
static inline int should_inject_overflow(struct b43_dmaring *ring)
{
#ifdef CONFIG_B43_DEBUG
- if (unlikely(b43_debug(ring->dev, B43_DBG_DMAOVERFLOW))) {
+ if (unlikely(b43_debugging(ring->dev, B43_DBG_DMAOVERFLOW))) {
/* Check if we should inject another ringbuffer overflow
* to test handling of this situation in the stack. */
unsigned long next_overflow;
@@ -1340,7 +1340,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb)
* Because of a race, one packet may be queued after
* the queue is stopped, thus we got called when we shouldn't.
* For now, just refuse the transmit. */
- if (b43_debug(dev, B43_DBG_DMAVERBOSE))
+ if (b43_debugging(dev, B43_DBG_DMAVERBOSE))
b43_err(dev->wl, "Packet after queue stopped\n");
err = -ENOSPC;
goto out;
@@ -1376,7 +1376,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb)
/* This TX ring is full. */
ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb));
ring->stopped = 1;
- if (b43_debug(dev, B43_DBG_DMAVERBOSE)) {
+ if (b43_debugging(dev, B43_DBG_DMAVERBOSE)) {
b43_dbg(dev->wl, "Stopped TX ring %d\n", ring->index);
}
}
@@ -1494,7 +1494,7 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
B43_WARN_ON(free_slots(ring) < TX_SLOTS_PER_FRAME);
ieee80211_wake_queue(dev->wl->hw, ring->queue_prio);
ring->stopped = 0;
- if (b43_debug(dev, B43_DBG_DMAVERBOSE)) {
+ if (b43_debugging(dev, B43_DBG_DMAVERBOSE)) {
b43_dbg(dev->wl, "Woke up TX ring %d\n", ring->index);
}
}
diff --git a/drivers/net/wireless/b43/lo.c b/drivers/net/wireless/b43/lo.c
index c16c35c..b047edd 100644
--- a/drivers/net/wireless/b43/lo.c
+++ b/drivers/net/wireless/b43/lo.c
@@ -774,7 +774,7 @@ struct b43_lo_calib *b43_calibrate_lo_setting(struct b43_wldev *dev,
lo_measure_restore(dev, &saved_regs);
b43_mac_enable(dev);
- if (b43_debug(dev, B43_DBG_LO)) {
+ if (b43_debugging(dev, B43_DBG_LO)) {
b43_dbg(dev->wl, "LO: Calibrated for BB(%u), RF(%u,%u) "
"=> I=%d Q=%d\n",
bbatt->att, rfatt->att, rfatt->with_padmix,
@@ -971,7 +971,7 @@ void b43_lo_g_maintanance_work(struct b43_wldev *dev)
B43_WARN_ON(current_item_expired);
current_item_expired = 1;
}
- if (b43_debug(dev, B43_DBG_LO)) {
+ if (b43_debugging(dev, B43_DBG_LO)) {
b43_dbg(dev->wl, "LO: Item BB(%u), RF(%u,%u), "
"I=%d, Q=%d expired\n",
cal->bbatt.att, cal->rfatt.att,
@@ -983,7 +983,7 @@ void b43_lo_g_maintanance_work(struct b43_wldev *dev)
}
if (current_item_expired || unlikely(list_empty(&lo->calib_list))) {
/* Recalibrate currently used LO setting. */
- if (b43_debug(dev, B43_DBG_LO))
+ if (b43_debugging(dev, B43_DBG_LO))
b43_dbg(dev->wl, "LO: Recalibrating current LO setting\n");
cal = b43_calibrate_lo_setting(dev, &gphy->bbatt, &gphy->rfatt);
if (cal) {
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 6343873..3d2c655 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -839,9 +839,9 @@ static void rx_tkip_phase1_write(struct b43_wldev *dev, u8 index, u32 iv32,
index -= pairwise_keys_start;
B43_WARN_ON(index >= B43_NR_PAIRWISE_KEYS);
- if (b43_debug(dev, B43_DBG_KEYS)) {
+ if (b43_debugging(dev, B43_DBG_KEYS)) {
b43_dbg(dev->wl, "rx_tkip_phase1_write : idx 0x%x, iv32 0x%x\n",
- index, iv32);
+ index, iv32);
}
/* Write the key to the RX tkip shared mem */
offset = B43_SHM_SH_TKIPTSCTTAK + index * (10 + 4);
@@ -1014,7 +1014,7 @@ static void b43_dump_keymemory(struct b43_wldev *dev)
u64 hf;
struct b43_key *key;
- if (!b43_debug(dev, B43_DBG_KEYS))
+ if (!b43_debugging(dev, B43_DBG_KEYS))
return;
hf = b43_hf_read(dev);
@@ -1857,7 +1857,7 @@ static void b43_do_interrupt_thread(struct b43_wldev *dev)
b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, dev->irq_mask);
#if B43_DEBUG
- if (b43_debug(dev, B43_DBG_VERBOSESTATS)) {
+ if (b43_debugging(dev, B43_DBG_VERBOSESTATS)) {
dev->irq_count++;
for (i = 0; i < ARRAY_SIZE(dev->irq_bit_count); i++) {
if (reason & (1 << i))
@@ -2587,7 +2587,7 @@ static void b43_gpio_cleanup(struct b43_wldev *dev)
/* http://bcm-specs.sipsolutions.net/EnableMac */
void b43_mac_enable(struct b43_wldev *dev)
{
- if (b43_debug(dev, B43_DBG_FIRMWARE)) {
+ if (b43_debugging(dev, B43_DBG_FIRMWARE)) {
u16 fwstate;
fwstate = b43_shm_read16(dev, B43_SHM_SHARED,
@@ -2944,7 +2944,7 @@ static void b43_periodic_every15sec(struct b43_wldev *dev)
wmb();
#if B43_DEBUG
- if (b43_debug(dev, B43_DBG_VERBOSESTATS)) {
+ if (b43_debugging(dev, B43_DBG_VERBOSESTATS)) {
unsigned int i;
b43_dbg(dev->wl, "Stats: %7u IRQs/sec, %7u TX/sec, %7u RX/sec\n",
@@ -2993,14 +2993,14 @@ static void b43_periodic_work_handler(struct work_struct *work)
if (unlikely(b43_status(dev) != B43_STAT_STARTED))
goto out;
- if (b43_debug(dev, B43_DBG_PWORK_STOP))
+ if (b43_debugging(dev, B43_DBG_PWORK_STOP))
goto out_requeue;
do_periodic_work(dev);
dev->periodic_state++;
out_requeue:
- if (b43_debug(dev, B43_DBG_PWORK_FAST))
+ if (b43_debugging(dev, B43_DBG_PWORK_FAST))
delay = msecs_to_jiffies(50);
else
delay = round_jiffies_relative(HZ * 15);
diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
index acadae6..ef539a5 100644
--- a/drivers/net/wireless/b43/phy_g.c
+++ b/drivers/net/wireless/b43/phy_g.c
@@ -236,7 +236,7 @@ static void b43_set_txpower_g(struct b43_wldev *dev,
gphy->rfatt.with_padmix = !!(tx_control & B43_TXCTL_TXMIX);
memmove(&gphy->bbatt, bbatt, sizeof(*bbatt));
- if (b43_debug(dev, B43_DBG_XMITPOWER)) {
+ if (b43_debugging(dev, B43_DBG_XMITPOWER)) {
b43_dbg(dev->wl, "Tuning TX-power to bbatt(%u), "
"rfatt(%u), tx_control(0x%02X), "
"tx_bias(0x%02X), tx_magn(0x%02X)\n",
@@ -2862,7 +2862,7 @@ static void b43_gphy_op_adjust_txpower(struct b43_wldev *dev)
gphy->rfatt.att = rfatt;
gphy->bbatt.att = bbatt;
- if (b43_debug(dev, B43_DBG_XMITPOWER))
+ if (b43_debugging(dev, B43_DBG_XMITPOWER))
b43_dbg(dev->wl, "Adjusting TX power\n");
/* Adjust the hardware */
@@ -2929,7 +2929,7 @@ static enum b43_txpwr_result b43_gphy_op_recalc_txpower(struct b43_wldev *dev,
desired_pwr = INT_TO_Q52(phy->desired_txpower);
/* And limit it. max_pwr already is Q5.2 */
desired_pwr = clamp_val(desired_pwr, 0, max_pwr);
- if (b43_debug(dev, B43_DBG_XMITPOWER)) {
+ if (b43_debugging(dev, B43_DBG_XMITPOWER)) {
b43_dbg(dev->wl,
"[TX power] current = " Q52_FMT
" dBm, desired = " Q52_FMT
@@ -2958,7 +2958,7 @@ static enum b43_txpwr_result b43_gphy_op_recalc_txpower(struct b43_wldev *dev,
bbatt_delta -= 4 * rfatt_delta;
#if B43_DEBUG
- if (b43_debug(dev, B43_DBG_XMITPOWER)) {
+ if (b43_debugging(dev, B43_DBG_XMITPOWER)) {
int dbm = pwr_adjust < 0 ? -pwr_adjust : pwr_adjust;
b43_dbg(dev->wl,
"[TX power deltas] %s" Q52_FMT " dBm => "
--
1.7.1.337.g6068.dirty
^ permalink raw reply related
* Re: Bad performance for libertas on Murata combo.
From: Dan Williams @ 2010-06-20 2:59 UTC (permalink / raw)
To: Enric Balletbò i Serra; +Cc: linux-wireless
In-Reply-To: <AANLkTik5z5SL_JB2-_elmbdyt1rDSxY3IHVEi2V_4uLD@mail.gmail.com>
On Sat, 2010-06-19 at 15:53 +0200, Enric Balletbò i Serra wrote:
> Hi all,
>
> Maybe someone can help me ...
>
> I am in the process of enabling WLAN for a target board. It has a WLAN
> Bluetooth (WLAN-BT) combo module from MuRata which has a Marvell WLAN
> (88W8686) + CSR Bluetooth chipset.
What SDIO host controller? Does the host controller support interrupts
and 4-bit mode? We've always been able to get good performance out of
laptop host controllers (Ricoh mostly) and the largest source of
performance issues has always been quirky hardware or non-optimized SDHC
drivers. Are there any errata for your SDHC that you're aware of?
If you also turn on kernel MMC debugging and the 'dmesg' output of the
controller and the libertas device being recognized, that can sometimes
help determine where the problem lies.
Dan
> I can connect to an AP, but the performance is too low. Pinging my AP
> I see a lot of 'Rx invalid crypt' and 'Invalid misc' packets.
>
> I'm using the libertas driver from mainline kernel (2.6.35-rc3) with
> SDIO interface and these errors are reported using the iwconfig
> command.
>
> I also tested with 2.6.34 and 2.6.33 with same result.
>
> Any idea about what this means ? What could be wrong? Or how can I
> investigate more ?
>
> Thanks in advance,
>
> Enric
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [RFC] wireless-regdb: Add A band in IL
From: Emmanuel Grumbach @ 2010-06-20 5:41 UTC (permalink / raw)
To: John W. Linville
Cc: Emmanuel Grumbach, linux-wireless, Michael Green, David Quan
In-Reply-To: <20100618184257.GB6282@tuxdriver.com>
Emmanuel Grumbach
egrumbach@gmail.com
On Fri, Jun 18, 2010 at 21:42, John W. Linville <linville@tuxdriver.com> wrote:
>
> On Wed, May 26, 2010 at 09:49:29AM +0300, Emmanuel Grumbach wrote:
> > A band in allowed in IL, according to official document issued by the Ministry
> > of Communications: http://www.moc.gov.il/sip_storage/FILES/1/1061.pdf.
> >
> > 5150 - 5250 200mW e.i.r.p. OUTDOOR forbidden
> > 5250 - 5350 200mW e.i.r.p. OUTDOOR forbidden DFS mandatory
> >
> > 40Mhz is allowed in A band for every WiFi-Alliance certified equipment.
> >
> > ***************************************************************
> > Not to be merged for the moment
> > ***************************************************************
> >
> > CC: Michael Green <Michael.Green@atheros.com>
> > CC: David Quan <David.Quan@atheros.com>
> > Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> > ---
> > db.txt | 2 ++
> > 1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/db.txt b/db.txt
> > index e63a43e..d49c397 100644
> > --- a/db.txt
> > +++ b/db.txt
> > @@ -319,6 +319,8 @@ country IE:
> >
> > country IL:
> > (2402 - 2482 @ 40), (N/A, 20)
> > + (5150 - 5250 @ 40). (N/A, 200 mW), NO-OUTDOOR
> > + (5250 - 5350 @ 40). (N/A, 200 mW), NO-OUTDOOR, DFS
> >
> > country IN:
> > (2402 - 2482 @ 40), (N/A, 20)
>
> Is this issue now settled?
Yes, I think that Michael Green agreed for this patch. Once he will
reply to make sure, we will be able to move on to a real patch.
^ permalink raw reply
* Re: [ath5k-devel] [PATCH v2] ath5k: disable ASPM
From: Luis R. Rodriguez @ 2010-06-20 8:13 UTC (permalink / raw)
To: Maxim Levitsky, David Quan
Cc: Bob Copeland, Luis R. Rodriguez, Jussi Kivilinna, ath5k-devel,
linux-wireless, linux-kernel
In-Reply-To: <1276933774.16697.11.camel@maxim-laptop>
Note: this e-mail is on a public mailing list.
On Sat, Jun 19, 2010 at 12:49 AM, Maxim Levitsky
<maximlevitsky@gmail.com> wrote:
> On Fri, 2010-06-18 at 17:11 +0300, Maxim Levitsky wrote:
>> On Fri, 2010-06-18 at 09:59 -0400, Bob Copeland wrote:
>> > On Fri, Jun 18, 2010 at 7:05 AM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
>> > >> Patch I made uses GPL code from e1000e, but since ath5k is
>> > >> dual-licensed so patch can't be accepted. So if I got it right, patch
>> > >> has to be remade from scratch by someone who really knows about pci
>> > >> registers etc. I don't, and learning this to fix something that is
>> > >> already fixed in my point of view is waste of (my) time.
>> > > Sure, regardless of licensing, this patch has to be redone (and e1000
>> > > with it)
>> >
>> > At any rate, Jussi, thanks a bundle for tracking it down. I owe you a
>> > beer, lots of bugs have been reported on these devices.
>> >
>> > Maxim, this device was always broken in the same way, right? Just
>> > curious if anything made it worse recently.
>>
>> Always was broken, of course even with madwifi.
>>
>> Recently I think driver stopped doing reset on RXORN, which sometimes
>> helped. This did made things a bit worse.
>>
>> Anyway, just disable L0S, and card works perfectly.
>
> How this patch?
> Its same patch but without open coded ASPM disabler.
> Of course to work therefore you need CONFIG_PCIEASPM.
> Without it, this reduces to noop.
> However I asked at linux-pci, and they said that its not a bad idea to
> just remove CONFIG_PCIEASPM and make it default.
>
> I hope there won't be a silly GPL vs BSD debate over one line of code...
When you use the SOB you respect the license of the file you are
editing, please see Documentation/SubmittingPatches Developer's
Certificate of Origin 1.1.
> commit ac5de416f822917b927958b21186a82141550da7
> Author: Maxim Levitsky <maximlevitsky@gmail.com>
> Date: Thu Jun 17 23:21:42 2010 +0300
>
> ath5k: disable ASPM
You are not disabling ASPM, you are disabling L0s. ASPM can work with
L1, for example.
> Atheros card on Acer Aspire One (AOA150, Atheros Communications Inc. AR5001
> Wireless Network Adapter [168c:001c] (rev 01)) doesn't work well with ASPM
> enabled. With ASPM ath5k will eventually stall on heavy traffic with often
> 'unsupported jumbo' warnings appearing. Disabling ASPM L0s in ath5k fixes
> these problems.
>
> Reproduced with pcie_aspm=force and by using 'nc < /dev/zero > /dev/null' at
> both ends (usually stalls within seconds).
I *highly* discourage the use of pcie_aspm=force, in fact I'm inclined
to just remove this junk code from the kernel. What you should do to
test ASPM on a device is to use setpci on the config space. I have
documented how you can do this here:
http://wireless.kernel.org/en/users/Documentation/ASPM
Reason for discouraging this is when you use this you enable ASPM on
*all* root complexes and *all* devices which do support ASPM. If you
have another device which is capable of ASPM but has it disabled for
some reason you will run into other issues.
I should also note that loading a module already has an effect on
devices for ASPM. An example today is ath9k's ath9k_hw_init() which
runs simply during module load, this has some ASPM related code which
for example disables the PLL for ASPM for AR9003. I don't recall
exactly what we do with ath5k but just giving you an idea. To truly
test ASPM well I recommend to do something similar as with this script
or you can just give it a shot.
http://kernel.org/pub/linux/kernel/people/mcgrof/aspm/enable-aspm
Not like I expect very different results but just wanted to clarify
the details on force aspm.
Why are you disabling L0s for all devices though? Why not just for the
reported device? Granted, L0s won't save you much more power but
still, why remove it completely, your commit log does not address that
in any way. It only states you have issues with L0s on one chipset but
what the patch really implies is you are disabling L0s completely for
all ath5k chipsets.
David, are you aware of recent L0s issues with some legacy cards?
> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
> Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
>
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index 3abbe75..e7a189a 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -48,6 +48,7 @@
> #include <linux/netdevice.h>
> #include <linux/cache.h>
> #include <linux/pci.h>
> +#include <linux/pci-aspm.h>
> #include <linux/ethtool.h>
> #include <linux/uaccess.h>
> #include <linux/slab.h>
> @@ -469,6 +470,9 @@ ath5k_pci_probe(struct pci_dev *pdev,
> int ret;
> u8 csz;
>
> + /* Disable PCIE ASPM L0S. It is never enabled by windows driver */
> + pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
> +
> ret = pci_enable_device(pdev);
> if (ret) {
> dev_err(&pdev->dev, "can't enable device\n");
> @@ -722,6 +726,8 @@ static int ath5k_pci_resume(struct device *dev)
> struct ieee80211_hw *hw = pci_get_drvdata(pdev);
> struct ath5k_softc *sc = hw->priv;
>
> + pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
> +
> /*
> * Suspend/Resume resets the PCI configuration space, so we have to
> * re-disable the RETRY_TIMEOUT register (0x41) to keep
>
>
>
>
>
>
> _______________________________________________
> ath5k-devel mailing list
> ath5k-devel@lists.ath5k.org
> https://lists.ath5k.org/mailman/listinfo/ath5k-devel
>
^ permalink raw reply
* [PATCH] compat-wireless: fix compilation for 2.6.32
From: Paul Fertser @ 2010-06-20 9:44 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless, Paul Fertser
2.6.32 was the latest version using CONFIG_WIRELESS_EXT. Without this patch
compilation produced
net/wireless/wext-compat.c:443: error: ‘struct wireless_dev’ has no member named ‘wext’
since config.mk defined CONFIG_CFG80211_WEXT but autoconf.sh didn't.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
---
scripts/gen-compat-autoconf.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh
index 88e2740..1e3002e 100755
--- a/scripts/gen-compat-autoconf.sh
+++ b/scripts/gen-compat-autoconf.sh
@@ -192,7 +192,7 @@ if [ -f $KLIB_BUILD/Makefile ]; then
define_config_multiple_deps CONFIG_MAC80211_QOS y $ALL_DEPS
rm -f $MULT_DEP_FILE
# Kernels >= 2.6.32 can disable WEXT :D
- if [ $SUBLEVEL -lt 32 ]; then
+ if [ $SUBLEVEL -le 32 ]; then
define_config_dep CONFIG_CFG80211_WEXT 1 CONFIG_WIRELESS_EXT
fi
fi
--
1.6.4.4
^ permalink raw reply related
* Re: [ath5k-devel] [PATCH v2] ath5k: disable ASPM
From: Maxim Levitsky @ 2010-06-20 11:18 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: David Quan, Bob Copeland, Luis R. Rodriguez, Jussi Kivilinna,
ath5k-devel, linux-wireless, linux-kernel
In-Reply-To: <AANLkTimIjaxq7IDWwIl1vv93k9bNQ2i89Sb5R5TiJmmA@mail.gmail.com>
On Sun, 2010-06-20 at 01:13 -0700, Luis R. Rodriguez wrote:
> Note: this e-mail is on a public mailing list.
>
> On Sat, Jun 19, 2010 at 12:49 AM, Maxim Levitsky
> <maximlevitsky@gmail.com> wrote:
> > On Fri, 2010-06-18 at 17:11 +0300, Maxim Levitsky wrote:
> >> On Fri, 2010-06-18 at 09:59 -0400, Bob Copeland wrote:
> >> > On Fri, Jun 18, 2010 at 7:05 AM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> >> > >> Patch I made uses GPL code from e1000e, but since ath5k is
> >> > >> dual-licensed so patch can't be accepted. So if I got it right, patch
> >> > >> has to be remade from scratch by someone who really knows about pci
> >> > >> registers etc. I don't, and learning this to fix something that is
> >> > >> already fixed in my point of view is waste of (my) time.
> >> > > Sure, regardless of licensing, this patch has to be redone (and e1000
> >> > > with it)
> >> >
> >> > At any rate, Jussi, thanks a bundle for tracking it down. I owe you a
> >> > beer, lots of bugs have been reported on these devices.
> >> >
> >> > Maxim, this device was always broken in the same way, right? Just
> >> > curious if anything made it worse recently.
> >>
> >> Always was broken, of course even with madwifi.
> >>
> >> Recently I think driver stopped doing reset on RXORN, which sometimes
> >> helped. This did made things a bit worse.
> >>
> >> Anyway, just disable L0S, and card works perfectly.
> >
> > How this patch?
> > Its same patch but without open coded ASPM disabler.
> > Of course to work therefore you need CONFIG_PCIEASPM.
> > Without it, this reduces to noop.
> > However I asked at linux-pci, and they said that its not a bad idea to
> > just remove CONFIG_PCIEASPM and make it default.
> >
> > I hope there won't be a silly GPL vs BSD debate over one line of code...
>
> When you use the SOB you respect the license of the file you are
> editing, please see Documentation/SubmittingPatches Developer's
> Certificate of Origin 1.1.
This is ok of course.
The debate was about Jussi Kivilinna copying ASPM disabler code from
e1000 which is GPL.
>
> > commit ac5de416f822917b927958b21186a82141550da7
> > Author: Maxim Levitsky <maximlevitsky@gmail.com>
> > Date: Thu Jun 17 23:21:42 2010 +0300
> >
> > ath5k: disable ASPM
>
> You are not disabling ASPM, you are disabling L0s. ASPM can work with
> L1, for example.
This is left over from original patch.
with open coded code I was able to disable just L0s and get stable
operation.
Note however that with this patch which implies CONFIG_PCIEASPM, pci
core disables both L0s and L1
(I still need to test and see if I need that patch at all. Maybe just
enabling CONFIG_PCIEASPM is enough...)
>
> > Atheros card on Acer Aspire One (AOA150, Atheros Communications Inc. AR5001
> > Wireless Network Adapter [168c:001c] (rev 01)) doesn't work well with ASPM
> > enabled. With ASPM ath5k will eventually stall on heavy traffic with often
> > 'unsupported jumbo' warnings appearing. Disabling ASPM L0s in ath5k fixes
> > these problems.
> >
> > Reproduced with pcie_aspm=force and by using 'nc < /dev/zero > /dev/null' at
> > both ends (usually stalls within seconds).
>
> I *highly* discourage the use of pcie_aspm=force, in fact I'm inclined
> to just remove this junk code from the kernel. What you should do to
> test ASPM on a device is to use setpci on the config space. I have
> documented how you can do this here:
>
> http://wireless.kernel.org/en/users/Documentation/ASPM
>
> Reason for discouraging this is when you use this you enable ASPM on
> *all* root complexes and *all* devices which do support ASPM. If you
> have another device which is capable of ASPM but has it disabled for
> some reason you will run into other issues.
>
> I should also note that loading a module already has an effect on
> devices for ASPM. An example today is ath9k's ath9k_hw_init() which
> runs simply during module load, this has some ASPM related code which
> for example disables the PLL for ASPM for AR9003. I don't recall
> exactly what we do with ath5k but just giving you an idea. To truly
> test ASPM well I recommend to do something similar as with this script
> or you can just give it a shot.
>
> http://kernel.org/pub/linux/kernel/people/mcgrof/aspm/enable-aspm
>
> Not like I expect very different results but just wanted to clarify
> the details on force aspm.
>
> Why are you disabling L0s for all devices though? Why not just for the
> reported device? Granted, L0s won't save you much more power but
> still, why remove it completely, your commit log does not address that
> in any way. It only states you have issues with L0s on one chipset but
> what the patch really implies is you are disabling L0s completely for
> all ath5k chipsets.
First of all there aren't many PCIE ath5k based devices.
Two of them are known to be broken.
Also Jussi Kivilinna said that he found that in windows .inf file there
are some instructions to enable L1 but not L0s.
Note that I tested that again, and card works very stable.
I didn't see a single drop to 0 bytes/s. In fact throughput never drops
below 1 Mb/s. (usually about 2.4 Mb/s, with rare drops for few seconds
to ~1Mb/s)
Best regards,
Maxim Levitsky
>
> David, are you aware of recent L0s issues with some legacy cards?
>
> > Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
> > Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
> >
> >
> > diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> > index 3abbe75..e7a189a 100644
> > --- a/drivers/net/wireless/ath/ath5k/base.c
> > +++ b/drivers/net/wireless/ath/ath5k/base.c
> > @@ -48,6 +48,7 @@
> > #include <linux/netdevice.h>
> > #include <linux/cache.h>
> > #include <linux/pci.h>
> > +#include <linux/pci-aspm.h>
> > #include <linux/ethtool.h>
> > #include <linux/uaccess.h>
> > #include <linux/slab.h>
> > @@ -469,6 +470,9 @@ ath5k_pci_probe(struct pci_dev *pdev,
> > int ret;
> > u8 csz;
> >
> > + /* Disable PCIE ASPM L0S. It is never enabled by windows driver */
> > + pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
> > +
> > ret = pci_enable_device(pdev);
> > if (ret) {
> > dev_err(&pdev->dev, "can't enable device\n");
> > @@ -722,6 +726,8 @@ static int ath5k_pci_resume(struct device *dev)
> > struct ieee80211_hw *hw = pci_get_drvdata(pdev);
> > struct ath5k_softc *sc = hw->priv;
> >
> > + pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
> > +
> > /*
> > * Suspend/Resume resets the PCI configuration space, so we have to
> > * re-disable the RETRY_TIMEOUT register (0x41) to keep
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > ath5k-devel mailing list
> > ath5k-devel@lists.ath5k.org
> > https://lists.ath5k.org/mailman/listinfo/ath5k-devel
> >
^ permalink raw reply
* Re: [PATCH 0/2] ssb: updates matching specs, fix for hangs?
From: Rafał Miłecki @ 2010-06-20 12:34 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
In-Reply-To: <1274730624-22922-1-git-send-email-zajec5@gmail.com>
W dniu 24 maja 2010 21:50 użytkownik Rafał Miłecki <zajec5@gmail.com> napisał:
> John, I don't really know w-t policy, so please decide where we should apply
> these patches. I'll try to provide some description.
John, I think you missed that two patches. It was already some time
ago, but AFAIR there wasn't any reason against commiting them, am I
wrong here?
--
Rafał
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox