* Re: [PATCH] tcp: undo spurious timeout after SACK reneging
From: Neal Cardwell @ 2013-03-24 20:50 UTC (permalink / raw)
To: Yuchung Cheng; +Cc: David Miller, Eric Dumazet, Nandita Dukkipati, Netdev
In-Reply-To: <1364157745-24866-1-git-send-email-ycheng@google.com>
On Sun, Mar 24, 2013 at 4:42 PM, Yuchung Cheng <ycheng@google.com> wrote:
> On SACK reneging the sender immediately retransmits and forces a
> timeout but disables Eifel (undo). If the (buggy) receiver does not
> drop any packet this can trigger a false slow-start retransmit storm
> driven by the ACKs of the original packets. This can be detected with
> undo and TCP timestamps.
>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> ---
> net/ipv4/tcp_input.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
Acked-by: Neal Cardwell <ncardwell@google.com>
neal
^ permalink raw reply
* Re: [PATCH 0/2] Fix for mv643xx_eth built as module
From: David Miller @ 2013-03-24 21:07 UTC (permalink / raw)
To: florian
Cc: gmbnomis, linux-arm-kernel, netdev, linuxppc-dev,
thomas.petazzoni, jason, andrew
In-Reply-To: <201303242148.33842.florian@openwrt.org>
From: Florian Fainelli <florian@openwrt.org>
Date: Sun, 24 Mar 2013 21:48:33 +0100
> Hello Simon,
>
> Le dimanche 24 mars 2013 21:33:58, Simon Baatz a écrit :
>> Recently [1], mv643xx_eth was changed to make use of mvmdio. However,
>> this change introduces two problems when mvmdio and mv643xx_eth are
>> built as modules:
>>
>> - mvmdio is not loaded automatically by udev
>> - mv643xx_eth oopses when it can't find its PHY, i.e. when mvmdio is
>> not yet loaded
>>
>> The first problem can be fixed easily by adding a module alias for the
>> respective platform device. The proposed fix for the second problem
>> uses EPROBE_DEFER as suggested by Thomas Petazzoni when the driver
>> can't find its PHY.
>>
>> These patches apply on top of Florian Fainelli's patchset. They have
>> been tested on Marvel Kirkwood non-DT.
>
> Both fixes look good to me, thanks for fixing this!
>
> Acked-by: Florian Fainelli <florian@openwrt.org>
All applied, thanks.
^ permalink raw reply
* Re: [PATCH 3/3] net/macb: make clk_enable atomic
From: David Miller @ 2013-03-24 21:08 UTC (permalink / raw)
To: festevam; +Cc: s.trumtrar, netdev, nicolas.ferre
In-Reply-To: <CAOMZO5BRDU_-fvv4PZQcLe-4OdZ4bDQ8m+nNHEFcC1Y2+zdh9g@mail.gmail.com>
From: Fabio Estevam <festevam@gmail.com>
Date: Fri, 22 Mar 2013 14:38:39 -0300
> On Fri, Mar 22, 2013 at 2:33 PM, Steffen Trumtrar
> <s.trumtrar@pengutronix.de> wrote:
>> Use clk_prepare_enable to be safe on SMP systems.
>
> Wouldn't you have to use clk_disable_unprepare() now?
Indeed I think he does.
^ permalink raw reply
* Re: [PATCH net] ipv4: Fix ip-header identification for gso packets.
From: David Miller @ 2013-03-24 21:13 UTC (permalink / raw)
To: pshelar; +Cc: amwang, netdev
In-Reply-To: <1364098248-1766-1-git-send-email-pshelar@nicira.com>
From: Pravin B Shelar <pshelar@nicira.com>
Date: Sat, 23 Mar 2013 21:10:48 -0700
> For TCP protocol ip-header id needs to be incremented even if
> IP_DF flag is set. This behaviour was changed in commit
> 490ab08127cebc25e3a26 (IP_GRE: Fix IP-Identification).
>
> Following patch fixes it so that identification is always
> incremented for TCP.
>
> Reported-by: Cong Wang <amwang@redhat.com>
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
We should do this increment for all protocols when DF is set,
not just TCP.
^ permalink raw reply
* Re: [PATCH] Fix IXP4xx coherent allocations
From: Krzysztof Halasa @ 2013-03-24 21:15 UTC (permalink / raw)
To: Ben Hutchings
Cc: David Miller, netdev, c.aeschlimann, linux-kernel,
linux-arm-kernel
In-Reply-To: <1364152267.3620.31.camel@deadeye.wl.decadent.org.uk>
Ben Hutchings <bhutchings@solarflare.com> writes:
> I'm failing to see where it says the default can't be narrower than 32
> bits due to platform limits. And how do you think DMA mapping is
> supposed to work for PCI devices on these platforms, anyway?
The problem on ARM (and probably on powerpc, and on something called
"metag" - grep -r 'coherent DMA mask is unset' arch) is that the default
coherent DMA mask is zero. IOW, coherent DMA allocations are, by
default, disabled. A driver has to dma_set_coherent_mask() or, as many
drivers do, set dev->coherent_dma_mask directly (IMHO
dev->coherent_dma_mask along with dev->dma_mask are private DMA API
stuff and e.g. device drivers have no interest there).
The zero default is IMHO, WRT the actual DMA API, an ARM bug (and
powerpc's etc). Nevertheless, the patch I posted does everything as
required by the API. Specifically, the IXP4xx arch part makes
IXP4xx's dma_set_coherent_mask() compliant with DMA API, and the actual
dma_set_coherent_mask() calls in drivers are both valid and I guess
recommended by the API.
The patch doesn't touch the core ARM issue, that's right.
--
Krzysztof Halasa
^ permalink raw reply
* Re: [PATCH net-next] bridge: avoid br_ifinfo_notify when nothing changed
From: David Miller @ 2013-03-24 21:15 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: honkiko, netdev, bridge, stephen, herbert, zhiguo.hong
In-Reply-To: <514F0F07.9050702@cogentembedded.com>
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Sun, 24 Mar 2013 17:34:47 +0300
> Hello.
>
> On 03/24/2013 04:26 PM, Hong Zhiguo wrote:
>
>> When neither IFF_BRIDGE nor IFF_BRIDGE_PORT is set,
>> and afspec == NULL but protinfo != NULL, we run into
>> "if (err == 0) br_ifinfo_notify(RTM_NEWLINK, p);" with
>> random value in ret.
>>
>> Thanks to Sergei for pointing out the error in commit comments.
>>
>> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
>
> For the future, if you post the revised version of the patch, you
> should indicate in the subject it like this: [PATCH v2].
I'm disappointed that you have enough energy to point out such a lower
priority omission, but you lack the time for something more important,
which is giving this patch your explicit ACK if it fixes all of the
issues you pointed out to him.
^ permalink raw reply
* Re: [PATCH net-next v2 1/2] ipv4: provide addr and netconf dump consistency info
From: David Miller @ 2013-03-24 21:16 UTC (permalink / raw)
To: nicolas.dichtel; +Cc: netdev, junwei.zhang, hongjun.li
In-Reply-To: <1363969723-4390-1-git-send-email-nicolas.dichtel@6wind.com>
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Fri, 22 Mar 2013 17:28:42 +0100
> This patch takes benefit of dev_addr_genid and dev_base_seq to check if a change
> occurs during a netlink dump. If a change is detected, the flag NLM_F_DUMP_INTR
> is set in the first message after the dump was interrupted.
>
> Note that seq and prev_seq must be reset between each family in rtnl_dump_all()
> because they are specific to each family.
>
> Reported-by: Junwei Zhang <junwei.zhang@6wind.com>
> Reported-by: Hongjun Li <hongjun.li@6wind.com>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next v2 2/2] ipv6: provide addr and netconf dump consistency info
From: David Miller @ 2013-03-24 21:17 UTC (permalink / raw)
To: nicolas.dichtel; +Cc: netdev, junwei.zhang, hongjun.li
In-Reply-To: <1363970042-12625-1-git-send-email-nicolas.dichtel@6wind.com>
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Fri, 22 Mar 2013 17:34:02 +0100
> When this flag is set, it means that dump was interrupted and result may be
> inconsistent.
>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 1/2] inet: generalize ipv4-only RFC3168 5.3 ecn fragmentation handling for future use by ipv6
From: David Miller @ 2013-03-24 21:17 UTC (permalink / raw)
To: hannes; +Cc: netdev, eric.dumazet, jbrouer, yoshfuji
In-Reply-To: <20130322182437.GC19365@order.stressinduktion.org>
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date: Fri, 22 Mar 2013 19:24:37 +0100
> This patch just moves some code arround to make the ip4_frag_ecn_table
> and IPFRAG_ECN_* constants accessible from the other reassembly engines. I
> also renamed ip4_frag_ecn_table to ip_frag_ecn_table.
>
> Cc: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Jesper Dangaard Brouer <jbrouer@redhat.com>
> Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 2/2] ipv6: implement RFC3168 5.3 (ecn protection) for ipv6 fragmentation handling
From: David Miller @ 2013-03-24 21:17 UTC (permalink / raw)
To: hannes; +Cc: netdev, eric.dumazet, jbrouer, yoshfuji
In-Reply-To: <20130322182444.GA939@order.stressinduktion.org>
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date: Fri, 22 Mar 2013 19:24:44 +0100
> [PATCH 2/2] ipv6: implement RFC3168 5.3 (ecn protection) for ipv6 fragmentation handling
>
> This patch also ensures that INET_ECN_CE is propagated if one fragment
> had the codepoint set.
>
> Cc: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Jesper Dangaard Brouer <jbrouer@redhat.com>
> Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] dsa: add device tree bindings to register DSA switches
From: David Miller @ 2013-03-24 21:17 UTC (permalink / raw)
To: florian
Cc: devicetree-discuss, rob.herring, grant.likely, thomas.petazzoni,
gregory.clement, jason, buytenh, netdev, andrew, linux-arm-kernel
In-Reply-To: <2044972.NvctqPqDPo@bender>
From: Florian Fainelli <florian@openwrt.org>
Date: Fri, 22 Mar 2013 21:50:50 +0100
> This patch adds support for registering DSA switches using Device Tree
> bindings. Note that we support programming the switch routing table even
> though no in-tree user seems to require it. I tested this on Armada 370
> with a Marvell 88E6172 (not supported by mainline yet).
>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] bridge: avoid br_ifinfo_notify when nothing changed
From: David Miller @ 2013-03-24 21:18 UTC (permalink / raw)
To: honkiko; +Cc: sergei.shtylyov, netdev, bridge, zhiguo.hong, stephen, herbert
In-Reply-To: <1364131607-11698-1-git-send-email-honkiko@gmail.com>
From: Hong Zhiguo <honkiko@gmail.com>
Date: Sun, 24 Mar 2013 21:26:47 +0800
> When neither IFF_BRIDGE nor IFF_BRIDGE_PORT is set,
> and afspec == NULL but protinfo != NULL, we run into
> "if (err == 0) br_ifinfo_notify(RTM_NEWLINK, p);" with
> random value in ret.
>
> Thanks to Sergei for pointing out the error in commit comments.
>
> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] 802: fix a possible race condition
From: David Miller @ 2013-03-24 21:24 UTC (permalink / raw)
To: amwang; +Cc: netdev, david.ward, jorge
In-Reply-To: <1364015648-4195-2-git-send-email-amwang@redhat.com>
From: Cong Wang <amwang@redhat.com>
Date: Sat, 23 Mar 2013 13:14:08 +0800
> From: Cong Wang <amwang@redhat.com>
>
> garp_pdu_queue() should ways be called with this spin lock.
> garp_uninit_applicant() only holds rtnl lock which is not
> enough here.
>
> Found by code inspection.
>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: David Ward <david.ward@ll.mit.edu>
> Cc: "Jorge Boncompte [DTI2]" <jorge@dti2.net>
> Signed-off-by: Cong Wang <amwang@redhat.com>
Under what conditions can entries be removed or added to
these RB-trees without the RTNL being held?
If such events cannot happen, then no locking is needed.
Even if your change is correct and necessary, the answer to my
needs to be added to your commit message.
Thanks.
^ permalink raw reply
* Re: [PATCH] net: remove a WARN_ON() in net_enable_timestamp()
From: David Miller @ 2013-03-24 21:27 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, chavey
In-Reply-To: <1363999108.4431.81.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 22 Mar 2013 17:38:28 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> The WARN_ON(in_interrupt()) in net_enable_timestamp() can get false
> positive, in socket clone path, run from softirq context :
...
> Its safe at this point because the parent socket owns a reference
> on the netstamp_needed, so we cant have a 0 -> 1 transition, which
> requires to lock a mutex.
>
> Instead of refining the check, lets remove it, as all known callers
> are safe. If it ever changes in the future, static_key_slow_inc()
> will complain anyway.
>
> Reported-by: Laurent Chavey <chavey@google.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] 8021q: fix a potential use-after-free
From: David Miller @ 2013-03-24 21:27 UTC (permalink / raw)
To: amwang; +Cc: netdev, kaber
In-Reply-To: <1364015648-4195-1-git-send-email-amwang@redhat.com>
From: Cong Wang <amwang@redhat.com>
Date: Sat, 23 Mar 2013 13:14:07 +0800
> From: Cong Wang <amwang@redhat.com>
>
> vlan_vid_del() could possibly free ->vlan_info after a RCU grace
> period, however, we may still refer to the freed memory area
> by 'grp' pointer. Found by code inspection.
>
> This patch moves vlan_vid_del() as behind as possible.
>
> Cc: Patrick McHardy <kaber@trash.net>
> Cc: "David S. Miller" <davem@davemloft.net>
> Signed-off-by: Cong Wang <amwang@redhat.com>
Applied.
^ permalink raw reply
* Re: [PATCH] bridge: fix crash when set mac address of br interface
From: David Miller @ 2013-03-24 21:28 UTC (permalink / raw)
To: honkiko; +Cc: stephen, netdev, bridge, zhiguo.hong, herbert
In-Reply-To: <1364041670-3408-1-git-send-email-honkiko@gmail.com>
From: Hong Zhiguo <honkiko@gmail.com>
Date: Sat, 23 Mar 2013 20:27:50 +0800
> When I tried to set mac address of a bridge interface to a mac
> address which already learned on this bridge, I got system hang.
>
> The cause is straight forward: function br_fdb_change_mac_address
> calls fdb_insert with NULL source nbp. Then an fdb lookup is
> performed. If an fdb entry is found and it's local, it's OK. But
> if it's not local, source is dereferenced for printk without NULL
> check.
>
> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH v2] bnx2x: fix assignment of signed expression to unsigned variable
From: David Miller @ 2013-03-24 21:28 UTC (permalink / raw)
To: gmate.amit; +Cc: eilong, dan.carpenter, netdev, linux-kernel, kernel-janitors
In-Reply-To: <1364105425-8198-1-git-send-email-gmate.amit@gmail.com>
From: Kumar Amit Mehta <gmate.amit@gmail.com>
Date: Sat, 23 Mar 2013 23:10:25 -0700
> fix for incorrect assignment of signed expression to unsigned variable.
>
> Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH] tcp: undo spurious timeout after SACK reneging
From: David Miller @ 2013-03-24 21:28 UTC (permalink / raw)
To: ncardwell; +Cc: ycheng, edumazet, nanditad, netdev
In-Reply-To: <CADVnQy=koYif1cM+VuXirz26jV33zDK2KHNW=EQUfRaGqBHa+g@mail.gmail.com>
From: Neal Cardwell <ncardwell@google.com>
Date: Sun, 24 Mar 2013 16:50:41 -0400
> On Sun, Mar 24, 2013 at 4:42 PM, Yuchung Cheng <ycheng@google.com> wrote:
>> On SACK reneging the sender immediately retransmits and forces a
>> timeout but disables Eifel (undo). If the (buggy) receiver does not
>> drop any packet this can trigger a false slow-start retransmit storm
>> driven by the ACKs of the original packets. This can be detected with
>> undo and TCP timestamps.
>>
>> Signed-off-by: Yuchung Cheng <ycheng@google.com>
>> ---
>> net/ipv4/tcp_input.c | 7 ++-----
>> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> Acked-by: Neal Cardwell <ncardwell@google.com>
Applied.
^ permalink raw reply
* Re: [git pull] firewire net: resource management improvements
From: David Miller @ 2013-03-24 21:32 UTC (permalink / raw)
To: stefanr; +Cc: yoshfuji, linux1394-devel, netdev
In-Reply-To: <20130322222109.613093ba@stein>
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
Date: Fri, 22 Mar 2013 22:21:09 +0100
> On Mar 22 David Miller wrote:
>> From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
>> Date: Fri, 22 Mar 2013 12:34:23 +0900
>>
>> > would you consider pulling this one to net-next, please?
>> > I can prepare rebased tree, if you want.
>>
>> So the firewire maintainers are OK with these changes?
>
> The firewire maintainers (that is me, myself, and I) have reviewed these
> changes, signed off on them, committed them to linux1394.git at
> kernel.org, and on top of that are OK with them and with their being
> routed through net-next, indeed. :-)
That's good enough for me, pulled into net-next, thanks.
^ permalink raw reply
* [PATCH] virtio: remove obsolete virtqueue_get_queue_index()
From: Rusty Russell @ 2013-03-25 0:03 UTC (permalink / raw)
To: netdev
You can access it directly now, since 3.8: v3.7-rc1-13-g06ca287
'virtio: move queue_index and num_free fields into core struct
virtqueue.'
(Handing to DaveM for Ack or just take it...)
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index d88d436..24fc9f5 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -153,7 +153,7 @@ struct padded_vnet_hdr {
*/
static int vq2txq(struct virtqueue *vq)
{
- return (virtqueue_get_queue_index(vq) - 1) / 2;
+ return (vq->index - 1) / 2;
}
static int txq2vq(int txq)
@@ -163,7 +163,7 @@ static int txq2vq(int txq)
static int vq2rxq(struct virtqueue *vq)
{
- return virtqueue_get_queue_index(vq) / 2;
+ return vq->index / 2;
}
static int rxq2vq(int rxq)
diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c
index 2029b6c..a7eddc7 100644
--- a/drivers/s390/kvm/virtio_ccw.c
+++ b/drivers/s390/kvm/virtio_ccw.c
@@ -166,7 +166,7 @@ static void virtio_ccw_kvm_notify(struct virtqueue *vq)
vcdev = to_vc_device(info->vq->vdev);
ccw_device_get_schid(vcdev->cdev, &schid);
- do_kvm_notify(schid, virtqueue_get_queue_index(vq));
+ do_kvm_notify(schid, vq->index);
}
static int virtio_ccw_read_vq_conf(struct virtio_ccw_device *vcdev,
@@ -188,7 +188,7 @@ static void virtio_ccw_del_vq(struct virtqueue *vq, struct ccw1 *ccw)
unsigned long flags;
unsigned long size;
int ret;
- unsigned int index = virtqueue_get_queue_index(vq);
+ unsigned int index = vq->index;
/* Remove from our list. */
spin_lock_irqsave(&vcdev->lock, flags);
@@ -610,7 +610,7 @@ static struct virtqueue *virtio_ccw_vq_by_ind(struct virtio_ccw_device *vcdev,
vq = NULL;
spin_lock_irqsave(&vcdev->lock, flags);
list_for_each_entry(info, &vcdev->virtqueues, node) {
- if (virtqueue_get_queue_index(info->vq) == index) {
+ if (info->vq->index == index) {
vq = info->vq;
break;
}
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 833f17b..9ff8645 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -76,12 +76,6 @@ void *virtqueue_detach_unused_buf(struct virtqueue *vq);
unsigned int virtqueue_get_vring_size(struct virtqueue *vq);
-/* FIXME: Obsolete accessor, but required for virtio_net merge. */
-static inline unsigned int virtqueue_get_queue_index(struct virtqueue *vq)
-{
- return vq->index;
-}
-
/**
* virtio_device - representation of a device using virtio
* @index: unique position on the virtio bus
^ permalink raw reply related
* [PATCH 1/1 net-next] net: fec: build fec.c and fec_ptp.c to one module
From: Frank Li @ 2013-03-25 1:03 UTC (permalink / raw)
To: festevam, lznuaa, u.kleine-koenig, netdev, davem,
linux-arm-kernel; +Cc: Frank Li
fec_ptp.ko can't run individually
rename fec.c to fec_main.c
Build fec.o and fec_ptp.o into one fec.ko
Remove unnessary EXPORT_SYMBOL in fec_ptp
Signed-off-by: Frank Li <Frank.Li@freescale.com>
---
drivers/net/ethernet/freescale/Makefile | 3 ++-
.../net/ethernet/freescale/{fec.c => fec_main.c} | 0
drivers/net/ethernet/freescale/fec_ptp.c | 3 ---
3 files changed, 2 insertions(+), 4 deletions(-)
rename drivers/net/ethernet/freescale/{fec.c => fec_main.c} (100%)
diff --git a/drivers/net/ethernet/freescale/Makefile b/drivers/net/ethernet/freescale/Makefile
index b7d58fe..549ce13 100644
--- a/drivers/net/ethernet/freescale/Makefile
+++ b/drivers/net/ethernet/freescale/Makefile
@@ -2,7 +2,8 @@
# Makefile for the Freescale network device drivers.
#
-obj-$(CONFIG_FEC) += fec.o fec_ptp.o
+obj-$(CONFIG_FEC) += fec.o
+fec-objs :=fec_main.o fec_ptp.o
obj-$(CONFIG_FEC_MPC52xx) += fec_mpc52xx.o
ifeq ($(CONFIG_FEC_MPC52xx_MDIO),y)
obj-$(CONFIG_FEC_MPC52xx) += fec_mpc52xx_phy.o
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec_main.c
similarity index 100%
rename from drivers/net/ethernet/freescale/fec.c
rename to drivers/net/ethernet/freescale/fec_main.c
diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index 0d8df40..1f17ca0 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -128,7 +128,6 @@ void fec_ptp_start_cyclecounter(struct net_device *ndev)
spin_unlock_irqrestore(&fep->tmreg_lock, flags);
}
-EXPORT_SYMBOL(fec_ptp_start_cyclecounter);
/**
* fec_ptp_adjfreq - adjust ptp cycle frequency
@@ -319,7 +318,6 @@ int fec_ptp_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ?
-EFAULT : 0;
}
-EXPORT_SYMBOL(fec_ptp_ioctl);
/**
* fec_time_keep - call timecounter_read every second to avoid timer overrun
@@ -385,4 +383,3 @@ void fec_ptp_init(struct net_device *ndev, struct platform_device *pdev)
pr_info("registered PHC device on %s\n", ndev->name);
}
}
-EXPORT_SYMBOL(fec_ptp_init);
--
1.7.1
^ permalink raw reply related
* [PATCH net-next] netfilter: implement RFC3168 5.3 (ecn protection) for ipv6 fragmentation handling
From: Hannes Frederic Sowa @ 2013-03-25 1:20 UTC (permalink / raw)
To: netfilter-devel; +Cc: eric.dumazet, jbrouer, yoshfuji, netdev
This change brings netfilter reassembly logic on par with
reassembly.c. The corresponding change in net-next is
eec2e6185ff6eab18c2cae9b01a9fbc5c33248fc.
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jesper Dangaard Brouer <jbrouer@redhat.com>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
I duplicated ip6_frag_ecn here again because I could not find a good header to
stick it in. There is a recursive header inclusion if I include inet_ecn.h
from inet_frag.h. I hope this is ok for the time being.
net/ipv6/netfilter/nf_conntrack_reasm.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index 6700069..dffdc1a 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -41,6 +41,7 @@
#include <net/rawv6.h>
#include <net/ndisc.h>
#include <net/addrconf.h>
+#include <net/inet_ecn.h>
#include <net/netfilter/ipv6/nf_conntrack_ipv6.h>
#include <linux/sysctl.h>
#include <linux/netfilter.h>
@@ -138,6 +139,11 @@ static void __net_exit nf_ct_frags6_sysctl_unregister(struct net *net)
}
#endif
+static inline u8 ip6_frag_ecn(const struct ipv6hdr *ipv6h)
+{
+ return 1 << (ipv6_get_dsfield(ipv6h) & INET_ECN_MASK);
+}
+
static unsigned int nf_hashfn(struct inet_frag_queue *q)
{
const struct frag_queue *nq;
@@ -166,7 +172,7 @@ static void nf_ct_frag6_expire(unsigned long data)
/* Creation primitives. */
static inline struct frag_queue *fq_find(struct net *net, __be32 id,
u32 user, struct in6_addr *src,
- struct in6_addr *dst)
+ struct in6_addr *dst, u8 ecn)
{
struct inet_frag_queue *q;
struct ip6_create_arg arg;
@@ -176,6 +182,7 @@ static inline struct frag_queue *fq_find(struct net *net, __be32 id,
arg.user = user;
arg.src = src;
arg.dst = dst;
+ arg.ecn = ecn;
read_lock_bh(&nf_frags.lock);
hash = inet6_hash_frag(id, src, dst, nf_frags.rnd);
@@ -196,6 +203,7 @@ static int nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb,
struct sk_buff *prev, *next;
unsigned int payload_len;
int offset, end;
+ u8 ecn;
if (fq->q.last_in & INET_FRAG_COMPLETE) {
pr_debug("Already completed\n");
@@ -213,6 +221,8 @@ static int nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb,
return -1;
}
+ ecn = ip6_frag_ecn(ipv6_hdr(skb));
+
if (skb->ip_summed == CHECKSUM_COMPLETE) {
const unsigned char *nh = skb_network_header(skb);
skb->csum = csum_sub(skb->csum,
@@ -317,6 +327,7 @@ found:
}
fq->q.stamp = skb->tstamp;
fq->q.meat += skb->len;
+ fq->ecn |= ecn;
if (payload_len > fq->q.max_size)
fq->q.max_size = payload_len;
add_frag_mem_limit(&fq->q, skb->truesize);
@@ -352,12 +363,17 @@ nf_ct_frag6_reasm(struct frag_queue *fq, struct net_device *dev)
{
struct sk_buff *fp, *op, *head = fq->q.fragments;
int payload_len;
+ u8 ecn;
inet_frag_kill(&fq->q, &nf_frags);
WARN_ON(head == NULL);
WARN_ON(NFCT_FRAG6_CB(head)->offset != 0);
+ ecn = ip_frag_ecn_table[fq->ecn];
+ if (unlikely(ecn == 0xff))
+ goto out_fail;
+
/* Unfragmented part is taken from the first segment. */
payload_len = ((head->data - skb_network_header(head)) -
sizeof(struct ipv6hdr) + fq->q.len -
@@ -428,6 +444,7 @@ nf_ct_frag6_reasm(struct frag_queue *fq, struct net_device *dev)
head->dev = dev;
head->tstamp = fq->q.stamp;
ipv6_hdr(head)->payload_len = htons(payload_len);
+ ipv6_change_dsfield(ipv6_hdr(head), 0xff, ecn);
IP6CB(head)->frag_max_size = sizeof(struct ipv6hdr) + fq->q.max_size;
/* Yes, and fold redundant checksum back. 8) */
@@ -572,7 +589,8 @@ struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user)
inet_frag_evictor(&net->nf_frag.frags, &nf_frags, false);
local_bh_enable();
- fq = fq_find(net, fhdr->identification, user, &hdr->saddr, &hdr->daddr);
+ fq = fq_find(net, fhdr->identification, user, &hdr->saddr, &hdr->daddr,
+ ip6_frag_ecn(hdr));
if (fq == NULL) {
pr_debug("Can't find and can't create new queue\n");
goto ret_orig;
--
1.8.1.4
^ permalink raw reply related
* Re: [PATCH] virtio: remove obsolete virtqueue_get_queue_index()
From: David Miller @ 2013-03-25 1:51 UTC (permalink / raw)
To: rusty; +Cc: netdev
In-Reply-To: <87fvzke45u.fsf@rustcorp.com.au>
From: Rusty Russell <rusty@rustcorp.com.au>
Date: Mon, 25 Mar 2013 10:33:57 +1030
> You can access it directly now, since 3.8: v3.7-rc1-13-g06ca287
> 'virtio: move queue_index and num_free fields into core struct
> virtqueue.'
>
> (Handing to DaveM for Ack or just take it...)
>
> Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This is already in my net-next tree.
^ permalink raw reply
* linux-next: manual merge of the kvm tree with the tree
From: Stephen Rothwell @ 2013-03-25 2:32 UTC (permalink / raw)
To: Marcelo Tosatti, Gleb Natapov
Cc: linux-next, linux-kernel, Rusty Russell, David Miller, netdev,
Michael S. Tsirkin, Cornelia Huck
[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]
Hi all,
Today's linux-next merge of the kvm tree got a conflict in
drivers/s390/kvm/virtio_ccw.c between commit 9d0ca6ed6f2f ("virtio:
remove obsolete virtqueue_get_queue_index()") from the net-next tree and
commit 07e169335ff0 ("virtio_ccw: pass a cookie value to kvm hypercall")
from the kvm tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/s390/kvm/virtio_ccw.c
index fb877b59,42d507c..0000000
--- a/drivers/s390/kvm/virtio_ccw.c
+++ b/drivers/s390/kvm/virtio_ccw.c
@@@ -166,7 -167,8 +167,7 @@@ static void virtio_ccw_kvm_notify(struc
vcdev = to_vc_device(info->vq->vdev);
ccw_device_get_schid(vcdev->cdev, &schid);
- do_kvm_notify(schid, vq->index);
- info->cookie = do_kvm_notify(schid, virtqueue_get_queue_index(vq),
- info->cookie);
++ info->cookie = do_kvm_notify(schid, vq->index, info->cookie);
}
static int virtio_ccw_read_vq_conf(struct virtio_ccw_device *vcdev,
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* [PATCH 04/25] rtlwifi: Modify files for 2013.02.07 vendor version - part 4
From: Larry Finger @ 2013-03-25 3:06 UTC (permalink / raw)
To: linville-2XuSBdqkA4R54TAoqtyWWQ
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA, Larry Finger,
netdev-u79uwXL29TY76Z2rM5mHXA, jcheung-IBi9RG/b67k,
machen-IBi9RG/b67k, mmarek-AlSwsSmVLrQ,
zhiyuan_yang-kXabqFNEczNtrwSWzY7KCg,
page_he-kXabqFNEczNtrwSWzY7KCg
In-Reply-To: <1364180817-8028-1-git-send-email-Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
This patch updates files debug.{c,h}, efuse.c, pci.{c,h}, and wifi.h for
the changes in the newest vendor driver.
Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
Cc: jcheung-IBi9RG/b67k@public.gmane.org
Cc: machen-IBi9RG/b67k@public.gmane.org
Cc: mmarek-AlSwsSmVLrQ@public.gmane.org
Cc: zhiyuan_yang-kXabqFNEczNtrwSWzY7KCg@public.gmane.org
Cc: page_he-kXabqFNEczNtrwSWzY7KCg@public.gmane.org
---
drivers/net/wireless/rtlwifi/base.c | 2 +
drivers/net/wireless/rtlwifi/debug.c | 5 +-
drivers/net/wireless/rtlwifi/debug.h | 7 +++
drivers/net/wireless/rtlwifi/efuse.c | 42 ++++++++++---
drivers/net/wireless/rtlwifi/pci.c | 117 +++++++++++++++++++++++++++++------
drivers/net/wireless/rtlwifi/pci.h | 1 +
drivers/net/wireless/rtlwifi/wifi.h | 3 +
7 files changed, 146 insertions(+), 31 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index acea8e8..270b27a 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -466,6 +466,8 @@ int rtl_init_core(struct ieee80211_hw *hw)
mutex_init(&rtlpriv->locks.ps_mutex);
spin_lock_init(&rtlpriv->locks.ips_lock);
spin_lock_init(&rtlpriv->locks.irq_th_lock);
+ spin_lock_init(&rtlpriv->locks.irq_pci_lock);
+ spin_lock_init(&rtlpriv->locks.tx_lock);
spin_lock_init(&rtlpriv->locks.h2c_lock);
spin_lock_init(&rtlpriv->locks.rf_ps_lock);
spin_lock_init(&rtlpriv->locks.rf_lock);
diff --git a/drivers/net/wireless/rtlwifi/debug.c b/drivers/net/wireless/rtlwifi/debug.c
index bdda9b2..7d52d3d 100644
--- a/drivers/net/wireless/rtlwifi/debug.c
+++ b/drivers/net/wireless/rtlwifi/debug.c
@@ -41,7 +41,10 @@ void rtl_dbgp_flag_init(struct ieee80211_hw *hw)
COMP_BEACON | COMP_RATE | COMP_RXDESC | COMP_DIG | COMP_TXAGC |
COMP_POWER | COMP_POWER_TRACKING | COMP_BB_POWERSAVING | COMP_SWAS |
COMP_RF | COMP_TURBO | COMP_RATR | COMP_CMD |
- COMP_EFUSE | COMP_QOS | COMP_MAC80211 | COMP_REGD | COMP_CHAN;
+ COMP_EFUSE | COMP_QOS | COMP_MAC80211 | COMP_REGD | COMP_CHAN |
+ COMP_EASY_CONCURRENT | COMP_EFUSE | COMP_QOS | COMP_MAC80211 |
+ COMP_REGD | COMP_CHAN | COMP_BT_COEXIST;
+
for (i = 0; i < DBGP_TYPE_MAX; i++)
rtlpriv->dbg.dbgp_type[i] = 0;
diff --git a/drivers/net/wireless/rtlwifi/debug.h b/drivers/net/wireless/rtlwifi/debug.h
index fd3269f..60119a6 100644
--- a/drivers/net/wireless/rtlwifi/debug.h
+++ b/drivers/net/wireless/rtlwifi/debug.h
@@ -135,6 +135,13 @@
#define PHY_TXPWR BIT(8)
#define PHY_PWRDIFF BIT(9)
+/* Define Dynamic Mechanism check module bit --> FDM */
+#define WA_IOT BIT(0)
+#define DM_PWDB BIT(1)
+#define DM_MONITOR BIT(2)
+#define DM_DIG BIT(3)
+#define DM_EDCA_TURBO BIT(4)
+
enum dbgp_flag_e {
FQOS = 0,
FTX = 1,
diff --git a/drivers/net/wireless/rtlwifi/efuse.c b/drivers/net/wireless/rtlwifi/efuse.c
index 8e2f9af..41a03b1 100644
--- a/drivers/net/wireless/rtlwifi/efuse.c
+++ b/drivers/net/wireless/rtlwifi/efuse.c
@@ -35,8 +35,6 @@ static const u8 MAX_PGPKT_SIZE = 9;
static const u8 PGPKT_DATA_SIZE = 8;
static const int EFUSE_MAX_SIZE = 512;
-static const u8 EFUSE_OOB_PROTECT_BYTES = 15;
-
static const struct efuse_map RTL8712_SDIO_EFUSE_TABLE[] = {
{0, 0, 0, 2},
{0, 1, 0, 2},
@@ -240,6 +238,7 @@ void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf)
u8 rtemp8[1];
u16 efuse_addr = 0;
u8 offset, wren;
+ u8 u1temp = 0;
u16 i;
u16 j;
const u16 efuse_max_section =
@@ -285,10 +284,31 @@ void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf)
}
while ((*rtemp8 != 0xFF) && (efuse_addr < efuse_len)) {
- offset = ((*rtemp8 >> 4) & 0x0f);
+ /* Check PG header for section num. */
+ if ((*rtemp8 & 0x1F) == 0x0F) {/* extended header */
+ u1temp = ((*rtemp8 & 0xE0) >> 5);
+ read_efuse_byte(hw, efuse_addr, rtemp8);
- if (offset < efuse_max_section) {
+ if ((*rtemp8 & 0x0F) == 0x0F) {
+ efuse_addr++;
+ read_efuse_byte(hw, efuse_addr, rtemp8);
+
+ if (*rtemp8 != 0xFF &&
+ (efuse_addr < efuse_len)) {
+ efuse_addr++;
+ }
+ continue;
+ } else {
+ offset = ((*rtemp8 & 0xF0) >> 1) | u1temp;
+ wren = (*rtemp8 & 0x0F);
+ efuse_addr++;
+ }
+ } else {
+ offset = ((*rtemp8 >> 4) & 0x0f);
wren = (*rtemp8 & 0x0f);
+ }
+
+ if (offset < efuse_max_section) {
RTPRINT(rtlpriv, FEEPROM, EFUSE_READ_ALL,
"offset-%d Worden=%x\n", offset, wren);
@@ -391,7 +411,8 @@ bool efuse_shadow_update_chk(struct ieee80211_hw *hw)
efuse_used = rtlefuse->efuse_usedbytes;
if ((totalbytes + efuse_used) >=
- (EFUSE_MAX_SIZE - EFUSE_OOB_PROTECT_BYTES))
+ (EFUSE_MAX_SIZE -
+ rtlpriv->cfg->maps[EFUSE_OOB_PROTECT_BYTES_LEN]))
result = false;
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD,
@@ -932,8 +953,8 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw,
u8 badworden = 0x0F;
static int repeat_times;
- if (efuse_get_current_size(hw) >=
- (EFUSE_MAX_SIZE - EFUSE_OOB_PROTECT_BYTES)) {
+ if (efuse_get_current_size(hw) >= (EFUSE_MAX_SIZE -
+ rtlpriv->cfg->maps[EFUSE_OOB_PROTECT_BYTES_LEN])) {
RTPRINT(rtlpriv, FEEPROM, EFUSE_PG,
"efuse_pg_packet_write error\n");
return false;
@@ -949,8 +970,8 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw,
RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, "efuse Power ON\n");
- while (continual && (efuse_addr <
- (EFUSE_MAX_SIZE - EFUSE_OOB_PROTECT_BYTES))) {
+ while (continual && (efuse_addr < (EFUSE_MAX_SIZE -
+ rtlpriv->cfg->maps[EFUSE_OOB_PROTECT_BYTES_LEN]))) {
if (write_state == PG_STATE_HEADER) {
badworden = 0x0F;
@@ -1003,7 +1024,8 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw,
}
}
- if (efuse_addr >= (EFUSE_MAX_SIZE - EFUSE_OOB_PROTECT_BYTES)) {
+ if (efuse_addr >= (EFUSE_MAX_SIZE -
+ rtlpriv->cfg->maps[EFUSE_OOB_PROTECT_BYTES_LEN])) {
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD,
"efuse_addr(%#x) Out of size!!\n", efuse_addr);
}
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index 4261e8e..4af6abd 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -59,7 +59,7 @@ static u8 _rtl_mac_to_hwqueue(struct ieee80211_hw *hw,
if (unlikely(ieee80211_is_beacon(fc)))
return BEACON_QUEUE;
- if (ieee80211_is_mgmt(fc))
+ if (ieee80211_is_mgmt(fc) || ieee80211_is_ctl(fc))
return MGNT_QUEUE;
if (rtlhal->hw_type == HARDWARE_TYPE_RTL8192SE)
if (ieee80211_is_nullfunc(fc))
@@ -271,9 +271,6 @@ static void rtl_pci_enable_aspm(struct ieee80211_hw *hw)
struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw);
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
- u8 pcibridge_busnum = pcipriv->ndis_adapter.pcibridge_busnum;
- u8 pcibridge_devnum = pcipriv->ndis_adapter.pcibridge_devnum;
- u8 pcibridge_funcnum = pcipriv->ndis_adapter.pcibridge_funcnum;
u8 pcibridge_vendor = pcipriv->ndis_adapter.pcibridge_vendor;
u8 num4bytes = pcipriv->ndis_adapter.num4bytes;
u16 aspmlevel;
@@ -302,8 +299,7 @@ static void rtl_pci_enable_aspm(struct ieee80211_hw *hw)
u_pcibridge_aspmsetting);
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD,
- "PlatformEnableASPM():PciBridge busnumber[%x], DevNumbe[%x], funcnumber[%x], Write reg[%x] = %x\n",
- pcibridge_busnum, pcibridge_devnum, pcibridge_funcnum,
+ "PlatformEnableASPM(): Write reg[%x] = %x\n",
(pcipriv->ndis_adapter.pcibridge_pciehdr_offset + 0x10),
u_pcibridge_aspmsetting);
@@ -349,6 +345,49 @@ static bool rtl_pci_get_amd_l1_patch(struct ieee80211_hw *hw)
return status;
}
+static bool rtl_pci_check_buddy_priv(struct ieee80211_hw *hw,
+ struct rtl_priv **buddy_priv)
+{
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+ struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw);
+ bool find_buddy_priv = false;
+ struct rtl_priv *tpriv = NULL;
+ struct rtl_pci_priv *tpcipriv = NULL;
+
+ if (!list_empty(&rtlpriv->glb_var->glb_priv_list)) {
+ list_for_each_entry(tpriv, &rtlpriv->glb_var->glb_priv_list,
+ list) {
+ if (tpriv) {
+ tpcipriv = (struct rtl_pci_priv *)tpriv->priv;
+ RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD,
+ "pcipriv->ndis_adapter.funcnumber %x\n",
+ pcipriv->ndis_adapter.funcnumber);
+ RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD,
+ "tpcipriv->ndis_adapter.funcnumber %x\n",
+ tpcipriv->ndis_adapter.funcnumber);
+
+ if ((pcipriv->ndis_adapter.busnumber ==
+ tpcipriv->ndis_adapter.busnumber) &&
+ (pcipriv->ndis_adapter.devnumber ==
+ tpcipriv->ndis_adapter.devnumber) &&
+ (pcipriv->ndis_adapter.funcnumber !=
+ tpcipriv->ndis_adapter.funcnumber)) {
+ find_buddy_priv = true;
+ break;
+ }
+ }
+ }
+ }
+
+ RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD,
+ "find_buddy_priv %d\n", find_buddy_priv);
+
+ if (find_buddy_priv)
+ *buddy_priv = tpriv;
+
+ return find_buddy_priv;
+}
+
static void rtl_pci_get_linkcontrol_field(struct ieee80211_hw *hw)
{
struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw);
@@ -420,17 +459,14 @@ static void _rtl_pci_io_handler_init(struct device *dev,
}
-static void _rtl_pci_io_handler_release(struct ieee80211_hw *hw)
-{
-}
-
static bool _rtl_update_earlymode_info(struct ieee80211_hw *hw,
struct sk_buff *skb, struct rtl_tcb_desc *tcb_desc, u8 tid)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
- u8 additionlen = FCS_LEN;
+ struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
struct sk_buff *next_skb;
+ u8 additionlen = FCS_LEN;
/* here open is 4, wep/tkip is 8, aes is 12*/
if (info->control.hw_key)
@@ -455,7 +491,7 @@ static bool _rtl_update_earlymode_info(struct ieee80211_hw *hw,
next_skb))
break;
- if (tcb_desc->empkt_num >= 5)
+ if (tcb_desc->empkt_num >= rtlhal->max_earlymode_num)
break;
}
spin_unlock_bh(&rtlpriv->locks.waitq_lock);
@@ -471,11 +507,17 @@ static void _rtl_pci_tx_chk_waitq(struct ieee80211_hw *hw)
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
struct sk_buff *skb = NULL;
struct ieee80211_tx_info *info = NULL;
+ struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
int tid;
if (!rtlpriv->rtlhal.earlymode_enable)
return;
+ if (rtlpriv->dm.supp_phymode_switch &&
+ (rtlpriv->easy_concurrent_ctl.switch_in_process ||
+ (rtlpriv->buddy_priv &&
+ rtlpriv->buddy_priv->easy_concurrent_ctl.switch_in_process)))
+ return;
/* we juse use em for BE/BK/VI/VO */
for (tid = 7; tid >= 0; tid--) {
u8 hw_queue = ac_to_hwq[rtl_tid_to_ac(tid)];
@@ -487,7 +529,8 @@ static void _rtl_pci_tx_chk_waitq(struct ieee80211_hw *hw)
spin_lock_bh(&rtlpriv->locks.waitq_lock);
if (!skb_queue_empty(&mac->skb_waitq[tid]) &&
- (ring->entries - skb_queue_len(&ring->queue) > 5)) {
+ (ring->entries - skb_queue_len(&ring->queue) >
+ rtlhal->max_earlymode_num)) {
skb = skb_dequeue(&mac->skb_waitq[tid]);
} else {
spin_unlock_bh(&rtlpriv->locks.waitq_lock);
@@ -525,9 +568,8 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio)
u8 own = (u8) rtlpriv->cfg->ops->get_desc((u8 *) entry, true,
HW_DESC_OWN);
- /*
- *beacon packet will only use the first
- *descriptor defautly,and the own may not
+ /*beacon packet will only use the first
+ *descriptor by defaut, and the own may not
*be cleared by the hardware
*/
if (own)
@@ -558,8 +600,9 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio)
}
/* for sw LPS, just after NULL skb send out, we can
- * sure AP kown we are sleeped, our we should not let
- * rf to sleep*/
+ * sure AP knows we are sleeping, we should not let
+ * rf sleep
+ */
fc = rtl_get_fc(skb);
if (ieee80211_is_nullfunc(fc)) {
if (ieee80211_has_pm(fc)) {
@@ -569,6 +612,15 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio)
rtlpriv->psc.state_inap = false;
}
}
+ if (ieee80211_is_action(fc)) {
+ struct ieee80211_mgmt *action_frame =
+ (struct ieee80211_mgmt *)skb->data;
+ if (action_frame->u.action.u.ht_smps.action ==
+ WLAN_HT_ACTION_SMPS) {
+ dev_kfree_skb(skb);
+ goto tx_status_ok;
+ }
+ }
/* update tid tx pkt num */
tid = rtl_get_tid(skb);
@@ -637,6 +689,10 @@ static void _rtl_receive_one(struct ieee80211_hw *hw, struct sk_buff *skb,
rtlpriv->link_info.num_rx_inperiod++;
}
+ /* static bcn for roaming */
+ rtl_beacon_statistic(hw, skb);
+ rtl_p2p_info(hw, (void *)skb->data, skb->len);
+
/* for sw lps */
rtl_swlps_beacon(hw, (void *)skb->data, skb->len);
rtl_recognize_peer(hw, (void *)skb->data, skb->len);
@@ -884,6 +940,16 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
_rtl_pci_rx_interrupt(hw);
}
+ /*fw related*/
+ if (rtlhal->hw_type == HARDWARE_TYPE_RTL8723AE) {
+ if (inta & rtlpriv->cfg->maps[RTL_IMR_C2HCMD]) {
+ RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
+ "firmware interrupt!\n");
+ queue_delayed_work(rtlpriv->works.rtl_wq,
+ &rtlpriv->works.fwevt_wq, 0);
+ }
+ }
+
if (rtlpriv->rtlhal.earlymode_enable)
tasklet_schedule(&rtlpriv->works.irq_tasklet);
@@ -1458,10 +1524,14 @@ static void rtl_pci_flush(struct ieee80211_hw *hw, bool drop)
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw);
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
+ struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
u16 i = 0;
int queue_id;
struct rtl8192_tx_ring *ring;
+ if (mac->skip_scan)
+ return;
+
for (queue_id = RTL_PCI_MAX_TX_QUEUE_COUNT - 1; queue_id >= 0;) {
u32 queue_len;
ring = &pcipriv->dev.tx_ring[queue_id];
@@ -1704,6 +1774,9 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
pcipriv->ndis_adapter.devnumber = PCI_SLOT(pdev->devfn);
pcipriv->ndis_adapter.funcnumber = PCI_FUNC(pdev->devfn);
+ /* some ARM have no bridge_pdev and will crash here
+ * so we should check if bridge_pdev is NULL
+ */
if (bridge_pdev) {
/*find bridge info if available */
pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor;
@@ -1758,6 +1831,7 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
pcipriv->ndis_adapter.amd_l1_patch);
rtl_pci_parse_configuration(pdev, hw);
+ list_add_tail(&rtlpriv->list, &rtlpriv->glb_var->glb_priv_list);
return true;
}
@@ -1804,6 +1878,7 @@ int rtl_pci_probe(struct pci_dev *pdev,
pci_set_drvdata(pdev, hw);
rtlpriv = hw->priv;
+ rtlpriv->hw = hw;
pcipriv = (void *)rtlpriv->priv;
pcipriv->dev.pdev = pdev;
init_completion(&rtlpriv->firmware_loading_complete);
@@ -1812,6 +1887,7 @@ int rtl_pci_probe(struct pci_dev *pdev,
rtlpriv->rtlhal.interface = INTF_PCI;
rtlpriv->cfg = (struct rtl_hal_cfg *)(id->driver_data);
rtlpriv->intf_ops = &rtl_pci_ops;
+ rtlpriv->glb_var = &global_var;
/*
*init dbgp flags before all
@@ -1916,7 +1992,6 @@ int rtl_pci_probe(struct pci_dev *pdev,
fail3:
rtl_deinit_core(hw);
- _rtl_pci_io_handler_release(hw);
if (rtlpriv->io.pci_mem_start != 0)
pci_iounmap(pdev, (void __iomem *)rtlpriv->io.pci_mem_start);
@@ -1965,14 +2040,15 @@ void rtl_pci_disconnect(struct pci_dev *pdev)
rtl_pci_deinit(hw);
rtl_deinit_core(hw);
- _rtl_pci_io_handler_release(hw);
rtlpriv->cfg->ops->deinit_sw_vars(hw);
if (rtlpci->irq_alloc) {
+ synchronize_irq(rtlpci->pdev->irq);
free_irq(rtlpci->pdev->irq, hw);
rtlpci->irq_alloc = 0;
}
+ list_del(&rtlpriv->list);
if (rtlpriv->io.pci_mem_start != 0) {
pci_iounmap(pdev, (void __iomem *)rtlpriv->io.pci_mem_start);
pci_release_regions(pdev);
@@ -2034,6 +2110,7 @@ struct rtl_intf_ops rtl_pci_ops = {
.read_efuse_byte = read_efuse_byte,
.adapter_start = rtl_pci_start,
.adapter_stop = rtl_pci_stop,
+ .check_buddy_priv = rtl_pci_check_buddy_priv,
.adapter_tx = rtl_pci_tx,
.flush = rtl_pci_flush,
.reset_trx_ring = rtl_pci_reset_trx_ring,
diff --git a/drivers/net/wireless/rtlwifi/pci.h b/drivers/net/wireless/rtlwifi/pci.h
index 65b08f5..bd368d9 100644
--- a/drivers/net/wireless/rtlwifi/pci.h
+++ b/drivers/net/wireless/rtlwifi/pci.h
@@ -175,6 +175,7 @@ struct rtl_pci {
/*irq */
u8 irq_alloc;
u32 irq_mask[2];
+ u32 sys_irq_mask;
/*Bcn control register setting */
u32 reg_bcn_ctrl_val;
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index 312a54f..9edd412 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -1222,6 +1222,7 @@ struct rtl_hal {
/* just for DualMac S3S4 */
u8 macphyctl_reg;
bool earlymode_enable;
+ u8 max_earlymode_num;
/* Dual mac*/
bool during_mac0init_radiob;
bool during_mac1init_radioa;
@@ -1733,6 +1734,8 @@ struct rtl_locks {
/*spin lock */
spinlock_t ips_lock;
spinlock_t irq_th_lock;
+ spinlock_t irq_pci_lock;
+ spinlock_t tx_lock;
spinlock_t h2c_lock;
spinlock_t rf_ps_lock;
spinlock_t rf_lock;
--
1.8.1.4
--
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 related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox