* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: jamal @ 2010-03-31 13:06 UTC (permalink / raw)
To: Herbert Xu; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <20100331110345.GC12845@gondor.apana.org.au>
On Wed, 2010-03-31 at 19:03 +0800, Herbert Xu wrote:
> This seems to be bogus to me. Just because the DB was empty
> before the flush doesn't mean that the flush didn't happen.
Herbert, If a tree falls in a forest and no one is around to hear it,
does it make a sound? ;->
A flush event is meant to be a signal to user space that what
was once a non-empty table is now empty.
This is a consistent definition of the semantics everywhere tables
are flushed (not just in Linux)..
What makes the SPD and SAD speacial?
cheers,
jamal
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: Herbert Xu @ 2010-03-31 13:11 UTC (permalink / raw)
To: jamal; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <1270040773.26743.12.camel@bigi>
On Wed, Mar 31, 2010 at 09:06:13AM -0400, jamal wrote:
> On Wed, 2010-03-31 at 19:03 +0800, Herbert Xu wrote:
>
> > This seems to be bogus to me. Just because the DB was empty
> > before the flush doesn't mean that the flush didn't happen.
>
> Herbert, If a tree falls in a forest and no one is around to hear it,
> does it make a sound? ;->
> A flush event is meant to be a signal to user space that what
> was once a non-empty table is now empty.
I disagree. A flush event is a signal that someone has sent a
flush command. In any case we've had this semantics for years
and I haven't heard a good reason why this should be changed.
> This is a consistent definition of the semantics everywhere tables
> are flushed (not just in Linux)..
Please give specific examples in the kernel.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: Herbert Xu @ 2010-03-31 13:26 UTC (permalink / raw)
To: jamal; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <20100331131131.GA13793@gondor.apana.org.au>
On Wed, Mar 31, 2010 at 09:11:31PM +0800, Herbert Xu wrote:
>
> > This is a consistent definition of the semantics everywhere tables
> > are flushed (not just in Linux)..
>
> Please give specific examples in the kernel.
In fact the previous behaviour is also consistent with RFC2367:
3.1.9 SADB_FLUSH
The SADB_FLUSH message causes the kernel to delete all entries in its
key table for a certain sadb_msg_satype. Only the base header is
required for a flush message. If sadb_msg_satype is filled in with a
specific value, only associations of that type are deleted. If it is
filled in with SADB_SATYPE_UNSPEC, ALL associations are deleted.
The messaging behavior for SADB_FLUSH is:
Send an SADB_FLUSH message from a user process to the kernel.
<base>
The kernel will return an SADB_FLUSH message to all listening
sockets.
<base>
The reply message happens only after the actual flushing
of security associations has been attempted.
There is no special treatment for an empty DB.
Please send a revert.
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [PATCH 3/7] flow: allocate hash table for online cpus only
From: Timo Teräs @ 2010-03-31 13:27 UTC (permalink / raw)
To: Rusty Russell; +Cc: Herbert Xu, netdev
In-Reply-To: <201003312302.51683.rusty@rustcorp.com.au>
Rusty Russell wrote:
> On Tue, 30 Mar 2010 10:42:55 pm Herbert Xu wrote:
>> On Mon, Mar 29, 2010 at 05:12:40PM +0300, Timo Teras wrote:
>>> Instead of unconditionally allocating hash table for all possible
>>> cpu's, allocate it only for online cpu's and release related
>>> memory if cpu goes down.
>>>
>>> Signed-off-by: Timo Teras <timo.teras@iki.fi>
>> Hmm that's where we started but then Rusty changed it back in 2004:
>>
>> So I'd like to hear his opinion on changing it back again.
>
> It was pretty unique at the time, it no longer is, so the arguments are less
> compelling IMHO.
>
> However, we can now use a dynamic percpu variable and get it as a real
> per-cpu thing (which currently means it *will* be for every available cpu,
> not just online ones). Haven't thought about it, but that change might be
> worth considering instead?
I did convert most of the static percpu variables to a struct which
is allocated dynamically using alloc_percpu. See:
http://marc.info/?l=linux-netdev&m=127003066905912&w=2
This patch is on top of that, to avoid allocating the larger hash
table unconditionally as amount of possible cpu's can be large.
If you take a look at the actual patch to add back the hash allocation
for only 'online' cpu's, it's not that complicated IMHO:
http://marc.info/?l=linux-netdev&m=126987200927472&w=2
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: jamal @ 2010-03-31 13:28 UTC (permalink / raw)
To: Herbert Xu; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <20100331131131.GA13793@gondor.apana.org.au>
On Wed, 2010-03-31 at 21:11 +0800, Herbert Xu wrote:
> I disagree. A flush event is a signal that someone has sent a
> flush command.
Sorry - I respectfully disagree.
> In any case we've had this semantics for years
> and I haven't heard a good reason why this should be changed.
It generates unnecessary noise and it is a deviation like i mentioned.
> > This is a consistent definition of the semantics everywhere tables
> > are flushed (not just in Linux)..
>
> Please give specific examples in the kernel.
Something i can do safely right now without messing my connection;
Issue iproute commands in one window, observe events in another
-sudo ip route add 192.168.11.100 dev eth0 table 15
generates an event
-sudo ip route flush table 15
generates an event
-sudo ip route flush table 15
No event
But pick anything else in the other netlink knowledgeable subsystem
and youd see similar behavior.
If there was an app depending on this behavior - thats a separate reason
(but thats not the arguement you are making).
cheers,
jamal
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: jamal @ 2010-03-31 13:32 UTC (permalink / raw)
To: Herbert Xu; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <20100331132622.GA13908@gondor.apana.org.au>
On Wed, 2010-03-31 at 21:26 +0800, Herbert Xu wrote:
> In fact the previous behaviour is also consistent with RFC2367:
I did not touch pfkey. That behavior remains there.
cheers,
jamal
^ permalink raw reply
* Re: [PATCH] can: Add driver for SJA1000 based PCI CAN interface cards by esd
From: Wolfgang Grandegger @ 2010-03-31 13:35 UTC (permalink / raw)
To: Matthias Fuchs
Cc: Socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <201003311428.05749.matthias.fuchs-iOnpLzIbIdM@public.gmane.org>
Hi Matthias,
Matthias Fuchs wrote:
> This patch adds support for SJA1000 based PCI CAN interface cards
> from electronic system design gmbh.
>
> These boards are supported:
>
> CAN-PCI/200 (PCI)
> CAN-PCI/266 (PCI)
> CAN-PMC266 (PMC module)
> CAN-PCIe/2000 (PCI Express)
> CAN-CPCI/200 (Compact PCI, 3U)
> CAN-PCI104 (PCI104)
>
> This driver is part of the SocketCAN SVN repository since
> April 2009.
>
> Signed-off-by: Matthias Fuchs <matthias.fuchs-iOnpLzIbIdM@public.gmane.org>
Since a while we have a generic PCI PLX driver in the mainline kernel,
which could support the esd cards as well, I believe.
Wolfgang.
^ permalink raw reply
* Re: [r8169] WARNING: at net/sched/sch_generic.c
From: Neil Horman @ 2010-03-31 13:35 UTC (permalink / raw)
To: Eric Dumazet
Cc: Sergey Senozhatsky, netdev, Francois Romieu, David S. Miller,
linux-kernel
In-Reply-To: <1270038569.2103.24.camel@edumazet-laptop>
On Wed, Mar 31, 2010 at 02:29:29PM +0200, Eric Dumazet wrote:
> Le mercredi 31 mars 2010 à 15:14 +0300, Sergey Senozhatsky a écrit :
>
>
> > PKT_SIZE="pkt_size 2048"
> >
>
> If you use 1024 bytes pktgen messages, do you still have the problem ?
>
+1 I wouldn't be suprised if using something over the nominal 1522 byte frame
length on r8169 caused tx errors. The driver doesn't seem to support Jumbo
frames, so my guess is you have to keep the packet size below 1522 bytes.
Neil
>
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: jamal @ 2010-03-31 13:39 UTC (permalink / raw)
To: Herbert Xu; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <1270042356.26743.30.camel@bigi>
On Wed, 2010-03-31 at 09:32 -0400, jamal wrote:
> I did not touch pfkey. That behavior remains there.
Sorry - I lied. I did touch pfkey. Here was my reasoning.
RFC 2367 says flushing behavior should be:
1) user space -> kernel: flush
2) kernel: flush
3) kernel -> user space: flush event to ALL listeners
This is not realistic today in the presence of selinux policies
which may reject the flush etc. So we make the sequence become:
1) user space -> kernel: flush
2) kernel: flush
3) kernel -> user space: flush response to originater from #1
4) if there were no errors then:
kernel -> user space: flush event to ALL listeners
This was in the logs.
cheers,
jamal
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: jamal @ 2010-03-31 13:41 UTC (permalink / raw)
To: Herbert Xu; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <1270042795.26743.31.camel@bigi>
On Wed, 2010-03-31 at 09:39 -0400, jamal wrote:
>
> On Wed, 2010-03-31 at 09:32 -0400, jamal wrote:
>
> > I did not touch pfkey. That behavior remains there.
>
> Sorry - I lied. I did touch pfkey. Here was my reasoning.
And what I meant by not touching is that "the behavior there
remains as it was before"
cheers,
jamal
> RFC 2367 says flushing behavior should be:
> 1) user space -> kernel: flush
> 2) kernel: flush
> 3) kernel -> user space: flush event to ALL listeners
>
> This is not realistic today in the presence of selinux policies
> which may reject the flush etc. So we make the sequence become:
> 1) user space -> kernel: flush
> 2) kernel: flush
> 3) kernel -> user space: flush response to originater from #1
> 4) if there were no errors then:
> kernel -> user space: flush event to ALL listeners
>
> This was in the logs.
>
> cheers,
> jamal
^ permalink raw reply
* Re: [PATCH 1/6] sysfs: Basic support for multiple super blocks
From: Serge E. Hallyn @ 2010-03-31 13:47 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Tejun Heo, Greg Kroah-Hartman, Kay Sievers, linux-kernel,
Cornelia Huck, linux-fsdevel, Eric Dumazet, Benjamin LaHaise,
netdev
In-Reply-To: <m1634d82e0.fsf@fess.ebiederm.org>
Quoting Eric W. Biederman (ebiederm@xmission.com):
> Tejun Heo <tj@kernel.org> writes:
> >> index 30f5a44..030a39d 100644
> >> --- a/fs/sysfs/sysfs.h
> >> +++ b/fs/sysfs/sysfs.h
> >> @@ -114,6 +114,9 @@ struct sysfs_addrm_cxt {
> >> /*
> >> * mount.c
> >> */
> >> +struct sysfs_super_info {
> >> +};
> >> +#define sysfs_info(SB) ((struct sysfs_super_info *)(SB->s_fs_info))
> >
> > Another nit picking. It would be better to wrap SB in the macro
> > definition. Also, wouldn't an inline function be better?
>
> Good spotting. That doesn't bite today but it will certainly bite
> someday if it isn't fixed.
>
> I wonder how that has slipped through the review all of this time.
(let me demonstrate how: )
WTH are you talking about? Unless you mean doing (SB) inside
the definition?
I actually was going to suggest dropping the #define as it obscures
the code, but I figured it would get more complicated later.
-serge
^ permalink raw reply
* Re: [r8169] WARNING: at net/sched/sch_generic.c
From: Sergey Senozhatsky @ 2010-03-31 13:49 UTC (permalink / raw)
To: Neil Horman
Cc: Eric Dumazet, Sergey Senozhatsky, netdev, Francois Romieu,
David S. Miller, linux-kernel
In-Reply-To: <20100331133533.GD13963@hmsreliant.think-freely.org>
[-- Attachment #1: Type: text/plain, Size: 624 bytes --]
On (03/31/10 09:35), Neil Horman wrote:
> On Wed, Mar 31, 2010 at 02:29:29PM +0200, Eric Dumazet wrote:
> > Le mercredi 31 mars 2010 à 15:14 +0300, Sergey Senozhatsky a écrit :
> >
> >
> > > PKT_SIZE="pkt_size 2048"
> > >
> >
> > If you use 1024 bytes pktgen messages, do you still have the problem ?
> >
> +1 I wouldn't be suprised if using something over the nominal 1522 byte frame
> length on r8169 caused tx errors. The driver doesn't seem to support Jumbo
> frames, so my guess is you have to keep the packet size below 1522 bytes.
> Neil
Hm. Good point. I'll test a bit later today.
Sergey
[-- Attachment #2: Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: Herbert Xu @ 2010-03-31 13:53 UTC (permalink / raw)
To: jamal; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <1270042092.26743.26.camel@bigi>
On Wed, Mar 31, 2010 at 09:28:12AM -0400, jamal wrote:
>
> -sudo ip route add 192.168.11.100 dev eth0 table 15
> generates an event
> -sudo ip route flush table 15
> generates an event
> -sudo ip route flush table 15
> No event
That's completely different. We don't have a route flush event,
instead we're sending route delete events. That's why when the
table is empty you get no events.
If we had a route flush event then it would behave exactly the
same.
BTW you've also made xfrm_state_flush inconsistent with respect
to xfrm_policy_flush.
Dave, please revert this patch.
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: Herbert Xu @ 2010-03-31 13:55 UTC (permalink / raw)
To: jamal; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <1270042795.26743.31.camel@bigi>
On Wed, Mar 31, 2010 at 09:39:55AM -0400, jamal wrote:
>
> This is not realistic today in the presence of selinux policies
> which may reject the flush etc. So we make the sequence become:
> 1) user space -> kernel: flush
> 2) kernel: flush
> 3) kernel -> user space: flush response to originater from #1
> 4) if there were no errors then:
> kernel -> user space: flush event to ALL listeners
Eliding the notification if SELinux says so is fine, but eliding
it because the table is empty is wrong.
The flush did not fail just because the table was empty to begin
with.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: Herbert Xu @ 2010-03-31 13:56 UTC (permalink / raw)
To: jamal; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <1270042883.26743.32.camel@bigi>
On Wed, Mar 31, 2010 at 09:41:23AM -0400, jamal wrote:
>
> On Wed, 2010-03-31 at 09:39 -0400, jamal wrote:
> >
> > On Wed, 2010-03-31 at 09:32 -0400, jamal wrote:
> >
> > > I did not touch pfkey. That behavior remains there.
> >
> > Sorry - I lied. I did touch pfkey. Here was my reasoning.
>
> And what I meant by not touching is that "the behavior there
> remains as it was before"
No you've changed it. PF_KEY will no longer notify if the policy
table is empty.
This is inconsistent with the behaviour of SADB flushes, and the
spirit of RFC2367.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [PATCH 1/6] sysfs: Basic support for multiple super blocks
From: Eric W. Biederman @ 2010-03-31 14:02 UTC (permalink / raw)
To: Serge E. Hallyn
Cc: Tejun Heo, Greg Kroah-Hartman, Kay Sievers, linux-kernel,
Cornelia Huck, linux-fsdevel, Eric Dumazet, Benjamin LaHaise,
netdev
In-Reply-To: <20100331134757.GA6132@us.ibm.com>
"Serge E. Hallyn" <serue@us.ibm.com> writes:
> Quoting Eric W. Biederman (ebiederm@xmission.com):
>> Tejun Heo <tj@kernel.org> writes:
>> >> index 30f5a44..030a39d 100644
>> >> --- a/fs/sysfs/sysfs.h
>> >> +++ b/fs/sysfs/sysfs.h
>> >> @@ -114,6 +114,9 @@ struct sysfs_addrm_cxt {
>> >> /*
>> >> * mount.c
>> >> */
>> >> +struct sysfs_super_info {
>> >> +};
>> >> +#define sysfs_info(SB) ((struct sysfs_super_info *)(SB->s_fs_info))
>> >
>> > Another nit picking. It would be better to wrap SB in the macro
>> > definition. Also, wouldn't an inline function be better?
>>
>> Good spotting. That doesn't bite today but it will certainly bite
>> someday if it isn't fixed.
>>
>> I wonder how that has slipped through the review all of this time.
>
> (let me demonstrate how: )
>
> WTH are you talking about? Unless you mean doing (SB) inside
> the definition?
>
> I actually was going to suggest dropping the #define as it obscures
> the code, but I figured it would get more complicated later.
I believe the discuss change was to make the define:
#define sysfs_info(SB) ((struct sysfs_super_info *)((SB)->s_fs_info))
As for dropping the define and using s_fs_info raw. I rather like
a light weight type safe wrapper. Maybe I just think s_fs_info
is an ugly name.
In practice I never call sysfs_info() with any expression that has
a side effect, so it doesn't matter.
Eric
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: jamal @ 2010-03-31 14:12 UTC (permalink / raw)
To: Herbert Xu; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <20100331135505.GC14082@gondor.apana.org.au>
On Wed, 2010-03-31 at 21:55 +0800, Herbert Xu wrote:
> Eliding the notification if SELinux says so is fine, but eliding
> it because the table is empty is wrong.
>
> The flush did not fail just because the table was empty to begin
> with.
Like i said i didnt touch the behavior except for the selinux case
(which sounds very reasonable). I believe there maybe historical legacy
reasons for that semantic in pfkey.
Can you point to something in the kernel (or anywhere else) that behaves
like this on table flushing? Actually if there was an app that depended
on netlink flush being exposed on empty table - then i think theres
reason for a revert.
Other than that i will say again: i respectfully disagree.
cheers,
jamal
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: jamal @ 2010-03-31 14:15 UTC (permalink / raw)
To: Herbert Xu; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <20100331135629.GD14082@gondor.apana.org.au>
On Wed, 2010-03-31 at 21:56 +0800, Herbert Xu wrote:
>
> No you've changed it. PF_KEY will no longer notify if the policy
> table is empty.
>
> This is inconsistent with the behaviour of SADB flushes, and the
> spirit of RFC2367.
I did not mean to change it for pfkey. I do believe there are apps that
need it.
I will run some tests and if it breaks - I will send a patch.
cheers,
jamal
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: Herbert Xu @ 2010-03-31 14:15 UTC (permalink / raw)
To: jamal; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <1270044768.26743.58.camel@bigi>
On Wed, Mar 31, 2010 at 10:12:48AM -0400, jamal wrote:
> On Wed, 2010-03-31 at 21:55 +0800, Herbert Xu wrote:
>
> > Eliding the notification if SELinux says so is fine, but eliding
> > it because the table is empty is wrong.
> >
> > The flush did not fail just because the table was empty to begin
> > with.
>
> Like i said i didnt touch the behavior except for the selinux case
> (which sounds very reasonable). I believe there maybe historical legacy
> reasons for that semantic in pfkey.
> Can you point to something in the kernel (or anywhere else) that behaves
> like this on table flushing? Actually if there was an app that depended
> on netlink flush being exposed on empty table - then i think theres
> reason for a revert.
> Other than that i will say again: i respectfully disagree.
OK I give up.
Dave can keep or revert this as he likes.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [PATCH] can: Add driver for SJA1000 based PCI CAN interface cards by esd
From: Matthias Fuchs @ 2010-03-31 14:17 UTC (permalink / raw)
To: Wolfgang Grandegger
Cc: Socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <4BB34F92.5010308-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
Hi Wolfgang,
I am aware of the PCI PLX driver. It should be possible to
adapt that one. It lacks PLX9056 support so it's not done by just
adding some PCI device IDs.
But if that's how it should be done I will do so.
Matthias
On Wednesday 31 March 2010 15:35, Wolfgang Grandegger wrote:
> Hi Matthias,
>
> Matthias Fuchs wrote:
> > This patch adds support for SJA1000 based PCI CAN interface cards
> > from electronic system design gmbh.
> >
> > These boards are supported:
> >
> > CAN-PCI/200 (PCI)
> > CAN-PCI/266 (PCI)
> > CAN-PMC266 (PMC module)
> > CAN-PCIe/2000 (PCI Express)
> > CAN-CPCI/200 (Compact PCI, 3U)
> > CAN-PCI104 (PCI104)
> >
> > This driver is part of the SocketCAN SVN repository since
> > April 2009.
> >
> > Signed-off-by: Matthias Fuchs <matthias.fuchs-iOnpLzIbIdM@public.gmane.org>
>
> Since a while we have a generic PCI PLX driver in the mainline kernel,
> which could support the esd cards as well, I believe.
>
> Wolfgang.
>
>
--
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: jamal @ 2010-03-31 14:24 UTC (permalink / raw)
To: Herbert Xu; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <20100331141525.GA14331@gondor.apana.org.au>
On Wed, 2010-03-31 at 22:15 +0800, Herbert Xu wrote:
>
> OK I give up.
>
> Dave can keep or revert this as he likes.
Ok - I will await to see what Dave thinks before i bother doing whatever
setup. What we have here is a philosophical difference.
Herbert note: i realize this is unfair for me to say given you were
likely very busy: I respect your opinion and knowledge and did CC you on
all the many mails when i was RFCing this and when i sent the patches.
cheers,
jamal
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: Herbert Xu @ 2010-03-31 14:29 UTC (permalink / raw)
To: jamal; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <1270045478.26743.71.camel@bigi>
On Wed, Mar 31, 2010 at 10:24:38AM -0400, jamal wrote:
> On Wed, 2010-03-31 at 22:15 +0800, Herbert Xu wrote:
>
> >
> > OK I give up.
> >
> > Dave can keep or revert this as he likes.
>
> Ok - I will await to see what Dave thinks before i bother doing whatever
> setup. What we have here is a philosophical difference.
> Herbert note: i realize this is unfair for me to say given you were
> likely very busy: I respect your opinion and knowledge and did CC you on
> all the many mails when i was RFCing this and when i sent the patches.
Yes you did cc me. Unfortunately I was rather busy with some other
stuff at the time. Had I read your patch back then I would've said
something :)
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: jamal @ 2010-03-31 14:38 UTC (permalink / raw)
To: Herbert Xu; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <20100331142915.GA14557@gondor.apana.org.au>
On Wed, 2010-03-31 at 22:29 +0800, Herbert Xu wrote:
> Yes you did cc me. Unfortunately I was rather busy with some other
> stuff at the time. Had I read your patch back then I would've said
> something :)
makes sense ;-> And it wouldnt have been like the first (or the last)
time you and i have had this heated discussions;->
Lets just wait to hear what Dave says - I dont want make his life more
difficult than it is; so no hard feeling if he decides to revert.
cheers,
jamal
PS:- since you woke me up and i know you are awake,
i am going to get rid of a jetlag by sending
probably another controversial patch. Hmmm.. where to start.
^ permalink raw reply
* Re: [net-2.6 PATCH] bonding: fix broken multicast with round-robin mode
From: Andy Gospodarek @ 2010-03-31 14:49 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev, lhh, fubar, bonding-devel
In-Reply-To: <1270026517.2103.9.camel@edumazet-laptop>
On Wed, Mar 31, 2010 at 5:08 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le jeudi 25 mars 2010 à 17:40 -0400, Andy Gospodarek a écrit :
>> Round-robin (mode 0) does nothing to ensure that any multicast traffic
>> originally destined for the host will continue to arrive at the host when
>> the link that sent the IGMP join or membership report goes down. One of
>> the benefits of absolute round-robin transmit.
>>
>> Keeping track of subscribed multicast groups for each slave did not seem
>> like a good use of resources, so I decided to simply send on the
>> curr_active slave of the bond (typically the first enslaved device that
>> is up). This makes failover management simple as IGMP membership
>> reports only need to be sent when the curr_active_slave changes. I
>> tested this patch and it appears to work as expected.
>>
>> Originally reported by Lon Hohberger <lhh@redhat.com>.
>>
>> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
>> CC: Lon Hohberger <lhh@redhat.com>
>> CC: Jay Vosburgh <fubar@us.ibm.com>
>>
>> ---
>> drivers/net/bonding/bond_main.c | 34 ++++++++++++++++++++++++++--------
>> 1 files changed, 26 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>> index 430c022..0b38455 100644
>> --- a/drivers/net/bonding/bond_main.c
>> +++ b/drivers/net/bonding/bond_main.c
>> @@ -1235,6 +1235,11 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
>> write_lock_bh(&bond->curr_slave_lock);
>> }
>> }
>> +
>> + /* resend IGMP joins since all were sent on curr_active_slave */
>> + if (bond->params.mode == BOND_MODE_ROUNDROBIN) {
>> + bond_resend_igmp_join_requests(bond);
>> + }
>> }
>>
>> /**
>> @@ -4138,22 +4143,35 @@ static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *bond_dev
>> struct bonding *bond = netdev_priv(bond_dev);
>> struct slave *slave, *start_at;
>> int i, slave_no, res = 1;
>> + struct iphdr *iph = ip_hdr(skb);
>>
>> read_lock(&bond->lock);
>>
>> if (!BOND_IS_OK(bond))
>> goto out;
>> -
>> /*
>> - * Concurrent TX may collide on rr_tx_counter; we accept that
>> - * as being rare enough not to justify using an atomic op here
>> + * Start with the curr_active_slave that joined the bond as the
>> + * default for sending IGMP traffic. For failover purposes one
>> + * needs to maintain some consistency for the interface that will
>> + * send the join/membership reports. The curr_active_slave found
>> + * will send all of this type of traffic.
>> */
>> - slave_no = bond->rr_tx_counter++ % bond->slave_cnt;
>> + if ((skb->protocol == htons(ETH_P_IP)) &&
>> + (iph->protocol == htons(IPPROTO_IGMP))) {
>
> Hmm...
>
> iph->protocol is a u8, how can htons(IPPROTO_IGMP) be equal to
> iph->protocol ?
Heh, this isn't needed for a single-byte check. Thanks for catching that.
> [PATCH] bonding: bond_xmit_roundrobin() fix
>
> Commit a2fd940f (bonding: fix broken multicast with round-robin mode)
> added a problem on litle endian machines.
>
> drivers/net/bonding/bond_main.c:4159: warning: comparison is always
> false due to limited range of data type
Curious what version of GCC are you using? Before applying your patch
it compiles without warning on my x86_64 F11-ish system with:
gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 5b92fbf..5972a52 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -4156,7 +4156,7 @@ static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *bond_dev
> * send the join/membership reports. The curr_active_slave found
> * will send all of this type of traffic.
> */
> - if ((iph->protocol == htons(IPPROTO_IGMP)) &&
> + if ((iph->protocol == IPPROTO_IGMP) &&
> (skb->protocol == htons(ETH_P_IP))) {
>
> read_lock(&bond->curr_slave_lock);
>
>
>
>
^ permalink raw reply
* pull request: wireless-2.6 2010-03-31
From: John W. Linville @ 2010-03-31 14:46 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev, linux-kernel
Dave,
Here is a batch of fixes intended for 2.6.34. Included are a few
device IDs, along with several almost-one-liners to fix a variety of
issues, including a NULL deref, a potential overflow, a misues of the
USB API, a regulatory error for iwlwifi, a race condition in mac80211,
and some other more minor fixes.
I saw your note about only "eats someones disk" bugs. I'm not
sure all of these meet that test, but I hope you will take them.
I've been sitting on them a while and letting them cook in linux-next,
mostly to test one particular patch (which I backed-out yesterday).
I promise I'll tighten-up after this batch! :-)
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit ce6fbdefb68d46db88170494b277551f955b48e2:
Julia Lawall (1):
drivers/net: Add missing unlock
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master
Ben Konrath (1):
ar9170: add support for NEC WL300NU-G USB dongle
Benjamin Larsson (1):
Add a pci-id to the mwl8k driver
Dan Carpenter (1):
iwlwifi: range checking issue
Daniel Mack (1):
net/wireless/libertas: do not call wiphy_unregister() w/o wiphy_register()
Gertjan van Wingerde (2):
rt2x00: Fix typo in RF register programming of rt2800.
rt2x00: Disable powersaving by default in rt2500usb.
Hans de Goede (1):
Add USB ID for Thomson SpeedTouch 120g to p54usb id table
Johannes Berg (1):
mac80211: move netdev queue enabling to correct spot
John W. Linville (2):
wireless: convert reg_regdb_search_lock to mutex
mac80211: correct typos in "unavailable upon resume" warning
Porsch, Marco (1):
mac80211: fix PREQ processing and one small bug
Reinette Chatre (1):
iwlwifi: fix regulatory
Shanyu Zhao (1):
iwlwifi: clear unattended interrupts in tasklet
Valentin Longchamp (1):
setup correct int pipe type in ar9170_usb_exec_cmd
Wey-Yi Guy (1):
iwlwifi: counting number of tfds can be free for 4965
drivers/net/wireless/ath/ar9170/usb.c | 4 +++-
drivers/net/wireless/iwlwifi/iwl-4965.c | 6 ++----
drivers/net/wireless/iwlwifi/iwl-agn.c | 12 ++++++++++--
drivers/net/wireless/iwlwifi/iwl3945-base.c | 4 ++--
drivers/net/wireless/libertas/cfg.c | 8 ++++++--
drivers/net/wireless/libertas/dev.h | 1 +
drivers/net/wireless/mwl8k.c | 1 +
drivers/net/wireless/p54/p54usb.c | 1 +
drivers/net/wireless/rt2x00/rt2500usb.c | 5 +++++
drivers/net/wireless/rt2x00/rt2800lib.c | 4 ++--
net/mac80211/mesh_hwmp.c | 4 ++--
net/mac80211/tx.c | 6 ++++++
net/mac80211/util.c | 18 +++++++++---------
net/wireless/reg.c | 12 +++++-------
14 files changed, 55 insertions(+), 31 deletions(-)
diff --git a/drivers/net/wireless/ath/ar9170/usb.c b/drivers/net/wireless/ath/ar9170/usb.c
index 4e30197..6b1cb70 100644
--- a/drivers/net/wireless/ath/ar9170/usb.c
+++ b/drivers/net/wireless/ath/ar9170/usb.c
@@ -94,6 +94,8 @@ static struct usb_device_id ar9170_usb_ids[] = {
{ USB_DEVICE(0x04bb, 0x093f) },
/* AVM FRITZ!WLAN USB Stick N */
{ USB_DEVICE(0x057C, 0x8401) },
+ /* NEC WL300NU-G */
+ { USB_DEVICE(0x0409, 0x0249) },
/* AVM FRITZ!WLAN USB Stick N 2.4 */
{ USB_DEVICE(0x057C, 0x8402), .driver_info = AR9170_REQ_FW1_ONLY },
@@ -416,7 +418,7 @@ static int ar9170_usb_exec_cmd(struct ar9170 *ar, enum ar9170_cmd cmd,
spin_unlock_irqrestore(&aru->common.cmdlock, flags);
usb_fill_int_urb(urb, aru->udev,
- usb_sndbulkpipe(aru->udev, AR9170_EP_CMD),
+ usb_sndintpipe(aru->udev, AR9170_EP_CMD),
aru->common.cmdbuf, plen + 4,
ar9170_usb_tx_urb_complete, NULL, 1);
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 1bd2cd8..83c52a6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2041,16 +2041,14 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
tx_resp->failure_frame);
freed = iwl_tx_queue_reclaim(priv, txq_id, index);
- if (qc && likely(sta_id != IWL_INVALID_STATION))
- priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
+ iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
if (priv->mac80211_registered &&
(iwl_queue_space(&txq->q) > txq->q.low_mark))
iwl_wake_queue(priv, txq_id);
}
- if (qc && likely(sta_id != IWL_INVALID_STATION))
- iwl_txq_check_empty(priv, sta_id, tid, txq_id);
+ iwl_txq_check_empty(priv, sta_id, tid, txq_id);
if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n");
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 818367b..e4c2e1e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1258,7 +1258,15 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
/* Ack/clear/reset pending uCode interrupts.
* Note: Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS,
*/
- iwl_write32(priv, CSR_INT, priv->inta);
+ /* There is a hardware bug in the interrupt mask function that some
+ * interrupts (i.e. CSR_INT_BIT_SCD) can still be generated even if
+ * they are disabled in the CSR_INT_MASK register. Furthermore the
+ * ICT interrupt handling mechanism has another bug that might cause
+ * these unmasked interrupts fail to be detected. We workaround the
+ * hardware bugs here by ACKing all the possible interrupts so that
+ * interrupt coalescing can still be achieved.
+ */
+ iwl_write32(priv, CSR_INT, priv->inta | ~priv->inta_mask);
inta = priv->inta;
@@ -2644,7 +2652,7 @@ static int iwl_mac_setup_register(struct iwl_priv *priv)
BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC);
- hw->wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY |
+ hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY |
WIPHY_FLAG_DISABLE_BEACON_HINTS;
/*
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 54daa38..e276f2a 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1955,7 +1955,7 @@ static void iwl3945_init_hw_rates(struct iwl_priv *priv,
{
int i;
- for (i = 0; i < IWL_RATE_COUNT; i++) {
+ for (i = 0; i < IWL_RATE_COUNT_LEGACY; i++) {
rates[i].bitrate = iwl3945_rates[i].ieee * 5;
rates[i].hw_value = i; /* Rate scaling will work on indexes */
rates[i].hw_value_short = i;
@@ -3921,7 +3921,7 @@ static int iwl3945_setup_mac(struct iwl_priv *priv)
BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC);
- hw->wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY |
+ hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY |
WIPHY_FLAG_DISABLE_BEACON_HINTS;
hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX_3945;
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 4396dcc..82ebe14 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -172,6 +172,8 @@ int lbs_cfg_register(struct lbs_private *priv)
if (ret < 0)
lbs_pr_err("cannot register wiphy device\n");
+ priv->wiphy_registered = true;
+
ret = register_netdev(priv->dev);
if (ret)
lbs_pr_err("cannot register network device\n");
@@ -190,9 +192,11 @@ void lbs_cfg_free(struct lbs_private *priv)
if (!wdev)
return;
- if (wdev->wiphy) {
+ if (priv->wiphy_registered)
wiphy_unregister(wdev->wiphy);
+
+ if (wdev->wiphy)
wiphy_free(wdev->wiphy);
- }
+
kfree(wdev);
}
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index 6977ee8..6875e14 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -36,6 +36,7 @@ struct lbs_private {
/* CFG80211 */
struct wireless_dev *wdev;
+ bool wiphy_registered;
/* Mesh */
struct net_device *mesh_dev; /* Virtual device */
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index ac65e13..4e58ebe 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -3851,6 +3851,7 @@ MODULE_FIRMWARE("mwl8k/helper_8366.fw");
MODULE_FIRMWARE("mwl8k/fmimage_8366.fw");
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
+ { PCI_VDEVICE(MARVELL, 0x2a0a), .driver_data = MWL8363, },
{ PCI_VDEVICE(MARVELL, 0x2a0c), .driver_data = MWL8363, },
{ PCI_VDEVICE(MARVELL, 0x2a24), .driver_data = MWL8363, },
{ PCI_VDEVICE(MARVELL, 0x2a2b), .driver_data = MWL8687, },
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index b3c4fbd..e3cfc00 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -35,6 +35,7 @@ MODULE_FIRMWARE("isl3887usb");
static struct usb_device_id p54u_table[] __devinitdata = {
/* Version 1 devices (pci chip + net2280) */
{USB_DEVICE(0x0506, 0x0a11)}, /* 3COM 3CRWE254G72 */
+ {USB_DEVICE(0x06b9, 0x0120)}, /* Thomson SpeedTouch 120g */
{USB_DEVICE(0x0707, 0xee06)}, /* SMC 2862W-G */
{USB_DEVICE(0x07aa, 0x001c)}, /* Corega CG-WLUSB2GT */
{USB_DEVICE(0x083a, 0x4501)}, /* Accton 802.11g WN4501 USB */
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index ee34c13..dbaa781 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1643,6 +1643,11 @@ static int rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
unsigned int i;
/*
+ * Disable powersaving as default.
+ */
+ rt2x00dev->hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
+
+ /*
* Initialize all hw fields.
*/
rt2x00dev->hw->flags =
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 18d4d8e..326fce7 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -812,9 +812,9 @@ static void rt2800_config_channel_rt3x(struct rt2x00_dev *rt2x00dev,
rt2800_rfcsr_write(rt2x00dev, 24,
rt2x00dev->calibration[conf_is_ht40(conf)]);
- rt2800_rfcsr_read(rt2x00dev, 23, &rfcsr);
+ rt2800_rfcsr_read(rt2x00dev, 7, &rfcsr);
rt2x00_set_field8(&rfcsr, RFCSR7_RF_TUNING, 1);
- rt2800_rfcsr_write(rt2x00dev, 23, rfcsr);
+ rt2800_rfcsr_write(rt2x00dev, 7, rfcsr);
}
static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index ce84237..ccff613 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -391,7 +391,7 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
if (SN_GT(mpath->sn, orig_sn) ||
(mpath->sn == orig_sn &&
action == MPATH_PREQ &&
- new_metric > mpath->metric)) {
+ new_metric >= mpath->metric)) {
process = false;
fresh_info = false;
}
@@ -611,7 +611,7 @@ static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata,
mesh_path_sel_frame_tx(MPATH_PREP, flags, orig_addr,
cpu_to_le32(orig_sn), 0, target_addr,
- cpu_to_le32(target_sn), mpath->next_hop->sta.addr, hopcount,
+ cpu_to_le32(target_sn), next_hop, hopcount,
ttl, cpu_to_le32(lifetime), cpu_to_le32(metric),
0, sdata);
rcu_read_unlock();
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index cbe53ed..cfc473e 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1991,6 +1991,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
void ieee80211_tx_pending(unsigned long data)
{
struct ieee80211_local *local = (struct ieee80211_local *)data;
+ struct ieee80211_sub_if_data *sdata;
unsigned long flags;
int i;
bool txok;
@@ -2029,6 +2030,11 @@ void ieee80211_tx_pending(unsigned long data)
if (!txok)
break;
}
+
+ if (skb_queue_empty(&local->pending[i]))
+ list_for_each_entry_rcu(sdata, &local->interfaces, list)
+ netif_tx_wake_queue(
+ netdev_get_tx_queue(sdata->dev, i));
}
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index c453226..53af570 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -279,13 +279,13 @@ static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
/* someone still has this queue stopped */
return;
- if (!skb_queue_empty(&local->pending[queue]))
+ if (skb_queue_empty(&local->pending[queue])) {
+ rcu_read_lock();
+ list_for_each_entry_rcu(sdata, &local->interfaces, list)
+ netif_tx_wake_queue(netdev_get_tx_queue(sdata->dev, queue));
+ rcu_read_unlock();
+ } else
tasklet_schedule(&local->tx_pending_tasklet);
-
- rcu_read_lock();
- list_for_each_entry_rcu(sdata, &local->interfaces, list)
- netif_tx_wake_queue(netdev_get_tx_queue(sdata->dev, queue));
- rcu_read_unlock();
}
void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
@@ -1097,9 +1097,9 @@ int ieee80211_reconfig(struct ieee80211_local *local)
*/
res = drv_start(local);
if (res) {
- WARN(local->suspended, "Harware became unavailable "
- "upon resume. This is could be a software issue"
- "prior to suspend or a hardware issue\n");
+ WARN(local->suspended, "Hardware became unavailable "
+ "upon resume. This could be a software issue "
+ "prior to suspend or a hardware issue.\n");
return res;
}
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index ed89c59..81fcafc 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -324,7 +324,7 @@ struct reg_regdb_search_request {
};
static LIST_HEAD(reg_regdb_search_list);
-static DEFINE_SPINLOCK(reg_regdb_search_lock);
+static DEFINE_MUTEX(reg_regdb_search_mutex);
static void reg_regdb_search(struct work_struct *work)
{
@@ -332,7 +332,7 @@ static void reg_regdb_search(struct work_struct *work)
const struct ieee80211_regdomain *curdom, *regdom;
int i, r;
- spin_lock(®_regdb_search_lock);
+ mutex_lock(®_regdb_search_mutex);
while (!list_empty(®_regdb_search_list)) {
request = list_first_entry(®_regdb_search_list,
struct reg_regdb_search_request,
@@ -346,18 +346,16 @@ static void reg_regdb_search(struct work_struct *work)
r = reg_copy_regd(®dom, curdom);
if (r)
break;
- spin_unlock(®_regdb_search_lock);
mutex_lock(&cfg80211_mutex);
set_regdom(regdom);
mutex_unlock(&cfg80211_mutex);
- spin_lock(®_regdb_search_lock);
break;
}
}
kfree(request);
}
- spin_unlock(®_regdb_search_lock);
+ mutex_unlock(®_regdb_search_mutex);
}
static DECLARE_WORK(reg_regdb_work, reg_regdb_search);
@@ -375,9 +373,9 @@ static void reg_regdb_query(const char *alpha2)
memcpy(request->alpha2, alpha2, 2);
- spin_lock(®_regdb_search_lock);
+ mutex_lock(®_regdb_search_mutex);
list_add_tail(&request->list, ®_regdb_search_list);
- spin_unlock(®_regdb_search_lock);
+ mutex_unlock(®_regdb_search_mutex);
schedule_work(®_regdb_work);
}
--
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
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