* Re: [bisected] Wireless regression in 2.6.32-git
From: John W. Linville @ 2009-09-28 13:59 UTC (permalink / raw)
To: Johannes Berg
Cc: Arjan van de Ven, Hugh Dickins, netdev, linux-kernel,
linux-wireless
In-Reply-To: <1254077199.6583.8.camel@johannes.local>
On Sun, Sep 27, 2009 at 08:46:39PM +0200, Johannes Berg wrote:
> On Sun, 2009-09-27 at 20:45 +0200, Arjan van de Ven wrote:
>
> > > Subject: cfg80211: don't set privacy w/o key
> > >
> > > When wpa_supplicant is used to connect to open networks,
> > > it causes the wdev->wext.keys to point to key memory, but
> > > that key memory is all empty. Only use privacy when there
> > > is a default key to be used.
> >
> >
> > indeed it does
> >
> > can we get this into mainline soon ?
>
> John's on his way home I suppose.
Yes, I'll get to it today -- sorry for the delays related to my travel!
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: [PATCH 13/13] TProxy: use the interface primary IP address as a default value for --on-ip
From: Brian Haley @ 2009-09-28 16:16 UTC (permalink / raw)
To: Balazs Scheidler; +Cc: netfilter-devel, netdev
In-Reply-To: <1253902068.10105.1.camel@bzorp.balabit>
Balazs Scheidler wrote:
> One question, how fast is ipv6_dev_get_saddr()? Since the TPROXY target
> can execute on a per-packet path (although the socket match should take
> care of packets that belong to already-established connections), this
> may be performance critical. Is ipv6_dev_get_saddr() something that I
> can call so often?
It probably isn't the best thing to be calling on a per-packet basis, it's
mainly called now on a per-connection basis. I guess if it's really bad
for you we could do something like ipv6_get_lladdr() does for finding
a link-local address, it might be good enough in this case.
-Brian
^ permalink raw reply
* [PATCH] isdn: fix netjet/isdnhdlc build errors
From: Randy Dunlap @ 2009-09-28 16:25 UTC (permalink / raw)
To: Linus Torvalds, davem; +Cc: Linux Kernel Mailing List, Karsten Keil, netdev
In-Reply-To: <alpine.LFD.2.01.0909271511190.3349@localhost.localdomain>
From: Randy Dunlap <randy.dunlap@oracle.com>
Commit cb3824bade2549d7ad059d5802da43312540fdee didn't fix this problem.
Fix build errors in netjet, using isdnhdlc module:
drivers/built-in.o: In function `mode_tiger':
netjet.c:(.text+0x1ca0c7): undefined reference to `isdnhdlc_rcv_init'
netjet.c:(.text+0x1ca0d4): undefined reference to `isdnhdlc_out_init'
drivers/built-in.o: In function `fill_dma':
netjet.c:(.text+0x1ca2bd): undefined reference to `isdnhdlc_encode'
drivers/built-in.o: In function `read_dma':
netjet.c:(.text+0x1ca614): undefined reference to `isdnhdlc_decode'
drivers/built-in.o: In function `nj_irq':
netjet.c:(.text+0x1cb07a): undefined reference to `isdnhdlc_encode'
drivers/built-in.o: In function `isdnhdlc_decode':
(.text+0x1c2088): undefined reference to `crc_ccitt_table'
drivers/built-in.o: In function `isdnhdlc_encode':
(.text+0x1c2339): undefined reference to `crc_ccitt_table'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Karsten Keil <keil@b1-systems.de>
---
drivers/isdn/hardware/mISDN/Kconfig | 1 +
drivers/isdn/i4l/Kconfig | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
--- lnx-2632-rc1.orig/drivers/isdn/hardware/mISDN/Kconfig
+++ lnx-2632-rc1/drivers/isdn/hardware/mISDN/Kconfig
@@ -78,6 +78,7 @@ config MISDN_NETJET
depends on PCI
select MISDN_IPAC
select ISDN_HDLC
+ select ISDN_I4L
help
Enable support for Traverse Technologies NETJet PCI cards.
--- lnx-2632-rc1.orig/drivers/isdn/i4l/Kconfig
+++ lnx-2632-rc1/drivers/isdn/i4l/Kconfig
@@ -141,8 +141,7 @@ endmenu
endif
config ISDN_HDLC
- tristate
- depends on HISAX_ST5481
+ tristate
select CRC_CCITT
select BITREVERSE
^ permalink raw reply
* Fw: [Bug 14241] New: Promiscuous mode on network slows the network down
From: Stephen Hemminger @ 2009-09-28 16:52 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev
Begin forwarded message:
Date: Sat, 26 Sep 2009 23:34:40 GMT
From: bugzilla-daemon@bugzilla.kernel.org
To: shemminger@linux-foundation.org
Subject: [Bug 14241] New: Promiscuous mode on network slows the network down
http://bugzilla.kernel.org/show_bug.cgi?id=14241
Summary: Promiscuous mode on network slows the network down
Product: Networking
Version: 2.5
Kernel Version: 2.6.31
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: IPV4
AssignedTo: shemminger@linux-foundation.org
ReportedBy: mwahal@gmail.com
Regression: No
Hi,
I have been running 2.6.22.14 kernel for about 2+ years on a pentium D 925, 1GB
DDR2 system. I have a realtek 8169 gigabit onboard network controller on a
ubuntu distribution. I wanted to try kvm but it didn't run because the
kvm-intel module of 2.6.22 kernel is way too old. So, I upgraded to 2.6.28 (and
later to 2.6.31 to eliminate 2.6.28 issues) to try that kernel. The kvm did
work with 2.6.28. I had to put the ethernet in bridge mode so that the kvm
guest OS gets the same IP address from my subnet. As a side effect when putting
in bridge mode, the ethernet interface also enters promiscuous mode. I made
changes in /etc/network/interface file as per ubuntu kvm wiki page to add a
bridge interface and add the eth0 to the bridge port.
Anyway, I noticed that certain network related tasks were taking too long. I
stream video my server using UPnP to my UPnP client. The UPnP client had
trouble streaming over a gigabit network inside my home. I was watching a x264
720p movie yesterday and it was freezing on almost each frame. This is all with
2.6.28 (and later upgraded to 2.6.31 latest kernel). If I downgrade back to
2.6.22 kernel, I dont have any issues streaming even a 20Mbps movie.
I've a 6Mbps DSL line at home. I run some scripts during the day to get stocks
quotes from yahoo. That involves about issues 100 or so wget requests. On a
2.6.22 kernel, that takes about 2-3 mins to complete. On a 2.6.31 kernel it
takes about 45-50 mins.
Since I didnt change the /etc/network/interfaces file , so when 2.6.22 loads,
the ethernet still enters into promiscuous mode. I can run iftop and see that
its watching other traffic on my network.
So, my conclusion is that there is something drastically change in the ethernet
driver when it runs in promiscuous mode between 2.6.22 and 2.6.28 (or 31) which
is making it run excruciatingly slow. I'm open to all suggestions for making
any changes to my system. I'm willing to offer whatever information is needed
from my system if someone is willing to take a look at it. I do need kvm but
not the expense of a sloooow network.
Thanks for reading so far.
--
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
--
^ permalink raw reply
* Re: [PATCH] ax25: Add missing dev_put in ax25_setsockopt
From: Bernard Pidoux @ 2009-09-28 17:46 UTC (permalink / raw)
To: Ralf Baechle
Cc: Jarek Poplawski, David Miller, Bernard Pidoux F6BVP,
Linux Netdev List, linux-hams
In-Reply-To: <20090928125313.GA14250@linux-mips.org>
Hi take this one too. Hi.
Applied.
Thanks Ralf.
Bernard
Ralf Baechle a écrit :
> ax25_setsockopt SO_BINDTODEVICE is missing a dev_put call in case of
> success. Re-order code to fix this bug. While at it also reformat two
> lines of code to comply with the Linux coding style.
>
> Initial patch by Jarek Poplawski <jarkao2@gmail.com>.
>
> Reported-by: Bernard Pidoux F6BVP <f6bvp@free.fr>
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
>
> ---
> Counter-proposal. Reordering all the code avoids the need for a 2nd dev_put
> and is more readable.
>
> Ralf
>
> net/ax25/af_ax25.c | 19 ++++++++++---------
> 1 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
> index fbcac76..4102de1 100644
> --- a/net/ax25/af_ax25.c
> +++ b/net/ax25/af_ax25.c
> @@ -641,15 +641,10 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname,
>
> case SO_BINDTODEVICE:
> if (optlen > IFNAMSIZ)
> - optlen=IFNAMSIZ;
> - if (copy_from_user(devname, optval, optlen)) {
> - res = -EFAULT;
> - break;
> - }
> + optlen = IFNAMSIZ;
>
> - dev = dev_get_by_name(&init_net, devname);
> - if (dev == NULL) {
> - res = -ENODEV;
> + if (copy_from_user(devname, optval, optlen)) {
> + res = -EFAULT;
> break;
> }
>
> @@ -657,12 +652,18 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname,
> (sock->state != SS_UNCONNECTED ||
> sk->sk_state == TCP_LISTEN)) {
> res = -EADDRNOTAVAIL;
> - dev_put(dev);
> + break;
> + }
> +
> + dev = dev_get_by_name(&init_net, devname);
> + if (!dev) {
> + res = -ENODEV;
> break;
> }
>
> ax25->ax25_dev = ax25_dev_ax25dev(dev);
> ax25_fillin_cb(ax25, ax25->ax25_dev);
> + dev_put(dev);
> break;
>
> default:
>
^ permalink raw reply
* Re: [2.6.31-git17] WARNING: at kernel/hrtimer.c:648 hres_timers_resume+0x40/0x50()/WARNING: at drivers/base/sys.c:353 __sysdev_resume+0xc3/0xe0()
From: Maciej Rutecki @ 2009-09-28 18:38 UTC (permalink / raw)
To: Yong Zhang
Cc: Linux Kernel Mailing List, Rafael J. Wysocki, clemens,
venkatesh.pallipadi, gregkh, zambrano, davem, netdev
In-Reply-To: <2674af740909271854v191d9768mc3d96f30998f8c01@mail.gmail.com>
2009/9/28 Yong Zhang <yong.zhang0@gmail.com>:
>>
>
> If you could, then please do it. It can give us some helpful information.
Add patch and remove previous:
http://unixy.pl/maciek/download/kernel/2.6.31-git17/gumis/dmesg-debug.txt
s2disk&resume twice.
no "timekeeping_resume() called with IRQs enabled!".
I found some interesting thing, warnings appear only once, during
first s2disk, on second don't appear.
Regards
--
Maciej Rutecki
http://www.maciek.unixy.pl
^ permalink raw reply
* [PATCH] get rid of read/write lock in gen_estimator
From: Stephen Hemminger @ 2009-09-28 18:38 UTC (permalink / raw)
To: David Miller, netdev
Don't need a read/write lock here sinc there already is a spin lock that
is being acquired.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/core/gen_estimator.c 2009-09-24 16:27:01.239755070 -0700
+++ b/net/core/gen_estimator.c 2009-09-24 16:41:09.290751273 -0700
@@ -101,9 +101,6 @@ struct gen_estimator_head
static struct gen_estimator_head elist[EST_MAX_INTERVAL+1];
-/* Protects against NULL dereference */
-static DEFINE_RWLOCK(est_lock);
-
/* Protects against soft lockup during large deletion */
static struct rb_root est_root = RB_ROOT;
@@ -118,9 +115,8 @@ static void est_timer(unsigned long arg)
u64 brate;
u32 npackets;
u32 rate;
-
+
spin_lock(e->stats_lock);
- read_lock(&est_lock);
if (e->bstats == NULL)
goto skip;
@@ -136,7 +132,6 @@ static void est_timer(unsigned long arg)
e->avpps += (rate >> e->ewma_log) - (e->avpps >> e->ewma_log);
e->rate_est->pps = (e->avpps+0x1FF)>>10;
skip:
- read_unlock(&est_lock);
spin_unlock(e->stats_lock);
}
@@ -270,9 +265,9 @@ void gen_kill_estimator(struct gnet_stat
while ((e = gen_find_node(bstats, rate_est))) {
rb_erase(&e->node, &est_root);
- write_lock_bh(&est_lock);
+ spin_lock(e->stats_lock);
e->bstats = NULL;
- write_unlock_bh(&est_lock);
+ spin_unlock(e->stats_lock);
list_del_rcu(&e->list);
call_rcu(&e->e_rcu, __gen_kill_estimator);
^ permalink raw reply
* Re: b43 is broken in latest net-2.6 and linux-2.6
From: John W. Linville @ 2009-09-28 18:42 UTC (permalink / raw)
To: Oliver Hartkopp; +Cc: Michael Buesch, Linux Netdev List
In-Reply-To: <4AB4BF1F.7070501@hartkopp.net>
On Sat, Sep 19, 2009 at 01:23:11PM +0200, Oliver Hartkopp wrote:
> Hello Michael,
>
> my b43 wireless card (Dell 830) is not working with the latest net-2.6 (and
> also linux-2.6 2.6.31-05767-gdf58bee).
>
> net-2.6 2.6.31-03263-gc29854e is working
> net-2.6 2.6.31-03301-ga97e178 is broken
>
> I removed the patch with the work_queue stuff which did not help - so it's
> probably the other patch you added to b43 recently.
>
> Don't know ... the wlan0 link does not become ready anymore.
>
> If you need some more information - please let me know.
Is this working better now, with 2.6.31-rc1?
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: [PATCH] get rid of read/write lock in gen_estimator
From: Eric Dumazet @ 2009-09-28 18:50 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netdev
In-Reply-To: <20090928113855.52eab44b@nehalam>
Stephen Hemminger a écrit :
> Don't need a read/write lock here sinc there already is a spin lock that
> is being acquired.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> --- a/net/core/gen_estimator.c 2009-09-24 16:27:01.239755070 -0700
> +++ b/net/core/gen_estimator.c 2009-09-24 16:41:09.290751273 -0700
> @@ -101,9 +101,6 @@ struct gen_estimator_head
>
> static struct gen_estimator_head elist[EST_MAX_INTERVAL+1];
>
> -/* Protects against NULL dereference */
> -static DEFINE_RWLOCK(est_lock);
> -
> /* Protects against soft lockup during large deletion */
> static struct rb_root est_root = RB_ROOT;
>
> @@ -118,9 +115,8 @@ static void est_timer(unsigned long arg)
> u64 brate;
> u32 npackets;
> u32 rate;
> -
> +
> spin_lock(e->stats_lock);
> - read_lock(&est_lock);
> if (e->bstats == NULL)
> goto skip;
>
> @@ -136,7 +132,6 @@ static void est_timer(unsigned long arg)
> e->avpps += (rate >> e->ewma_log) - (e->avpps >> e->ewma_log);
> e->rate_est->pps = (e->avpps+0x1FF)>>10;
> skip:
> - read_unlock(&est_lock);
> spin_unlock(e->stats_lock);
> }
>
> @@ -270,9 +265,9 @@ void gen_kill_estimator(struct gnet_stat
> while ((e = gen_find_node(bstats, rate_est))) {
> rb_erase(&e->node, &est_root);
>
> - write_lock_bh(&est_lock);
> + spin_lock(e->stats_lock);
Are you sure _bh() variant is not needed here ?
> e->bstats = NULL;
> - write_unlock_bh(&est_lock);
> + spin_unlock(e->stats_lock);
>
> list_del_rcu(&e->list);
> call_rcu(&e->e_rcu, __gen_kill_estimator);
^ permalink raw reply
* Re: [PATCH] ax25: Add missing dev_put in ax25_setsockopt
From: David Miller @ 2009-09-28 19:26 UTC (permalink / raw)
To: ralf; +Cc: jarkao2, f6bvp, bernard.pidoux, netdev, linux-hams
In-Reply-To: <20090928125313.GA14250@linux-mips.org>
From: Ralf Baechle <ralf@linux-mips.org>
Date: Mon, 28 Sep 2009 13:53:13 +0100
> ax25_setsockopt SO_BINDTODEVICE is missing a dev_put call in case of
> success. Re-order code to fix this bug. While at it also reformat two
> lines of code to comply with the Linux coding style.
>
> Initial patch by Jarek Poplawski <jarkao2@gmail.com>.
>
> Reported-by: Bernard Pidoux F6BVP <f6bvp@free.fr>
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
>
> ---
> Counter-proposal. Reordering all the code avoids the need for a 2nd dev_put
> and is more readable.
Looks good to me, applied.
^ permalink raw reply
* Re: [PATCH] get rid of read/write lock in gen_estimator
From: David Miller @ 2009-09-28 19:42 UTC (permalink / raw)
To: eric.dumazet; +Cc: shemminger, netdev
In-Reply-To: <4AC10574.6070406@gmail.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 28 Sep 2009 20:50:28 +0200
> Stephen Hemminger a écrit :
>> Don't need a read/write lock here sinc there already is a spin lock that
>> is being acquired.
>>
>> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
...
>> @@ -270,9 +265,9 @@ void gen_kill_estimator(struct gnet_stat
>> while ((e = gen_find_node(bstats, rate_est))) {
>> rb_erase(&e->node, &est_root);
>>
>> - write_lock_bh(&est_lock);
>> + spin_lock(e->stats_lock);
>
> Are you sure _bh() variant is not needed here ?
Right, that need to be fixed to be spin_lock_bh() and spin_unlock_bh()
in the next hunk.
^ permalink raw reply
* Re: [PATCH] atm: dereference of he_dev->rbps_virt in he_init_group()
From: David Miller @ 2009-09-28 19:46 UTC (permalink / raw)
To: roel.kluin; +Cc: joe, chas, linux-atm-general, netdev, akpm
In-Reply-To: <4AC07AC3.1090707@gmail.com>
From: Roel Kluin <roel.kluin@gmail.com>
Date: Mon, 28 Sep 2009 10:58:43 +0200
> From: Juha Leppanen <juha_motorsportcom@luukku.com>
> Date: Sat, Sep 26, 2009 at 12:34 AM
> Subject: atm: he: memleak/negative indexing of arrays in he_init_group()
>
> The prefix decrement causes a very long loop if pci_pool_alloc() failed
> in the first iteration. Also I swapped rbps and rbpl arguments.
>
> Reported-by: Juha Leppanen <juha_motorsportcom@luukku.com>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Applied, thanks.
Note that, by putting that From: line with Juha's info in it,
I assume that you want this person to be listed as the author
of the patch instead of you.
^ permalink raw reply
* Re: [PATCH] isdn: fix netjet/isdnhdlc build errors
From: David Miller @ 2009-09-28 19:47 UTC (permalink / raw)
To: randy.dunlap; +Cc: torvalds, linux-kernel, keil, netdev
In-Reply-To: <20090928092520.b6f921de.randy.dunlap@oracle.com>
From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Mon, 28 Sep 2009 09:25:20 -0700
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Commit cb3824bade2549d7ad059d5802da43312540fdee didn't fix this problem.
>
> Fix build errors in netjet, using isdnhdlc module:
...
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Since Karsten has been unresonspive to ISDN stuff for weeks,
I'm going to apply this directly.
Thanks!
^ permalink raw reply
* Re: [PATCH 9/9] Add explicit bound checks in net/socket.c
From: David Miller @ 2009-09-28 19:57 UTC (permalink / raw)
To: arjan; +Cc: gorcunov, linux-kernel, torvalds, mingo, netdev
In-Reply-To: <20090926212302.0ce64a5c@infradead.org>
From: Arjan van de Ven <arjan@infradead.org>
Date: Sat, 26 Sep 2009 21:23:02 +0200
> The sys_socketcall() function has a very clever system for the copy
> size of its arguments. Unfortunately, gcc cannot deal with this in
> terms of proving that the copy_from_user() is then always in bounds.
> This is the last (well 9th of this series, but last in the kernel) such
> case around.
>
> With this patch, we can turn on code to make having the boundary provably
> right for the whole kernel, and detect introduction of new security
> accidents of this type early on.
>
> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Applied, thanks.
^ permalink raw reply
* Re: [2.6.31-git17] WARNING: at kernel/hrtimer.c:648 hres_timers_resume+0x40/0x50()/WARNING: at drivers/base/sys.c:353 __sysdev_resume+0xc3/0xe0()
From: Maciej Rutecki @ 2009-09-28 20:08 UTC (permalink / raw)
To: Yong Zhang
Cc: Linux Kernel Mailing List, Rafael J. Wysocki, clemens,
venkatesh.pallipadi, gregkh, zambrano, davem, netdev
In-Reply-To: <8db1092f0909281138t18a379d1qdf999b0610ed6414@mail.gmail.com>
2009/9/28 Maciej Rutecki <maciej.rutecki@gmail.com>:
>
> Add patch and remove previous:
> http://unixy.pl/maciek/download/kernel/2.6.31-git17/gumis/dmesg-debug.txt
>
> s2disk&resume twice.
>
> no "timekeeping_resume() called with IRQs enabled!".
>
> I found some interesting thing, warnings appear only once, during
> first s2disk, on second don't appear.
Already I test 2.6-32-rc1 few times; warnings has gone. Any patches
has been add since 2.6.31-git17?
Regards
--
Maciej Rutecki
http://www.maciek.unixy.pl
^ permalink raw reply
* Re: 2.6.31 regression: e1000e jumbo frames no longer work: 'Unsupported MTU setting'
From: Nix @ 2009-09-28 20:51 UTC (permalink / raw)
To: Alexander Duyck; +Cc: e1000-devel, netdev, bruce.w.allan, linux-kernel
In-Reply-To: <5f2db9d90909261914l3a927f4cya1dc5e4548688bce@mail.gmail.com>
On 27 Sep 2009, Alexander Duyck said:
> It looks like the problem is that the 82574 and 82583 seem to have
> their max_hw_frame_size values swapped. You might try applying the
> patch below. I am not sure if it will apply since I hand generated it
Applies fine: works fine. Thank you!
> using the git patch that seems to have introduced the problem, and I
> am sending the patch through an untested account that may mangle the
> patch.
Unmangled.
> I will see about submitting an official patch for this
> sometime next few days.
I wonder if this belongs in -stable? People with an 82574 who are using
jumbo frames may well find their networks not coming up, if like me
they set a bunch of properties in one /sbin/ip call.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
^ permalink raw reply
* Re: tg3: Badness at kernel/mutex.c:207
From: Matt Carlson @ 2009-09-28 20:51 UTC (permalink / raw)
To: Felix Radensky; +Cc: netdev@vger.kernel.org
In-Reply-To: <4ABE85B9.3020304@embedded-sol.com>
On Sat, Sep 26, 2009 at 02:20:57PM -0700, Felix Radensky wrote:
> Hi,
>
> I'm running linux-2.6.31 on a custom MPC8536 based board with BCM57760 chip.
> Both tg3 driver, and Broadcom PHY driver are modules.
>
> Each time I run ifconfig eth2 up, I get the following error message:
>
> Badness at kernel/mutex.c:207
> NIP: c025132c LR: c0251314 CTR: c0251334
> REGS: efbedbd0 TRAP: 0700 Not tainted (2.6.31)
> MSR: 00029000 <EE,ME,CE> CR: 24020422 XER: 00000000
> TASK = efacce10[1080] 'ifconfig' THREAD: efbec000
> GPR00: 00000000 efbedc80 efacce10 00000001 00007020 00000002 00000000
> 00000200
> GPR08: 00029000 c0350000 c0330000 00000001 24020424 10057d94 000002a0
> 1000d82c
> GPR16: 1000d81c 1000d814 10010000 10050000 ef897a0c efbede18 ffff8914
> ef897a00
> GPR24: 00008000 c034b480 efbec000 efb0122c c0350000 efacce10 ef82d2c0
> efb01228
> NIP [c025132c] __mutex_lock_slowpath+0x1f0/0x1f8
> LR [c0251314] __mutex_lock_slowpath+0x1d8/0x1f8
> Call Trace:
> [efbedcd0] [c025134c] mutex_lock+0x18/0x34
> [efbedcf0] [f534a228] tg3_chip_reset+0x7cc/0x9f8 [tg3]
> [efbedd20] [f534a8f0] tg3_reset_hw+0x58/0x2360 [tg3]
> [efbedd70] [f5351dd4] tg3_open+0x610/0x910 [tg3]
> [efbeddb0] [c01e1c6c] dev_open+0x100/0x138
> [efbeddd0] [c01dff20] dev_change_flags+0x80/0x1ac
> [efbeddf0] [c02232cc] devinet_ioctl+0x648/0x824
> [efbede60] [c0223de4] inet_ioctl+0xcc/0xf8
> [efbede70] [c01cdf44] sock_ioctl+0x60/0x300
> [efbede90] [c008a35c] vfs_ioctl+0x34/0x8c
> [efbedea0] [c008a580] do_vfs_ioctl+0x88/0x724
> [efbedf10] [c008ac5c] sys_ioctl+0x40/0x74
> [efbedf40] [c000f814] ret_from_syscall+0x0/0x3c
> Instruction dump:
> 0fe00000 4bfffe80 801a000c 5409016f 4182fe60 4bf0f6d9 2f830000 41befe54
> 3d20c035 8009c2c0 2f800000 40befe44 <0fe00000> 4bfffe3c 9421ffe0 7c0802a6
>
> Does it indicate a real problem, or something that can be ignored ?
>
> Additional information from kernel log:
>
> tg3.c:v3.99 (April 20, 2009)
> tg3 0002:05:00.0: enabling bus mastering
> tg3 0002:05:00.0: PME# disabled
> tg3 mdio bus: probed
> eth2: Tigon3 [partno(BCM57760) rev 57780001] (PCI Express) MAC address
> 00:10:18:00:00:00
> eth2: attached PHY driver [Broadcom BCM57780] (mii_bus:phy_addr=500:01)
> eth2: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1]
> eth2: dma_rwctrl[76180000] dma_mask[64-bit]
> tg3 0002:05:00.0: PME# disabled
Yes, this is a real problem. The driver is taking the MDIO bus lock
while holding the device's own spinlock. I think I may have a
workaround. Let me test it and get back to you.
^ permalink raw reply
* Re: tg3 and Broadcom PHY driver
From: Matt Carlson @ 2009-09-28 20:52 UTC (permalink / raw)
To: Felix Radensky; +Cc: netdev@vger.kernel.org
In-Reply-To: <4ABE8862.3060308@embedded-sol.com>
On Sat, Sep 26, 2009 at 02:32:18PM -0700, Felix Radensky wrote:
> Hi,
>
> I've noticed that in linux-2.6.31 I have to make tg3 driver modular, due to
> its dependency on Broadcom PHY driver. If both tg3 and PHY driver are
> compiled into the kernel, tg3 fails to detect a PHY, apparently because PHY
> driver is loaded later. I'm using BCM57760 on embedded powerpc platform
> (MPC8536).
>
> How can I make tg3 work when it's compiled into the kernel ?
>
> Thanks.
Is the broadcom module also compiled into the kernel?
^ permalink raw reply
* Re: tg3 and Broadcom PHY driver
From: Felix Radensky @ 2009-09-28 20:53 UTC (permalink / raw)
To: Matt Carlson; +Cc: netdev@vger.kernel.org
In-Reply-To: <20090928205226.GB12652@xw6200.broadcom.net>
Hi, Matt
Matt Carlson wrote:
> On Sat, Sep 26, 2009 at 02:32:18PM -0700, Felix Radensky wrote:
>
>> Hi,
>>
>> I've noticed that in linux-2.6.31 I have to make tg3 driver modular, due to
>> its dependency on Broadcom PHY driver. If both tg3 and PHY driver are
>> compiled into the kernel, tg3 fails to detect a PHY, apparently because PHY
>> driver is loaded later. I'm using BCM57760 on embedded powerpc platform
>> (MPC8536).
>>
>> How can I make tg3 work when it's compiled into the kernel ?
>>
>> Thanks.
>>
>
> Is the broadcom module also compiled into the kernel?
>
>
Yes.
^ permalink raw reply
* Re: [2.6.31-git17] WARNING: at kernel/hrtimer.c:648 hres_timers_resume+0x40/0x50()/WARNING: at drivers/base/sys.c:353 __sysdev_resume+0xc3/0xe0()
From: Rafael J. Wysocki @ 2009-09-28 21:13 UTC (permalink / raw)
To: Maciej Rutecki
Cc: Yong Zhang, Linux Kernel Mailing List, clemens,
venkatesh.pallipadi, gregkh, zambrano, davem, netdev
In-Reply-To: <8db1092f0909281308s36c35c80s65c18dcbcf9fff2b@mail.gmail.com>
On Monday 28 September 2009, Maciej Rutecki wrote:
> 2009/9/28 Maciej Rutecki <maciej.rutecki@gmail.com>:
> >
> > Add patch and remove previous:
> > http://unixy.pl/maciek/download/kernel/2.6.31-git17/gumis/dmesg-debug.txt
> >
> > s2disk&resume twice.
> >
> > no "timekeeping_resume() called with IRQs enabled!".
> >
> > I found some interesting thing, warnings appear only once, during
> > first s2disk, on second don't appear.
>
> Already I test 2.6-32-rc1 few times; warnings has gone. Any patches
> has been add since 2.6.31-git17?
Quite some of them, actually.
Thanks,
Rafael
^ permalink raw reply
* Re: tg3 and Broadcom PHY driver
From: David Miller @ 2009-09-28 21:15 UTC (permalink / raw)
To: felix; +Cc: mcarlson, netdev
In-Reply-To: <4AC1223B.8070903@embedded-sol.com>
From: Felix Radensky <felix@embedded-sol.com>
Date: Mon, 28 Sep 2009 22:53:15 +0200
> Hi, Matt
>
> Matt Carlson wrote:
>> On Sat, Sep 26, 2009 at 02:32:18PM -0700, Felix Radensky wrote:
>>
>> Is the broadcom module also compiled into the kernel?
>>
>>
> Yes.
I bet this is all because the tg3 driver is linked into the kernel
before the PHY layer and drivers subdirectory or something like that.
Link order determines the order in which built-in initializations
occur (within the same init type).
^ permalink raw reply
* pull request: wireless-2.6 2009-09-28
From: John W. Linville @ 2009-09-28 21:40 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev, linux-kernel
Dave,
This group of fixes is intended for the 2.6.32 train...
There are number of small fixes to core wireless infrastructure from
Johannes Berg. These have been bounced around on the list quite a bit
during the last several days, so I think they are solid. Also included
is one that improves some debugging messages.
There are a few fixes for the iwlwifi family of drivers, including a
buffer overrun, a memory leak, and another debugging message fix.
Arjan showed-up with a bounds checking fix in some ancient wext code. I
included it due to the potential security implications.
The sony-laptop fixes may seem a bit out of place, but they are related
to rfkill. Also, they are "Acked-by: Mattia Dongili <malattia@linux.it>",
who is the listed maintainer for that code. I put them at the end, so
if you want you can pull from 8f1546cadf7ac5e9a40d54089a1c7302264ec49b
instead of master.
Please let me know if there are problems!
Thanks,
John
---
Individual patches are available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/
---
The following changes since commit d1f8297a96b0d70f17704296a6666468f2087ce6:
Sascha Hlusiak (1):
Revert "sit: stateless autoconf for isatap"
are available in the git repository at:
ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master
Alan Jenkins (2):
sony-laptop: check for rfkill hard block at load time
sony-laptop: re-read the rfkill state when resuming from suspend
Arjan van de Ven (1):
wext: Add bound checks for copy_from_user
Johannes Berg (5):
cfg80211: wext: don't display BSSID unless associated
cfg80211: don't set privacy w/o key
cfg80211: always get BSS
mac80211: improve/fix mlme messages
wext: add back wireless/ dir in sysfs for cfg80211 interfaces
Reinette Chatre (3):
iwlwifi: fix debugfs buffer handling
iwlwifi: fix memory leak in command queue handling
iwlwifi: fix 3945 ucode info retrieval after failure
drivers/net/wireless/iwlwifi/iwl-1000.c | 2 +
drivers/net/wireless/iwlwifi/iwl-3945.c | 2 +
drivers/net/wireless/iwlwifi/iwl-3945.h | 2 +
drivers/net/wireless/iwlwifi/iwl-4965.c | 2 +
drivers/net/wireless/iwlwifi/iwl-5000.c | 4 +
drivers/net/wireless/iwlwifi/iwl-6000.c | 2 +
drivers/net/wireless/iwlwifi/iwl-agn.c | 185 ++++++++++++++++++++++++++
drivers/net/wireless/iwlwifi/iwl-core.c | 187 +--------------------------
drivers/net/wireless/iwlwifi/iwl-core.h | 14 ++
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 8 +-
drivers/net/wireless/iwlwifi/iwl-tx.c | 6 +
drivers/net/wireless/iwlwifi/iwl3945-base.c | 31 ++---
drivers/platform/x86/sony-laptop.c | 9 ++
include/net/wext.h | 1 +
net/core/net-sysfs.c | 12 +-
net/mac80211/mlme.c | 18 ++--
net/wireless/sme.c | 5 +-
net/wireless/wext-sme.c | 8 +-
net/wireless/wext.c | 11 +-
19 files changed, 274 insertions(+), 235 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index a95caa0..2716b91 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -99,6 +99,8 @@ static struct iwl_lib_ops iwl1000_lib = {
.setup_deferred_work = iwl5000_setup_deferred_work,
.is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
.load_ucode = iwl5000_load_ucode,
+ .dump_nic_event_log = iwl_dump_nic_event_log,
+ .dump_nic_error_log = iwl_dump_nic_error_log,
.init_alive_start = iwl5000_init_alive_start,
.alive_notify = iwl5000_alive_notify,
.send_tx_power = iwl5000_send_tx_power,
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index e9a685d..e70c5b0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -2839,6 +2839,8 @@ static struct iwl_lib_ops iwl3945_lib = {
.txq_free_tfd = iwl3945_hw_txq_free_tfd,
.txq_init = iwl3945_hw_tx_queue_init,
.load_ucode = iwl3945_load_bsm,
+ .dump_nic_event_log = iwl3945_dump_nic_event_log,
+ .dump_nic_error_log = iwl3945_dump_nic_error_log,
.apm_ops = {
.init = iwl3945_apm_init,
.reset = iwl3945_apm_reset,
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index f240369..21679bf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -209,6 +209,8 @@ extern int __must_check iwl3945_send_cmd(struct iwl_priv *priv,
struct iwl_host_cmd *cmd);
extern unsigned int iwl3945_fill_beacon_frame(struct iwl_priv *priv,
struct ieee80211_hdr *hdr,int left);
+extern void iwl3945_dump_nic_event_log(struct iwl_priv *priv);
+extern void iwl3945_dump_nic_error_log(struct iwl_priv *priv);
/*
* Currently used by iwl-3945-rs... look at restructuring so that it doesn't
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 3259b88..a22a050 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2298,6 +2298,8 @@ static struct iwl_lib_ops iwl4965_lib = {
.alive_notify = iwl4965_alive_notify,
.init_alive_start = iwl4965_init_alive_start,
.load_ucode = iwl4965_load_bsm,
+ .dump_nic_event_log = iwl_dump_nic_event_log,
+ .dump_nic_error_log = iwl_dump_nic_error_log,
.apm_ops = {
.init = iwl4965_apm_init,
.reset = iwl4965_apm_reset,
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index a6391c7..eb08f44 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -1535,6 +1535,8 @@ struct iwl_lib_ops iwl5000_lib = {
.rx_handler_setup = iwl5000_rx_handler_setup,
.setup_deferred_work = iwl5000_setup_deferred_work,
.is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
+ .dump_nic_event_log = iwl_dump_nic_event_log,
+ .dump_nic_error_log = iwl_dump_nic_error_log,
.load_ucode = iwl5000_load_ucode,
.init_alive_start = iwl5000_init_alive_start,
.alive_notify = iwl5000_alive_notify,
@@ -1585,6 +1587,8 @@ static struct iwl_lib_ops iwl5150_lib = {
.rx_handler_setup = iwl5000_rx_handler_setup,
.setup_deferred_work = iwl5000_setup_deferred_work,
.is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
+ .dump_nic_event_log = iwl_dump_nic_event_log,
+ .dump_nic_error_log = iwl_dump_nic_error_log,
.load_ucode = iwl5000_load_ucode,
.init_alive_start = iwl5000_init_alive_start,
.alive_notify = iwl5000_alive_notify,
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 82b9c93..c295b8e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -100,6 +100,8 @@ static struct iwl_lib_ops iwl6000_lib = {
.setup_deferred_work = iwl5000_setup_deferred_work,
.is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
.load_ucode = iwl5000_load_ucode,
+ .dump_nic_event_log = iwl_dump_nic_event_log,
+ .dump_nic_error_log = iwl_dump_nic_error_log,
.init_alive_start = iwl5000_init_alive_start,
.alive_notify = iwl5000_alive_notify,
.send_tx_power = iwl5000_send_tx_power,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 00457bf..cdc07c4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1526,6 +1526,191 @@ static int iwl_read_ucode(struct iwl_priv *priv)
return ret;
}
+#ifdef CONFIG_IWLWIFI_DEBUG
+static const char *desc_lookup_text[] = {
+ "OK",
+ "FAIL",
+ "BAD_PARAM",
+ "BAD_CHECKSUM",
+ "NMI_INTERRUPT_WDG",
+ "SYSASSERT",
+ "FATAL_ERROR",
+ "BAD_COMMAND",
+ "HW_ERROR_TUNE_LOCK",
+ "HW_ERROR_TEMPERATURE",
+ "ILLEGAL_CHAN_FREQ",
+ "VCC_NOT_STABLE",
+ "FH_ERROR",
+ "NMI_INTERRUPT_HOST",
+ "NMI_INTERRUPT_ACTION_PT",
+ "NMI_INTERRUPT_UNKNOWN",
+ "UCODE_VERSION_MISMATCH",
+ "HW_ERROR_ABS_LOCK",
+ "HW_ERROR_CAL_LOCK_FAIL",
+ "NMI_INTERRUPT_INST_ACTION_PT",
+ "NMI_INTERRUPT_DATA_ACTION_PT",
+ "NMI_TRM_HW_ER",
+ "NMI_INTERRUPT_TRM",
+ "NMI_INTERRUPT_BREAK_POINT"
+ "DEBUG_0",
+ "DEBUG_1",
+ "DEBUG_2",
+ "DEBUG_3",
+ "UNKNOWN"
+};
+
+static const char *desc_lookup(int i)
+{
+ int max = ARRAY_SIZE(desc_lookup_text) - 1;
+
+ if (i < 0 || i > max)
+ i = max;
+
+ return desc_lookup_text[i];
+}
+
+#define ERROR_START_OFFSET (1 * sizeof(u32))
+#define ERROR_ELEM_SIZE (7 * sizeof(u32))
+
+void iwl_dump_nic_error_log(struct iwl_priv *priv)
+{
+ u32 data2, line;
+ u32 desc, time, count, base, data1;
+ u32 blink1, blink2, ilink1, ilink2;
+
+ if (priv->ucode_type == UCODE_INIT)
+ base = le32_to_cpu(priv->card_alive_init.error_event_table_ptr);
+ else
+ base = le32_to_cpu(priv->card_alive.error_event_table_ptr);
+
+ if (!priv->cfg->ops->lib->is_valid_rtc_data_addr(base)) {
+ IWL_ERR(priv, "Not valid error log pointer 0x%08X\n", base);
+ return;
+ }
+
+ count = iwl_read_targ_mem(priv, base);
+
+ if (ERROR_START_OFFSET <= count * ERROR_ELEM_SIZE) {
+ IWL_ERR(priv, "Start IWL Error Log Dump:\n");
+ IWL_ERR(priv, "Status: 0x%08lX, count: %d\n",
+ priv->status, count);
+ }
+
+ desc = iwl_read_targ_mem(priv, base + 1 * sizeof(u32));
+ blink1 = iwl_read_targ_mem(priv, base + 3 * sizeof(u32));
+ blink2 = iwl_read_targ_mem(priv, base + 4 * sizeof(u32));
+ ilink1 = iwl_read_targ_mem(priv, base + 5 * sizeof(u32));
+ ilink2 = iwl_read_targ_mem(priv, base + 6 * sizeof(u32));
+ data1 = iwl_read_targ_mem(priv, base + 7 * sizeof(u32));
+ data2 = iwl_read_targ_mem(priv, base + 8 * sizeof(u32));
+ line = iwl_read_targ_mem(priv, base + 9 * sizeof(u32));
+ time = iwl_read_targ_mem(priv, base + 11 * sizeof(u32));
+
+ IWL_ERR(priv, "Desc Time "
+ "data1 data2 line\n");
+ IWL_ERR(priv, "%-28s (#%02d) %010u 0x%08X 0x%08X %u\n",
+ desc_lookup(desc), desc, time, data1, data2, line);
+ IWL_ERR(priv, "blink1 blink2 ilink1 ilink2\n");
+ IWL_ERR(priv, "0x%05X 0x%05X 0x%05X 0x%05X\n", blink1, blink2,
+ ilink1, ilink2);
+
+}
+
+#define EVENT_START_OFFSET (4 * sizeof(u32))
+
+/**
+ * iwl_print_event_log - Dump error event log to syslog
+ *
+ */
+static void iwl_print_event_log(struct iwl_priv *priv, u32 start_idx,
+ u32 num_events, u32 mode)
+{
+ u32 i;
+ u32 base; /* SRAM byte address of event log header */
+ u32 event_size; /* 2 u32s, or 3 u32s if timestamp recorded */
+ u32 ptr; /* SRAM byte address of log data */
+ u32 ev, time, data; /* event log data */
+
+ if (num_events == 0)
+ return;
+ if (priv->ucode_type == UCODE_INIT)
+ base = le32_to_cpu(priv->card_alive_init.log_event_table_ptr);
+ else
+ base = le32_to_cpu(priv->card_alive.log_event_table_ptr);
+
+ if (mode == 0)
+ event_size = 2 * sizeof(u32);
+ else
+ event_size = 3 * sizeof(u32);
+
+ ptr = base + EVENT_START_OFFSET + (start_idx * event_size);
+
+ /* "time" is actually "data" for mode 0 (no timestamp).
+ * place event id # at far right for easier visual parsing. */
+ for (i = 0; i < num_events; i++) {
+ ev = iwl_read_targ_mem(priv, ptr);
+ ptr += sizeof(u32);
+ time = iwl_read_targ_mem(priv, ptr);
+ ptr += sizeof(u32);
+ if (mode == 0) {
+ /* data, ev */
+ IWL_ERR(priv, "EVT_LOG:0x%08x:%04u\n", time, ev);
+ } else {
+ data = iwl_read_targ_mem(priv, ptr);
+ ptr += sizeof(u32);
+ IWL_ERR(priv, "EVT_LOGT:%010u:0x%08x:%04u\n",
+ time, data, ev);
+ }
+ }
+}
+
+void iwl_dump_nic_event_log(struct iwl_priv *priv)
+{
+ u32 base; /* SRAM byte address of event log header */
+ u32 capacity; /* event log capacity in # entries */
+ u32 mode; /* 0 - no timestamp, 1 - timestamp recorded */
+ u32 num_wraps; /* # times uCode wrapped to top of log */
+ u32 next_entry; /* index of next entry to be written by uCode */
+ u32 size; /* # entries that we'll print */
+
+ if (priv->ucode_type == UCODE_INIT)
+ base = le32_to_cpu(priv->card_alive_init.log_event_table_ptr);
+ else
+ base = le32_to_cpu(priv->card_alive.log_event_table_ptr);
+
+ if (!priv->cfg->ops->lib->is_valid_rtc_data_addr(base)) {
+ IWL_ERR(priv, "Invalid event log pointer 0x%08X\n", base);
+ return;
+ }
+
+ /* event log header */
+ capacity = iwl_read_targ_mem(priv, base);
+ mode = iwl_read_targ_mem(priv, base + (1 * sizeof(u32)));
+ num_wraps = iwl_read_targ_mem(priv, base + (2 * sizeof(u32)));
+ next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32)));
+
+ size = num_wraps ? capacity : next_entry;
+
+ /* bail out if nothing in log */
+ if (size == 0) {
+ IWL_ERR(priv, "Start IWL Event Log Dump: nothing in log\n");
+ return;
+ }
+
+ IWL_ERR(priv, "Start IWL Event Log Dump: display count %d, wraps %d\n",
+ size, num_wraps);
+
+ /* if uCode has wrapped back to top of log, start at the oldest entry,
+ * i.e the next one that uCode would fill. */
+ if (num_wraps)
+ iwl_print_event_log(priv, next_entry,
+ capacity - next_entry, mode);
+ /* (then/else) start at top of log */
+ iwl_print_event_log(priv, 0, next_entry, mode);
+
+}
+#endif
+
/**
* iwl_alive_start - called after REPLY_ALIVE notification received
* from protocol/runtime uCode (initialization uCode's
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index fd26c0d..484d5c1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1309,189 +1309,6 @@ static void iwl_print_rx_config_cmd(struct iwl_priv *priv)
IWL_DEBUG_RADIO(priv, "u8[6] bssid_addr: %pM\n", rxon->bssid_addr);
IWL_DEBUG_RADIO(priv, "u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id));
}
-
-static const char *desc_lookup_text[] = {
- "OK",
- "FAIL",
- "BAD_PARAM",
- "BAD_CHECKSUM",
- "NMI_INTERRUPT_WDG",
- "SYSASSERT",
- "FATAL_ERROR",
- "BAD_COMMAND",
- "HW_ERROR_TUNE_LOCK",
- "HW_ERROR_TEMPERATURE",
- "ILLEGAL_CHAN_FREQ",
- "VCC_NOT_STABLE",
- "FH_ERROR",
- "NMI_INTERRUPT_HOST",
- "NMI_INTERRUPT_ACTION_PT",
- "NMI_INTERRUPT_UNKNOWN",
- "UCODE_VERSION_MISMATCH",
- "HW_ERROR_ABS_LOCK",
- "HW_ERROR_CAL_LOCK_FAIL",
- "NMI_INTERRUPT_INST_ACTION_PT",
- "NMI_INTERRUPT_DATA_ACTION_PT",
- "NMI_TRM_HW_ER",
- "NMI_INTERRUPT_TRM",
- "NMI_INTERRUPT_BREAK_POINT"
- "DEBUG_0",
- "DEBUG_1",
- "DEBUG_2",
- "DEBUG_3",
- "UNKNOWN"
-};
-
-static const char *desc_lookup(int i)
-{
- int max = ARRAY_SIZE(desc_lookup_text) - 1;
-
- if (i < 0 || i > max)
- i = max;
-
- return desc_lookup_text[i];
-}
-
-#define ERROR_START_OFFSET (1 * sizeof(u32))
-#define ERROR_ELEM_SIZE (7 * sizeof(u32))
-
-static void iwl_dump_nic_error_log(struct iwl_priv *priv)
-{
- u32 data2, line;
- u32 desc, time, count, base, data1;
- u32 blink1, blink2, ilink1, ilink2;
-
- if (priv->ucode_type == UCODE_INIT)
- base = le32_to_cpu(priv->card_alive_init.error_event_table_ptr);
- else
- base = le32_to_cpu(priv->card_alive.error_event_table_ptr);
-
- if (!priv->cfg->ops->lib->is_valid_rtc_data_addr(base)) {
- IWL_ERR(priv, "Not valid error log pointer 0x%08X\n", base);
- return;
- }
-
- count = iwl_read_targ_mem(priv, base);
-
- if (ERROR_START_OFFSET <= count * ERROR_ELEM_SIZE) {
- IWL_ERR(priv, "Start IWL Error Log Dump:\n");
- IWL_ERR(priv, "Status: 0x%08lX, count: %d\n",
- priv->status, count);
- }
-
- desc = iwl_read_targ_mem(priv, base + 1 * sizeof(u32));
- blink1 = iwl_read_targ_mem(priv, base + 3 * sizeof(u32));
- blink2 = iwl_read_targ_mem(priv, base + 4 * sizeof(u32));
- ilink1 = iwl_read_targ_mem(priv, base + 5 * sizeof(u32));
- ilink2 = iwl_read_targ_mem(priv, base + 6 * sizeof(u32));
- data1 = iwl_read_targ_mem(priv, base + 7 * sizeof(u32));
- data2 = iwl_read_targ_mem(priv, base + 8 * sizeof(u32));
- line = iwl_read_targ_mem(priv, base + 9 * sizeof(u32));
- time = iwl_read_targ_mem(priv, base + 11 * sizeof(u32));
-
- IWL_ERR(priv, "Desc Time "
- "data1 data2 line\n");
- IWL_ERR(priv, "%-28s (#%02d) %010u 0x%08X 0x%08X %u\n",
- desc_lookup(desc), desc, time, data1, data2, line);
- IWL_ERR(priv, "blink1 blink2 ilink1 ilink2\n");
- IWL_ERR(priv, "0x%05X 0x%05X 0x%05X 0x%05X\n", blink1, blink2,
- ilink1, ilink2);
-
-}
-
-#define EVENT_START_OFFSET (4 * sizeof(u32))
-
-/**
- * iwl_print_event_log - Dump error event log to syslog
- *
- */
-static void iwl_print_event_log(struct iwl_priv *priv, u32 start_idx,
- u32 num_events, u32 mode)
-{
- u32 i;
- u32 base; /* SRAM byte address of event log header */
- u32 event_size; /* 2 u32s, or 3 u32s if timestamp recorded */
- u32 ptr; /* SRAM byte address of log data */
- u32 ev, time, data; /* event log data */
-
- if (num_events == 0)
- return;
- if (priv->ucode_type == UCODE_INIT)
- base = le32_to_cpu(priv->card_alive_init.log_event_table_ptr);
- else
- base = le32_to_cpu(priv->card_alive.log_event_table_ptr);
-
- if (mode == 0)
- event_size = 2 * sizeof(u32);
- else
- event_size = 3 * sizeof(u32);
-
- ptr = base + EVENT_START_OFFSET + (start_idx * event_size);
-
- /* "time" is actually "data" for mode 0 (no timestamp).
- * place event id # at far right for easier visual parsing. */
- for (i = 0; i < num_events; i++) {
- ev = iwl_read_targ_mem(priv, ptr);
- ptr += sizeof(u32);
- time = iwl_read_targ_mem(priv, ptr);
- ptr += sizeof(u32);
- if (mode == 0) {
- /* data, ev */
- IWL_ERR(priv, "EVT_LOG:0x%08x:%04u\n", time, ev);
- } else {
- data = iwl_read_targ_mem(priv, ptr);
- ptr += sizeof(u32);
- IWL_ERR(priv, "EVT_LOGT:%010u:0x%08x:%04u\n",
- time, data, ev);
- }
- }
-}
-
-void iwl_dump_nic_event_log(struct iwl_priv *priv)
-{
- u32 base; /* SRAM byte address of event log header */
- u32 capacity; /* event log capacity in # entries */
- u32 mode; /* 0 - no timestamp, 1 - timestamp recorded */
- u32 num_wraps; /* # times uCode wrapped to top of log */
- u32 next_entry; /* index of next entry to be written by uCode */
- u32 size; /* # entries that we'll print */
-
- if (priv->ucode_type == UCODE_INIT)
- base = le32_to_cpu(priv->card_alive_init.log_event_table_ptr);
- else
- base = le32_to_cpu(priv->card_alive.log_event_table_ptr);
-
- if (!priv->cfg->ops->lib->is_valid_rtc_data_addr(base)) {
- IWL_ERR(priv, "Invalid event log pointer 0x%08X\n", base);
- return;
- }
-
- /* event log header */
- capacity = iwl_read_targ_mem(priv, base);
- mode = iwl_read_targ_mem(priv, base + (1 * sizeof(u32)));
- num_wraps = iwl_read_targ_mem(priv, base + (2 * sizeof(u32)));
- next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32)));
-
- size = num_wraps ? capacity : next_entry;
-
- /* bail out if nothing in log */
- if (size == 0) {
- IWL_ERR(priv, "Start IWL Event Log Dump: nothing in log\n");
- return;
- }
-
- IWL_ERR(priv, "Start IWL Event Log Dump: display count %d, wraps %d\n",
- size, num_wraps);
-
- /* if uCode has wrapped back to top of log, start at the oldest entry,
- * i.e the next one that uCode would fill. */
- if (num_wraps)
- iwl_print_event_log(priv, next_entry,
- capacity - next_entry, mode);
- /* (then/else) start at top of log */
- iwl_print_event_log(priv, 0, next_entry, mode);
-
-}
#endif
/**
* iwl_irq_handle_error - called for HW or SW error interrupt from card
@@ -1506,8 +1323,8 @@ void iwl_irq_handle_error(struct iwl_priv *priv)
#ifdef CONFIG_IWLWIFI_DEBUG
if (iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS) {
- iwl_dump_nic_error_log(priv);
- iwl_dump_nic_event_log(priv);
+ priv->cfg->ops->lib->dump_nic_error_log(priv);
+ priv->cfg->ops->lib->dump_nic_event_log(priv);
iwl_print_rx_config_cmd(priv);
}
#endif
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 7ff9ffb..e50103a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -166,6 +166,8 @@ struct iwl_lib_ops {
int (*is_valid_rtc_data_addr)(u32 addr);
/* 1st ucode load */
int (*load_ucode)(struct iwl_priv *priv);
+ void (*dump_nic_event_log)(struct iwl_priv *priv);
+ void (*dump_nic_error_log)(struct iwl_priv *priv);
/* power management */
struct iwl_apm_ops apm_ops;
@@ -540,7 +542,19 @@ int iwl_pci_resume(struct pci_dev *pdev);
/*****************************************************
* Error Handling Debugging
******************************************************/
+#ifdef CONFIG_IWLWIFI_DEBUG
void iwl_dump_nic_event_log(struct iwl_priv *priv);
+void iwl_dump_nic_error_log(struct iwl_priv *priv);
+#else
+static inline void iwl_dump_nic_event_log(struct iwl_priv *priv)
+{
+}
+
+static inline void iwl_dump_nic_error_log(struct iwl_priv *priv)
+{
+}
+#endif
+
void iwl_clear_isr_stats(struct iwl_priv *priv);
/*****************************************************
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index fb84485..a198bcf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -410,7 +410,7 @@ static ssize_t iwl_dbgfs_nvm_read(struct file *file,
pos += scnprintf(buf + pos, buf_size - pos, "0x%.4x ", ofs);
hex_dump_to_buffer(ptr + ofs, 16 , 16, 2, buf + pos,
buf_size - pos, 0);
- pos += strlen(buf);
+ pos += strlen(buf + pos);
if (buf_size - pos > 0)
buf[pos++] = '\n';
}
@@ -436,7 +436,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file,
if (sscanf(buf, "%d", &event_log_flag) != 1)
return -EFAULT;
if (event_log_flag == 1)
- iwl_dump_nic_event_log(priv);
+ priv->cfg->ops->lib->dump_nic_event_log(priv);
return count;
}
@@ -909,7 +909,7 @@ static ssize_t iwl_dbgfs_traffic_log_read(struct file *file,
"0x%.4x ", ofs);
hex_dump_to_buffer(ptr + ofs, 16, 16, 2,
buf + pos, bufsz - pos, 0);
- pos += strlen(buf);
+ pos += strlen(buf + pos);
if (bufsz - pos > 0)
buf[pos++] = '\n';
}
@@ -932,7 +932,7 @@ static ssize_t iwl_dbgfs_traffic_log_read(struct file *file,
"0x%.4x ", ofs);
hex_dump_to_buffer(ptr + ofs, 16, 16, 2,
buf + pos, bufsz - pos, 0);
- pos += strlen(buf);
+ pos += strlen(buf + pos);
if (bufsz - pos > 0)
buf[pos++] = '\n';
}
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index a7422e5..c189075 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -197,6 +197,12 @@ void iwl_cmd_queue_free(struct iwl_priv *priv)
pci_free_consistent(dev, priv->hw_params.tfd_size *
txq->q.n_bd, txq->tfds, txq->q.dma_addr);
+ /* deallocate arrays */
+ kfree(txq->cmd);
+ kfree(txq->meta);
+ txq->cmd = NULL;
+ txq->meta = NULL;
+
/* 0-fill queue descriptor structure */
memset(txq, 0, sizeof(*txq));
}
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 4f2d439..c390dbd 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1481,6 +1481,7 @@ static inline void iwl_synchronize_irq(struct iwl_priv *priv)
tasklet_kill(&priv->irq_tasklet);
}
+#ifdef CONFIG_IWLWIFI_DEBUG
static const char *desc_lookup(int i)
{
switch (i) {
@@ -1504,7 +1505,7 @@ static const char *desc_lookup(int i)
#define ERROR_START_OFFSET (1 * sizeof(u32))
#define ERROR_ELEM_SIZE (7 * sizeof(u32))
-static void iwl3945_dump_nic_error_log(struct iwl_priv *priv)
+void iwl3945_dump_nic_error_log(struct iwl_priv *priv)
{
u32 i;
u32 desc, time, count, base, data1;
@@ -1598,7 +1599,7 @@ static void iwl3945_print_event_log(struct iwl_priv *priv, u32 start_idx,
}
}
-static void iwl3945_dump_nic_event_log(struct iwl_priv *priv)
+void iwl3945_dump_nic_event_log(struct iwl_priv *priv)
{
u32 base; /* SRAM byte address of event log header */
u32 capacity; /* event log capacity in # entries */
@@ -1640,6 +1641,16 @@ static void iwl3945_dump_nic_event_log(struct iwl_priv *priv)
iwl3945_print_event_log(priv, 0, next_entry, mode);
}
+#else
+void iwl3945_dump_nic_event_log(struct iwl_priv *priv)
+{
+}
+
+void iwl3945_dump_nic_error_log(struct iwl_priv *priv)
+{
+}
+
+#endif
static void iwl3945_irq_tasklet(struct iwl_priv *priv)
{
@@ -3683,21 +3694,6 @@ static ssize_t dump_error_log(struct device *d,
static DEVICE_ATTR(dump_errors, S_IWUSR, NULL, dump_error_log);
-static ssize_t dump_event_log(struct device *d,
- struct device_attribute *attr,
- const char *buf, size_t count)
-{
- struct iwl_priv *priv = dev_get_drvdata(d);
- char *p = (char *)buf;
-
- if (p[0] == '1')
- iwl3945_dump_nic_event_log(priv);
-
- return strnlen(buf, count);
-}
-
-static DEVICE_ATTR(dump_events, S_IWUSR, NULL, dump_event_log);
-
/*****************************************************************************
*
* driver setup and tear down
@@ -3742,7 +3738,6 @@ static struct attribute *iwl3945_sysfs_entries[] = {
&dev_attr_antenna.attr,
&dev_attr_channels.attr,
&dev_attr_dump_errors.attr,
- &dev_attr_dump_events.attr,
&dev_attr_flags.attr,
&dev_attr_filter_flags.attr,
#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index f9f68e0..afdbdaa 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -1041,6 +1041,9 @@ static int sony_nc_resume(struct acpi_device *device)
sony_backlight_update_status(sony_backlight_device) < 0)
printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n");
+ /* re-read rfkill state */
+ sony_nc_rfkill_update();
+
return 0;
}
@@ -1078,6 +1081,8 @@ static int sony_nc_setup_rfkill(struct acpi_device *device,
struct rfkill *rfk;
enum rfkill_type type;
const char *name;
+ int result;
+ bool hwblock;
switch (nc_type) {
case SONY_WIFI:
@@ -1105,6 +1110,10 @@ static int sony_nc_setup_rfkill(struct acpi_device *device,
if (!rfk)
return -ENOMEM;
+ sony_call_snc_handle(0x124, 0x200, &result);
+ hwblock = !(result & 0x1);
+ rfkill_set_hw_state(rfk, hwblock);
+
err = rfkill_register(rfk);
if (err) {
rfkill_destroy(rfk);
diff --git a/include/net/wext.h b/include/net/wext.h
index 6d76a39..3f2b94d 100644
--- a/include/net/wext.h
+++ b/include/net/wext.h
@@ -14,6 +14,7 @@ extern int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cm
void __user *arg);
extern int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
unsigned long arg);
+extern struct iw_statistics *get_wireless_stats(struct net_device *dev);
#else
static inline int wext_proc_init(struct net *net)
{
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 7d4c575..821d309 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -16,7 +16,7 @@
#include <net/sock.h>
#include <linux/rtnetlink.h>
#include <linux/wireless.h>
-#include <net/iw_handler.h>
+#include <net/wext.h>
#include "net-sysfs.h"
@@ -363,15 +363,13 @@ static ssize_t wireless_show(struct device *d, char *buf,
char *))
{
struct net_device *dev = to_net_dev(d);
- const struct iw_statistics *iw = NULL;
+ const struct iw_statistics *iw;
ssize_t ret = -EINVAL;
read_lock(&dev_base_lock);
if (dev_isalive(dev)) {
- if (dev->wireless_handlers &&
- dev->wireless_handlers->get_wireless_stats)
- iw = dev->wireless_handlers->get_wireless_stats(dev);
- if (iw != NULL)
+ iw = get_wireless_stats(dev);
+ if (iw)
ret = (*format)(iw, buf);
}
read_unlock(&dev_base_lock);
@@ -505,7 +503,7 @@ int netdev_register_kobject(struct net_device *net)
*groups++ = &netstat_group;
#ifdef CONFIG_WIRELESS_EXT_SYSFS
- if (net->wireless_handlers && net->wireless_handlers->get_wireless_stats)
+ if (net->wireless_handlers || net->ieee80211_ptr)
*groups++ = &wireless_group;
#endif
#endif /* CONFIG_SYSFS */
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 97a278a..8d26e9b 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1388,8 +1388,8 @@ ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code);
- printk(KERN_DEBUG "%s: disassociated (Reason: %u)\n",
- sdata->dev->name, reason_code);
+ printk(KERN_DEBUG "%s: disassociated from %pM (Reason: %u)\n",
+ sdata->dev->name, mgmt->sa, reason_code);
ieee80211_set_disassoc(sdata, false);
return RX_MGMT_CFG80211_DISASSOC;
@@ -1675,7 +1675,7 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata,
/* direct probe may be part of the association flow */
if (wk && wk->state == IEEE80211_MGD_STATE_PROBE) {
- printk(KERN_DEBUG "%s direct probe responded\n",
+ printk(KERN_DEBUG "%s: direct probe responded\n",
sdata->dev->name);
wk->tries = 0;
wk->state = IEEE80211_MGD_STATE_AUTH;
@@ -2502,9 +2502,6 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
struct ieee80211_mgd_work *wk;
const u8 *bssid = NULL;
- printk(KERN_DEBUG "%s: deauthenticating by local choice (reason=%d)\n",
- sdata->dev->name, req->reason_code);
-
mutex_lock(&ifmgd->mtx);
if (ifmgd->associated && &ifmgd->associated->cbss == req->bss) {
@@ -2532,6 +2529,9 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
mutex_unlock(&ifmgd->mtx);
+ printk(KERN_DEBUG "%s: deauthenticating from %pM by local choice (reason=%d)\n",
+ sdata->dev->name, bssid, req->reason_code);
+
ieee80211_send_deauth_disassoc(sdata, bssid,
IEEE80211_STYPE_DEAUTH, req->reason_code,
cookie);
@@ -2545,9 +2545,6 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
- printk(KERN_DEBUG "%s: disassociating by local choice (reason=%d)\n",
- sdata->dev->name, req->reason_code);
-
mutex_lock(&ifmgd->mtx);
/*
@@ -2561,6 +2558,9 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
return -ENOLINK;
}
+ printk(KERN_DEBUG "%s: disassociating from %pM by local choice (reason=%d)\n",
+ sdata->dev->name, req->bss->bssid, req->reason_code);
+
ieee80211_set_disassoc(sdata, false);
mutex_unlock(&ifmgd->mtx);
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 7fae7ee..93c3ed3 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -762,9 +762,8 @@ int __cfg80211_connect(struct cfg80211_registered_device *rdev,
wdev->conn->params.ssid = wdev->ssid;
wdev->conn->params.ssid_len = connect->ssid_len;
- /* don't care about result -- but fill bssid & channel */
- if (!wdev->conn->params.bssid || !wdev->conn->params.channel)
- bss = cfg80211_get_conn_bss(wdev);
+ /* see if we have the bss already */
+ bss = cfg80211_get_conn_bss(wdev);
wdev->sme_state = CFG80211_SME_CONNECTING;
wdev->connect_keys = connkeys;
diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c
index bf72527..5615a88 100644
--- a/net/wireless/wext-sme.c
+++ b/net/wireless/wext-sme.c
@@ -30,7 +30,8 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev,
if (wdev->wext.keys) {
wdev->wext.keys->def = wdev->wext.default_key;
wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key;
- wdev->wext.connect.privacy = true;
+ if (wdev->wext.default_key != -1)
+ wdev->wext.connect.privacy = true;
}
if (!wdev->wext.connect.ssid_len)
@@ -229,8 +230,7 @@ int cfg80211_mgd_wext_giwessid(struct net_device *dev,
data->flags = 1;
data->length = wdev->wext.connect.ssid_len;
memcpy(ssid, wdev->wext.connect.ssid, data->length);
- } else
- data->flags = 0;
+ }
wdev_unlock(wdev);
return 0;
@@ -306,8 +306,6 @@ int cfg80211_mgd_wext_giwap(struct net_device *dev,
wdev_lock(wdev);
if (wdev->current_bss)
memcpy(ap_addr->sa_data, wdev->current_bss->pub.bssid, ETH_ALEN);
- else if (wdev->wext.connect.bssid)
- memcpy(ap_addr->sa_data, wdev->wext.connect.bssid, ETH_ALEN);
else
memset(ap_addr->sa_data, 0, ETH_ALEN);
wdev_unlock(wdev);
diff --git a/net/wireless/wext.c b/net/wireless/wext.c
index 5b4a0ce..60fe577 100644
--- a/net/wireless/wext.c
+++ b/net/wireless/wext.c
@@ -470,7 +470,7 @@ static iw_handler get_handler(struct net_device *dev, unsigned int cmd)
/*
* Get statistics out of the driver
*/
-static struct iw_statistics *get_wireless_stats(struct net_device *dev)
+struct iw_statistics *get_wireless_stats(struct net_device *dev)
{
/* New location */
if ((dev->wireless_handlers != NULL) &&
@@ -773,10 +773,13 @@ static int ioctl_standard_iw_point(struct iw_point *iwp, unsigned int cmd,
essid_compat = 1;
else if (IW_IS_SET(cmd) && (iwp->length != 0)) {
char essid[IW_ESSID_MAX_SIZE + 1];
+ unsigned int len;
+ len = iwp->length * descr->token_size;
- err = copy_from_user(essid, iwp->pointer,
- iwp->length *
- descr->token_size);
+ if (len > IW_ESSID_MAX_SIZE)
+ return -EFAULT;
+
+ err = copy_from_user(essid, iwp->pointer, len);
if (err)
return -EFAULT;
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply related
* Re: pull request: wireless-2.6 2009-09-28
From: David Miller @ 2009-09-28 21:51 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20090928214047.GF4737@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Mon, 28 Sep 2009 17:40:48 -0400
> There are number of small fixes to core wireless infrastructure from
> Johannes Berg. These have been bounced around on the list quite a bit
> during the last several days, so I think they are solid. Also included
> is one that improves some debugging messages.
>
> There are a few fixes for the iwlwifi family of drivers, including a
> buffer overrun, a memory leak, and another debugging message fix.
>
> Arjan showed-up with a bounds checking fix in some ancient wext code. I
> included it due to the potential security implications.
>
> The sony-laptop fixes may seem a bit out of place, but they are related
> to rfkill. Also, they are "Acked-by: Mattia Dongili <malattia@linux.it>",
> who is the listed maintainer for that code. I put them at the end, so
> if you want you can pull from 8f1546cadf7ac5e9a40d54089a1c7302264ec49b
> instead of master.
>
> Please let me know if there are problems!
Pulled, thanks a lot John!
^ permalink raw reply
* Re: tg3 and Broadcom PHY driver
From: Felix Radensky @ 2009-09-28 21:52 UTC (permalink / raw)
To: David Miller; +Cc: mcarlson, netdev
In-Reply-To: <20090928.141527.193009676.davem@davemloft.net>
Hi, David
David Miller wrote:
> From: Felix Radensky <felix@embedded-sol.com>
> Date: Mon, 28 Sep 2009 22:53:15 +0200
>
>
>> Hi, Matt
>>
>> Matt Carlson wrote:
>>
>>> On Sat, Sep 26, 2009 at 02:32:18PM -0700, Felix Radensky wrote:
>>>
>>> Is the broadcom module also compiled into the kernel?
>>>
>>>
>>>
>> Yes.
>>
>
> I bet this is all because the tg3 driver is linked into the kernel
> before the PHY layer and drivers subdirectory or something like that.
>
> Link order determines the order in which built-in initializations
> occur (within the same init type).
>
Yes, moving CONFIG_TIGON3 right after CONFIG_PHYLIB in drivers/net/Makefile
fixes the problem for me.
Thanks a lot.
Felix.
^ permalink raw reply
* Re: tg3 and Broadcom PHY driver
From: David Miller @ 2009-09-28 21:55 UTC (permalink / raw)
To: felix; +Cc: mcarlson, netdev
In-Reply-To: <4AC13036.8030506@embedded-sol.com>
From: Felix Radensky <felix@embedded-sol.com>
Date: Mon, 28 Sep 2009 23:52:54 +0200
> Yes, moving CONFIG_TIGON3 right after CONFIG_PHYLIB in
> drivers/net/Makefile fixes the problem for me.
Thanks for testing.
We really need to fix this generically.
Does anyone think that moving the MDIO/MII/PHY layer objects
to the top of drivers/net/Makefile will break anything?
If not, that's what we should do I think.
^ 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