* [PATCH net-next] drivers/net: use IS_ENABLED(CONFIG_IPV6)
From: Joe Perches @ 2011-12-10 22:00 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev
In-Reply-To: <1323546511.4016.32.camel@edumazet-laptop>
Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
Signed-off-by: Joe Perches <joe@perches.com>
---
Here's the same for drivers/net/
drivers/net/ethernet/broadcom/cnic.c | 2 +-
drivers/net/wireless/ipw2x00/ipw2100.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
index 4bcb67e..757b981 100644
--- a/drivers/net/ethernet/broadcom/cnic.c
+++ b/drivers/net/ethernet/broadcom/cnic.c
@@ -3516,7 +3516,7 @@ static int cnic_get_v4_route(struct sockaddr_in *dst_addr,
static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr,
struct dst_entry **dst)
{
-#if defined(CONFIG_IPV6) || (defined(CONFIG_IPV6_MODULE) && defined(MODULE))
+#if IS_ENABLED(CONFIG_IPV6)
struct flowi6 fl6;
memset(&fl6, 0, sizeof(fl6));
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index a0e5c21..a469a53 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -4926,7 +4926,7 @@ static int ipw2100_system_config(struct ipw2100_priv *priv, int batch_mode)
/* If IPv6 is configured in the kernel then we don't want to filter out all
* of the multicast packets as IPv6 needs some. */
-#if !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE)
+#if !IS_ENABLED(CONFIG_IPV6)
cmd.host_command = ADD_MULTICAST;
cmd.host_command_sequence = 0;
cmd.host_command_length = 0;
^ permalink raw reply related
* Re: [PATCH net-next] drivers/net: use IS_ENABLED(CONFIG_IPV6)
From: Eric Dumazet @ 2011-12-10 22:29 UTC (permalink / raw)
To: Joe Perches; +Cc: David Miller, netdev
In-Reply-To: <1323554422.29470.4.camel@joe2Laptop>
Le samedi 10 décembre 2011 à 14:00 -0800, Joe Perches a écrit :
> Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>
> Here's the same for drivers/net/
>
> drivers/net/ethernet/broadcom/cnic.c | 2 +-
> drivers/net/wireless/ipw2x00/ipw2100.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
> index 4bcb67e..757b981 100644
> --- a/drivers/net/ethernet/broadcom/cnic.c
> +++ b/drivers/net/ethernet/broadcom/cnic.c
> @@ -3516,7 +3516,7 @@ static int cnic_get_v4_route(struct sockaddr_in *dst_addr,
> static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr,
> struct dst_entry **dst)
> {
> -#if defined(CONFIG_IPV6) || (defined(CONFIG_IPV6_MODULE) && defined(MODULE))
> +#if IS_ENABLED(CONFIG_IPV6)
Are you sure this is equivalent ?
^ permalink raw reply
* APPLY FOR LOAN @ 2% INTEREST RATE
From: LOAN COMPANY @ 2011-12-10 22:38 UTC (permalink / raw)
Dear Loan Applicants,
Apply for a loan from our company to enable you establish your business at 2 percent interest rate.
Ranging from 10,000.00 Dollars To 50,000,000.00 Dollars
If you are interested, contact us via E-mail with with the information's below.
Full Name:
Address:
Phone Number:
Loan Amount Need:
Loan Duration:
Or contact us to obtain an application form if requested by you.
Regards
General Manager
(Lawrence kabal)
^ permalink raw reply
* [PATCH] netem: add cell concept to simulate special MAC behavior
From: Hagen Paul Pfeifer @ 2011-12-10 23:36 UTC (permalink / raw)
To: netdev; +Cc: eric.dumazet, shemminger, Hagen Paul Pfeifer, Florian Westphal
In-Reply-To: <1323535432.4016.24.camel@edumazet-laptop>
This extension can be used to simulate special link layer
characteristics. Simulate because packet data is not modified, only the
calculation base is changed to delay a packet based on the original
packet size and artificial cell information.
packet_overhead can be used to simulate a link layer header compression
scheme (e.g. set packet_overhead to -20) or with a positive
packet_overhead value an additional MAC header can be simulated. It is
also possible to "replace" the 14 byte Ethernet header with something
else.
cell_size and cell_overhead can be used to simulate link layer schemes,
based on cells, like some TDMA schemes. Another application area are MAC
schemes using a link layer fragmentation with a (small) header each.
Cell size is the maximum amount of data bytes within one cell. Cell
overhead is an additional variable to change the per-cell-overhead (e.g.
5 byte header per fragment).
Example (5 kbit/s, 20 byte per packet overhead, cell-size 100 byte, per
cell overhead 5 byte):
tc qdisc add dev eth0 root netem rate 5kbit 20 100 5
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
reciprocal_value() by zero fixed. Second: I thought that API modification
_within_ one merge window are ok? My patchset was thought to be one atomic
patchset, I splitted rate and cell-rate for better patch review. Next time I
will sent API changes in one separate patch. Thanks Eric!
include/linux/pkt_sched.h | 3 +++
net/sched/sch_netem.c | 42 ++++++++++++++++++++++++++++++++++++++----
2 files changed, 41 insertions(+), 4 deletions(-)
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index 8786ea7..8daced3 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -502,6 +502,9 @@ struct tc_netem_corrupt {
struct tc_netem_rate {
__u32 rate; /* byte/s */
+ __s32 packet_overhead;
+ __u32 cell_size;
+ __s32 cell_overhead;
};
enum {
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 3bfd733..c946ff8 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -22,6 +22,7 @@
#include <linux/skbuff.h>
#include <linux/vmalloc.h>
#include <linux/rtnetlink.h>
+#include <linux/reciprocal_div.h>
#include <net/netlink.h>
#include <net/pkt_sched.h>
@@ -80,6 +81,10 @@ struct netem_sched_data {
u32 reorder;
u32 corrupt;
u32 rate;
+ s32 packet_overhead;
+ u32 cell_size;
+ u32 cell_size_reciprocal;
+ s32 cell_overhead;
struct crndstate {
u32 last;
@@ -299,11 +304,32 @@ static psched_tdiff_t tabledist(psched_tdiff_t mu, psched_tdiff_t sigma,
return x / NETEM_DIST_SCALE + (sigma / NETEM_DIST_SCALE) * t + mu;
}
-static psched_time_t packet_len_2_sched_time(unsigned int len, u32 rate)
+static psched_time_t packet_len_2_sched_time(unsigned int len, struct netem_sched_data *q)
{
- u64 ticks = (u64)len * NSEC_PER_SEC;
+ u64 ticks;
- do_div(ticks, rate);
+ len += q->packet_overhead;
+
+ if (q->cell_size) {
+ u32 cells = reciprocal_divide(len, q->cell_size_reciprocal);
+ u32 mod_carry = len - cells * q->cell_size;
+
+ if (mod_carry)
+ mod_carry = (len > q->cell_size || !cells) ?
+ q->cell_size - mod_carry : len - mod_carry;
+
+ if (q->cell_overhead) {
+ if (mod_carry)
+ ++cells;
+ len += cells * q->cell_overhead;
+ }
+
+ len += mod_carry;
+ }
+
+ ticks = (u64)len * NSEC_PER_SEC;
+
+ do_div(ticks, q->rate);
return PSCHED_NS2TICKS(ticks);
}
@@ -384,7 +410,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
if (q->rate) {
struct sk_buff_head *list = &q->qdisc->q;
- delay += packet_len_2_sched_time(skb->len, q->rate);
+ delay += packet_len_2_sched_time(skb->len, q);
if (!skb_queue_empty(list)) {
/*
@@ -568,6 +594,11 @@ static void get_rate(struct Qdisc *sch, const struct nlattr *attr)
const struct tc_netem_rate *r = nla_data(attr);
q->rate = r->rate;
+ q->packet_overhead = r->packet_overhead;
+ q->cell_size = r->cell_size;
+ if (q->cell_size)
+ q->cell_size_reciprocal = reciprocal_value(q->cell_size);
+ q->cell_overhead = r->cell_overhead;
}
static int get_loss_clg(struct Qdisc *sch, const struct nlattr *attr)
@@ -909,6 +940,9 @@ static int netem_dump(struct Qdisc *sch, struct sk_buff *skb)
NLA_PUT(skb, TCA_NETEM_CORRUPT, sizeof(corrupt), &corrupt);
rate.rate = q->rate;
+ rate.packet_overhead = q->packet_overhead;
+ rate.cell_size = q->cell_size;
+ rate.cell_overhead = q->cell_overhead;
NLA_PUT(skb, TCA_NETEM_RATE, sizeof(rate), &rate);
if (dump_loss_model(q, skb) != 0)
--
1.7.7.3
^ permalink raw reply related
* Re: [PATCH] netem: add cell concept to simulate special MAC behavior
From: Florian Westphal @ 2011-12-10 23:58 UTC (permalink / raw)
To: Hagen Paul Pfeifer; +Cc: netdev, eric.dumazet, shemminger, Florian Westphal
In-Reply-To: <1323560203-11715-1-git-send-email-hagen@jauu.net>
Hagen Paul Pfeifer <hagen@jauu.net> wrote:
> +static psched_time_t packet_len_2_sched_time(unsigned int len, struct netem_sched_data *q)
> {
[..]
> + if (q->cell_size) {
> + u32 cells = reciprocal_divide(len, q->cell_size_reciprocal);
> + u32 mod_carry = len - cells * q->cell_size;
> +
> + if (mod_carry)
> + mod_carry = (len > q->cell_size || !cells) ?
> + q->cell_size - mod_carry : len - mod_carry;
> +
> + if (q->cell_overhead) {
> + if (mod_carry)
> + ++cells;
> + len += cells * q->cell_overhead;
> + }
> +
> + len += mod_carry;
Why did you chose to replace the previous version?
if (q->cell_size) {
u32 cells = reciprocal_divide(len, q->cell_size_reciprocal);
if (len > cells * q->cell_size) /* extra cell needed for remainder */
cells++;
len = cells * (q->cell_size + q->cell_overhead);
}
I think that it is a lot easier to read -- did you find a problem with it?
^ permalink raw reply
* Re: [PATCH] netem: add cell concept to simulate special MAC behavior
From: Hagen Paul Pfeifer @ 2011-12-11 0:02 UTC (permalink / raw)
To: Florian Westphal; +Cc: netdev, eric.dumazet, shemminger
In-Reply-To: <20111210235822.GM17840@Chamillionaire.breakpoint.cc>
* Florian Westphal | 2011-12-11 00:58:22 [+0100]:
>I think that it is a lot easier to read -- did you find a problem with it?
My mistake, switched from my workstation to the laptop and the old patch was
in the queue. Just ignore this one.
^ permalink raw reply
* [PATCH] netem: add cell concept to simulate special MAC behavior
From: Hagen Paul Pfeifer @ 2011-12-11 0:08 UTC (permalink / raw)
To: netdev; +Cc: eric.dumazet, shemminger, Hagen Paul Pfeifer, Florian Westphal
In-Reply-To: <20111211000228.GA2767@hell>
This extension can be used to simulate special link layer
characteristics. Simulate because packet data is not modified, only the
calculation base is changed to delay a packet based on the original
packet size and artificial cell information.
packet_overhead can be used to simulate a link layer header compression
scheme (e.g. set packet_overhead to -20) or with a positive
packet_overhead value an additional MAC header can be simulated. It is
also possible to "replace" the 14 byte Ethernet header with something
else.
cell_size and cell_overhead can be used to simulate link layer schemes,
based on cells, like some TDMA schemes. Another application area are MAC
schemes using a link layer fragmentation with a (small) header each.
Cell size is the maximum amount of data bytes within one cell. Cell
overhead is an additional variable to change the per-cell-overhead
(e.g. 5 byte header per fragment).
Example (5 kbit/s, 20 byte per packet overhead, cell-size 100 byte, per
cell overhead 5 byte):
tc qdisc add dev eth0 root netem rate 5kbit 20 100 5
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
reciprocal_value() by zero fixed. Second: I thought that API modification
_within_ one merge window are ok? My patchset was thought to be one atomic
patchset, I splitted rate and cell-rate for better patch review. Next time I
will sent API changes in one separate patch. Thanks Eric!
include/linux/pkt_sched.h | 3 +++
net/sched/sch_netem.c | 34 ++++++++++++++++++++++++++++++----
2 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index 8786ea7..8daced3 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -502,6 +502,9 @@ struct tc_netem_corrupt {
struct tc_netem_rate {
__u32 rate; /* byte/s */
+ __s32 packet_overhead;
+ __u32 cell_size;
+ __s32 cell_overhead;
};
enum {
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 3bfd733..b6a16bd 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -22,6 +22,7 @@
#include <linux/skbuff.h>
#include <linux/vmalloc.h>
#include <linux/rtnetlink.h>
+#include <linux/reciprocal_div.h>
#include <net/netlink.h>
#include <net/pkt_sched.h>
@@ -80,6 +81,10 @@ struct netem_sched_data {
u32 reorder;
u32 corrupt;
u32 rate;
+ s32 packet_overhead;
+ u32 cell_size;
+ u32 cell_size_reciprocal;
+ s32 cell_overhead;
struct crndstate {
u32 last;
@@ -299,11 +304,23 @@ static psched_tdiff_t tabledist(psched_tdiff_t mu, psched_tdiff_t sigma,
return x / NETEM_DIST_SCALE + (sigma / NETEM_DIST_SCALE) * t + mu;
}
-static psched_time_t packet_len_2_sched_time(unsigned int len, u32 rate)
+static psched_time_t packet_len_2_sched_time(unsigned int len, struct netem_sched_data *q)
{
- u64 ticks = (u64)len * NSEC_PER_SEC;
+ u64 ticks;
- do_div(ticks, rate);
+ len += q->packet_overhead;
+
+ if (q->cell_size) {
+ u32 cells = reciprocal_divide(len, q->cell_size_reciprocal);
+
+ if (len > cells * q->cell_size) /* extra cell needed for remainder */
+ cells++;
+ len = cells * (q->cell_size + q->cell_overhead);
+ }
+
+ ticks = (u64)len * NSEC_PER_SEC;
+
+ do_div(ticks, q->rate);
return PSCHED_NS2TICKS(ticks);
}
@@ -384,7 +401,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
if (q->rate) {
struct sk_buff_head *list = &q->qdisc->q;
- delay += packet_len_2_sched_time(skb->len, q->rate);
+ delay += packet_len_2_sched_time(skb->len, q);
if (!skb_queue_empty(list)) {
/*
@@ -568,6 +585,12 @@ static void get_rate(struct Qdisc *sch, const struct nlattr *attr)
const struct tc_netem_rate *r = nla_data(attr);
q->rate = r->rate;
+ q->packet_overhead = r->packet_overhead;
+ q->cell_size = r->cell_size;
+ if (q->cell_size)
+ q->cell_size_reciprocal = reciprocal_value(q->cell_size);
+ q->cell_size = q->cell_size;
+ q->cell_overhead = r->cell_overhead;
}
static int get_loss_clg(struct Qdisc *sch, const struct nlattr *attr)
@@ -909,6 +932,9 @@ static int netem_dump(struct Qdisc *sch, struct sk_buff *skb)
NLA_PUT(skb, TCA_NETEM_CORRUPT, sizeof(corrupt), &corrupt);
rate.rate = q->rate;
+ rate.packet_overhead = q->packet_overhead;
+ rate.cell_size = q->cell_size;
+ rate.cell_overhead = q->cell_overhead;
NLA_PUT(skb, TCA_NETEM_RATE, sizeof(rate), &rate);
if (dump_loss_model(q, skb) != 0)
--
1.7.7.3
^ permalink raw reply related
* [PATCH] netem: add cell concept to simulate special MAC behavior
From: Hagen Paul Pfeifer @ 2011-12-11 0:11 UTC (permalink / raw)
To: netdev; +Cc: eric.dumazet, shemminger, Hagen Paul Pfeifer, Florian Westphal
In-Reply-To: <1323562110-13865-1-git-send-email-hagen@jauu.net>
This extension can be used to simulate special link layer
characteristics. Simulate because packet data is not modified, only the
calculation base is changed to delay a packet based on the original
packet size and artificial cell information.
packet_overhead can be used to simulate a link layer header compression
scheme (e.g. set packet_overhead to -20) or with a positive
packet_overhead value an additional MAC header can be simulated. It is
also possible to "replace" the 14 byte Ethernet header with something
else.
cell_size and cell_overhead can be used to simulate link layer schemes,
based on cells, like some TDMA schemes. Another application area are MAC
schemes using a link layer fragmentation with a (small) header each.
Cell size is the maximum amount of data bytes within one cell. Cell
overhead is an additional variable to change the per-cell-overhead
(e.g. 5 byte header per fragment).
Example (5 kbit/s, 20 byte per packet overhead, cell-size 100 byte, per
cell overhead 5 byte):
tc qdisc add dev eth0 root netem rate 5kbit 20 100 5
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
reciprocal_value() by zero fixed. Second: I thought that API modification
_within_ one merge window are ok? My patchset was thought to be one atomic
patchset, I splitted rate and cell-rate for better patch review. Next time I
will sent API changes in one separate patch. Thanks Eric!
include/linux/pkt_sched.h | 3 +++
net/sched/sch_netem.c | 34 ++++++++++++++++++++++++++++++----
2 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index 8786ea7..8daced3 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -502,6 +502,9 @@ struct tc_netem_corrupt {
struct tc_netem_rate {
__u32 rate; /* byte/s */
+ __s32 packet_overhead;
+ __u32 cell_size;
+ __s32 cell_overhead;
};
enum {
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 3bfd733..b6a16bd 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -22,6 +22,7 @@
#include <linux/skbuff.h>
#include <linux/vmalloc.h>
#include <linux/rtnetlink.h>
+#include <linux/reciprocal_div.h>
#include <net/netlink.h>
#include <net/pkt_sched.h>
@@ -80,6 +81,10 @@ struct netem_sched_data {
u32 reorder;
u32 corrupt;
u32 rate;
+ s32 packet_overhead;
+ u32 cell_size;
+ u32 cell_size_reciprocal;
+ s32 cell_overhead;
struct crndstate {
u32 last;
@@ -299,11 +304,23 @@ static psched_tdiff_t tabledist(psched_tdiff_t mu, psched_tdiff_t sigma,
return x / NETEM_DIST_SCALE + (sigma / NETEM_DIST_SCALE) * t + mu;
}
-static psched_time_t packet_len_2_sched_time(unsigned int len, u32 rate)
+static psched_time_t packet_len_2_sched_time(unsigned int len, struct netem_sched_data *q)
{
- u64 ticks = (u64)len * NSEC_PER_SEC;
+ u64 ticks;
- do_div(ticks, rate);
+ len += q->packet_overhead;
+
+ if (q->cell_size) {
+ u32 cells = reciprocal_divide(len, q->cell_size_reciprocal);
+
+ if (len > cells * q->cell_size) /* extra cell needed for remainder */
+ cells++;
+ len = cells * (q->cell_size + q->cell_overhead);
+ }
+
+ ticks = (u64)len * NSEC_PER_SEC;
+
+ do_div(ticks, q->rate);
return PSCHED_NS2TICKS(ticks);
}
@@ -384,7 +401,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
if (q->rate) {
struct sk_buff_head *list = &q->qdisc->q;
- delay += packet_len_2_sched_time(skb->len, q->rate);
+ delay += packet_len_2_sched_time(skb->len, q);
if (!skb_queue_empty(list)) {
/*
@@ -568,6 +585,12 @@ static void get_rate(struct Qdisc *sch, const struct nlattr *attr)
const struct tc_netem_rate *r = nla_data(attr);
q->rate = r->rate;
+ q->packet_overhead = r->packet_overhead;
+ q->cell_size = r->cell_size;
+ if (q->cell_size)
+ q->cell_size_reciprocal = reciprocal_value(q->cell_size);
+ q->cell_overhead = r->cell_overhead;
}
static int get_loss_clg(struct Qdisc *sch, const struct nlattr *attr)
@@ -909,6 +932,9 @@ static int netem_dump(struct Qdisc *sch, struct sk_buff *skb)
NLA_PUT(skb, TCA_NETEM_CORRUPT, sizeof(corrupt), &corrupt);
rate.rate = q->rate;
+ rate.packet_overhead = q->packet_overhead;
+ rate.cell_size = q->cell_size;
+ rate.cell_overhead = q->cell_overhead;
NLA_PUT(skb, TCA_NETEM_RATE, sizeof(rate), &rate);
if (dump_loss_model(q, skb) != 0)
--
1.7.7.3
^ permalink raw reply related
* Re: [PATCH net-next] drivers/net: use IS_ENABLED(CONFIG_IPV6)
From: Joe Perches @ 2011-12-11 0:51 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev
In-Reply-To: <1323556174.4016.35.camel@edumazet-laptop>
On Sat, 2011-12-10 at 23:29 +0100, Eric Dumazet wrote:
> Le samedi 10 décembre 2011 à 14:00 -0800, Joe Perches a écrit :
> > Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
[]
> > diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
[]
> > @@ -3516,7 +3516,7 @@ static int cnic_get_v4_route(struct sockaddr_in *dst_addr,
> > static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr,
> > struct dst_entry **dst)
> > {
> > -#if defined(CONFIG_IPV6) || (defined(CONFIG_IPV6_MODULE) && defined(MODULE))
> > +#if IS_ENABLED(CONFIG_IPV6)
>
> Are you sure this is equivalent ?
I believe so.
KBUILD add -DMODULE to the compile options when
building for modules.
^ permalink raw reply
* drivers/net/usb/asix: bug in asix_get_wol
From: Eugene @ 2011-12-11 1:02 UTC (permalink / raw)
To: netdev, grundler
Dear kernel devs,
Thanks for the commit at
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commitdiff;h=4ad1438f025ed8d1e4e95a796ca7f0ad5a22c378,
It successfully stops my adapter from dying when wake-on-lan gets
enabled. However, I've noticed that it has broken asix_get_wol - the
lines
if (opt & AX_MONITOR_LINK)
wolinfo->wolopts |= WAKE_PHY;
if (opt & AX_MONITOR_MAGIC)
wolinfo->wolopts |= WAKE_MAGIC;
have been accidentally removed. The vendor driver has them, and I've
successfully tested a kernel with these lines included. The change is
too small for me to bother sending in a properly formatted patch...
Cheers,
Eugene
^ permalink raw reply
* IFB and bridges
From: John A. Sullivan III @ 2011-12-11 1:15 UTC (permalink / raw)
To: netdev
Hello, all. This is more an "out of curiosity" question. I'm starting
to build a test environment for all I've learned about Linux traffic
shaping over the last week. One of the devices happens to be configured
as a bridge. It quickly became apparent that I needed to do shaping on
the individual ports and not the bridge port.
This would be a real pain if I have lots of ports - 8 or 10 or 20
identical configurations. Would this be an ideal use for IFB? That is,
to redirect all ports to IFB and apply one set qdiscs/classes? Thanks -
John
^ permalink raw reply
* Re: [PATCH net-next] drivers/net: use IS_ENABLED(CONFIG_IPV6)
From: Eric Dumazet @ 2011-12-11 8:52 UTC (permalink / raw)
To: Joe Perches; +Cc: David Miller, netdev
In-Reply-To: <1323564696.29470.6.camel@joe2Laptop>
Le samedi 10 décembre 2011 à 16:51 -0800, Joe Perches a écrit :
> On Sat, 2011-12-10 at 23:29 +0100, Eric Dumazet wrote:
> > Le samedi 10 décembre 2011 à 14:00 -0800, Joe Perches a écrit :
> > > Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
> []
> > > diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
> []
> > > @@ -3516,7 +3516,7 @@ static int cnic_get_v4_route(struct sockaddr_in *dst_addr,
> > > static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr,
> > > struct dst_entry **dst)
> > > {
> > > -#if defined(CONFIG_IPV6) || (defined(CONFIG_IPV6_MODULE) && defined(MODULE))
> > > +#if IS_ENABLED(CONFIG_IPV6)
> >
> > Are you sure this is equivalent ?
>
> I believe so.
>
> KBUILD add -DMODULE to the compile options when
> building for modules.
>
>
You didnt answer my question or you dont understand your change.
I wonder why.
Point was : IPV6 compiled as a module, and _this_ driver compiled
staticaly.
Did you tried this combination ?
^ permalink raw reply
* Re: IFB and bridges
From: Eric Dumazet @ 2011-12-11 8:58 UTC (permalink / raw)
To: John A. Sullivan III; +Cc: netdev
In-Reply-To: <1323566146.3159.186.camel@denise.theartistscloset.com>
Le samedi 10 décembre 2011 à 20:15 -0500, John A. Sullivan III a écrit :
> Hello, all. This is more an "out of curiosity" question. I'm starting
> to build a test environment for all I've learned about Linux traffic
> shaping over the last week. One of the devices happens to be configured
> as a bridge. It quickly became apparent that I needed to do shaping on
> the individual ports and not the bridge port.
>
> This would be a real pain if I have lots of ports - 8 or 10 or 20
> identical configurations. Would this be an ideal use for IFB? That is,
> to redirect all ports to IFB and apply one set qdiscs/classes? Thanks -
I have no idea what your problem is.
You want to shape either egress or ingress, for different reasons (most
people shape egress), but on proxies an ingress and egress combination
is welcomed.
But having to use ingress on the same machine in place of egress, I dont
see why.
^ permalink raw reply
* [PATCH/resend] m68k/net: Remove obsolete IRQ_FLG_* users
From: Geert Uytterhoeven @ 2011-12-11 9:04 UTC (permalink / raw)
To: David S. Miller, netdev; +Cc: linux-m68k, Geert Uytterhoeven, David S. Miller
The m68k core irq code stopped honoring these flags during the irq
restructuring in 2006.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
---
Please take or ack, so I can remove the definition for IRQ_FLG_FAST in
the m68k code
drivers/net/ethernet/natsemi/macsonic.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/natsemi/macsonic.c b/drivers/net/ethernet/natsemi/macsonic.c
index a2eacbf..5987d17 100644
--- a/drivers/net/ethernet/natsemi/macsonic.c
+++ b/drivers/net/ethernet/natsemi/macsonic.c
@@ -142,8 +142,7 @@ static int macsonic_open(struct net_device* dev)
{
int retval;
- retval = request_irq(dev->irq, sonic_interrupt, IRQ_FLG_FAST,
- "sonic", dev);
+ retval = request_irq(dev->irq, sonic_interrupt, 0, "sonic", dev);
if (retval) {
printk(KERN_ERR "%s: unable to get IRQ %d.\n",
dev->name, dev->irq);
@@ -154,8 +153,8 @@ static int macsonic_open(struct net_device* dev)
* rupt as well, which must prevent re-entrance of the sonic handler.
*/
if (dev->irq == IRQ_AUTO_3) {
- retval = request_irq(IRQ_NUBUS_9, macsonic_interrupt,
- IRQ_FLG_FAST, "sonic", dev);
+ retval = request_irq(IRQ_NUBUS_9, macsonic_interrupt, 0,
+ "sonic", dev);
if (retval) {
printk(KERN_ERR "%s: unable to get IRQ %d.\n",
dev->name, IRQ_NUBUS_9);
--
1.7.0.4
^ permalink raw reply related
* [PATCH net-next v4] xen-netfront: delay gARP until backend switches to Connected
From: Laszlo Ersek @ 2011-12-11 11:48 UTC (permalink / raw)
To: konrad.wilk, jeremy, xen-devel, virtualization, netdev,
linux-kernel
In-Reply-To: <20111209.192439.275865894437319638.davem@davemloft.net>
After a guest is live migrated, the xen-netfront driver emits a gratuitous
ARP message, so that networking hardware on the target host's subnet can
take notice, and public routing to the guest is re-established. However,
if the packet appears on the backend interface before the backend is added
to the target host's bridge, the packet is lost, and the migrated guest's
peers become unable to talk to the guest.
A sufficient two-parts condition to prevent the above is:
(1) ensure that the backend only moves to Connected xenbus state after its
hotplug scripts completed, ie. the netback interface got added to the
bridge; and
(2) ensure the frontend only queues the gARP when it sees the backend move
to Connected.
These two together provide complete ordering. Sub-condition (1) is already
satisfied by commit f942dc2552b8 in Linus' tree, based on commit
6b0b80ca7165 from [1].
In general, the full condition is sufficient, not necessary, because,
according to [2], live migration has been working for a long time without
satisfying sub-condition (2). However, after 6b0b80ca7165 was backported
to the RHEL-5 host to ensure (1), (2) still proved necessary in the RHEL-6
guest. This patch intends to provide (2) for upstream.
The Reviewed-by line comes from [3].
[1] git://xenbits.xen.org/people/ianc/linux-2.6.git#upstream/dom0/backend/netback-history
[2] http://old-list-archives.xen.org/xen-devel/2011-06/msg01969.html
[3] http://old-list-archives.xen.org/xen-devel/2011-07/msg00484.html
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ian Campbell <ian.campbell@citrix.com>
---
drivers/net/xen-netfront.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index d29365a..f033656 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1646,7 +1646,6 @@ static void netback_changed(struct xenbus_device *dev,
case XenbusStateInitialised:
case XenbusStateReconfiguring:
case XenbusStateReconfigured:
- case XenbusStateConnected:
case XenbusStateUnknown:
case XenbusStateClosed:
break;
@@ -1657,6 +1656,9 @@ static void netback_changed(struct xenbus_device *dev,
if (xennet_connect(netdev) != 0)
break;
xenbus_switch_state(dev, XenbusStateConnected);
+ break;
+
+ case XenbusStateConnected:
netif_notify_peers(netdev);
break;
--
1.7.4.4
^ permalink raw reply related
* RE: [PATCH net-next 4/4 v2] bnx2x, cnic: support DRV_INFO upon FW request
From: Barak Witkowski @ 2011-12-11 13:47 UTC (permalink / raw)
To: Michael Chan, 'Joe Perches'
Cc: 'davem@davemloft.net', 'netdev@vger.kernel.org',
Eilon Greenstein
In-Reply-To: <0E685F8B314BFB42AE2422915B7BDCC3066290@IRVEXCHMB07.corp.ad.broadcom.com>
Michael Chan wrote:
> Joe Perches wrote:
> >
> > > + #define DRV_FLAGS_CAPABILITIES_LOADED_L2 0x00000002
> > > + #define DRV_FLAGS_CAPABILITIES_LOADED_FCOE 0x00000004
> > > + #define DRV_FLAGS_CAPABILITIES_LOADED_ISCSI 0x00000008
> >
> > I think the #defines should be left aligned.
> >
>
> I'll fix up some of these, but many #defines in this file are not
> starting at the left margin. Eilon will fix those up with a separate
> patch later.
In that area of the file all of the #defines related to specific field are not left aligned, but aligned to the field definition they refer to.
We looked into it and tried left aligning all of those definitions and found it less readable, as this part contains only structure definitions with specific #defines per each field, and some of those definitions include double hierarchy (which will be lost if they will all be left aligned).
^ permalink raw reply
* iwlagn regression in v3.1.5
From: Andrej Gelenberg @ 2011-12-11 13:24 UTC (permalink / raw)
To: Wey-Yi Guy
Cc: Intel Linux Wireless, John W. Linville, linux-wireless, netdev,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 418 bytes --]
Hello,
there in an regression in kernel release v3.1.5. Commit
43c308bd8d0a3e7d98c5abcd41a4a3fada3d198f "iwlwifi: do not re-configure
HT40 after associated" break iwlagn driver for Intel Corporation
Centrino Ultimate-N 6300 (rev 35) on my Thinkpad t510. I still can
connect to the AP, but i can't pin or access anything. Reverting that
commit solved the Problem. I attached the patch.
Regards,
Andrej Gelenberg
[-- Attachment #2: 0001-Revert-iwlwifi-do-not-re-configure-HT40-after-associ.patch --]
[-- Type: text/x-patch, Size: 5301 bytes --]
>From 4f53ace64deb22cc4dc5616c93a3b5e21435d429 Mon Sep 17 00:00:00 2001
From: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Date: Sun, 11 Dec 2011 13:50:26 +0100
Subject: [PATCH] Revert "iwlwifi: do not re-configure HT40 after associated"
This reverts commit 43c308bd8d0a3e7d98c5abcd41a4a3fada3d198f.
It break wlan driver on my Thinkpad t510. I can connect to the network
and i get ip from dhcpcd, but no ping or tcp connection can be
established.
lspci:
03:00.0 Network controller: Intel Corporation Centrino Ultimate-N 6300
(rev 35)
dmesg:
[ 3.697288] iwlagn 0000:03:00.0: PCI INT A -> GSI 17 (level, low) ->
IRQ 17
[ 3.697841] iwlagn 0000:03:00.0: setting latency timer to 64
[ 3.697873] iwlagn 0000:03:00.0: pci_resource_len = 0x00002000
[ 3.698389] iwlagn 0000:03:00.0: pci_resource_base = ffffc90010084000
[ 3.698954] iwlagn 0000:03:00.0: HW Revision ID = 0x35
[ 3.699629] iwlagn 0000:03:00.0: irq 43 for MSI/MSI-X
[ 3.699705] iwlagn 0000:03:00.0: Detected Intel(R) Centrino(R)
Ultimate-N 6300 AGN, REV=0x74
[ 3.700181] iwlagn 0000:03:00.0: L1 Enabled; Disabling L0S
[ 3.717265] iwlagn 0000:03:00.0: device EEPROM VER=0x436, CALIB=0x6
[ 3.717461] iwlagn 0000:03:00.0: Device SKU: 0X1f0
[ 3.717984] iwlagn 0000:03:00.0: Valid Tx ant: 0X7, Valid Rx ant: 0X7
[ 3.718531] iwlagn 0000:03:00.0: Tunable channels: 13 802.11bg, 24
802.11a channels
[ 3.719141] iwlagn 0000:03:00.0: loaded firmware version 9.221.4.1
build 25532
...
[ 71.965289] iwlagn 0000:03:00.0: L1 Enabled; Disabling L0S
[ 71.972290] iwlagn 0000:03:00.0: Radio type=0x0-0x3-0x1
[ 72.213804] iwlagn 0000:03:00.0: L1 Enabled; Disabling L0S
[ 72.220770] iwlagn 0000:03:00.0: Radio type=0x0-0x3-0x1
Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
---
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 36 +++++++++-----------------
drivers/net/wireless/iwlwifi/iwl-agn.c | 18 +++++++++++--
drivers/net/wireless/iwlwifi/iwl-agn.h | 2 -
3 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index eabbf1a..a7ddc98 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -542,24 +542,6 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
return 0;
}
-void iwlagn_config_ht40(struct ieee80211_conf *conf,
- struct iwl_rxon_context *ctx)
-{
- if (conf_is_ht40_minus(conf)) {
- ctx->ht.extension_chan_offset =
- IEEE80211_HT_PARAM_CHA_SEC_BELOW;
- ctx->ht.is_40mhz = true;
- } else if (conf_is_ht40_plus(conf)) {
- ctx->ht.extension_chan_offset =
- IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
- ctx->ht.is_40mhz = true;
- } else {
- ctx->ht.extension_chan_offset =
- IEEE80211_HT_PARAM_CHA_SEC_NONE;
- ctx->ht.is_40mhz = false;
- }
-}
-
int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
{
struct iwl_priv *priv = hw->priv;
@@ -618,11 +600,19 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
ctx->ht.enabled = conf_is_ht(conf);
if (ctx->ht.enabled) {
- /* if HT40 is used, it should not change
- * after associated except channel switch */
- if (iwl_is_associated_ctx(ctx) &&
- !ctx->ht.is_40mhz)
- iwlagn_config_ht40(conf, ctx);
+ if (conf_is_ht40_minus(conf)) {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_BELOW;
+ ctx->ht.is_40mhz = true;
+ } else if (conf_is_ht40_plus(conf)) {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
+ ctx->ht.is_40mhz = true;
+ } else {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_NONE;
+ ctx->ht.is_40mhz = false;
+ }
} else
ctx->ht.is_40mhz = false;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index f473c01..7157c6b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3086,9 +3086,21 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw,
/* Configure HT40 channels */
ctx->ht.enabled = conf_is_ht(conf);
- if (ctx->ht.enabled)
- iwlagn_config_ht40(conf, ctx);
- else
+ if (ctx->ht.enabled) {
+ if (conf_is_ht40_minus(conf)) {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_BELOW;
+ ctx->ht.is_40mhz = true;
+ } else if (conf_is_ht40_plus(conf)) {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
+ ctx->ht.is_40mhz = true;
+ } else {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_NONE;
+ ctx->ht.is_40mhz = false;
+ }
+ } else
ctx->ht.is_40mhz = false;
if ((le16_to_cpu(ctx->staging.channel) != ch))
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index e172f6b..d941c4c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -135,8 +135,6 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *bss_conf,
u32 changes);
-void iwlagn_config_ht40(struct ieee80211_conf *conf,
- struct iwl_rxon_context *ctx);
/* uCode */
void iwlagn_rx_calib_result(struct iwl_priv *priv,
--
1.7.8
^ permalink raw reply related
* Re: [PATCH RFC] virtio_net: fix refill related races
From: Michael S. Tsirkin @ 2011-12-11 14:44 UTC (permalink / raw)
To: Rusty Russell; +Cc: Amit Shah, netdev, linux-kernel, virtualization
In-Reply-To: <8739cvisqe.fsf@rustcorp.com.au>
On Thu, Dec 08, 2011 at 03:07:29PM +1030, Rusty Russell wrote:
> On Wed, 7 Dec 2011 17:21:22 +0200, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > Fix theoretical races related to refill work:
> > 1. After napi is disabled by ndo_stop, refill work
> > can run and re-enable it.
> > 2. Refill can reschedule itself, if this happens
> > it can run after cancel_delayed_work_sync,
> > and will access device after it is destroyed.
> >
> > As a solution, add flags to track napi state and
> > to disable refill, and toggle them on start, stop
> > and remove; check these flags on refill.
>
> Why isn't a "dont-readd" flag sufficient?
>
> Cheers,
> Rusty.
I started with that, but here's the problem I wanted to
address:
- we run out of descriptors and schedule refill work
- ndo_close runs
- refill work runs
- ndo_open runs
Now if we just disable refill, refill work will not add buffers and will
not reschedule. Now we'll never get more buffers.
We can try starting refill work from ndo_open but overall
this seems to me more risky than just splitting flags.
--
MST
^ permalink raw reply
* Re: iwlagn regression in v3.1.5
From: Andrej Gelenberg @ 2011-12-11 16:33 UTC (permalink / raw)
To: Wey-Yi Guy
Cc: Intel Linux Wireless, John W. Linville, linux-wireless, netdev,
linux-kernel
In-Reply-To: <4EE4AEF4.2080702@udo.edu>
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
Hello,
the original commit 34a5b4b6af104cf18eb50748509528b9bdbc4036 in upstream
(v3.2.0-rc5) break the driver too. Please revert it, before the release.
Patch for 3.2-rc5 attached.
Regards,
Andrej Gelenberg
On 12/11/2011 02:24 PM, Andrej Gelenberg wrote:
> Hello,
>
> there in an regression in kernel release v3.1.5. Commit
> 43c308bd8d0a3e7d98c5abcd41a4a3fada3d198f "iwlwifi: do not re-configure
> HT40 after associated" break iwlagn driver for Intel Corporation
> Centrino Ultimate-N 6300 (rev 35) on my Thinkpad t510. I still can
> connect to the AP, but i can't pin or access anything. Reverting that
> commit solved the Problem. I attached the patch.
>
> Regards,
> Andrej Gelenberg
[-- Attachment #2: 0001-Revert-iwlwifi-do-not-re-configure-HT40-after-associ.patch --]
[-- Type: text/x-patch, Size: 5298 bytes --]
>From 88a9409dbe93193d28e2fde6525e98c84a0ce115 Mon Sep 17 00:00:00 2001
From: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Date: Sun, 11 Dec 2011 17:21:38 +0100
Subject: [PATCH] Revert "iwlwifi: do not re-configure HT40 after associated"
This reverts commit 34a5b4b6af104cf18eb50748509528b9bdbc4036.
It break wlan driver on my Thinkpad t510. I can connect to the network
and i get ip from dhcpcd, but no ping or tcp connection can be
established.
lspci:
03:00.0 Network controller: Intel Corporation Centrino Ultimate-N 6300
(rev 35)
dmesg:
[ 3.697288] iwlagn 0000:03:00.0: PCI INT A -> GSI 17 (level, low) ->
IRQ 17
[ 3.697841] iwlagn 0000:03:00.0: setting latency timer to 64
[ 3.697873] iwlagn 0000:03:00.0: pci_resource_len = 0x00002000
[ 3.698389] iwlagn 0000:03:00.0: pci_resource_base = ffffc90010084000
[ 3.698954] iwlagn 0000:03:00.0: HW Revision ID = 0x35
[ 3.699629] iwlagn 0000:03:00.0: irq 43 for MSI/MSI-X
[ 3.699705] iwlagn 0000:03:00.0: Detected Intel(R) Centrino(R)
Ultimate-N 6300 AGN, REV=0x74
[ 3.700181] iwlagn 0000:03:00.0: L1 Enabled; Disabling L0S
[ 3.717265] iwlagn 0000:03:00.0: device EEPROM VER=0x436, CALIB=0x6
[ 3.717461] iwlagn 0000:03:00.0: Device SKU: 0X1f0
[ 3.717984] iwlagn 0000:03:00.0: Valid Tx ant: 0X7, Valid Rx ant: 0X7
[ 3.718531] iwlagn 0000:03:00.0: Tunable channels: 13 802.11bg, 24
802.11a channels
[ 3.719141] iwlagn 0000:03:00.0: loaded firmware version 9.221.4.1
build 25532
...
[ 71.965289] iwlagn 0000:03:00.0: L1 Enabled; Disabling L0S
[ 71.972290] iwlagn 0000:03:00.0: Radio type=0x0-0x3-0x1
[ 72.213804] iwlagn 0000:03:00.0: L1 Enabled; Disabling L0S
[ 72.220770] iwlagn 0000:03:00.0: Radio type=0x0-0x3-0x1
Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
---
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 36 +++++++++-----------------
drivers/net/wireless/iwlwifi/iwl-agn.c | 18 +++++++++++--
drivers/net/wireless/iwlwifi/iwl-agn.h | 2 -
3 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index a7a6def..58a381c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -528,24 +528,6 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
return 0;
}
-void iwlagn_config_ht40(struct ieee80211_conf *conf,
- struct iwl_rxon_context *ctx)
-{
- if (conf_is_ht40_minus(conf)) {
- ctx->ht.extension_chan_offset =
- IEEE80211_HT_PARAM_CHA_SEC_BELOW;
- ctx->ht.is_40mhz = true;
- } else if (conf_is_ht40_plus(conf)) {
- ctx->ht.extension_chan_offset =
- IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
- ctx->ht.is_40mhz = true;
- } else {
- ctx->ht.extension_chan_offset =
- IEEE80211_HT_PARAM_CHA_SEC_NONE;
- ctx->ht.is_40mhz = false;
- }
-}
-
int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
{
struct iwl_priv *priv = hw->priv;
@@ -604,11 +586,19 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
ctx->ht.enabled = conf_is_ht(conf);
if (ctx->ht.enabled) {
- /* if HT40 is used, it should not change
- * after associated except channel switch */
- if (iwl_is_associated_ctx(ctx) &&
- !ctx->ht.is_40mhz)
- iwlagn_config_ht40(conf, ctx);
+ if (conf_is_ht40_minus(conf)) {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_BELOW;
+ ctx->ht.is_40mhz = true;
+ } else if (conf_is_ht40_plus(conf)) {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
+ ctx->ht.is_40mhz = true;
+ } else {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_NONE;
+ ctx->ht.is_40mhz = false;
+ }
} else
ctx->ht.is_40mhz = false;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index bacc06c..3a5e802 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2610,9 +2610,21 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw,
/* Configure HT40 channels */
ctx->ht.enabled = conf_is_ht(conf);
- if (ctx->ht.enabled)
- iwlagn_config_ht40(conf, ctx);
- else
+ if (ctx->ht.enabled) {
+ if (conf_is_ht40_minus(conf)) {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_BELOW;
+ ctx->ht.is_40mhz = true;
+ } else if (conf_is_ht40_plus(conf)) {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
+ ctx->ht.is_40mhz = true;
+ } else {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_NONE;
+ ctx->ht.is_40mhz = false;
+ }
+ } else
ctx->ht.is_40mhz = false;
if ((le16_to_cpu(ctx->staging.channel) != ch))
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index 3856aba..5b936ec 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -86,8 +86,6 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *bss_conf,
u32 changes);
-void iwlagn_config_ht40(struct ieee80211_conf *conf,
- struct iwl_rxon_context *ctx);
/* uCode */
int iwlagn_rx_calib_result(struct iwl_priv *priv,
--
1.7.8
^ permalink raw reply related
* Re: iwlagn regression in v3.1.5
From: Udo Steinberg @ 2011-12-11 16:41 UTC (permalink / raw)
To: Andrej Gelenberg
Cc: Wey-Yi Guy, Intel Linux Wireless, John W. Linville,
linux-wireless, netdev, linux-kernel
In-Reply-To: <4EE4DB55.4090804@udo.edu>
[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]
Hi,
The patch fixes the following bug:
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2326
If the patch introduces a regression for you, then the problem needs to be
investigated further. Reverting the patch will reintroduce an already fixed
problem for others.
Cheers,
- Udo
On Sun, 11 Dec 2011 17:33:25 +0100 Andrej Gelenberg (AG) wrote:
AG> Hello,
AG>
AG> the original commit 34a5b4b6af104cf18eb50748509528b9bdbc4036 in upstream (v3.2.0-rc5) break the driver too. Please revert it, before the release. Patch for 3.2-rc5 attached.
AG>
AG> Regards,
AG> Andrej Gelenberg
AG>
AG> On 12/11/2011 02:24 PM, Andrej Gelenberg wrote:
AG> > Hello,
AG> >
AG> > there in an regression in kernel release v3.1.5. Commit
AG> > 43c308bd8d0a3e7d98c5abcd41a4a3fada3d198f "iwlwifi: do not re-configure
AG> > HT40 after associated" break iwlagn driver for Intel Corporation
AG> > Centrino Ultimate-N 6300 (rev 35) on my Thinkpad t510. I still can
AG> > connect to the AP, but i can't pin or access anything. Reverting that
AG> > commit solved the Problem. I attached the patch.
AG> >
AG> > Regards,
AG> > Andrej Gelenberg
AG>
--
Dipl.-Inf. Udo Steinberg
Technische Universität Dresden http://os.inf.tu-dresden.de/~us15
Institute of Systems Architecture Tel: +49 351 463 38401
D-01062 Dresden Fax: +49 351 463 38284
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* Re: iwlagn regression in v3.1.5
From: Andrej Gelenberg @ 2011-12-11 16:58 UTC (permalink / raw)
To: Udo Steinberg
Cc: Wey-Yi Guy, Intel Linux Wireless, John W. Linville,
linux-wireless, netdev, linux-kernel
In-Reply-To: <20111211174138.79e51fe8@x220.fritz.box>
Hi,
this is pretty mean regression for the stable kernel. You may the fix
only for cards, which need it and not for all of them.
Regards,
Andrej
On 12/11/2011 05:41 PM, Udo Steinberg wrote:
> Hi,
>
> The patch fixes the following bug:
> http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2326
>
> If the patch introduces a regression for you, then the problem needs to be
> investigated further. Reverting the patch will reintroduce an already fixed
> problem for others.
>
> Cheers,
>
> - Udo
>
^ permalink raw reply
* Re: iwlagn regression in v3.1.5
From: wwguy @ 2011-12-11 18:23 UTC (permalink / raw)
To: Andrej Gelenberg
Cc: Udo Steinberg, Intel Linux Wireless, John W. Linville,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <4EE4E152.2070204-KJIyc1CJxjQ@public.gmane.org>
On Sun, 2011-12-11 at 08:58 -0800, Andrej Gelenberg wrote:
> Hi,
>
> this is pretty mean regression for the stable kernel. You may the fix
> only for cards, which need it and not for all of them.
Could you elaborate more on the failure case and setup. this patch is to
address HT40 related problem which cause the iwlwifi firmware crash.
Thanks
Wey
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" 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 net-next v2 2/4] can: cc770: add legacy ISA bus driver for the CC770 and AN82527
From: Wolfgang Zarre @ 2011-12-11 18:33 UTC (permalink / raw)
To: Wolfgang Grandegger
Cc: Oliver Hartkopp, netdev, linux-can, socketcan-users, IreneV,
Stanislav Yelenskiy
In-Reply-To: <4EE1E26B.6090308@grandegger.com>
Hello Wolfgang,
> On 12/07/2011 02:42 PM, Wolfgang Grandegger wrote:
>> Hi Wolfgang,
>>
>> On 12/06/2011 10:08 PM, Wolfgang Zarre wrote:
>>> Hello Wolfgang,
>>>
>>>> Hi Wolfgang,
>>>>
>>>> On 12/04/2011 07:47 PM, Wolfgang Zarre wrote:
>> ...
>>>>>
>>>>> Should be not a problem at all.
>>>>
>>>> Great, thanks.
>>>
>>> Ok, here we go:
>>>
>>> uname -r: 3.2.0-rc4
>>>
>>> modprobe cc770_isa irq=0xa port=0x384 indirect=1 cir=0x61 bcr=0x4A
>>> ip link set can0 up type can bitrate 500000;
>>>
>>> kern.log
>>> Dec 6 20:42:19 svserv01 kernel: [ 2111.900735] CAN device driver interface
>>> Dec 6 20:42:19 svserv01 kernel: [ 2111.903072] cc770: CAN netdevice driver
>>> Dec 6 20:42:19 svserv01 kernel: [ 2111.904692] cc770_isa: platform
>>> device 0: port=0x384, mem=0x0, irq=10
>>> Dec 6 20:42:19 svserv01 kernel: [ 2111.904726] cc770_isa cc770_isa.0:
>>> probing idx=0: port=0x384, mem=0x0, irq=10
>>> Dec 6 20:42:19 svserv01 kernel: [ 2111.904779] cc770_isa cc770_isa.0:
>>> (unregistered net_device): i82527 mode with additional functions
>>> Dec 6 20:42:19 svserv01 kernel: [ 2111.906407] cc770_isa cc770_isa.0:
>>> device registered (reg_base=0x00000384, irq=10)
>>> Dec 6 20:42:19 svserv01 kernel: [ 2111.906457] cc770_isa: driver for
>>> max. 8 devices registered
>>> 6 20:44:17 svserv01 kernel: [ 2229.886845] cc770_isa cc770_isa.0:
>>> can0: setting BTR0=0x00 BTR1=0x1c
>>> Dec 6 20:44:17 svserv01 kernel: [ 2229.886920] cc770_isa cc770_isa.0:
>>> can0: Message object 15 for RX data, RTR, SFF and EFF
>>> Dec 6 20:44:17 svserv01 kernel: [ 2229.886937] cc770_isa cc770_isa.0:
>>> can0: Message object 11 for TX data, RTR, SFF and EFF
>>> Dec 6 20:52:40 svserv01 kernel: [ 2733.172845] can: controller area
>>> network core (rev 20090105 abi 8)
>>> Dec 6 20:52:40 svserv01 kernel: [ 2733.172967] NET: Registered protocol
>>> family 29
>>> Dec 6 20:52:40 svserv01 kernel: [ 2733.178187] can: raw protocol (rev
>>> 20090105)
>>>
>>>
>>> ip -d -s link show
>>> 4: can0:<NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN
>>> qlen 10
>>> link/can
>>> can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
>>> bitrate 500000 sample-point 0.875
>>> tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
>>> cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
>>> clock 8000000
>>> re-started bus-errors arbit-lost error-warn error-pass bus-off
>>> 0 0 0 0 0 0
>>> RX: bytes packets errors dropped overrun mcast
>>> 0 0 0 0 0 0
>>> TX: bytes packets errors dropped carrier collsns
>>> 0 0 0 0 0 0
>>>
>>>
>>> After rebooting the PLC with proprietary buggy kernel:
>>> 4: can0:<NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN
>>> qlen 10
>>> link/can
>>> can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
>>> bitrate 500000 sample-point 0.875
>>> tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
>>> cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
>>> clock 8000000
>>> re-started bus-errors arbit-lost error-warn error-pass bus-off
>>> 0 0 0 0 0 0
>>> RX: bytes packets errors dropped overrun mcast
>>> 414 267 0 267 0 0
>>> TX: bytes packets errors dropped carrier collsns
>>> 0 0 0 0 0 0
>>>
>>>
>>>
>>> After sending 100,000 PDO's with 13ms displacement:
>>> 4: can0:<NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN
>>> qlen 10
>>> link/can
>>> can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
>>> bitrate 500000 sample-point 0.875
>>> tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
>>> cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
>>> clock 8000000
>>> re-started bus-errors arbit-lost error-warn error-pass bus-off
>>> 0 0 0 0 0 0
>>> RX: bytes packets errors dropped overrun mcast
>>> 4544 4284 0 331 0 0
>>> TX: bytes packets errors dropped carrier collsns
>>> 802660 202653 0 0 0 0
>>>
>>>
>>> The dropped ones of RX may be the not processed input packages and
>>> therefore ok.
>>>
>>> Let me know if You need more or some other tests.
>>
>> You could provoke some state changes or bus-off conditions to see if the
>> berr-counter shows reasonable results. I'm currently consolidating and
>> unifying error state and bus-off handling. Would be nice if you could do
>> some further tests when I have the patches ready...
>
> I just pushed the mentioned modifications to the "devel" branch of my
> "wg-linux-can-next" [1] repository. You can get it as shown below:
>
> $ git clone --reference=<some-recent-net-next-tree> \
> git://gitorious.org/~wgrandegger/linux-can/wg-linux-can-next.git
> $ git checkout -b devel devel
>
> [1] https://gitorious.org/~wgrandegger/linux-can/wg-linux-can-next
>
> Wolfgang.
OK, I was trying so far and You will find below the results.
Just FYI the states on the PLC side couldn't be verified because the function
provided by the manufacturer is not working at all and CAN analyser was not
available.
We are running CANopen and therefore the PLC will send automatically a heartbeat.
I produced the bus-off state through a short circuit between L/H which was
working as expected.
A bit odd was that on the second try I had to reload the module
because a ip down/up was not enough.
Let me know if You would need further tests or different procedure.
Starting procedure:
Cable disconnected
Restarting PC with new driver
Restarting PLC
Connecting cable
modprobe cc770_isa irq=0xa port=0x384 indirect=1 cir=0x61 bcr=0x4A
dmesg:
[ 221.996751] CAN device driver interface
[ 222.036036] cc770: CAN netdevice driver
[ 222.054260] cc770_isa: platform device 0: port=0x384, mem=0x0, irq=10
[ 222.054293] cc770_isa cc770_isa.0: probing idx=0: port=0x384, mem=0x0, irq=10
[ 222.054343] cc770_isa cc770_isa.0: (unregistered net_device): i82527 mode with additional functions
[ 222.055925] cc770_isa cc770_isa.0: device registered (reg_base=0x00000384, irq=10)
[ 222.055972] cc770_isa: driver for max. 8 devices registered
ip -d -s link show can0
4: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN qlen 10
link/can
can state STOPPED (berr-counter tx 92 rx 103) restart-ms 0
bitrate 0 sample-point 0.000
tq 0 prop-seg 0 phase-seg1 0 phase-seg2 0 sjw 0
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
ip link set can0 up type can bitrate 500000
dmesg:
[ 287.871983] cc770_isa cc770_isa.0: can0: setting BTR0=0x00 BTR1=0x1c
[ 287.872103] cc770_isa cc770_isa.0: can0: Message object 15 for RX data, RTR, SFF and EFF
[ 287.872119] cc770_isa cc770_isa.0: can0: Message object 11 for TX data, RTR, SFF and EFF
ip -d -s link show can0
4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
PLC stays in unknown CAN state (as usual )
Rebooting PLC
dmesg:
[ 466.169054] can: controller area network core (rev 20090105 abi 8)
[ 466.169178] NET: Registered protocol family 29
[ 466.174339] can: raw protocol (rev 20090105)
PLC is sending heartbeat
Starting PC heartbeats
ip -d -s link show can0
4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
513 365 0 0 0 0
TX: bytes packets errors dropped carrier collsns
20 20 0 0 0 0
Producing L/H short circuit for 2 seconds
dmesg:
[ 885.409058] cc770_isa cc770_isa.0: can0: status interrupt (0x5b)
[ 885.420475] cc770_isa cc770_isa.0: can0: status interrupt (0xc5)
[ 885.420496] cc770_isa cc770_isa.0: can0: bus-off
ip -d -s link show can0
4: can0: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state DOWN qlen 10
link/can
can state BUS-OFF (berr-counter tx 92 rx 103) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 0 1
RX: bytes packets errors dropped overrun mcast
544 382 0 0 0 0
TX: bytes packets errors dropped carrier collsns
30 29 0 0 0 0
Sending and receiving stops.
Trying to recover on PC:
ip link set can0 down;
ip -d -s link show can0
4: can0: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN qlen 10
link/can
can state STOPPED (berr-counter tx 92 rx 103) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 0 1
RX: bytes packets errors dropped overrun mcast
544 382 0 0 0 0
TX: bytes packets errors dropped carrier collsns
30 29 0 1 0 0
ip link set can0 up type can bitrate 500000;
dmesg:
[ 1090.937778] cc770_isa cc770_isa.0: can0: setting BTR0=0x00 BTR1=0x1c
[ 1090.937869] cc770_isa cc770_isa.0: can0: Message object 15 for RX data, RTR, SFF and EFF
[ 1090.937885] cc770_isa cc770_isa.0: can0: Message object 11 for TX data, RTR, SFF and EFF
[ 1090.938050] ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
[ 1090.940769] cc770_isa cc770_isa.0: can0: status interrupt (0x5)
ip -d -s link show can0
4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 0 1
RX: bytes packets errors dropped overrun mcast
552 383 0 0 0 0
TX: bytes packets errors dropped carrier collsns
30 29 0 1 0 0
PLC in unknown state but not sending heartbeat,
Rebooting PLC
PLC sends heartbeat but PC cannot send (buffer overrun)
ip -d -s link show can0
4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 0 1
RX: bytes packets errors dropped overrun mcast
582 398 0 0 0 0
TX: bytes packets errors dropped carrier collsns
30 29 0 1 0 0
Reloading driver
modprobe -r cc770_isa
dmesg:
[ 1457.133359] cc770: driver removed
modprobe cc770_isa irq=0xa port=0x384 indirect=1 cir=0x61 bcr=0x4A
dmesg:
[ 1474.051479] CAN device driver interface
[ 1474.053180] cc770: CAN netdevice driver
[ 1474.054416] cc770_isa: platform device 0: port=0x384, mem=0x0, irq=10
[ 1474.054449] cc770_isa cc770_isa.0: probing idx=0: port=0x384, mem=0x0, irq=10
[ 1474.054500] cc770_isa cc770_isa.0: (unregistered net_device): i82527 mode with additional functions
[ 1474.056097] cc770_isa cc770_isa.0: device registered (reg_base=0x00000384, irq=10)
[ 1474.056146] cc770_isa: driver for max. 8 devices registered
ip link set can0 up type can bitrate 500000;
[ 1484.586697] cc770_isa cc770_isa.0: can0: setting BTR0=0x00 BTR1=0x1c
[ 1484.586775] cc770_isa cc770_isa.0: can0: Message object 15 for RX data, RTR, SFF and EFF
[ 1484.586791] cc770_isa cc770_isa.0: can0: Message object 11 for TX data, RTR, SFF and EFF
Receiving and sending heartbeat
ip -d -s link show can0
5: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
158 157 0 0 0 0
TX: bytes packets errors dropped carrier collsns
16 16 0 0 0 0
-----------------------------------------
Producing L/H short circuit again for 2 seconds
dmesg:
[ 1719.018116] cc770_isa cc770_isa.0: can0: status interrupt (0x5b)
ip -d -s link show can0
5: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-WARNING (berr-counter tx 128 rx 128) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 0 0
RX: bytes packets errors dropped overrun mcast
271 263 0 0 0 0
TX: bytes packets errors dropped carrier collsns
88 87 0 0 0 0
Sending and receiving stops.
Trying to recover on PC with driver reload:
modprobe -r cc770_isa
dmesg:
[ 1820.358418] cc770: driver removed
modprobe cc770_isa irq=0xa port=0x384 indirect=1 cir=0x61 bcr=0x4A
dmesg:
[ 1826.810914] CAN device driver interface
[ 1826.812619] cc770: CAN netdevice driver
[ 1826.814126] cc770_isa: platform device 0: port=0x384, mem=0x0, irq=10
[ 1826.814158] cc770_isa cc770_isa.0: probing idx=0: port=0x384, mem=0x0, irq=10
[ 1826.814211] cc770_isa cc770_isa.0: (unregistered net_device): i82527 mode with additional functions
[ 1826.815789] cc770_isa cc770_isa.0: device registered (reg_base=0x00000384, irq=10)
[ 1826.815839] cc770_isa: driver for max. 8 devices registered
ip -d -s link show can0
6: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN qlen 10
link/can
can state STOPPED (berr-counter tx 92 rx 103) restart-ms 0
bitrate 0 sample-point 0.000
tq 0 prop-seg 0 phase-seg1 0 phase-seg2 0 sjw 0
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
ip link set can0 up type can bitrate 500000;
dmesg:
[ 1861.776977] cc770_isa cc770_isa.0: can0: setting BTR0=0x00 BTR1=0x1c
[ 1861.777102] cc770_isa cc770_isa.0: can0: Message object 15 for RX data, RTR, SFF and EFF
[ 1861.777118] cc770_isa cc770_isa.0: can0: Message object 11 for TX data, RTR, SFF and EFF
ip -d -s link show can0
6: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 128 rx 128) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
1 0 0 0 0 0
PLC in unknown state
Unable to send and receive heartbeat
Rebooting PLC
ip -d -s link show can0
6: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 115 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
13 13 0 0 0 0
ip -d -s link show can0
6: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 107 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
30 15 0 0 0 0
TX: bytes packets errors dropped carrier collsns
21 21 0 0 0 0
dmesg:
[ 2102.085718] cc770_isa cc770_isa.0: can0: status interrupt (0x18)
ip -d -s link show can0
6: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 32 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
310 156 0 0 0 0
TX: bytes packets errors dropped carrier collsns
96 96 0 0 0 0
And with counters on zero:
ip -d -s link show can0
6: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
358 204 0 0 0 0
TX: bytes packets errors dropped carrier collsns
129 129 0 0 0 0
-----------------------------------------
Disconnecting cable for around 4 seconds:
dmesg:
[ 2339.660283] cc770_isa cc770_isa.0: can0: status interrupt (0x5b)
ip -d -s link show can0
6: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-WARNING (berr-counter tx 128 rx 128) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 0 0
RX: bytes packets errors dropped overrun mcast
459 298 0 0 0 0
TX: bytes packets errors dropped carrier collsns
193 192 0 0 0 0
Connecting again:
ip -d -s link show can0
6: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-WARNING (berr-counter tx 120 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 0 0
RX: bytes packets errors dropped overrun mcast
473 311 0 0 0 0
TX: bytes packets errors dropped carrier collsns
200 200 0 0 0 0
After some time (around 125 seconds):
dmesg:
[ 2387.172008] cc770_isa cc770_isa.0: can0: status interrupt (0x18)
ip -d -s link show can0
6: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 29 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 0 0
RX: bytes packets errors dropped overrun mcast
616 447 0 0 0 0
TX: bytes packets errors dropped carrier collsns
291 291 0 0 0 0
-----------------------------------------
Disconnecting cable for around 55 seconds:
dmesg:
[ 2658.896959] cc770_isa cc770_isa.0: can0: status interrupt (0x5b)
ip -d -s link show can0
6: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-WARNING (berr-counter tx 128 rx 128) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 2 0 0
RX: bytes packets errors dropped overrun mcast
797 621 0 0 0 0
TX: bytes packets errors dropped carrier collsns
408 407 0 0 0 0
ip -d -s link show can0
6: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-WARNING (berr-counter tx 112 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 2 0 0
RX: bytes packets errors dropped overrun mcast
837 661 0 0 0 0
TX: bytes packets errors dropped carrier collsns
423 423 0 0 0 0
dmesg:
[ 2765.805486] cc770_isa cc770_isa.0: can0: status interrupt (0x18)
ip -d -s link show can0
6: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 94 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
cc770: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 2 0 0
RX: bytes packets errors dropped overrun mcast
872 689 0 0 0 0
TX: bytes packets errors dropped carrier collsns
441 441 0 0 0 0
Thanks a lot.
Wolfgang
^ permalink raw reply
* Re: iwlagn regression in v3.1.5
From: Andrej Gelenberg @ 2011-12-11 19:05 UTC (permalink / raw)
To: wwguy
Cc: Udo Steinberg, Intel Linux Wireless, John W. Linville,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <1323627815.1806.19.camel@wwguy-ubuntu>
Hi,
i haven't experienced firmware crushes, but after that commit i don't
get any networking with my wlan card. I added some lspci and dmesg
output to the patch. There was no strange output in my dmesg. dhcpcd
says in logs, that carrier lost after about 30 seconds. How can i
reproduce the HT40 bug?
Regards,
Andrej
On 12/11/2011 07:23 PM, wwguy wrote:
> On Sun, 2011-12-11 at 08:58 -0800, Andrej Gelenberg wrote:
>> Hi,
>>
>> this is pretty mean regression for the stable kernel. You may the fix
>> only for cards, which need it and not for all of them.
>
> Could you elaborate more on the failure case and setup. this patch is to
> address HT40 related problem which cause the iwlwifi firmware crash.
>
> Thanks
> Wey
>>>
>
>
^ permalink raw reply
* Re: iwlagn regression in v3.1.5
From: Andrej Gelenberg @ 2011-12-11 19:20 UTC (permalink / raw)
To: wwguy
Cc: Udo Steinberg, Intel Linux Wireless, John W. Linville,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <1323627815.1806.19.camel@wwguy-ubuntu>
Hi,
some info to the AP i use:
Technaxx Router-150 Wifi-N based on ranik soc
$ iw dev wlan0 station dump
Station xx:xx..xx:xx (on wlan0)
inactive time: 6603 ms
rx bytes: 377786468
rx packets: 443535
tx bytes: 15677515
tx packets: 155009
tx retries: 2723757
tx failed: 51495
signal: -72 dBm
signal avg: -71 dBm
tx bitrate: 135.0 MBit/s MCS 6 40Mhz short GI
authorized: yes
authenticated: yes
preamble: long
WMM/WME: yes
MFP: no
$ iwconfig wlan0
wlan0 IEEE 802.11abgn ESSID:"xxx"
Mode:Managed Frequency:2.437 GHz Access Point: xx:xx..xx:xx
Bit Rate=121.5 Mb/s Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=42/70 Signal level=-68 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:51520 Invalid misc:3567 Missed beacon:0
some dmesg output:
[ 903.748514] wlan0: authenticate with xx:xx..xx:xx (try 1)
[ 903.750991] wlan0: authenticated
[ 903.753357] wlan0: associate with xx:xx..xx:xx (try 1)
[ 903.759482] wlan0: RX AssocResp from xx:xx..xx:xx (capab=0xc31
status=0 aid=1)
[ 903.759487] wlan0: associated
$ iwlist wlan0 scan
Cell 06 - Address: xx:xx..xx:xx
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=45/70 Signal level=-65 dBm
Encryption key:on
ESSID:"xxx"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
18 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 12 Mb/s; 24 Mb/s; 48 Mb/s
Mode:Master
Extra:tsf=0000005666eac197
Extra: Last beacon: 33ms ago
IE: Unknown: 000873757065726B7568
IE: Unknown: 010882848B961224486C
IE: Unknown: 030106
IE: Unknown: 2A0100
IE: Unknown: 32040C183060
IE: Unknown:
2D1A7E1117FF000000010000000000000000000000000C0000000000
IE: Unknown:
3D1606070500000000000000000000000000000000000000
IE: Unknown: 3E0100
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown:
DD180050F2020101800003A4000027A4000042435E0062322F00
IE: Unknown: 0B05020012127A
IE: Unknown: 4A0E14000A002C01C800140005001900
IE: Unknown: 7F0101
IE: Unknown: DD07000C4307000000
IE: Unknown: 0706465220010D10
IE: Unknown:
DD1E00904C337E1117FF000000010000000000000000000000000C0000000000
IE: Unknown:
DD1A00904C3406070500000000000000000000000000000000000000
Regards,
Andrej Gelenberg
On 12/11/2011 07:23 PM, wwguy wrote:
> On Sun, 2011-12-11 at 08:58 -0800, Andrej Gelenberg wrote:
>> Hi,
>>
>> this is pretty mean regression for the stable kernel. You may the fix
>> only for cards, which need it and not for all of them.
>
> Could you elaborate more on the failure case and setup. this patch is to
> address HT40 related problem which cause the iwlwifi firmware crash.
>
> Thanks
> Wey
>>>
>
>
^ 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