* Re: [PATCH net-next-2.6] net: build_ehash_secret() and rt_bind_peer() cleanups
From: Changli Gao @ 2010-08-19 15:58 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev, Mathieu Desnoyers
In-Reply-To: <1282232815.2549.61.camel@edumazet-laptop>
On Thu, Aug 19, 2010 at 11:46 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Now cmpxchg() is available on all arches, we can use it in
> build_ehash_secret() and rt_bind_peer() instead of using spinlocks.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
> ---
> net/ipv4/af_inet.c | 8 +++-----
> net/ipv4/route.c | 11 +++--------
> 2 files changed, 6 insertions(+), 13 deletions(-)
>
> diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
> index 6a1100c..f581f77 100644
> --- a/net/ipv4/af_inet.c
> +++ b/net/ipv4/af_inet.c
> @@ -227,18 +227,16 @@ EXPORT_SYMBOL(inet_ehash_secret);
>
> /*
> * inet_ehash_secret must be set exactly once
> - * Instead of using a dedicated spinlock, we (ab)use inetsw_lock
> */
> void build_ehash_secret(void)
> {
> u32 rnd;
> +
> do {
> get_random_bytes(&rnd, sizeof(rnd));
> } while (rnd == 0);
> - spin_lock_bh(&inetsw_lock);
> - if (!inet_ehash_secret)
> - inet_ehash_secret = rnd;
> - spin_unlock_bh(&inetsw_lock);
> +
> + cmpxchg(&inet_ehash_secret, 0, rnd);
> }
> EXPORT_SYMBOL(build_ehash_secret);
>
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 3f56b6e..ae3dba7 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -1268,18 +1268,13 @@ skip_hashing:
>
> void rt_bind_peer(struct rtable *rt, int create)
> {
> - static DEFINE_SPINLOCK(rt_peer_lock);
> struct inet_peer *peer;
>
> peer = inet_getpeer(rt->rt_dst, create);
>
> - spin_lock_bh(&rt_peer_lock);
> - if (rt->peer == NULL) {
> - rt->peer = peer;
> - peer = NULL;
> - }
> - spin_unlock_bh(&rt_peer_lock);
> - if (peer)
> + peer = cmpxchg(&rt->peer, NULL, peer);
> +
> + if (unlikely(peer))
It isn't correct, and should be
if (unlikely(cmpxchg(&rt->peer, NULL, peer) != NULL))
> inet_putpeer(peer);
> }
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* [PATCH net-next-2.6 v2] net: build_ehash_secret() and rt_bind_peer() cleanups
From: Eric Dumazet @ 2010-08-19 16:10 UTC (permalink / raw)
To: Changli Gao; +Cc: David Miller, netdev, Mathieu Desnoyers
In-Reply-To: <AANLkTinpqNa3cgEb=86H0sYXdLmo-RP1G2icJgWpfyN1@mail.gmail.com>
Le jeudi 19 août 2010 à 23:58 +0800, Changli Gao a écrit :
> > - if (peer)
> > + peer = cmpxchg(&rt->peer, NULL, peer);
> > +
> > + if (unlikely(peer))
>
> It isn't correct, and should be
> if (unlikely(cmpxchg(&rt->peer, NULL, peer) != NULL))
>
> > inet_putpeer(peer);
> > }
>
>
Good catch, thanks !
I was trying to take into account peer being NULL...
[PATCH net-next-2.6] net: build_ehash_secret() and rt_bind_peer() cleanups
Now cmpxchg() is available on all arches, we can use it in
build_ehash_secret() and rt_bind_peer() instead of using spinlocks.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
---
net/ipv4/af_inet.c | 8 +++-----
net/ipv4/route.c | 9 +--------
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 6a1100c..f581f77 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -227,18 +227,16 @@ EXPORT_SYMBOL(inet_ehash_secret);
/*
* inet_ehash_secret must be set exactly once
- * Instead of using a dedicated spinlock, we (ab)use inetsw_lock
*/
void build_ehash_secret(void)
{
u32 rnd;
+
do {
get_random_bytes(&rnd, sizeof(rnd));
} while (rnd == 0);
- spin_lock_bh(&inetsw_lock);
- if (!inet_ehash_secret)
- inet_ehash_secret = rnd;
- spin_unlock_bh(&inetsw_lock);
+
+ cmpxchg(&inet_ehash_secret, 0, rnd);
}
EXPORT_SYMBOL(build_ehash_secret);
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 3f56b6e..85a67c9 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1268,18 +1268,11 @@ skip_hashing:
void rt_bind_peer(struct rtable *rt, int create)
{
- static DEFINE_SPINLOCK(rt_peer_lock);
struct inet_peer *peer;
peer = inet_getpeer(rt->rt_dst, create);
- spin_lock_bh(&rt_peer_lock);
- if (rt->peer == NULL) {
- rt->peer = peer;
- peer = NULL;
- }
- spin_unlock_bh(&rt_peer_lock);
- if (peer)
+ if (peer && cmpxchg(&rt->peer, NULL, peer) != NULL)
inet_putpeer(peer);
}
^ permalink raw reply related
* Re: [PATCH net-next-2.6] net: build_ehash_secret() and rt_bind_peer() cleanups
From: Changli Gao @ 2010-08-19 16:10 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev, Mathieu Desnoyers
In-Reply-To: <AANLkTinpqNa3cgEb=86H0sYXdLmo-RP1G2icJgWpfyN1@mail.gmail.com>
On Thu, Aug 19, 2010 at 11:58 PM, Changli Gao <xiaosuo@gmail.com> wrote:
> On Thu, Aug 19, 2010 at 11:46 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> Now cmpxchg() is available on all arches, we can use it in
>> build_ehash_secret() and rt_bind_peer() instead of using spinlocks.
>>
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>> CC: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
>> ---
>> net/ipv4/af_inet.c | 8 +++-----
>> net/ipv4/route.c | 11 +++--------
>> 2 files changed, 6 insertions(+), 13 deletions(-)
>>
>> diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
>> index 6a1100c..f581f77 100644
>> --- a/net/ipv4/af_inet.c
>> +++ b/net/ipv4/af_inet.c
>> @@ -227,18 +227,16 @@ EXPORT_SYMBOL(inet_ehash_secret);
>>
>> /*
>> * inet_ehash_secret must be set exactly once
>> - * Instead of using a dedicated spinlock, we (ab)use inetsw_lock
>> */
>> void build_ehash_secret(void)
>> {
>> u32 rnd;
>> +
>> do {
>> get_random_bytes(&rnd, sizeof(rnd));
>> } while (rnd == 0);
>> - spin_lock_bh(&inetsw_lock);
>> - if (!inet_ehash_secret)
>> - inet_ehash_secret = rnd;
>> - spin_unlock_bh(&inetsw_lock);
>> +
>> + cmpxchg(&inet_ehash_secret, 0, rnd);
>> }
>> EXPORT_SYMBOL(build_ehash_secret);
>>
>> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
>> index 3f56b6e..ae3dba7 100644
>> --- a/net/ipv4/route.c
>> +++ b/net/ipv4/route.c
>> @@ -1268,18 +1268,13 @@ skip_hashing:
>>
>> void rt_bind_peer(struct rtable *rt, int create)
>> {
>> - static DEFINE_SPINLOCK(rt_peer_lock);
>> struct inet_peer *peer;
>>
>> peer = inet_getpeer(rt->rt_dst, create);
>>
>> - spin_lock_bh(&rt_peer_lock);
>> - if (rt->peer == NULL) {
>> - rt->peer = peer;
>> - peer = NULL;
>> - }
>> - spin_unlock_bh(&rt_peer_lock);
>> - if (peer)
>> + peer = cmpxchg(&rt->peer, NULL, peer);
>> +
>> + if (unlikely(peer))
>
> It isn't correct, and should be
> if (unlikely(cmpxchg(&rt->peer, NULL, peer) != NULL))
>
we should also test peer != NULL.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* Re: [PATCH v2] netfilter: save the hash of the tuple in the original direction for latter use
From: Mathieu Desnoyers @ 2010-08-19 16:11 UTC (permalink / raw)
To: Eric Dumazet
Cc: Changli Gao, Patrick McHardy, David S. Miller, netfilter-devel,
netdev
In-Reply-To: <1282232786.2549.60.camel@edumazet-laptop>
* Eric Dumazet (eric.dumazet@gmail.com) wrote:
> Le jeudi 19 août 2010 à 23:35 +0800, Changli Gao a écrit :
>
> >
> > In fact, I don't know the reason clearly. This code is derived from
> > the older one. Maybe there isn't enough entropy when initializing.
> >
>
> Yes, we wanted to initialize these random data as late as possible, that
> is when the first entry is added in conntrack hash.
Ah, I see. But I think the static variable should stay declared outside
of the function scope, with a nice comment explaining why it's not
initialized at init-time.
Hiding global state in function code is usually frowned upon.
Thanks,
Mathieu
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply
* Re: [PATCH net-next-2.6] net: build_ehash_secret() and rt_bind_peer() cleanups
From: Mathieu Desnoyers @ 2010-08-19 16:13 UTC (permalink / raw)
To: Changli Gao; +Cc: Eric Dumazet, David Miller, netdev
In-Reply-To: <AANLkTinpqNa3cgEb=86H0sYXdLmo-RP1G2icJgWpfyN1@mail.gmail.com>
* Changli Gao (xiaosuo@gmail.com) wrote:
> On Thu, Aug 19, 2010 at 11:46 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > Now cmpxchg() is available on all arches, we can use it in
> > build_ehash_secret() and rt_bind_peer() instead of using spinlocks.
> >
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> > CC: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
> > ---
[...]
> > void rt_bind_peer(struct rtable *rt, int create)
> > {
> > - static DEFINE_SPINLOCK(rt_peer_lock);
> > struct inet_peer *peer;
> >
> > peer = inet_getpeer(rt->rt_dst, create);
> >
> > - spin_lock_bh(&rt_peer_lock);
> > - if (rt->peer == NULL) {
> > - rt->peer = peer;
> > - peer = NULL;
> > - }
> > - spin_unlock_bh(&rt_peer_lock);
> > - if (peer)
> > + peer = cmpxchg(&rt->peer, NULL, peer);
> > +
> > + if (unlikely(peer))
>
> It isn't correct, and should be
> if (unlikely(cmpxchg(&rt->peer, NULL, peer) != NULL))
>
> > inet_putpeer(peer);
> > }
What do you mean by "It isn't correct" ? Eric code and yours perform the
exact same thing. So I assume this is just a code style issue here.
Thanks,
Mathieu
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply
* Re: [PATCH net-next-2.6] net: build_ehash_secret() and rt_bind_peer() cleanups
From: Mathieu Desnoyers @ 2010-08-19 16:28 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev
In-Reply-To: <1282232815.2549.61.camel@edumazet-laptop>
* Eric Dumazet (eric.dumazet@gmail.com) wrote:
> Now cmpxchg() is available on all arches, we can use it in
> build_ehash_secret() and rt_bind_peer() instead of using spinlocks.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
> ---
> net/ipv4/af_inet.c | 8 +++-----
> net/ipv4/route.c | 11 +++--------
> 2 files changed, 6 insertions(+), 13 deletions(-)
>
> diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
> index 6a1100c..f581f77 100644
> --- a/net/ipv4/af_inet.c
> +++ b/net/ipv4/af_inet.c
> @@ -227,18 +227,16 @@ EXPORT_SYMBOL(inet_ehash_secret);
>
> /*
> * inet_ehash_secret must be set exactly once
> - * Instead of using a dedicated spinlock, we (ab)use inetsw_lock
> */
> void build_ehash_secret(void)
> {
> u32 rnd;
> +
> do {
> get_random_bytes(&rnd, sizeof(rnd));
> } while (rnd == 0);
> - spin_lock_bh(&inetsw_lock);
> - if (!inet_ehash_secret)
> - inet_ehash_secret = rnd;
> - spin_unlock_bh(&inetsw_lock);
> +
> + cmpxchg(&inet_ehash_secret, 0, rnd);
I'd be more comfortable if you add a comment saying why you can get away
with not testing the cmpxchg failure case. (it's because the failure is
caused by a concurrent CPU setting the ehash secret to a random value,
which actually does the job for us, so no need to retry).
> }
> EXPORT_SYMBOL(build_ehash_secret);
>
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 3f56b6e..ae3dba7 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -1268,18 +1268,13 @@ skip_hashing:
>
> void rt_bind_peer(struct rtable *rt, int create)
> {
> - static DEFINE_SPINLOCK(rt_peer_lock);
> struct inet_peer *peer;
>
> peer = inet_getpeer(rt->rt_dst, create);
Hrm, peer can be NULL on OOM condition.
>
> - spin_lock_bh(&rt_peer_lock);
> - if (rt->peer == NULL) {
> - rt->peer = peer;
> - peer = NULL;
> - }
> - spin_unlock_bh(&rt_peer_lock);
> - if (peer)
> + peer = cmpxchg(&rt->peer, NULL, peer);
> +
> + if (unlikely(peer))
> inet_putpeer(peer);
And you don't want to put the peer returned by cmpxchg, you want to put
the peer you just allocated.
I'd go for:
if (!peer)
return;
if (unlikely(cmpxchg(&rt->peer, NULL, peer) != NULL))
inet_putpeer(peer);
Thanks,
Mathieu
> }
>
>
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply
* Re: [PATCH net-next-2.6] net: build_ehash_secret() and rt_bind_peer() cleanups
From: Mathieu Desnoyers @ 2010-08-19 16:30 UTC (permalink / raw)
To: Changli Gao; +Cc: Eric Dumazet, David Miller, netdev
In-Reply-To: <20100819161326.GB24357@Krystal>
* Mathieu Desnoyers (mathieu.desnoyers@polymtl.ca) wrote:
> * Changli Gao (xiaosuo@gmail.com) wrote:
> > On Thu, Aug 19, 2010 at 11:46 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
[...]
> > > + peer = cmpxchg(&rt->peer, NULL, peer);
> > > +
> > > + if (unlikely(peer))
> >
> > It isn't correct, and should be
> > if (unlikely(cmpxchg(&rt->peer, NULL, peer) != NULL))
> >
> > > inet_putpeer(peer);
> > > }
>
> What do you mean by "It isn't correct" ? Eric code and yours perform the
> exact same thing. So I assume this is just a code style issue here.
Nevermind my comment, it's not accurate.
Thanks,
Mathieu
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply
* [PATCH] tcp: allow effective reduction of TCP's rcv-buffer via setsockopt
From: Hagen Paul Pfeifer @ 2010-08-19 16:33 UTC (permalink / raw)
To: netdev
Cc: Hagen Paul Pfeifer, David S. Miller, Patrick McHardy,
Eric Dumazet, Ilpo Järvinen
Via setsockopt it is possible to reduce the socket RX buffer
(SO_RCVBUF). TCP method to select the initial window and window scaling
option in tcp_select_initial_window() currently misbehaves and do not
consider a reduced RX socket buffer via setsockopt.
Even though the server's RX buffer is reduced via setsockopt() to 256
byte (Initial Window 384 byte => 256 * 2 - (256 * 2 / 4)) the window
scale option is still 7:
192.168.1.38.40676 > 78.47.222.210.5001: Flags [S], seq 2577214362, win 5840, options [mss 1460,sackOK,TS val 338417 ecr 0,nop,wscale 0], length 0
78.47.222.210.5001 > 192.168.1.38.40676: Flags [S.], seq 1570631029, ack 2577214363, win 384, options [mss 1452,sackOK,TS val 2435248895 ecr 338417,nop,wscale 7], length 0
192.168.1.38.40676 > 78.47.222.210.5001: Flags [.], ack 1, win 5840, options [nop,nop,TS val 338421 ecr 2435248895], length 0
Within tcp_select_initial_window() the original space argument - a
representation of the rx buffer size - is expanded during
tcp_select_initial_window(). Only sysctl_tcp_rmem[2], sysctl_rmem_max
and window_clamp are considered to calculate the initial window.
This patch adjust the window_clamp argument if the user explicitly
reduce the receive buffer.
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
---
net/ipv4/tcp_output.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index de3bd84..01b94b8 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2429,6 +2429,12 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
__u8 rcv_wscale;
/* Set this up on the first call only */
req->window_clamp = tp->window_clamp ? : dst_metric(dst, RTAX_WINDOW);
+
+ /* limit the window selection if the user enforce a smaller rx buffer */
+ if (sk->sk_userlocks & SOCK_RCVBUF_LOCK &&
+ (req->window_clamp > tcp_full_space(sk) || req->window_clamp == 0))
+ req->window_clamp = tcp_full_space(sk);
+
/* tcp_full_space because it is guaranteed to be the first packet */
tcp_select_initial_window(tcp_full_space(sk),
mss - (ireq->tstamp_ok ? TCPOLEN_TSTAMP_ALIGNED : 0),
@@ -2555,6 +2561,11 @@ static void tcp_connect_init(struct sock *sk)
tcp_initialize_rcv_mss(sk);
+ /* limit the window selection if the user enforce a smaller rx buffer */
+ if (sk->sk_userlocks & SOCK_RCVBUF_LOCK &&
+ (tp->window_clamp > tcp_full_space(sk) || tp->window_clamp == 0))
+ tp->window_clamp = tcp_full_space(sk);
+
tcp_select_initial_window(tcp_full_space(sk),
tp->advmss - (tp->rx_opt.ts_recent_stamp ? tp->tcp_header_len - sizeof(struct tcphdr) : 0),
&tp->rcv_wnd,
--
1.7.2.1.95.g3d045.dirty
^ permalink raw reply related
* RE: [PATCH 0/6] bna: Brocade 10Gb Ethernet device driver
From: Debashis Dutt @ 2010-08-19 16:36 UTC (permalink / raw)
To: Simon Horman, Rasesh Mody; +Cc: netdev@vger.kernel.org
In-Reply-To: <20100818130309.GL9073@verge.net.au>
Hi Simon,
Thanks for your feedback.
The only reason that we did not put a separate subject line
for each of the patches is because this is a whole new driver
submission, waiting for acceptance. So these are not really logically
separate entities (unlike other patches adding features / bug fixes).
If you still think that we should try to logically separate the patches
please let me know.
Thanks
--Debashis
Brocade Linux Driver Team.
-----Original Message-----
From: Simon Horman [mailto:horms@verge.net.au]
Sent: Wednesday, August 18, 2010 6:03 AM
To: Rasesh Mody
Cc: netdev@vger.kernel.org; Adapter Linux Open SRC Team
Subject: Re: [PATCH 0/6] bna: Brocade 10Gb Ethernet device driver
Hi Rasesh,
it would be helpful if all six patches in your series
didn't feature the same subject and each had unique
description that described them in a little more detail.
Thanks
^ permalink raw reply
* [PATCH -next] isdn/avm: fix build when PCMCIA is not enabled
From: Randy Dunlap @ 2010-08-19 17:07 UTC (permalink / raw)
To: Stephen Rothwell, Carsten Paeth, Karsten Keil; +Cc: linux-next, LKML, netdev
In-Reply-To: <20100819143941.d3ea5cb4.sfr@canb.auug.org.au>
From: Randy Dunlap <randy.dunlap@oracle.com>
Why wouldn't kconfig symbol ISDN_DRV_AVMB1_B1PCMCIA also depend on
PCMCIA?
Fix build for PCMCIA not enabled:
ERROR: "b1_free_card" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1ctl_proc_fops" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_reset_ctr" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_load_firmware" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_send_message" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_release_appl" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_register_appl" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_getrevision" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_detect" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_interrupt" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_alloc_card" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Carsten Paeth <calle@calle.de>
Cc: Karsten Keil <isdn@linux-pingi.de>
---
drivers/isdn/hardware/avm/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- linux-next-20100819.orig/drivers/isdn/hardware/avm/Kconfig
+++ linux-next-20100819/drivers/isdn/hardware/avm/Kconfig
@@ -36,12 +36,13 @@ config ISDN_DRV_AVMB1_T1ISA
config ISDN_DRV_AVMB1_B1PCMCIA
tristate "AVM B1/M1/M2 PCMCIA support"
+ depends on PCMCIA
help
Enable support for the PCMCIA version of the AVM B1 card.
config ISDN_DRV_AVMB1_AVM_CS
tristate "AVM B1/M1/M2 PCMCIA cs module"
- depends on ISDN_DRV_AVMB1_B1PCMCIA && PCMCIA
+ depends on ISDN_DRV_AVMB1_B1PCMCIA
help
Enable the PCMCIA client driver for the AVM B1/M1/M2
PCMCIA cards.
^ permalink raw reply
* Re: via-rhine interrupts
From: Jarek Poplawski @ 2010-08-19 17:09 UTC (permalink / raw)
To: David Miller; +Cc: ruzicka.jakub, netdev
In-Reply-To: <20100818.234939.71574087.davem@davemloft.net>
On Wed, Aug 18, 2010 at 11:49:39PM -0700, David Miller wrote:
> From: Jarek Poplawski <jarkao2@gmail.com>
> Date: Sun, 15 Aug 2010 22:04:31 +0200
>
> > I've just tested it using a simplistic patch below, which skips
> > some napi receiving by doing it only every second jiffie (on even
> > ones), and I've got around 30% less interrupts from via-rhine,
> > which seems to suggest napi works OK, but there is too low
> > traffic (or too fast soft interrupt handling) to affect hard
> > interrupts. (Btw, probably CONFIG_HZ can matter here a bit too.
> > I tested with 1000.)
>
> 100Mbit on any modern system isn't going to trigger NAPI much at all
> even with near full link utilization.
>
> The simply cpu processes the packets too fast for them to gather up
> much at all.
>
> Some improvement in polling could be gained if the via-rhine has some
> HW interrupt mitigation settings. However after a quick perusal of
> the driver I don't see anything about this. The mitigation ethtool
> ops aren't implemented either, so I'm not optimistic :-)
>
Yes, now I see the old comments (pre 2.6.27) mentioned 10kpps
threshold, which wasn't reached in Jakub's example.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=32b0f53e5bc80b87fd20d4d78a0e0cb602c9157a
Jarek P.
^ permalink raw reply
* pull request: wireless-2.6 2010-08-19
From: John W. Linville @ 2010-08-19 17:46 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev, linux-kernel
Dave,
This collection of fixes intended for 2.6.36 includes a few that look
bigger than they really are. The one from Joe Perches corrects a number
of inadvertant upper->lower case conversion from an earlier patch
already in 2.6.36. The ones from Wey-Yi Guy change a timer value in a
number of device-dependent data structures in order to avoid excessive
firmware resets for those devices.
In addition to those, the one from Johannes Berg gives iwl3945 its own
filter flag function since sharing the iwlagn version has created
regressions for iwl3945. The one from me corrects a DMA API misuse in
ipw2100 that results in warning backtraces.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 0645bab7da3cb021157e5c661ef35f1d1226785a:
ibmveth: Fix opps during MTU change on an active device (2010-08-19 00:09:48 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master
Joe Perches (1):
drivers/net/wireless: Restore upper case words in wiphy_<level> messages
Johannes Berg (1):
iwlwifi: fix 3945 filter flags
John W. Linville (1):
ipw2100: don't sync status queue entries
Wey-Yi Guy (3):
iwlwifi: long monitor timer
iwlwifi: use long monitor timer to avoid un-necessary reload
iwlwifi: use long monitor timer for 5300 series
drivers/net/wireless/adm8211.c | 8 ++--
drivers/net/wireless/at76c50x-usb.c | 22 +++++-----
drivers/net/wireless/ath/ar9170/main.c | 4 +-
drivers/net/wireless/ipw2x00/ipw2100.c | 8 ----
drivers/net/wireless/iwlwifi/iwl-1000.c | 4 +-
drivers/net/wireless/iwlwifi/iwl-3945.c | 4 +-
drivers/net/wireless/iwlwifi/iwl-4965.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-5000.c | 14 +++---
drivers/net/wireless/iwlwifi/iwl-6000.c | 32 +++++++-------
drivers/net/wireless/iwlwifi/iwl-agn.c | 45 ++++++++++++++++++++-
drivers/net/wireless/iwlwifi/iwl-core.c | 45 ---------------------
drivers/net/wireless/iwlwifi/iwl-core.h | 3 -
drivers/net/wireless/iwlwifi/iwl-dev.h | 3 +-
drivers/net/wireless/iwlwifi/iwl3945-base.c | 51 +++++++++++++++++++++++-
drivers/net/wireless/mac80211_hwsim.c | 2 +-
drivers/net/wireless/mwl8k.c | 34 ++++++++--------
drivers/net/wireless/p54/eeprom.c | 6 +-
drivers/net/wireless/p54/fwio.c | 2 +-
drivers/net/wireless/p54/led.c | 4 +-
drivers/net/wireless/p54/p54pci.c | 2 +-
drivers/net/wireless/p54/txrx.c | 2 +-
drivers/net/wireless/rtl818x/rtl8180_dev.c | 6 +-
drivers/net/wireless/rtl818x/rtl8187_dev.c | 4 +-
drivers/net/wireless/rtl818x/rtl8187_rtl8225.c | 4 +-
24 files changed, 174 insertions(+), 137 deletions(-)
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index a105087..f9aa1bc 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -732,7 +732,7 @@ static int adm8211_rf_set_channel(struct ieee80211_hw *dev, unsigned int chan)
/* Nothing to do for ADMtek BBP */
} else if (priv->bbp_type != ADM8211_TYPE_ADMTEK)
- wiphy_debug(dev->wiphy, "unsupported bbp type %d\n",
+ wiphy_debug(dev->wiphy, "unsupported BBP type %d\n",
priv->bbp_type);
ADM8211_RESTORE();
@@ -1032,7 +1032,7 @@ static int adm8211_hw_init_bbp(struct ieee80211_hw *dev)
break;
}
} else
- wiphy_debug(dev->wiphy, "unsupported bbp %d\n", priv->bbp_type);
+ wiphy_debug(dev->wiphy, "unsupported BBP %d\n", priv->bbp_type);
ADM8211_CSR_WRITE(SYNRF, 0);
@@ -1525,7 +1525,7 @@ static int adm8211_start(struct ieee80211_hw *dev)
retval = request_irq(priv->pdev->irq, adm8211_interrupt,
IRQF_SHARED, "adm8211", dev);
if (retval) {
- wiphy_err(dev->wiphy, "failed to register irq handler\n");
+ wiphy_err(dev->wiphy, "failed to register IRQ handler\n");
goto fail;
}
@@ -1902,7 +1902,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
goto err_free_eeprom;
}
- wiphy_info(dev->wiphy, "hwaddr %pm, rev 0x%02x\n",
+ wiphy_info(dev->wiphy, "hwaddr %pM, Rev 0x%02x\n",
dev->wiphy->perm_addr, pdev->revision);
return 0;
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index d5140a8..1128fa8 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -655,7 +655,7 @@ static int at76_get_hw_config(struct at76_priv *priv)
exit:
kfree(hwcfg);
if (ret < 0)
- wiphy_err(priv->hw->wiphy, "cannot get hw config (error %d)\n",
+ wiphy_err(priv->hw->wiphy, "cannot get HW Config (error %d)\n",
ret);
return ret;
@@ -960,7 +960,7 @@ static void at76_dump_mib_mac_addr(struct at76_priv *priv)
sizeof(struct mib_mac_addr));
if (ret < 0) {
wiphy_err(priv->hw->wiphy,
- "at76_get_mib (mac_addr) failed: %d\n", ret);
+ "at76_get_mib (MAC_ADDR) failed: %d\n", ret);
goto exit;
}
@@ -989,7 +989,7 @@ static void at76_dump_mib_mac_wep(struct at76_priv *priv)
sizeof(struct mib_mac_wep));
if (ret < 0) {
wiphy_err(priv->hw->wiphy,
- "at76_get_mib (mac_wep) failed: %d\n", ret);
+ "at76_get_mib (MAC_WEP) failed: %d\n", ret);
goto exit;
}
@@ -1026,7 +1026,7 @@ static void at76_dump_mib_mac_mgmt(struct at76_priv *priv)
sizeof(struct mib_mac_mgmt));
if (ret < 0) {
wiphy_err(priv->hw->wiphy,
- "at76_get_mib (mac_mgmt) failed: %d\n", ret);
+ "at76_get_mib (MAC_MGMT) failed: %d\n", ret);
goto exit;
}
@@ -1062,7 +1062,7 @@ static void at76_dump_mib_mac(struct at76_priv *priv)
ret = at76_get_mib(priv->udev, MIB_MAC, m, sizeof(struct mib_mac));
if (ret < 0) {
wiphy_err(priv->hw->wiphy,
- "at76_get_mib (mac) failed: %d\n", ret);
+ "at76_get_mib (MAC) failed: %d\n", ret);
goto exit;
}
@@ -1099,7 +1099,7 @@ static void at76_dump_mib_phy(struct at76_priv *priv)
ret = at76_get_mib(priv->udev, MIB_PHY, m, sizeof(struct mib_phy));
if (ret < 0) {
wiphy_err(priv->hw->wiphy,
- "at76_get_mib (phy) failed: %d\n", ret);
+ "at76_get_mib (PHY) failed: %d\n", ret);
goto exit;
}
@@ -1132,7 +1132,7 @@ static void at76_dump_mib_local(struct at76_priv *priv)
ret = at76_get_mib(priv->udev, MIB_LOCAL, m, sizeof(struct mib_local));
if (ret < 0) {
wiphy_err(priv->hw->wiphy,
- "at76_get_mib (local) failed: %d\n", ret);
+ "at76_get_mib (LOCAL) failed: %d\n", ret);
goto exit;
}
@@ -1158,7 +1158,7 @@ static void at76_dump_mib_mdomain(struct at76_priv *priv)
sizeof(struct mib_mdomain));
if (ret < 0) {
wiphy_err(priv->hw->wiphy,
- "at76_get_mib (mdomain) failed: %d\n", ret);
+ "at76_get_mib (MDOMAIN) failed: %d\n", ret);
goto exit;
}
@@ -1229,7 +1229,7 @@ static int at76_submit_rx_urb(struct at76_priv *priv)
struct sk_buff *skb = priv->rx_skb;
if (!priv->rx_urb) {
- wiphy_err(priv->hw->wiphy, "%s: priv->rx_urb is null\n",
+ wiphy_err(priv->hw->wiphy, "%s: priv->rx_urb is NULL\n",
__func__);
return -EFAULT;
}
@@ -1792,7 +1792,7 @@ static int at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
wiphy_err(priv->hw->wiphy, "error in tx submit urb: %d\n", ret);
if (ret == -EINVAL)
wiphy_err(priv->hw->wiphy,
- "-einval: tx urb %p hcpriv %p complete %p\n",
+ "-EINVAL: tx urb %p hcpriv %p complete %p\n",
priv->tx_urb,
priv->tx_urb->hcpriv, priv->tx_urb->complete);
}
@@ -2310,7 +2310,7 @@ static int at76_init_new_device(struct at76_priv *priv,
priv->mac80211_registered = 1;
- wiphy_info(priv->hw->wiphy, "usb %s, mac %pm, firmware %d.%d.%d-%d\n",
+ wiphy_info(priv->hw->wiphy, "USB %s, MAC %pM, firmware %d.%d.%d-%d\n",
dev_name(&interface->dev), priv->mac_addr,
priv->fw_version.major, priv->fw_version.minor,
priv->fw_version.patch, priv->fw_version.build);
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index c67b05f..debfb0f 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -245,7 +245,7 @@ static void __ar9170_dump_txstats(struct ar9170 *ar)
{
int i;
- wiphy_debug(ar->hw->wiphy, "qos queue stats\n");
+ wiphy_debug(ar->hw->wiphy, "QoS queue stats\n");
for (i = 0; i < __AR9170_NUM_TXQ; i++)
wiphy_debug(ar->hw->wiphy,
@@ -387,7 +387,7 @@ static struct sk_buff *ar9170_get_queued_skb(struct ar9170 *ar,
if (mac && compare_ether_addr(ieee80211_get_DA(hdr), mac)) {
#ifdef AR9170_QUEUE_DEBUG
wiphy_debug(ar->hw->wiphy,
- "skip frame => da %pm != %pm\n",
+ "skip frame => DA %pM != %pM\n",
mac, ieee80211_get_DA(hdr));
ar9170_print_txheader(ar, skb);
#endif /* AR9170_QUEUE_DEBUG */
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index 1189dbb..996e9d7 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -2723,14 +2723,6 @@ static void __ipw2100_rx_process(struct ipw2100_priv *priv)
packet = &priv->rx_buffers[i];
- /* Sync the DMA for the STATUS buffer so CPU is sure to get
- * the correct values */
- pci_dma_sync_single_for_cpu(priv->pci_dev,
- sq->nic +
- sizeof(struct ipw2100_status) * i,
- sizeof(struct ipw2100_status),
- PCI_DMA_FROMDEVICE);
-
/* Sync the DMA for the RX buffer so CPU is sure to get
* the correct values */
pci_dma_sync_single_for_cpu(priv->pci_dev, packet->dma_addr,
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index fec0262..0b779a4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -265,7 +265,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 128,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -297,7 +297,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 128,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 6950a78..8ccfcd0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -2731,7 +2731,7 @@ static struct iwl_cfg iwl3945_bg_cfg = {
.led_compensation = 64,
.broken_powersave = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 512,
.tx_power_by_driver = true,
};
@@ -2752,7 +2752,7 @@ static struct iwl_cfg iwl3945_abg_cfg = {
.led_compensation = 64,
.broken_powersave = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 512,
.tx_power_by_driver = true,
};
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index d6da356..d92b729 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2322,7 +2322,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
.led_compensation = 61,
.chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.temperature_kelvin = true,
.max_event_log_size = 512,
.tx_power_by_driver = true,
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index aacf377..48bdcd8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -510,7 +510,7 @@ struct iwl_cfg iwl5300_agn_cfg = {
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
.max_event_log_size = 512,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -541,7 +541,7 @@ struct iwl_cfg iwl5100_bgn_cfg = {
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
.max_event_log_size = 512,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -570,7 +570,7 @@ struct iwl_cfg iwl5100_abg_cfg = {
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
.max_event_log_size = 512,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -601,7 +601,7 @@ struct iwl_cfg iwl5100_agn_cfg = {
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
.max_event_log_size = 512,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -632,7 +632,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
.max_event_log_size = 512,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -663,7 +663,7 @@ struct iwl_cfg iwl5150_agn_cfg = {
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
.max_event_log_size = 512,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -693,7 +693,7 @@ struct iwl_cfg iwl5150_abg_cfg = {
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
.max_event_log_size = 512,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index af4fd50..cee06b9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -388,7 +388,7 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 512,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -424,7 +424,7 @@ struct iwl_cfg iwl6000g2a_2abg_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 512,
.sensitivity_calib_by_driver = true,
.chain_noise_calib_by_driver = true,
@@ -459,7 +459,7 @@ struct iwl_cfg iwl6000g2a_2bg_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 512,
.sensitivity_calib_by_driver = true,
.chain_noise_calib_by_driver = true,
@@ -496,7 +496,7 @@ struct iwl_cfg iwl6000g2b_2agn_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
.max_event_log_size = 512,
.sensitivity_calib_by_driver = true,
.chain_noise_calib_by_driver = true,
@@ -532,7 +532,7 @@ struct iwl_cfg iwl6000g2b_2abg_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
.max_event_log_size = 512,
.sensitivity_calib_by_driver = true,
.chain_noise_calib_by_driver = true,
@@ -570,7 +570,7 @@ struct iwl_cfg iwl6000g2b_2bgn_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
.max_event_log_size = 512,
.sensitivity_calib_by_driver = true,
.chain_noise_calib_by_driver = true,
@@ -606,7 +606,7 @@ struct iwl_cfg iwl6000g2b_2bg_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
.max_event_log_size = 512,
.sensitivity_calib_by_driver = true,
.chain_noise_calib_by_driver = true,
@@ -644,7 +644,7 @@ struct iwl_cfg iwl6000g2b_bgn_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
.max_event_log_size = 512,
.sensitivity_calib_by_driver = true,
.chain_noise_calib_by_driver = true,
@@ -680,7 +680,7 @@ struct iwl_cfg iwl6000g2b_bg_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
.max_event_log_size = 512,
.sensitivity_calib_by_driver = true,
.chain_noise_calib_by_driver = true,
@@ -721,7 +721,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 1024,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -756,7 +756,7 @@ struct iwl_cfg iwl6000i_2abg_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 1024,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -791,7 +791,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 1024,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -828,7 +828,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1500,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 1024,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -866,7 +866,7 @@ struct iwl_cfg iwl6050g2_bgn_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1500,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 1024,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -902,7 +902,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1500,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 1024,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
@@ -940,7 +940,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
.support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
- .monitor_recover_period = IWL_MONITORING_PERIOD,
+ .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
.max_event_log_size = 1024,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index c1882fd..10d7b9b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3667,6 +3667,49 @@ out_exit:
IWL_DEBUG_MAC80211(priv, "leave\n");
}
+static void iwlagn_configure_filter(struct ieee80211_hw *hw,
+ unsigned int changed_flags,
+ unsigned int *total_flags,
+ u64 multicast)
+{
+ struct iwl_priv *priv = hw->priv;
+ __le32 filter_or = 0, filter_nand = 0;
+
+#define CHK(test, flag) do { \
+ if (*total_flags & (test)) \
+ filter_or |= (flag); \
+ else \
+ filter_nand |= (flag); \
+ } while (0)
+
+ IWL_DEBUG_MAC80211(priv, "Enter: changed: 0x%x, total: 0x%x\n",
+ changed_flags, *total_flags);
+
+ CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK);
+ CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK);
+ CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK);
+
+#undef CHK
+
+ mutex_lock(&priv->mutex);
+
+ priv->staging_rxon.filter_flags &= ~filter_nand;
+ priv->staging_rxon.filter_flags |= filter_or;
+
+ iwlcore_commit_rxon(priv);
+
+ mutex_unlock(&priv->mutex);
+
+ /*
+ * Receiving all multicast frames is always enabled by the
+ * default flags setup in iwl_connection_init_rx_config()
+ * since we currently do not support programming multicast
+ * filters into the device.
+ */
+ *total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS |
+ FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL;
+}
+
static void iwl_mac_flush(struct ieee80211_hw *hw, bool drop)
{
struct iwl_priv *priv = hw->priv;
@@ -3867,7 +3910,7 @@ static struct ieee80211_ops iwl_hw_ops = {
.add_interface = iwl_mac_add_interface,
.remove_interface = iwl_mac_remove_interface,
.config = iwl_mac_config,
- .configure_filter = iwl_configure_filter,
+ .configure_filter = iwlagn_configure_filter,
.set_key = iwl_mac_set_key,
.update_tkip_key = iwl_mac_update_tkip_key,
.conf_tx = iwl_mac_conf_tx,
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 2c03c6e..07dbc27 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1328,51 +1328,6 @@ out:
EXPORT_SYMBOL(iwl_apm_init);
-
-void iwl_configure_filter(struct ieee80211_hw *hw,
- unsigned int changed_flags,
- unsigned int *total_flags,
- u64 multicast)
-{
- struct iwl_priv *priv = hw->priv;
- __le32 filter_or = 0, filter_nand = 0;
-
-#define CHK(test, flag) do { \
- if (*total_flags & (test)) \
- filter_or |= (flag); \
- else \
- filter_nand |= (flag); \
- } while (0)
-
- IWL_DEBUG_MAC80211(priv, "Enter: changed: 0x%x, total: 0x%x\n",
- changed_flags, *total_flags);
-
- CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK);
- CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK);
- CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK);
-
-#undef CHK
-
- mutex_lock(&priv->mutex);
-
- priv->staging_rxon.filter_flags &= ~filter_nand;
- priv->staging_rxon.filter_flags |= filter_or;
-
- iwlcore_commit_rxon(priv);
-
- mutex_unlock(&priv->mutex);
-
- /*
- * Receiving all multicast frames is always enabled by the
- * default flags setup in iwl_connection_init_rx_config()
- * since we currently do not support programming multicast
- * filters into the device.
- */
- *total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS |
- FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL;
-}
-EXPORT_SYMBOL(iwl_configure_filter);
-
int iwl_set_hw_params(struct iwl_priv *priv)
{
priv->hw_params.max_rxq_size = RX_QUEUE_SIZE;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 4a71dfb..5e6ee3d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -372,9 +372,6 @@ int iwl_set_decrypted_flag(struct iwl_priv *priv,
u32 decrypt_res,
struct ieee80211_rx_status *stats);
void iwl_irq_handle_error(struct iwl_priv *priv);
-void iwl_configure_filter(struct ieee80211_hw *hw,
- unsigned int changed_flags,
- unsigned int *total_flags, u64 multicast);
int iwl_set_hw_params(struct iwl_priv *priv);
void iwl_post_associate(struct iwl_priv *priv, struct ieee80211_vif *vif);
void iwl_bss_info_changed(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index f35bcad..2e97cd2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1049,7 +1049,8 @@ struct iwl_event_log {
#define IWL_DELAY_NEXT_FORCE_FW_RELOAD (HZ*5)
/* timer constants use to monitor and recover stuck tx queues in mSecs */
-#define IWL_MONITORING_PERIOD (1000)
+#define IWL_DEF_MONITORING_PERIOD (1000)
+#define IWL_LONG_MONITORING_PERIOD (5000)
#define IWL_ONE_HUNDRED_MSECS (100)
#define IWL_SIXTY_SECS (60000)
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 70c4b8f..59a308b 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3391,6 +3391,55 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw,
return 0;
}
+
+static void iwl3945_configure_filter(struct ieee80211_hw *hw,
+ unsigned int changed_flags,
+ unsigned int *total_flags,
+ u64 multicast)
+{
+ struct iwl_priv *priv = hw->priv;
+ __le32 filter_or = 0, filter_nand = 0;
+
+#define CHK(test, flag) do { \
+ if (*total_flags & (test)) \
+ filter_or |= (flag); \
+ else \
+ filter_nand |= (flag); \
+ } while (0)
+
+ IWL_DEBUG_MAC80211(priv, "Enter: changed: 0x%x, total: 0x%x\n",
+ changed_flags, *total_flags);
+
+ CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK);
+ CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK);
+ CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK);
+
+#undef CHK
+
+ mutex_lock(&priv->mutex);
+
+ priv->staging_rxon.filter_flags &= ~filter_nand;
+ priv->staging_rxon.filter_flags |= filter_or;
+
+ /*
+ * Committing directly here breaks for some reason,
+ * but we'll eventually commit the filter flags
+ * change anyway.
+ */
+
+ mutex_unlock(&priv->mutex);
+
+ /*
+ * Receiving all multicast frames is always enabled by the
+ * default flags setup in iwl_connection_init_rx_config()
+ * since we currently do not support programming multicast
+ * filters into the device.
+ */
+ *total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS |
+ FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL;
+}
+
+
/*****************************************************************************
*
* sysfs attributes
@@ -3796,7 +3845,7 @@ static struct ieee80211_ops iwl3945_hw_ops = {
.add_interface = iwl_mac_add_interface,
.remove_interface = iwl_mac_remove_interface,
.config = iwl_mac_config,
- .configure_filter = iwl_configure_filter,
+ .configure_filter = iwl3945_configure_filter,
.set_key = iwl3945_mac_set_key,
.conf_tx = iwl_mac_conf_tx,
.reset_tsf = iwl_mac_reset_tsf,
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 01ad7f7..86fa8ab 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -486,7 +486,7 @@ static bool mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,
struct ieee80211_rx_status rx_status;
if (data->idle) {
- wiphy_debug(hw->wiphy, "trying to tx when idle - reject\n");
+ wiphy_debug(hw->wiphy, "Trying to TX when idle - reject\n");
return false;
}
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index d761ed2..f152a25 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -910,14 +910,14 @@ static int mwl8k_rxq_init(struct ieee80211_hw *hw, int index)
rxq->rxd = pci_alloc_consistent(priv->pdev, size, &rxq->rxd_dma);
if (rxq->rxd == NULL) {
- wiphy_err(hw->wiphy, "failed to alloc rx descriptors\n");
+ wiphy_err(hw->wiphy, "failed to alloc RX descriptors\n");
return -ENOMEM;
}
memset(rxq->rxd, 0, size);
rxq->buf = kmalloc(MWL8K_RX_DESCS * sizeof(*rxq->buf), GFP_KERNEL);
if (rxq->buf == NULL) {
- wiphy_err(hw->wiphy, "failed to alloc rx skbuff list\n");
+ wiphy_err(hw->wiphy, "failed to alloc RX skbuff list\n");
pci_free_consistent(priv->pdev, size, rxq->rxd, rxq->rxd_dma);
return -ENOMEM;
}
@@ -1145,14 +1145,14 @@ static int mwl8k_txq_init(struct ieee80211_hw *hw, int index)
txq->txd = pci_alloc_consistent(priv->pdev, size, &txq->txd_dma);
if (txq->txd == NULL) {
- wiphy_err(hw->wiphy, "failed to alloc tx descriptors\n");
+ wiphy_err(hw->wiphy, "failed to alloc TX descriptors\n");
return -ENOMEM;
}
memset(txq->txd, 0, size);
txq->skb = kmalloc(MWL8K_TX_DESCS * sizeof(*txq->skb), GFP_KERNEL);
if (txq->skb == NULL) {
- wiphy_err(hw->wiphy, "failed to alloc tx skbuff list\n");
+ wiphy_err(hw->wiphy, "failed to alloc TX skbuff list\n");
pci_free_consistent(priv->pdev, size, txq->txd, txq->txd_dma);
return -ENOMEM;
}
@@ -1573,7 +1573,7 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd)
PCI_DMA_BIDIRECTIONAL);
if (!timeout) {
- wiphy_err(hw->wiphy, "command %s timeout after %u ms\n",
+ wiphy_err(hw->wiphy, "Command %s timeout after %u ms\n",
mwl8k_cmd_name(cmd->code, buf, sizeof(buf)),
MWL8K_CMD_TIMEOUT_MS);
rc = -ETIMEDOUT;
@@ -1584,11 +1584,11 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd)
rc = cmd->result ? -EINVAL : 0;
if (rc)
- wiphy_err(hw->wiphy, "command %s error 0x%x\n",
+ wiphy_err(hw->wiphy, "Command %s error 0x%x\n",
mwl8k_cmd_name(cmd->code, buf, sizeof(buf)),
le16_to_cpu(cmd->result));
else if (ms > 2000)
- wiphy_notice(hw->wiphy, "command %s took %d ms\n",
+ wiphy_notice(hw->wiphy, "Command %s took %d ms\n",
mwl8k_cmd_name(cmd->code,
buf, sizeof(buf)),
ms);
@@ -3210,7 +3210,7 @@ static int mwl8k_start(struct ieee80211_hw *hw)
rc = request_irq(priv->pdev->irq, mwl8k_interrupt,
IRQF_SHARED, MWL8K_NAME, hw);
if (rc) {
- wiphy_err(hw->wiphy, "failed to register irq handler\n");
+ wiphy_err(hw->wiphy, "failed to register IRQ handler\n");
return -EIO;
}
@@ -3926,7 +3926,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
priv->sram = pci_iomap(pdev, 0, 0x10000);
if (priv->sram == NULL) {
- wiphy_err(hw->wiphy, "cannot map device sram\n");
+ wiphy_err(hw->wiphy, "Cannot map device SRAM\n");
goto err_iounmap;
}
@@ -3938,7 +3938,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
if (priv->regs == NULL) {
priv->regs = pci_iomap(pdev, 2, 0x10000);
if (priv->regs == NULL) {
- wiphy_err(hw->wiphy, "cannot map device registers\n");
+ wiphy_err(hw->wiphy, "Cannot map device registers\n");
goto err_iounmap;
}
}
@@ -3950,14 +3950,14 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
/* Ask userland hotplug daemon for the device firmware */
rc = mwl8k_request_firmware(priv);
if (rc) {
- wiphy_err(hw->wiphy, "firmware files not found\n");
+ wiphy_err(hw->wiphy, "Firmware files not found\n");
goto err_stop_firmware;
}
/* Load firmware into hardware */
rc = mwl8k_load_firmware(hw);
if (rc) {
- wiphy_err(hw->wiphy, "cannot start firmware\n");
+ wiphy_err(hw->wiphy, "Cannot start firmware\n");
goto err_stop_firmware;
}
@@ -4047,7 +4047,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
rc = request_irq(priv->pdev->irq, mwl8k_interrupt,
IRQF_SHARED, MWL8K_NAME, hw);
if (rc) {
- wiphy_err(hw->wiphy, "failed to register irq handler\n");
+ wiphy_err(hw->wiphy, "failed to register IRQ handler\n");
goto err_free_queues;
}
@@ -4067,7 +4067,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
rc = mwl8k_cmd_get_hw_spec_sta(hw);
}
if (rc) {
- wiphy_err(hw->wiphy, "cannot initialise firmware\n");
+ wiphy_err(hw->wiphy, "Cannot initialise firmware\n");
goto err_free_irq;
}
@@ -4081,14 +4081,14 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
/* Turn radio off */
rc = mwl8k_cmd_radio_disable(hw);
if (rc) {
- wiphy_err(hw->wiphy, "cannot disable\n");
+ wiphy_err(hw->wiphy, "Cannot disable\n");
goto err_free_irq;
}
/* Clear MAC address */
rc = mwl8k_cmd_set_mac_addr(hw, NULL, "\x00\x00\x00\x00\x00\x00");
if (rc) {
- wiphy_err(hw->wiphy, "cannot clear mac address\n");
+ wiphy_err(hw->wiphy, "Cannot clear MAC address\n");
goto err_free_irq;
}
@@ -4098,7 +4098,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
rc = ieee80211_register_hw(hw);
if (rc) {
- wiphy_err(hw->wiphy, "cannot register device\n");
+ wiphy_err(hw->wiphy, "Cannot register device\n");
goto err_free_queues;
}
diff --git a/drivers/net/wireless/p54/eeprom.c b/drivers/net/wireless/p54/eeprom.c
index d687cb7..78347041 100644
--- a/drivers/net/wireless/p54/eeprom.c
+++ b/drivers/net/wireless/p54/eeprom.c
@@ -167,7 +167,7 @@ static int p54_generate_band(struct ieee80211_hw *dev,
}
if (j == 0) {
- wiphy_err(dev->wiphy, "disabling totally damaged %d GHz band\n",
+ wiphy_err(dev->wiphy, "Disabling totally damaged %d GHz band\n",
(band == IEEE80211_BAND_2GHZ) ? 2 : 5);
ret = -ENODATA;
@@ -695,12 +695,12 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
u8 perm_addr[ETH_ALEN];
wiphy_warn(dev->wiphy,
- "invalid hwaddr! using randomly generated mac addr\n");
+ "Invalid hwaddr! Using randomly generated MAC addr\n");
random_ether_addr(perm_addr);
SET_IEEE80211_PERM_ADDR(dev, perm_addr);
}
- wiphy_info(dev->wiphy, "hwaddr %pm, mac:isl38%02x rf:%s\n",
+ wiphy_info(dev->wiphy, "hwaddr %pM, MAC:isl38%02x RF:%s\n",
dev->wiphy->perm_addr, priv->version,
p54_rf_chips[priv->rxhw]);
diff --git a/drivers/net/wireless/p54/fwio.c b/drivers/net/wireless/p54/fwio.c
index 47006bc..15b20c2 100644
--- a/drivers/net/wireless/p54/fwio.c
+++ b/drivers/net/wireless/p54/fwio.c
@@ -125,7 +125,7 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
if (fw_version)
wiphy_info(priv->hw->wiphy,
- "fw rev %s - softmac protocol %x.%x\n",
+ "FW rev %s - Softmac protocol %x.%x\n",
fw_version, priv->fw_var >> 8, priv->fw_var & 0xff);
if (priv->fw_var < 0x500)
diff --git a/drivers/net/wireless/p54/led.c b/drivers/net/wireless/p54/led.c
index ea91f5c..3837e1e 100644
--- a/drivers/net/wireless/p54/led.c
+++ b/drivers/net/wireless/p54/led.c
@@ -58,7 +58,7 @@ static void p54_update_leds(struct work_struct *work)
err = p54_set_leds(priv);
if (err && net_ratelimit())
wiphy_err(priv->hw->wiphy,
- "failed to update leds (%d).\n", err);
+ "failed to update LEDs (%d).\n", err);
if (rerun)
ieee80211_queue_delayed_work(priv->hw, &priv->led_work,
@@ -103,7 +103,7 @@ static int p54_register_led(struct p54_common *priv,
err = led_classdev_register(wiphy_dev(priv->hw->wiphy), &led->led_dev);
if (err)
wiphy_err(priv->hw->wiphy,
- "failed to register %s led.\n", name);
+ "Failed to register %s LED.\n", name);
else
led->registered = 1;
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c
index 822f8dc..1eacba4 100644
--- a/drivers/net/wireless/p54/p54pci.c
+++ b/drivers/net/wireless/p54/p54pci.c
@@ -466,7 +466,7 @@ static int p54p_open(struct ieee80211_hw *dev)
P54P_READ(dev_int);
if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) {
- wiphy_err(dev->wiphy, "cannot boot firmware!\n");
+ wiphy_err(dev->wiphy, "Cannot boot firmware!\n");
p54p_stop(dev);
return -ETIMEDOUT;
}
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index 427b46f..173aec3 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -540,7 +540,7 @@ static void p54_rx_trap(struct p54_common *priv, struct sk_buff *skb)
case P54_TRAP_BEACON_TX:
break;
case P54_TRAP_RADAR:
- wiphy_info(priv->hw->wiphy, "radar (freq:%d mhz)\n", freq);
+ wiphy_info(priv->hw->wiphy, "radar (freq:%d MHz)\n", freq);
break;
case P54_TRAP_NO_BEACON:
if (priv->vif)
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c
index b50c39a..30107ce 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c
@@ -445,7 +445,7 @@ static int rtl8180_init_rx_ring(struct ieee80211_hw *dev)
&priv->rx_ring_dma);
if (!priv->rx_ring || (unsigned long)priv->rx_ring & 0xFF) {
- wiphy_err(dev->wiphy, "cannot allocate rx ring\n");
+ wiphy_err(dev->wiphy, "Cannot allocate RX ring\n");
return -ENOMEM;
}
@@ -502,7 +502,7 @@ static int rtl8180_init_tx_ring(struct ieee80211_hw *dev,
ring = pci_alloc_consistent(priv->pdev, sizeof(*ring) * entries, &dma);
if (!ring || (unsigned long)ring & 0xFF) {
- wiphy_err(dev->wiphy, "cannot allocate tx ring (prio = %d)\n",
+ wiphy_err(dev->wiphy, "Cannot allocate TX ring (prio = %d)\n",
prio);
return -ENOMEM;
}
@@ -568,7 +568,7 @@ static int rtl8180_start(struct ieee80211_hw *dev)
ret = request_irq(priv->pdev->irq, rtl8180_interrupt,
IRQF_SHARED, KBUILD_MODNAME, dev);
if (ret) {
- wiphy_err(dev->wiphy, "failed to register irq handler\n");
+ wiphy_err(dev->wiphy, "failed to register IRQ handler\n");
goto err_free_rings;
}
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c
index 5738a55..98e0351 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
@@ -573,7 +573,7 @@ static int rtl8187_cmd_reset(struct ieee80211_hw *dev)
} while (--i);
if (!i) {
- wiphy_err(dev->wiphy, "reset timeout!\n");
+ wiphy_err(dev->wiphy, "Reset timeout!\n");
return -ETIMEDOUT;
}
@@ -1526,7 +1526,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
mutex_init(&priv->conf_mutex);
skb_queue_head_init(&priv->b_tx_status.queue);
- wiphy_info(dev->wiphy, "hwaddr %pm, %s v%d + %s, rfkill mask %d\n",
+ wiphy_info(dev->wiphy, "hwaddr %pM, %s V%d + %s, rfkill mask %d\n",
mac_addr, chip_name, priv->asic_rev, priv->rf->name,
priv->rfkill_mask);
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c b/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
index fd96f91..97eebdc 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
@@ -366,7 +366,7 @@ static void rtl8225_rf_init(struct ieee80211_hw *dev)
rtl8225_write(dev, 0x02, 0x044d);
msleep(100);
if (!(rtl8225_read(dev, 6) & (1 << 7)))
- wiphy_warn(dev->wiphy, "rf calibration failed! %x\n",
+ wiphy_warn(dev->wiphy, "RF Calibration Failed! %x\n",
rtl8225_read(dev, 6));
}
@@ -735,7 +735,7 @@ static void rtl8225z2_rf_init(struct ieee80211_hw *dev)
rtl8225_write(dev, 0x02, 0x044D);
msleep(100);
if (!(rtl8225_read(dev, 6) & (1 << 7)))
- wiphy_warn(dev->wiphy, "rf calibration failed! %x\n",
+ wiphy_warn(dev->wiphy, "RF Calibration Failed! %x\n",
rtl8225_read(dev, 6));
}
--
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
* WARN_ON(sk->sk_forward_alloc) 2.6.32.17
From: Franchoze Eric @ 2010-08-19 18:00 UTC (permalink / raw)
To: netdev
Hello,
I got the follwing bug in inet_sock_destruct(struct sock *sk) caused with check WARN_ON(sk->sk_forward_alloc).
This happens only on high load server. I tried to reprodue it on local machine but without luck. I would be happy to hear any ideas
how to fix or reprosuce it on test machine.
- it happends when restarting openvpn server with /etc/init.d/openvpn restart (kill application);
- it is reproducible
- happens only on high load
- warning does not happen on 2.6.18 kernel with same environment (warning exist in 2.6.18).
kernel: ------------[ cut here ]------------
kernel: WARNING: at net/ipv4/af_inet.c:153 inet_sock_destruct+0xfb/0x114()
kernel: Hardware name: PowerEdge SC1435
kernel: Modules linked in: ipt_REJECT xt_connlimit xt_limit iptable_filter ipt_REDIRECT xt_tcpudp xt_state xt_multiport iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables tun 8021q dm_mirror dm_multipath scsi_dh sbs sbshc power_meter hwmon battery ac sg dcdbas tpm_tis tpm serio_raw tpm_bios button rtc_cmos rtc_core rtc_lib tg3 firmware_class libphy amd64_edac_mod edac_core i2c_piix4 i2c_core dm_region_hash dm_log dm_mod sata_svw libata sd_mod scsi_mod ext3 jbd
kernel: Pid: 15163, comm: openvpn Tainted: G W 2.6.32.17 #3
kernel: Call Trace:
kernel: [<ffffffff812a1d21>] ? inet_sock_destruct+0xfb/0x114
kernel: [<ffffffff81047e4a>] warn_slowpath_common+0x77/0x8f
kernel: [<ffffffff81047e71>] warn_slowpath_null+0xf/0x11
kernel: [<ffffffff812a1d21>] inet_sock_destruct+0xfb/0x114
kernel: [<ffffffff8124c52c>] __sk_free+0x1e/0xdb
kernel: [<ffffffff8124c65a>] sk_free+0x17/0x19
kernel: [<ffffffff8124c670>] sock_put+0x14/0x16
kernel: [<ffffffff8124c71e>] sk_common_release+0xac/0xb1
kernel: [<ffffffff812995c8>] udp_lib_close+0x9/0xb
kernel: [<ffffffff812a1300>] inet_release+0x58/0x5f
kernel: [<ffffffff81249ce7>] sock_release+0x1a/0x6c
kernel: [<ffffffff8124a1ad>] sock_close+0x22/0x26
kernel: [<ffffffff810dc8f5>] __fput+0xf6/0x193
kernel: [<ffffffff810dcc36>] fput+0x15/0x17
kernel: [<ffffffff810d9bc9>] filp_close+0x67/0x72
kernel: [<ffffffff81049d7b>] put_files_struct+0x77/0xcb
kernel: [<ffffffff81049e05>] exit_files+0x36/0x3b
kernel: [<ffffffff8104af44>] do_exit+0x23f/0x65e
kernel: [<ffffffff81055e91>] ? set_tsk_thread_flag+0xd/0xf
kernel: [<ffffffff81055ec9>] ? recalc_sigpending_tsk+0x36/0x3d
kernel: [<ffffffff8104b3f7>] sys_exit_group+0x0/0x16
kernel: [<ffffffff8105829f>] get_signal_to_deliver+0x33a/0x38d
kernel: [<ffffffff8100b11e>] do_notify_resume+0x8c/0x6bb
kernel: [<ffffffff812db68f>] ? _spin_lock_irqsave+0x18/0x34
kernel: [<ffffffff81060737>] ? remove_wait_queue+0x4c/0x51
kernel: [<ffffffff8104ac2d>] ? do_wait+0x216/0x222
kernel: [<ffffffff8104ace6>] ? sys_wait4+0xad/0xbf
kernel: [<ffffffff8100be06>] int_signal+0x12/0x17
kernel: ---[ end trace 9ae8be71cf9ee7de ]---
Thanks,
Eric.
^ permalink raw reply
* Re: pull request: wireless-2.6 2010-08-19
From: Jan III Sobieski @ 2010-08-19 18:16 UTC (permalink / raw)
To: John W. Linville; +Cc: davem, linux-wireless, netdev, linux-kernel
In-Reply-To: <20100819174638.GC2672@tuxdriver.com>
Hi,
2010/8/19 John W. Linville <linville@tuxdriver.com>:
> Dave,
>
> This collection of fixes intended for 2.6.36 includes a few that look
> bigger than they really are. The one from Joe Perches corrects a number
> of inadvertant upper->lower case conversion from an earlier patch
> already in 2.6.36.
I wonder when the madness linked to the trivial patches will end up.
Next time, please tell "no more trivial patches". No more stupid
removal of white spaces, no more useless
"IamAwesomeKernelHacker->i_am_awesome_kernel_hacker"
conversions/masturbations etc.
Thanks in advance,
J
--
Jan III Sobieski
^ permalink raw reply
* Re: TAHI CN-6-4-1 failed on Linux 2.6.32 kernel
From: Steve Chen @ 2010-08-19 18:35 UTC (permalink / raw)
To: Brian Haley; +Cc: usagi-users-ctl, netdev
In-Reply-To: <AANLkTi=qP7BO2=Uhx2Xb0XiLbUz0mPutbg0vz6QnMgYb@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2582 bytes --]
On Mon, Aug 16, 2010 at 9:07 AM, Steve Chen <schen@mvista.com> wrote:
> On Fri, Aug 13, 2010 at 5:25 PM, Steve Chen <schen@mvista.com> wrote:
>> On Fri, Aug 13, 2010 at 12:55 PM, Brian Haley <brian.haley@hp.com> wrote:
>>> On 08/13/2010 01:34 PM, Steve Chen wrote:
>>>>>>>> The TAHI correspondent node tests CN-6-4-1 (Processing in upper layer
>>>>>>>> - Echo Checksum) failed for me in the 2.6.32 kernel. It appears that
>>>>>>>> the Linux kernel is replying the ICMP echo request in
>>>>>>>> icmpv6_echo_reply without much checking. Is this an intentional
>>>>>>>> non-conformance to RFC3775 section 9.3.1?
>>> [snip]
>>>
>>>> It appears that skb->ip_summed is always 1 (CHECKSUM_UNNECESSARY).
>>>> I'm using e1000e. Looking at the driver, there is a checksum offload
>>>> hardware. I think the code is doing frame check on the entire
>>>> Ethernet packet. Since no error was found, it assume everything
>>>> inside is correct.
>>>
>>> # ethtool -K ethX rx off
>>>
>>> Does that help? Does using a different NIC help?
>>>
>>
>> ethtool did not help.
>>
>> I tried to run the test with a different NIC, but I keep getting
>>
>> ...
>>
>> IPSEC_AKEY : --------------------
>> IPSEC_EALGO : ---------
>> IPSEC_EKEY : ------------------------
>> IPSEC_SUPPORT : OFF
>> RR_TIMEOUT : 3
>> TIMEOUT : 2
>> WAIT_RATELIMIT : 1
>> send Ra_R0_AllNd
>> Wait 3 sec.
>> Clear Captured Packets (Link0)
>> Clear Captured Packets (Link0)
>> send Ns_R0_AllNd
>> ######### Packe Name(RH) Field Value(NextHeader) is NULL
>> CNT_SendAndRecv Status=UnKnown
>> NG UnKnown
>> -> Initialization Fail
>> ...
>
> Brian,
>
> Oops, set the Link0 in nut.def to the wrong value. However, I'm still
> getting the same failure with different NIC. I'll start looking into
> the code. Please let me know your test results.
>
> Thanks,
>
> Steve
>
I trace through the code. It appears that the network driver (e1000e
for my setup) always set ip_summed to CHECKSUM_UNNECESSARY. I have
been unsuccessful to get the driver to take the other branch where
ip_summed is set to CHECKSUM_COMPLETE. Even when I hard code
ip_summed to CHECKSUM_COMPLETE, __skb_checksum_complete_head set
ip_summed to CHECKSUM_UNNECESSARY after recomputing the checksum.
So far the only way I'm able to get ICMP to recompute checksum is
through the attached hack. Even though I can get all the tests to
pass, but it just seem wrong.
Steve
[-- Attachment #2: force_icmp6_checksum_for_mip6.patch --]
[-- Type: text/x-patch, Size: 785 bytes --]
MR: 39774
Type: Defect Fix
Disposition: Needs submitting to mipv6
Description:
Fix failure in TAHI conformance test CN-6-4-1 - Processing in upper layer -
Echo Checksum. It appears the kernel does not perform ICMP checksum if
no error was detected at the link layer. This patch forces an ICMP checksum
recalculation for MIP6.
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index f23ebbe..54a77ca 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -663,6 +663,9 @@ static int icmpv6_rcv(struct sk_buff *skb)
/* Perform checksum. */
switch (skb->ip_summed) {
+#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
+ case CHECKSUM_UNNECESSARY:
+#endif
case CHECKSUM_COMPLETE:
if (!csum_ipv6_magic(saddr, daddr, skb->len, IPPROTO_ICMPV6,
skb->csum))
^ permalink raw reply related
* [patch v2] qlge: pull NULL check ahead of dereference
From: Dan Carpenter @ 2010-08-19 18:52 UTC (permalink / raw)
To: Linux Driver, David S. Miller, Breno Leitao,
netdev@vger.kernel.org, "kernel-
In-Reply-To: <20100819125933.GB14895@linux-ox1b.qlogic.org>
There was a dereference before NULL check issue introduced in 1e213303d
"qlge: Add tx multiqueue support." I've pulled the NULL check of
"net_rsp" forward a couple lines to avoid that.
Also Ron Mercer says that the early exit should be above the index
write. ql_write_cq_idx(rx_ring);
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
v2: Moved the early exit ahead of the ql_write_cq_idx()
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 8d63f69..c9f9754 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -2222,10 +2222,11 @@ static int ql_clean_outbound_rx_ring(struct rx_ring *rx_ring)
ql_update_cq(rx_ring);
prod = ql_read_sh_reg(rx_ring->prod_idx_sh_reg);
}
+ if (!net_rsp)
+ return 0;
ql_write_cq_idx(rx_ring);
tx_ring = &qdev->tx_ring[net_rsp->txq_idx];
- if (__netif_subqueue_stopped(qdev->ndev, tx_ring->wq_id) &&
- net_rsp != NULL) {
+ if (__netif_subqueue_stopped(qdev->ndev, tx_ring->wq_id)) {
if (atomic_read(&tx_ring->queue_stopped) &&
(atomic_read(&tx_ring->tx_count) > (tx_ring->wq_len / 4)))
/*
^ permalink raw reply related
* [Bug #16572][REGRESSION, bisected] random panics in bridging on 2.6.34+
From: Patrick McLean @ 2010-08-19 18:55 UTC (permalink / raw)
To: bridge; +Cc: linux-kernel, netdev, Herbert Xu, Jan Binder
Hi,
I am getting random panics with KVM/bridging on 2.6.34+ (including
latest git as of this morning).
There is a screenshot of the panic message in bugzilla at
https://bugzilla.kernel.org/show_bug.cgi?id=16572
It seems to happen when I have KVM virtual machines running with
bridging mode, most often when any of the virtual machines talk to the
network, or sometimes when they are brought up or down.
I bisected it down to this commit:
commit 68b7c895be336b19f4c38d7cb500132fabba0afd
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date: Sat Feb 27 19:41:40 2010 +0000
bridge: Allow tail-call on br_pass_frame_up
This patch allows tail-call on the call to br_pass_frame_up
in br_handle_frame_finish. This is now possible because of the
previous patch to call br_pass_frame_up last.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* ipoib neighbour free race?
From: Zach Brown @ 2010-08-19 19:10 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA
Hi gang,
We're chasing a bug that we can hit when we pull IB cables with
CONFIG_DEBUG_PAGE_ALLOC enabled. It appears as though the to_ipoib_neigh() in
ipoib_neigh_free() under ipoib_mcast_free() is referencing a freed neighbour
struct.
The invariant here, as far as I can tell, is that cleanup_neigh is always
called as neighbours leave the hash. We should never reference a freed
neighbour from the ipoib_neigh teardown path because ipoib_neigh_cleanup()
should free the ipoib_neigh before the neighbour drops its hash ref and can be
freed.
But I wonder if we can get a race during shutdown where ipoib_neigh_cleanup()
is called before the send path sees a neighbour and associates it with an
ipoib_neigh. In that case we'd never get the neigh_cleanup() call to free the
ipoib_neigh before the neighbour. Later teardown of the ipoib_neigh, say from
ipoib_mcast_free(), could try to clear the ipoib_neigh pointer in the freed
neighbour.
neigh_forced_gc() and neigh_periodic_work() are careful to only remove
neighbours from the table if their refcount is 1. But neigh_flush_dev() can
remove neighbours, and call neigh_cleanup(), while others are referencing it.
My question, then, is whether or not neigh_flush_dev() race with the ipoib send
paths? If so, it seems that we could hit this race.
It's been a long time (maybe a decade?!) since I worked with the networking
paths, so maybe I'm missing serialization that prevents this.
- z
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 2/2] platform: Facilitate the creation of pseudo-platform buses
From: Kevin Hilman @ 2010-08-19 19:20 UTC (permalink / raw)
To: Grant Likely
Cc: Moffett, Kyle D, Patrick Pannuto, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, magnus.damm@gmail.com,
gregkh@suse.de, Paul Mundt, Magnus Damm, Rafael J. Wysocki,
Eric Miao, Dmitry Torokhov, netdev@vger.kernel.org,
Kyle D Moffett
In-Reply-To: <AANLkTi=Pm8BL+Ksq1o7MYpV7mMH10bEPu1=Am9EgT-Kk@mail.gmail.com>
Grant Likely <grant.likely@secretlab.ca> writes:
> I'm not convinced (yet) that this is the right approach, and I'd like
> to see a few sample drivers converted to the new approach. Creating
> new bus_types that "inherit" from the platform_bus is actually not a
> bad idea, and it is an elegant way to change the behaviour (for
> example, how power management is implemented) for devices connected in
> a different way.
>
> A problem with the approach that Kevin pointed out is that drivers
> that need to work on both the platform_bus_type and the new
> soc_bus_type must explicitly register themselves on both bus types.
And potentially more than 2 if a driver exists for a hardware block on
different SoCs. Magnus raised this issue for drivers used across SH and
ARM/SH-Mobile, and the same issue exists between TI OMAP and TI DaVinci
SoCs.
> There is no mechanism to allow drivers from one bus type to also be
> made available to another bus type. Certainly it would be possible to
> invent a mechanism, but the more I think about it, them more I think
> it will be a bad idea. The runtime-PM use-case that kicked this
> discussion off makes the assumption that a driver will behave
> identically when attached to either the platform_bus_type or the
> soc_bus_type. However, I think that in the general case that
> assumption will prove to be false. I strongly suspect that the new
> bus type will turn out to be not as similar to the platform_bus_type
> as originally assumed and that there will still be bus-type-specific
> impact on device drivers
What makes you suspect that? Maybe Patrick has other use-cases in mind,
but from a PM perspective, I have not seen any impact.
One of the primary goals of this (at least for me and it seems Magnus also)
is to keep drivers ignorant of their bus type, and any bus-type-specific
code should be done in the bus_type implementation.
Both for SH and OMAP, we've been using the (admiteddly broken)
weak-symbol-override approach to getting a custom bus-type based on the
platform_bus. We've been using that in OMAP for a while now and have
not seen any need to for the drivers to know if they are on the vanilla
platform_bus or the customized one.
I'm very curious to hear what type of impact you expect to the drivers.
Kevin
^ permalink raw reply
* [RFC patch] include/net/cfg80211.h: wiphy_<level> messages use dev_printk
From: Joe Perches @ 2010-08-19 19:24 UTC (permalink / raw)
To: Johannes Berg; +Cc: John W. Linville, linux-wireless, netdev, LKML
Adding device to the wiphy logging messages could be useful.
Signed-off-by: Joe Perches <joe@perches.com>
---
include/net/cfg80211.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 6a98b1b..61bc007 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2439,7 +2439,7 @@ void cfg80211_cqm_rssi_notify(struct net_device *dev,
/* wiphy_printk helpers, similar to dev_printk */
#define wiphy_printk(level, wiphy, format, args...) \
- printk(level "%s: " format, wiphy_name(wiphy), ##args)
+ dev_printk(level, &wiphy->dev, "%s: " format, wiphy_name(wiphy), ##args)
#define wiphy_emerg(wiphy, format, args...) \
wiphy_printk(KERN_EMERG, wiphy, format, ##args)
#define wiphy_alert(wiphy, format, args...) \
^ permalink raw reply related
* Re: [RFC patch] include/net/cfg80211.h: wiphy_<level> messages use dev_printk
From: Johannes Berg @ 2010-08-19 19:39 UTC (permalink / raw)
To: Joe Perches; +Cc: John W. Linville, linux-wireless, netdev, LKML
In-Reply-To: <1282245848.6724.261.camel@Joe-Laptop>
On Thu, 2010-08-19 at 12:24 -0700, Joe Perches wrote:
> Adding device to the wiphy logging messages could be useful.
>
> #define wiphy_printk(level, wiphy, format, args...) \
> - printk(level "%s: " format, wiphy_name(wiphy), ##args)
> + dev_printk(level, &wiphy->dev, "%s: " format, wiphy_name(wiphy), ##args)
what will that actually print?
johannes
^ permalink raw reply
* Re: [patch v2] qlge: pull NULL check ahead of dereference
From: Ron Mercer @ 2010-08-19 20:28 UTC (permalink / raw)
To: Dan Carpenter
Cc: Linux Driver, David S. Miller, Breno Leitao,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
In-Reply-To: <20100819185244.GD6674@bicker>
On Thu, Aug 19, 2010 at 11:52:44AM -0700, Dan Carpenter wrote:
> There was a dereference before NULL check issue introduced in 1e213303d
> "qlge: Add tx multiqueue support." I've pulled the NULL check of
> "net_rsp" forward a couple lines to avoid that.
>
> Also Ron Mercer says that the early exit should be above the index
> write. ql_write_cq_idx(rx_ring);
>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
^ permalink raw reply
* Re: [PATCH] Add firmware label support to iproute2
From: Matt Domsch @ 2010-08-19 21:33 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Narendra_K, netdev, Charles_Rose, Jordan_Hargrave
In-Reply-To: <20100818144124.33a72453@nehalam>
On Wed, Aug 18, 2010 at 02:41:24PM -0700, Stephen Hemminger wrote:
> The netdev_alias_to_kernelname should only happen after normal lookup failed.
Stephen, can you enlighten me as to the "right" way to do interface
name lookups? While I can still find examples of parsing
/proc/net/dev, or globbing /sys/class/net/*, I expect these aren't the
preferred method anymore. Your own iproute2 suite uses RTM_GETLINK
netlink calls, though for the seeming simple case of "give me a list of all
interfaces", your path through there is far more capable (and
complex) than I would hope to need.
Please advise.
> Also how does ifindex to name mapping work?
libnetdevname does not use ifindex at all at present.
Thanks,
Matt
--
Matt Domsch
Technology Strategist
Dell | Office of the CTO
^ permalink raw reply
* Re: [PATCH] Add firmware label support to iproute2
From: Stephen Hemminger @ 2010-08-19 21:53 UTC (permalink / raw)
To: Matt Domsch; +Cc: Narendra_K, netdev, Charles_Rose, Jordan_Hargrave
In-Reply-To: <20100819213314.GA26135@auslistsprd01.us.dell.com>
On Thu, 19 Aug 2010 16:33:14 -0500
Matt Domsch <Matt_Domsch@Dell.com> wrote:
> On Wed, Aug 18, 2010 at 02:41:24PM -0700, Stephen Hemminger wrote:
> > The netdev_alias_to_kernelname should only happen after normal lookup failed.
>
> Stephen, can you enlighten me as to the "right" way to do interface
> name lookups? While I can still find examples of parsing
> /proc/net/dev, or globbing /sys/class/net/*, I expect these aren't the
> preferred method anymore. Your own iproute2 suite uses RTM_GETLINK
> netlink calls, though for the seeming simple case of "give me a list of all
> interfaces", your path through there is far more capable (and
> complex) than I would hope to need.
There is no magic right way. We have to support multiple interfaces.
I am really concerned that all this alias stuff will turn into a
disaster when there are 10,000 interfaces (Vlans). The kernel has
lots of tables and hashes to handle this but if the utilities
are doing a dumb scan of all names it will not work.
Also burying logic in an external library seems problematic as
well. The original sysfs library was a disaster for this.
I want this to work but it has to have a simple interface that
is not trying to hide things.
^ permalink raw reply
* Re: [PATCH] Add firmware label support to iproute2
From: Matt Domsch @ 2010-08-19 22:18 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Narendra_K, netdev, Charles_Rose, Jordan_Hargrave
In-Reply-To: <20100819145308.0fa08522@nehalam>
On Thu, Aug 19, 2010 at 02:53:08PM -0700, Stephen Hemminger wrote:
> On Thu, 19 Aug 2010 16:33:14 -0500
> Matt Domsch <Matt_Domsch@Dell.com> wrote:
>
> > On Wed, Aug 18, 2010 at 02:41:24PM -0700, Stephen Hemminger wrote:
> > > The netdev_alias_to_kernelname should only happen after normal lookup failed.
> >
> > Stephen, can you enlighten me as to the "right" way to do interface
> > name lookups? While I can still find examples of parsing
> > /proc/net/dev, or globbing /sys/class/net/*, I expect these aren't the
> > preferred method anymore. Your own iproute2 suite uses RTM_GETLINK
> > netlink calls, though for the seeming simple case of "give me a list of all
> > interfaces", your path through there is far more capable (and
> > complex) than I would hope to need.
>
> There is no magic right way. We have to support multiple interfaces.
> I am really concerned that all this alias stuff will turn into a
> disaster when there are 10,000 interfaces (Vlans). The kernel has
> lots of tables and hashes to handle this but if the utilities
> are doing a dumb scan of all names it will not work.
I believe you proposed a lookup algorithm in each app, something like:
if exists(passed device name)
use it
else if (kernelname=netdev_alias_to_kernelname(passed device name))
use kernelname
so I'm looking for the "right" way to do these existance tests. I
agree iterating through all the interfaces should be avoided.
> Also burying logic in an external library seems problematic as
> well. The original sysfs library was a disaster for this.
> I want this to work but it has to have a simple interface that
> is not trying to hide things.
the library right now is all of:
422 netdevname.c
38 netdevname.h
with another 100 line app to print the mappings in both directions.
The interface is pretty simple too:
extern int netdev_alias_to_kernelname (const char *alias, char *kernelname);
struct netdev_alias {
char *name;
const char *namespace_name;
int is_descriptive; /* this may disappear yet */
struct netdev_alias *next;
};
extern int netdev_kernelname_to_aliases (const char *, struct netdev_alias **);
extern void free_netdev_aliases (struct netdev_alias *);
The common app usage will be to call netdev_alias_to_kernelname().
Only those apps that want to display the alternate names would use the
struct or other 2 functions.
Even though it's a small library, I do think it makes sense to make it
a library. I expect to add additional "namespaces" (e.g. "fw:Embedded
NIC 1" is the name of a device provided by the firmware. As I
mentioned in my talk at LinuxCon last week (slides at
http://domsch.com/linux/linuxcon10/) there could be other valid name
providers, and we'd like them to be usable without re-patching all the
applications again.
As always, I'm open to ideas.
Thanks,
Matt
--
Matt Domsch
Technology Strategist
Dell | Office of the CTO
^ 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