Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH V3] wanrouter: Remove it and the drivers that depend on it
From: Paul Gortmaker @ 2012-11-14 15:23 UTC (permalink / raw)
  To: David Miller; +Cc: joe, netdev
In-Reply-To: <20121114060759.GA17128@windriver.com>

[Re: [PATCH V3] wanrouter: Remove it and the drivers that depend on it] On 14/11/2012 (Wed 01:07) Paul Gortmaker wrote:

> [Re: [PATCH V3] wanrouter: Remove it and the drivers that depend on it] On 13/11/2012 (Tue 20:44) David Miller wrote:
> 
> > 
> > Paul, you can't have HTML content to the list and one of your MIME
> > sections was HTML, so it was rejected by vger's filters.
> > 
> > Please repost with the HTML stuff removed.
> 
> Ah crap.  I'd replied via gmail ; today and occasionally in the past as
> a convenient short cut when not reading netdev with a "normal" MUA.  And
> this is not the 1st time gmail has randomly decided to be "helpful" by
> mangling plain text like this.  Well, I'll be having no more of that BS.

I was curious to better figure out what triggered this, now that it
isn't 1AM.  It seems the original wasn't plain text, and that gmail
didn't know what else to do with the content from your message when it
arrived as base64 encoded.  It looks like it arrived that way to the
list archivers too, and they failed to do anything sensible with their
copy of your message as well.

http://marc.info/?l=linux-netdev&m=135284894104364&w=2

Paul.

^ permalink raw reply

* [PATCH iproute2 3/3] ip/ip6tunnel: fix update of tclass and flowlabel
From: Nicolas Dichtel @ 2012-11-14 15:29 UTC (permalink / raw)
  To: shemminger; +Cc: netdev, Nicolas Dichtel
In-Reply-To: <1352906966-12932-1-git-send-email-nicolas.dichtel@6wind.com>

When tclass or flowlabel field were updated, we only performed an OR with the
new value. For example, it was not possible to reset tclass:
  ip -6 tunnel change ip6tnl2 tclass 0

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 ip/ip6tunnel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
index 7aaac61..fcc9f33 100644
--- a/ip/ip6tunnel.c
+++ b/ip/ip6tunnel.c
@@ -173,6 +173,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip6_tnl_parm *p)
 			   matches(*argv, "dsfield") == 0) {
 			__u8 uval;
 			NEXT_ARG();
+			p->flowinfo &= ~IP6_FLOWINFO_TCLASS;
 			if (strcmp(*argv, "inherit") == 0)
 				p->flags |= IP6_TNL_F_USE_ORIG_TCLASS;
 			else {
@@ -185,6 +186,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip6_tnl_parm *p)
 			   strcmp(*argv, "fl") == 0) {
 			__u32 uval;
 			NEXT_ARG();
+			p->flowinfo &= ~IP6_FLOWINFO_FLOWLABEL;
 			if (strcmp(*argv, "inherit") == 0)
 				p->flags |= IP6_TNL_F_USE_ORIG_FLOWLABEL;
 			else {
-- 
1.7.12

^ permalink raw reply related

* [PATCH iproute2 1/3] ip/ip6tunnel: fix help for TCLASS
From: Nicolas Dichtel @ 2012-11-14 15:29 UTC (permalink / raw)
  To: shemminger; +Cc: netdev, Nicolas Dichtel

Help is "[tclass TCLASS]", but only TOS was described.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 ip/ip6tunnel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
index c9720eb..b23377a 100644
--- a/ip/ip6tunnel.c
+++ b/ip/ip6tunnel.c
@@ -60,7 +60,7 @@ static void usage(void)
 		IPV6_DEFAULT_TNL_ENCAP_LIMIT);
 	fprintf(stderr, "       TTL       := 0..255 (default=%d)\n",
 		DEFAULT_TNL_HOP_LIMIT);
-	fprintf(stderr, "       TOS       := { 0x0..0xff | inherit }\n");
+	fprintf(stderr, "       TCLASS    := { 0x0..0xff | inherit }\n");
 	fprintf(stderr, "       FLOWLABEL := { 0x0..0xfffff | inherit }\n");
 	exit(-1);
 }
-- 
1.7.12

^ permalink raw reply related

* [PATCH iproute2 2/3] ip/ip6tunnel: reset encap limit flag on change
From: Nicolas Dichtel @ 2012-11-14 15:29 UTC (permalink / raw)
  To: shemminger; +Cc: netdev, Nicolas Dichtel
In-Reply-To: <1352906966-12932-1-git-send-email-nicolas.dichtel@6wind.com>

Flag IP6_TNL_F_IGN_ENCAP_LIMIT is set when encaplimit is none, but it was not
removed if encaplimit was set on update (ip tunnel change).

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 ip/ip6tunnel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
index b23377a..7aaac61 100644
--- a/ip/ip6tunnel.c
+++ b/ip/ip6tunnel.c
@@ -157,6 +157,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip6_tnl_parm *p)
 				if (get_u8(&uval, *argv, 0) < -1)
 					invarg("invalid ELIM", *argv);
 				p->encap_limit = uval;
+				p->flags &= ~IP6_TNL_F_IGN_ENCAP_LIMIT;
 			}
 		} else if (strcmp(*argv, "hoplimit") == 0 ||
 			   strcmp(*argv, "ttl") == 0 ||
-- 
1.7.12

^ permalink raw reply related

* Re: [PATCH net-next 2/3] myri10ge: Add vlan rx for better GRO perf.
From: Andrew Gallatin @ 2012-11-14 15:43 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev
In-Reply-To: <1352904408.4497.11.camel@edumazet-glaptop>

On 11/14/12 09:46, Eric Dumazet wrote:
> On Wed, 2012-11-14 at 08:06 -0500, Andrew Gallatin wrote:
>>
>> Unlike LRO, GRO requires that vlan tags be removed before
>> aggregation can occur.  Since the myri10ge NIC does not support
>> hardware vlan tag offload, we must remove the tag in the driver
>> to achieve performance comparable to LRO for vlan tagged frames.
>>
>> Signed-off-by: Andrew Gallatin <gallatin@myri.com>
>> ---
>>    drivers/net/ethernet/myricom/myri10ge/myri10ge.c |   47
>> ++++++++++++++++++++++
>>    1 file changed, 47 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
>> b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
>> index a5ab2f2..b9b6dfd 100644
>> --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
>> +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
>> @@ -1264,6 +1264,48 @@ myri10ge_unmap_rx_page(struct pci_dev *pdev,
>>    	}
>>    }
>>
>> +/*
>> + * GRO does not support acceleration of tagged vlan frames, and
>> + * this NIC does not support vlan tag offload, so we must pop
>> + * the tag ourselves to be able to achieve GRO performance that
>> + * is comparable to LRO.
>> + */
>> +
>> +static inline void
>> +myri10ge_vlan_rx(struct net_device *dev, void *addr, struct sk_buff *skb)
>> +{
>> +	u8 *va;
>> +	struct vlan_ethhdr *veh;
>> +	struct ethhdr *eh;
>> +	struct skb_frag_struct *frag;
>> +	u16 proto;
>> +
>> +	va = addr;
>> +	va += MXGEFW_PAD;
>> +	veh = (struct vlan_ethhdr *) va;
>> +	if ((dev->features & (NETIF_F_HW_VLAN_RX | NETIF_F_GRO)) ==
>> +	    (NETIF_F_HW_VLAN_RX | NETIF_F_GRO) &&
>> +	    (veh->h_vlan_proto == ntohs(ETH_P_8021Q))) {
>> +		/* fixup csum if needed */
>> +		if (skb->ip_summed == CHECKSUM_COMPLETE)
>> +			skb->csum = csum_sub(skb->csum,
>> +					     csum_partial(va + ETH_HLEN,
>> +							  VLAN_HLEN, 0));
>> +		/* pop tag */
>> +		__vlan_hwaccel_put_tag(skb, ntohs(veh->h_vlan_TCI));
>> +		proto = veh->h_vlan_encapsulated_proto;
> I am not sure you need this @proto ?
>
>> +		memmove(va + VLAN_HLEN, va, ETH_HLEN);
>
> You could only memmove the mac addresses (2 * ETH_ALEN)
> To not touch the proto (and avoid possible aliasing problems)
>
>> +		va += VLAN_HLEN;
>> +		eh = (struct ethhdr *)va;
>> +		eh->h_proto = proto;
>
> and this should not be needed ?

Indeed, your suggestion works and is simpler and less risky.
Thank you for your help.

I also think that I am making a mistake by only popping the tag when
GRO is enabled.  My fear is that something will become confused when
skb->dev->features contains NETIF_F_HW_VLAN_RX, but the tag is not
decap'ed.  So I will remove the check for NETIF_F_GRO when popping
the vlan tag.

Thanks,

Drew

^ permalink raw reply

* [PATCH v2 net-next 2/3] myri10ge: Add vlan rx for better GRO perf.
From: Andrew Gallatin @ 2012-11-14 16:32 UTC (permalink / raw)
  To: netdev; +Cc: Eric Dumazet
In-Reply-To: <1352904408.4497.11.camel@edumazet-glaptop>


Unlike LRO, GRO requires that vlan tags be removed before
aggregation can occur.  Since the myri10ge NIC does not support
hardware vlan tag offload, we must remove the tag in the driver
to achieve performance comparable to LRO for vlan tagged frames.

Updated with change suggested by Eric Duzamet to simplify the vlan
tag popping & a change by me to always pop tags when
NETIF_F_HW_VLAN_RX is set.

Signed-off-by: Andrew Gallatin <gallatin@myri.com>
---
  drivers/net/ethernet/myricom/myri10ge/myri10ge.c |   40 
++++++++++++++++++++++
  1 file changed, 40 insertions(+)

diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c 
b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index a5ab2f2..93ed089 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -1264,6 +1264,41 @@ myri10ge_unmap_rx_page(struct pci_dev *pdev,
  	}
  }

+/*
+ * GRO does not support acceleration of tagged vlan frames, and
+ * this NIC does not support vlan tag offload, so we must pop
+ * the tag ourselves to be able to achieve GRO performance that
+ * is comparable to LRO.
+ */
+
+static inline void
+myri10ge_vlan_rx(struct net_device *dev, void *addr, struct sk_buff *skb)
+{
+	u8 *va;
+	struct vlan_ethhdr *veh;
+	struct skb_frag_struct *frag;
+
+	va = addr;
+	va += MXGEFW_PAD;
+	veh = (struct vlan_ethhdr *) va;
+	if ((dev->features & (NETIF_F_HW_VLAN_RX)) == NETIF_F_HW_VLAN_RX &&
+	    (veh->h_vlan_proto == ntohs(ETH_P_8021Q))) {
+		/* fixup csum if needed */
+		if (skb->ip_summed == CHECKSUM_COMPLETE)
+			skb->csum = csum_sub(skb->csum,
+					     csum_partial(va + ETH_HLEN,
+							  VLAN_HLEN, 0));
+		/* pop tag */
+		__vlan_hwaccel_put_tag(skb, ntohs(veh->h_vlan_TCI));
+		memmove(va + VLAN_HLEN, va, 2 * ETH_ALEN);
+		skb->len -= VLAN_HLEN;
+		skb->data_len -= VLAN_HLEN;
+		frag = skb_shinfo(skb)->frags;
+		frag->page_offset += VLAN_HLEN;
+		skb_frag_size_set(frag, skb_frag_size(frag) - VLAN_HLEN);
+	}
+}
+
  static inline int
  myri10ge_rx_done(struct myri10ge_slice_state *ss, int len, __wsum csum)
  {
@@ -1329,6 +1364,7 @@ myri10ge_rx_done(struct myri10ge_slice_state *ss, 
int len, __wsum csum)
  		skb->ip_summed = CHECKSUM_COMPLETE;
  		skb->csum = csum;
  	}
+	myri10ge_vlan_rx(mgp->dev, va, skb);
  	skb_record_rx_queue(skb, ss - &mgp->ss[0]);

  	napi_gro_frags(&ss->napi);
@@ -3854,6 +3890,10 @@ static int myri10ge_probe(struct pci_dev *pdev, 
const struct pci_device_id *ent)
  	netdev->netdev_ops = &myri10ge_netdev_ops;
  	netdev->mtu = myri10ge_initial_mtu;
  	netdev->hw_features = mgp->features | NETIF_F_RXCSUM;
+
+	/* fake NETIF_F_HW_VLAN_RX for good GRO performance */
+	netdev->hw_features |= NETIF_F_HW_VLAN_RX;
+
  	netdev->features = netdev->hw_features;

  	if (dac_enabled)
-- 
1.7.9.5

^ permalink raw reply related

* Re: [PATCHES] Networking fixes for -stable.
From: Ben Hutchings @ 2012-11-14 16:34 UTC (permalink / raw)
  To: Peter Senna Tschudin; +Cc: David Miller, Greg Kroah-Hartman, stable, netdev
In-Reply-To: <CA+MoWDqOd_0jOvFpqkqtSePRV--O8A2tfG71d_VpkUfN89Q_FQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1398 bytes --]

On Wed, 2012-11-14 at 15:02 +0100, Peter Senna Tschudin wrote:
> Hi Ben,
> 
> On Tue, Nov 13, 2012 at 8:51 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> > On Mon, 2012-11-12 at 00:25 -0500, David Miller wrote:
> >> Please queue up the following networking bug fixes for
> >> 3.0.x, 3.2.x, 3.4.x, and 3.6.x, respectively.
> > [...]
> >> From 2204849a85383fbde75680aa199142abe504adbb Mon Sep 17 00:00:00 2001
> >> From: Peter Senna Tschudin <peter.senna@gmail.com>
> >> Date: Sun, 28 Oct 2012 06:12:01 +0000
> >> Subject: [PATCH 7/9] drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister
> >>  before mdiobus_free
> >>
> >> [ Upstream commit aa731872f7d33dcb8b54dad0cfb82d4e4d195d7e ]
> >>
> >> Based on commit b27393aecf66199f5ddad37c302d3e0cfadbe6c0
> >>
> >> Calling mdiobus_free without calling mdiobus_unregister causes
> >> BUG_ON(). This patch fixes the issue.
> > [...]
> >
> > This introduces a regresssion, as mdiobus_unregister() is not safe to
> > call if the bus isn't registered.  Registration is controlled by the
> > drivers that use mdio-bitbang, and they should take care of
> > unregistration too - and most of them do.
> 
> Is mdiobus_free() safe to call if the bus isn't registered?
[...]

It must be, otherwise what do you do if mdiobus_register() fails?

Ben.

-- 
Ben Hutchings
friends: People who know you well, but like you anyway.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply

* Re: [Pv-drivers] [PATCH 0/6] VSOCK for Linux upstreaming
From: Andy King @ 2012-11-14 16:42 UTC (permalink / raw)
  To: Sasha Levin
  Cc: pv-drivers, netdev, linux-kernel, virtualization, gregkh, davem,
	George Zhang
In-Reply-To: <50A01FB1.1080502@gmail.com>

Hi Sasha,

Thanks for taking a look.

> So all the documentation I see in the VMCI Socket Programming Guide
> is about userspace programming, and the documentation in af_vsock.c
> is all around implementation considerations.

Agreed, we're sorely lacking in proper documentation for the internal
protocol.  We're in the process of writing such a specification and
will post it to LKML next week at the latest.

> example, whats the deal with REQUEST/REQUEST2? it appears like
> something to deal with legacy code, but I'd really like to have it
> documented somewhere instead of trying to figure how everything

Correct, we have a legacy protocol and a v2, the latter now being
the default.  This particular packet is sent by the client when
initiating a STREAM connection.  The sequence is REQUEST(2)->
NEGOTIATE(2)->OFFER->ACCEPT.  It will be properly documented in
the specification we post next week.

Thanks!
- Andy

^ permalink raw reply

* Re: vlan tagged packets and libpcap breakage
From: Michael Richardson @ 2012-11-14 18:58 UTC (permalink / raw)
  To: Ani Sinha; +Cc: Francesco Ruggeri, tcpdump-workers, netdev
In-Reply-To: <CAOxq_8N7mSY9rLTeSdUohV5ufU+QF7DtrjwZ3xnAbuP9mRm3jQ@mail.gmail.com>


>>>>> "Ani" == Ani Sinha <ani@aristanetworks.com> writes:
    Ani> I'm wondering if there has been any progress on this. Are there
    Ani> any thoughts on what Bill wrote in his email?

I don't think so.

Do you have time?
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers

^ permalink raw reply

* [PATCH V5 0/7] ARM: AM33XX: net: Add DT support to CPSW and MDIO driver
From: Mugunthan V N @ 2012-11-14 19:07 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA
  Cc: Mugunthan V N, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

This patch-series adds support for,

[1/7]: Typo mistake in CPSW driver while invoking runtime_pm api's

[2/7]: Adds parent<->child relation between CPSW & MDIO module inside cpsw
       driver, as in case of AM33XX, the resources are shared and common
       register bit-field is provided to control module/clock enable/disable,
       makes it difficult to handle common resource.

       So the solution here is, to create parent<->child relation between them.

[3/7]: cpsw: simplify the setup of the register pointers

[4/7]: cpsw: Kernel warn fix during suspend

[5/7]: Add hwmod entry for MDIO module, required for MDIO driver.

[6/7]: Enable CPSW support to omap2plus_defconfig

[7/7]: Add DT device nodes for both CPSW and MDIO modules in am33xx.dtsi,
       am335x-evm.dts and am335x-bone.dts file

This patch series has been created on top of net-next/master and tested
on BeagleBone platform for NFS boot and basic ping test cases.

Changes from V3:
* Removed unnecessary flags in Davinci MDIO Hwmod entry.

Changes from V4:
* Changed CPSW phy ID in DT to make it generic.
* Applied cosmetic changed in AM33XX dts file from Benoit Cousson

Mugunthan V N (4):
  net: cpsw: halt network stack before halting the device during
    suspend
  ARM: OMAP3+: hwmod: Add AM33XX HWMOD data for davinci_mdio module
  ARM: OMAP2+: omap2plus_defconfig: Enable CPSW support
  arm/dts: am33xx: Add CPSW and MDIO module nodes for AM33XX

Richard Cochran (1):
  cpsw: simplify the setup of the register pointers

Vaibhav Hiremath (2):
  net: davinci_mdio: Fix typo mistake in calling runtime-pm api
  net: cpsw: Add parent<->child relation support between cpsw and mdio

 Documentation/devicetree/bindings/net/cpsw.txt |   42 +----
 arch/arm/boot/dts/am335x-bone.dts              |    8 +
 arch/arm/boot/dts/am335x-evm.dts               |    8 +
 arch/arm/boot/dts/am33xx.dtsi                  |   48 +++++
 arch/arm/configs/omap2plus_defconfig           |    3 +
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c     |   31 +++
 drivers/net/ethernet/ti/cpsw.c                 |  248 +++++++++++-------------
 drivers/net/ethernet/ti/davinci_mdio.c         |    2 +-
 include/linux/platform_data/cpsw.h             |   21 +--
 9 files changed, 216 insertions(+), 195 deletions(-)

^ permalink raw reply

* [PATCH V5 2/7] net: cpsw: Add parent<->child relation support between cpsw and mdio
From: Mugunthan V N @ 2012-11-14 19:07 UTC (permalink / raw)
  To: netdev
  Cc: davem, devicetree-discuss, linux-arm-kernel, linux-omap,
	b-cousson, paul, Vaibhav Hiremath, Mugunthan V N
In-Reply-To: <1352920080-6179-1-git-send-email-mugunthanvnm@ti.com>

From: Vaibhav Hiremath <hvaibhav@ti.com>

CPGMAC SubSystem consist of various sub-modules, like, mdio, cpdma,
cpsw, etc... These sub-modules are also used in some of Davinci family
of devices. Now based on requirement, use-case and available technology
nodes the integration of these sub-modules varies across devices.

So coming back to Linux net driver, currently separate and independent
platform devices & drivers for CPSW and MDIO is implemented. In case of
Davinci they both has separate control, from resources perspective,
like clock.

In case of AM33XX, the resources are shared and only one register
bit-field is provided to control module/clock enable/disable, makes it
difficult to handle common resource.

So the solution here implemented in this patch is,

Create parent<->child relationship between both the drivers, making
CPSW as a parent and MDIO as its child and enumerate all the child nodes
under CPSW module.
Both the drivers will function exactly the way it was operating before,
including runtime-pm functionality. No change is required in MDIO driver
(for that matter to any child driver).

As this is only supported during DT boot, the parent<->child relationship
is created and populated in DT execution flow. The only required change
is inside DTS file, making MDIO as a child to CPSW node.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Richard Cochran <richardcochran@gmail.com>
---
 drivers/net/ethernet/ti/cpsw.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 7654a62..7007aba 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1144,7 +1144,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 	}
 	data->mac_control = prop;
 
-	for_each_child_of_node(node, slave_node) {
+	for_each_node_by_name(slave_node, "slave") {
 		struct cpsw_slave_data *slave_data = data->slave_data + i;
 		const char *phy_id = NULL;
 		const void *mac_addr = NULL;
@@ -1179,6 +1179,14 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 		i++;
 	}
 
+	/*
+	 * Populate all the child nodes here...
+	 */
+	ret = of_platform_populate(node, NULL, NULL, &pdev->dev);
+	/* We do not want to force this, as in some cases may not have child */
+	if (ret)
+		pr_warn("Doesn't have any child node\n");
+
 	return 0;
 
 error_ret:
@@ -1212,6 +1220,11 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
 	priv->msg_enable = netif_msg_init(debug_level, CPSW_DEBUG);
 	priv->rx_packet_max = max(rx_packet_max, 128);
 
+	/*
+	 * This may be required here for child devices.
+	 */
+	pm_runtime_enable(&pdev->dev);
+
 	if (cpsw_probe_dt(&priv->data, pdev)) {
 		pr_err("cpsw: platform data missing\n");
 		ret = -ENODEV;
@@ -1238,7 +1251,6 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
 	for (i = 0; i < data->slaves; i++)
 		priv->slaves[i].slave_num = i;
 
-	pm_runtime_enable(&pdev->dev);
 	priv->clk = clk_get(&pdev->dev, "fck");
 	if (IS_ERR(priv->clk)) {
 		dev_err(&pdev->dev, "fck is not found\n");
-- 
1.7.0.4


^ permalink raw reply related

* [PATCH V5 3/7] cpsw: simplify the setup of the register pointers
From: Mugunthan V N @ 2012-11-14 19:07 UTC (permalink / raw)
  To: netdev
  Cc: davem, devicetree-discuss, linux-arm-kernel, linux-omap,
	b-cousson, paul, Richard Cochran, Mugunthan V N
In-Reply-To: <1352920080-6179-1-git-send-email-mugunthanvnm@ti.com>

From: Richard Cochran <richardcochran@gmail.com>

Instead of having a host of different register offsets in the device tree,
this patch simplifies the CPSW code by letting the driver set the proper
register offsets automatically, based on the CPSW version.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 Documentation/devicetree/bindings/net/cpsw.txt |   42 +----
 drivers/net/ethernet/ti/cpsw.c                 |  242 ++++++++++--------------
 include/linux/platform_data/cpsw.h             |   21 +--
 3 files changed, 108 insertions(+), 197 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt
index 2214607..6ddd028 100644
--- a/Documentation/devicetree/bindings/net/cpsw.txt
+++ b/Documentation/devicetree/bindings/net/cpsw.txt
@@ -9,15 +9,7 @@ Required properties:
 			  number
 - interrupt-parent	: The parent interrupt controller
 - cpdma_channels 	: Specifies number of channels in CPDMA
-- host_port_no		: Specifies host port shift
-- cpdma_reg_ofs		: Specifies CPDMA submodule register offset
-- cpdma_sram_ofs	: Specifies CPDMA SRAM offset
-- ale_reg_ofs		: Specifies ALE submodule register offset
 - ale_entries		: Specifies No of entries ALE can hold
-- host_port_reg_ofs	: Specifies host port register offset
-- hw_stats_reg_ofs	: Specifies hardware statistics register offset
-- cpts_reg_ofs		: Specifies the offset of the CPTS registers
-- bd_ram_ofs		: Specifies internal desciptor RAM offset
 - bd_ram_size		: Specifies internal descriptor RAM size
 - rx_descs		: Specifies number of Rx descriptors
 - mac_control		: Specifies Default MAC control register content
@@ -26,8 +18,6 @@ Required properties:
 - cpts_active_slave	: Specifies the slave to use for time stamping
 - cpts_clock_mult	: Numerator to convert input clock ticks into nanoseconds
 - cpts_clock_shift	: Denominator to convert input clock ticks into nanoseconds
-- slave_reg_ofs		: Specifies slave register offset
-- sliver_reg_ofs	: Specifies slave sliver register offset
 - phy_id		: Specifies slave phy id
 - mac-address		: Specifies slave MAC address
 
@@ -49,15 +39,7 @@ Examples:
 		interrupts = <55 0x4>;
 		interrupt-parent = <&intc>;
 		cpdma_channels = <8>;
-		host_port_no = <0>;
-		cpdma_reg_ofs = <0x800>;
-		cpdma_sram_ofs = <0xa00>;
-		ale_reg_ofs = <0xd00>;
 		ale_entries = <1024>;
-		host_port_reg_ofs = <0x108>;
-		hw_stats_reg_ofs = <0x900>;
-		cpts_reg_ofs = <0xc00>;
-		bd_ram_ofs = <0x2000>;
 		bd_ram_size = <0x2000>;
 		no_bd_ram = <0>;
 		rx_descs = <64>;
@@ -67,16 +49,12 @@ Examples:
 		cpts_clock_mult = <0x80000000>;
 		cpts_clock_shift = <29>;
 		cpsw_emac0: slave@0 {
-			slave_reg_ofs = <0x200>;
-			sliver_reg_ofs = <0xd80>;
-			phy_id = "davinci_mdio.16:00";
+			phy_id = <&davinci_mdio>, <0>;
 			/* Filled in by U-Boot */
 			mac-address = [ 00 00 00 00 00 00 ];
 		};
 		cpsw_emac1: slave@1 {
-			slave_reg_ofs = <0x300>;
-			sliver_reg_ofs = <0xdc0>;
-			phy_id = "davinci_mdio.16:01";
+			phy_id = <&davinci_mdio>, <1>;
 			/* Filled in by U-Boot */
 			mac-address = [ 00 00 00 00 00 00 ];
 		};
@@ -87,15 +65,7 @@ Examples:
 		compatible = "ti,cpsw";
 		ti,hwmods = "cpgmac0";
 		cpdma_channels = <8>;
-		host_port_no = <0>;
-		cpdma_reg_ofs = <0x800>;
-		cpdma_sram_ofs = <0xa00>;
-		ale_reg_ofs = <0xd00>;
 		ale_entries = <1024>;
-		host_port_reg_ofs = <0x108>;
-		hw_stats_reg_ofs = <0x900>;
-		cpts_reg_ofs = <0xc00>;
-		bd_ram_ofs = <0x2000>;
 		bd_ram_size = <0x2000>;
 		no_bd_ram = <0>;
 		rx_descs = <64>;
@@ -105,16 +75,12 @@ Examples:
 		cpts_clock_mult = <0x80000000>;
 		cpts_clock_shift = <29>;
 		cpsw_emac0: slave@0 {
-			slave_reg_ofs = <0x200>;
-			sliver_reg_ofs = <0xd80>;
-			phy_id = "davinci_mdio.16:00";
+			phy_id = <&davinci_mdio>, <0>;
 			/* Filled in by U-Boot */
 			mac-address = [ 00 00 00 00 00 00 ];
 		};
 		cpsw_emac1: slave@1 {
-			slave_reg_ofs = <0x300>;
-			sliver_reg_ofs = <0xdc0>;
-			phy_id = "davinci_mdio.16:01";
+			phy_id = <&davinci_mdio>, <1>;
 			/* Filled in by U-Boot */
 			mac-address = [ 00 00 00 00 00 00 ];
 		};
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 7007aba..0da9c75 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -80,6 +80,29 @@ do {								\
 
 #define CPSW_VERSION_1		0x19010a
 #define CPSW_VERSION_2		0x19010c
+
+#define HOST_PORT_NUM		0
+#define SLIVER_SIZE		0x40
+
+#define CPSW1_HOST_PORT_OFFSET	0x028
+#define CPSW1_SLAVE_OFFSET	0x050
+#define CPSW1_SLAVE_SIZE	0x040
+#define CPSW1_CPDMA_OFFSET	0x100
+#define CPSW1_STATERAM_OFFSET	0x200
+#define CPSW1_CPTS_OFFSET	0x500
+#define CPSW1_ALE_OFFSET	0x600
+#define CPSW1_SLIVER_OFFSET	0x700
+
+#define CPSW2_HOST_PORT_OFFSET	0x108
+#define CPSW2_SLAVE_OFFSET	0x200
+#define CPSW2_SLAVE_SIZE	0x100
+#define CPSW2_CPDMA_OFFSET	0x800
+#define CPSW2_STATERAM_OFFSET	0xa00
+#define CPSW2_CPTS_OFFSET	0xc00
+#define CPSW2_ALE_OFFSET	0xd00
+#define CPSW2_SLIVER_OFFSET	0xd80
+#define CPSW2_BD_OFFSET		0x2000
+
 #define CPDMA_RXTHRESH		0x0c0
 #define CPDMA_RXFREE		0x0e0
 #define CPDMA_TXHDP		0x00
@@ -87,21 +110,6 @@ do {								\
 #define CPDMA_TXCP		0x40
 #define CPDMA_RXCP		0x60
 
-#define cpsw_dma_regs(base, offset)		\
-	(void __iomem *)((base) + (offset))
-#define cpsw_dma_rxthresh(base, offset)		\
-	(void __iomem *)((base) + (offset) + CPDMA_RXTHRESH)
-#define cpsw_dma_rxfree(base, offset)		\
-	(void __iomem *)((base) + (offset) + CPDMA_RXFREE)
-#define cpsw_dma_txhdp(base, offset)		\
-	(void __iomem *)((base) + (offset) + CPDMA_TXHDP)
-#define cpsw_dma_rxhdp(base, offset)		\
-	(void __iomem *)((base) + (offset) + CPDMA_RXHDP)
-#define cpsw_dma_txcp(base, offset)		\
-	(void __iomem *)((base) + (offset) + CPDMA_TXCP)
-#define cpsw_dma_rxcp(base, offset)		\
-	(void __iomem *)((base) + (offset) + CPDMA_RXCP)
-
 #define CPSW_POLL_WEIGHT	64
 #define CPSW_MIN_PACKET_SIZE	60
 #define CPSW_MAX_PACKET_SIZE	(1500 + 14 + 4 + 4)
@@ -629,8 +637,7 @@ static int cpsw_ndo_open(struct net_device *ndev)
 
 	pm_runtime_get_sync(&priv->pdev->dev);
 
-	reg = __raw_readl(&priv->regs->id_ver);
-	priv->version = reg;
+	reg = priv->version;
 
 	dev_info(priv->dev, "initializing cpsw version %d.%d (%d)\n",
 		 CPSW_MAJOR_VERSION(reg), CPSW_MINOR_VERSION(reg),
@@ -995,15 +1002,16 @@ static const struct ethtool_ops cpsw_ethtool_ops = {
 	.get_ts_info	= cpsw_get_ts_info,
 };
 
-static void cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_priv *priv)
+static void cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_priv *priv,
+			    u32 slave_reg_ofs, u32 sliver_reg_ofs)
 {
 	void __iomem		*regs = priv->regs;
 	int			slave_num = slave->slave_num;
 	struct cpsw_slave_data	*data = priv->data.slave_data + slave_num;
 
 	slave->data	= data;
-	slave->regs	= regs + data->slave_reg_ofs;
-	slave->sliver	= regs + data->sliver_reg_ofs;
+	slave->regs	= regs + slave_reg_ofs;
+	slave->sliver	= regs + sliver_reg_ofs;
 }
 
 static int cpsw_probe_dt(struct cpsw_platform_data *data,
@@ -1051,8 +1059,6 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 		return -EINVAL;
 	}
 
-	data->no_bd_ram = of_property_read_bool(node, "no_bd_ram");
-
 	if (of_property_read_u32(node, "cpdma_channels", &prop)) {
 		pr_err("Missing cpdma_channels property in the DT.\n");
 		ret = -EINVAL;
@@ -1060,34 +1066,6 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 	}
 	data->channels = prop;
 
-	if (of_property_read_u32(node, "host_port_no", &prop)) {
-		pr_err("Missing host_port_no property in the DT.\n");
-		ret = -EINVAL;
-		goto error_ret;
-	}
-	data->host_port_num = prop;
-
-	if (of_property_read_u32(node, "cpdma_reg_ofs", &prop)) {
-		pr_err("Missing cpdma_reg_ofs property in the DT.\n");
-		ret = -EINVAL;
-		goto error_ret;
-	}
-	data->cpdma_reg_ofs = prop;
-
-	if (of_property_read_u32(node, "cpdma_sram_ofs", &prop)) {
-		pr_err("Missing cpdma_sram_ofs property in the DT.\n");
-		ret = -EINVAL;
-		goto error_ret;
-	}
-	data->cpdma_sram_ofs = prop;
-
-	if (of_property_read_u32(node, "ale_reg_ofs", &prop)) {
-		pr_err("Missing ale_reg_ofs property in the DT.\n");
-		ret = -EINVAL;
-		goto error_ret;
-	}
-	data->ale_reg_ofs = prop;
-
 	if (of_property_read_u32(node, "ale_entries", &prop)) {
 		pr_err("Missing ale_entries property in the DT.\n");
 		ret = -EINVAL;
@@ -1095,34 +1073,6 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 	}
 	data->ale_entries = prop;
 
-	if (of_property_read_u32(node, "host_port_reg_ofs", &prop)) {
-		pr_err("Missing host_port_reg_ofs property in the DT.\n");
-		ret = -EINVAL;
-		goto error_ret;
-	}
-	data->host_port_reg_ofs = prop;
-
-	if (of_property_read_u32(node, "hw_stats_reg_ofs", &prop)) {
-		pr_err("Missing hw_stats_reg_ofs property in the DT.\n");
-		ret = -EINVAL;
-		goto error_ret;
-	}
-	data->hw_stats_reg_ofs = prop;
-
-	if (of_property_read_u32(node, "cpts_reg_ofs", &prop)) {
-		pr_err("Missing cpts_reg_ofs property in the DT.\n");
-		ret = -EINVAL;
-		goto error_ret;
-	}
-	data->cpts_reg_ofs = prop;
-
-	if (of_property_read_u32(node, "bd_ram_ofs", &prop)) {
-		pr_err("Missing bd_ram_ofs property in the DT.\n");
-		ret = -EINVAL;
-		goto error_ret;
-	}
-	data->bd_ram_ofs = prop;
-
 	if (of_property_read_u32(node, "bd_ram_size", &prop)) {
 		pr_err("Missing bd_ram_size property in the DT.\n");
 		ret = -EINVAL;
@@ -1144,33 +1094,34 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 	}
 	data->mac_control = prop;
 
+	/*
+	 * Populate all the child nodes here...
+	 */
+	ret = of_platform_populate(node, NULL, NULL, &pdev->dev);
+	/* We do not want to force this, as in some cases may not have child */
+	if (ret)
+		pr_warn("Doesn't have any child node\n");
+
 	for_each_node_by_name(slave_node, "slave") {
 		struct cpsw_slave_data *slave_data = data->slave_data + i;
-		const char *phy_id = NULL;
 		const void *mac_addr = NULL;
-
-		if (of_property_read_string(slave_node, "phy_id", &phy_id)) {
+		u32 phyid;
+		int lenp;
+		const __be32 *parp;
+		struct device_node *mdio_node;
+		struct platform_device *mdio;
+
+		parp = of_get_property(slave_node, "phy_id", &lenp);
+		if ((parp == NULL) && (lenp != (sizeof(void *) * 2))) {
 			pr_err("Missing slave[%d] phy_id property\n", i);
 			ret = -EINVAL;
 			goto error_ret;
 		}
-		slave_data->phy_id = phy_id;
-
-		if (of_property_read_u32(slave_node, "slave_reg_ofs", &prop)) {
-			pr_err("Missing slave[%d] slave_reg_ofs property\n", i);
-			ret = -EINVAL;
-			goto error_ret;
-		}
-		slave_data->slave_reg_ofs = prop;
-
-		if (of_property_read_u32(slave_node, "sliver_reg_ofs",
-					 &prop)) {
-			pr_err("Missing slave[%d] sliver_reg_ofs property\n",
-				i);
-			ret = -EINVAL;
-			goto error_ret;
-		}
-		slave_data->sliver_reg_ofs = prop;
+		mdio_node = of_find_node_by_phandle(be32_to_cpup(parp));
+		phyid = be32_to_cpup(parp+1);
+		mdio = of_find_device_by_node(mdio_node);
+		snprintf(slave_data->phy_id, sizeof(slave_data->phy_id),
+			 PHY_ID_FMT, mdio->name, phyid);
 
 		mac_addr = of_get_mac_address(slave_node);
 		if (mac_addr)
@@ -1179,14 +1130,6 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 		i++;
 	}
 
-	/*
-	 * Populate all the child nodes here...
-	 */
-	ret = of_platform_populate(node, NULL, NULL, &pdev->dev);
-	/* We do not want to force this, as in some cases may not have child */
-	if (ret)
-		pr_warn("Doesn't have any child node\n");
-
 	return 0;
 
 error_ret:
@@ -1201,8 +1144,9 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
 	struct cpsw_priv		*priv;
 	struct cpdma_params		dma_params;
 	struct cpsw_ale_params		ale_params;
-	void __iomem			*regs;
+	void __iomem			*ss_regs, *wr_regs;
 	struct resource			*res;
+	u32 slave_offset, sliver_offset, slave_size;
 	int ret = 0, i, k = 0;
 
 	ndev = alloc_etherdev(sizeof(struct cpsw_priv));
@@ -1270,15 +1214,14 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
 		ret = -ENXIO;
 		goto clean_clk_ret;
 	}
-	regs = ioremap(priv->cpsw_res->start, resource_size(priv->cpsw_res));
-	if (!regs) {
+	ss_regs = ioremap(priv->cpsw_res->start, resource_size(priv->cpsw_res));
+	if (!ss_regs) {
 		dev_err(priv->dev, "unable to map i/o region\n");
 		goto clean_cpsw_iores_ret;
 	}
-	priv->regs = regs;
-	priv->host_port = data->host_port_num;
-	priv->host_port_regs = regs + data->host_port_reg_ofs;
-	priv->cpts.reg = regs + data->cpts_reg_ofs;
+	priv->regs = ss_regs;
+	priv->version = __raw_readl(&priv->regs->id_ver);
+	priv->host_port = HOST_PORT_NUM;
 
 	priv->cpsw_wr_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 	if (!priv->cpsw_wr_res) {
@@ -1292,32 +1235,59 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
 		ret = -ENXIO;
 		goto clean_iomap_ret;
 	}
-	regs = ioremap(priv->cpsw_wr_res->start,
+	wr_regs = ioremap(priv->cpsw_wr_res->start,
 				resource_size(priv->cpsw_wr_res));
-	if (!regs) {
+	if (!wr_regs) {
 		dev_err(priv->dev, "unable to map i/o region\n");
 		goto clean_cpsw_wr_iores_ret;
 	}
-	priv->wr_regs = regs;
-
-	for_each_slave(priv, cpsw_slave_init, priv);
+	priv->wr_regs = wr_regs;
 
 	memset(&dma_params, 0, sizeof(dma_params));
+	memset(&ale_params, 0, sizeof(ale_params));
+
+	switch (priv->version) {
+	case CPSW_VERSION_1:
+		priv->host_port_regs = ss_regs + CPSW1_HOST_PORT_OFFSET;
+		priv->cpts.reg       = ss_regs + CPSW1_CPTS_OFFSET;
+		dma_params.dmaregs   = ss_regs + CPSW1_CPDMA_OFFSET;
+		dma_params.txhdp     = ss_regs + CPSW1_STATERAM_OFFSET;
+		ale_params.ale_regs  = ss_regs + CPSW1_ALE_OFFSET;
+		slave_offset         = CPSW1_SLAVE_OFFSET;
+		slave_size           = CPSW1_SLAVE_SIZE;
+		sliver_offset        = CPSW1_SLIVER_OFFSET;
+		dma_params.desc_mem_phys = 0;
+		break;
+	case CPSW_VERSION_2:
+		priv->host_port_regs = ss_regs + CPSW2_HOST_PORT_OFFSET;
+		priv->cpts.reg       = ss_regs + CPSW2_CPTS_OFFSET;
+		dma_params.dmaregs   = ss_regs + CPSW2_CPDMA_OFFSET;
+		dma_params.txhdp     = ss_regs + CPSW2_STATERAM_OFFSET;
+		ale_params.ale_regs  = ss_regs + CPSW2_ALE_OFFSET;
+		slave_offset         = CPSW2_SLAVE_OFFSET;
+		slave_size           = CPSW2_SLAVE_SIZE;
+		sliver_offset        = CPSW2_SLIVER_OFFSET;
+		dma_params.desc_mem_phys =
+			(u32 __force) priv->cpsw_res->start + CPSW2_BD_OFFSET;
+		break;
+	default:
+		dev_err(priv->dev, "unknown version 0x%08x\n", priv->version);
+		ret = -ENODEV;
+		goto clean_cpsw_wr_iores_ret;
+	}
+	for (i = 0; i < priv->data.slaves; i++) {
+		struct cpsw_slave *slave = &priv->slaves[i];
+		cpsw_slave_init(slave, priv, slave_offset, sliver_offset);
+		slave_offset  += slave_size;
+		sliver_offset += SLIVER_SIZE;
+	}
+
 	dma_params.dev		= &pdev->dev;
-	dma_params.dmaregs	= cpsw_dma_regs((u32)priv->regs,
-						data->cpdma_reg_ofs);
-	dma_params.rxthresh	= cpsw_dma_rxthresh((u32)priv->regs,
-						    data->cpdma_reg_ofs);
-	dma_params.rxfree	= cpsw_dma_rxfree((u32)priv->regs,
-						  data->cpdma_reg_ofs);
-	dma_params.txhdp	= cpsw_dma_txhdp((u32)priv->regs,
-						 data->cpdma_sram_ofs);
-	dma_params.rxhdp	= cpsw_dma_rxhdp((u32)priv->regs,
-						 data->cpdma_sram_ofs);
-	dma_params.txcp		= cpsw_dma_txcp((u32)priv->regs,
-						data->cpdma_sram_ofs);
-	dma_params.rxcp		= cpsw_dma_rxcp((u32)priv->regs,
-						data->cpdma_sram_ofs);
+	dma_params.rxthresh	= dma_params.dmaregs + CPDMA_RXTHRESH;
+	dma_params.rxfree	= dma_params.dmaregs + CPDMA_RXFREE;
+	dma_params.rxhdp	= dma_params.txhdp + CPDMA_RXHDP;
+	dma_params.txcp		= dma_params.txhdp + CPDMA_TXCP;
+	dma_params.rxcp		= dma_params.txhdp + CPDMA_RXCP;
 
 	dma_params.num_chan		= data->channels;
 	dma_params.has_soft_reset	= true;
@@ -1325,10 +1295,7 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
 	dma_params.desc_mem_size	= data->bd_ram_size;
 	dma_params.desc_align		= 16;
 	dma_params.has_ext_regs		= true;
-	dma_params.desc_mem_phys        = data->no_bd_ram ? 0 :
-			(u32 __force)priv->cpsw_res->start + data->bd_ram_ofs;
-	dma_params.desc_hw_addr         = data->hw_ram_addr ?
-			data->hw_ram_addr : dma_params.desc_mem_phys ;
+	dma_params.desc_hw_addr         = dma_params.desc_mem_phys;
 
 	priv->dma = cpdma_ctlr_create(&dma_params);
 	if (!priv->dma) {
@@ -1348,10 +1315,7 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
 		goto clean_dma_ret;
 	}
 
-	memset(&ale_params, 0, sizeof(ale_params));
 	ale_params.dev			= &ndev->dev;
-	ale_params.ale_regs		= (void *)((u32)priv->regs) +
-						((u32)data->ale_reg_ofs);
 	ale_params.ale_ageout		= ale_ageout;
 	ale_params.ale_entries		= data->ale_entries;
 	ale_params.ale_ports		= data->slaves;
diff --git a/include/linux/platform_data/cpsw.h b/include/linux/platform_data/cpsw.h
index b5c16c3..24368a2 100644
--- a/include/linux/platform_data/cpsw.h
+++ b/include/linux/platform_data/cpsw.h
@@ -18,9 +18,7 @@
 #include <linux/if_ether.h>
 
 struct cpsw_slave_data {
-	u32		slave_reg_ofs;
-	u32		sliver_reg_ofs;
-	const char	*phy_id;
+	char		phy_id[MII_BUS_ID_SIZE];
 	int		phy_if;
 	u8		mac_addr[ETH_ALEN];
 };
@@ -28,31 +26,14 @@ struct cpsw_slave_data {
 struct cpsw_platform_data {
 	u32	ss_reg_ofs;	/* Subsystem control register offset */
 	u32	channels;	/* number of cpdma channels (symmetric) */
-	u32	cpdma_reg_ofs;	/* cpdma register offset */
-	u32	cpdma_sram_ofs;	/* cpdma sram offset */
-
 	u32	slaves;		/* number of slave cpgmac ports */
 	struct cpsw_slave_data	*slave_data;
 	u32	cpts_active_slave; /* time stamping slave */
 	u32	cpts_clock_mult;  /* convert input clock ticks to nanoseconds */
 	u32	cpts_clock_shift; /* convert input clock ticks to nanoseconds */
-
-	u32	ale_reg_ofs;	/* address lookup engine reg offset */
 	u32	ale_entries;	/* ale table size */
-
-	u32	host_port_reg_ofs; /* cpsw cpdma host port registers */
-	u32     host_port_num; /* The port number for the host port */
-
-	u32	hw_stats_reg_ofs;  /* cpsw hardware statistics counters */
-	u32	cpts_reg_ofs;      /* cpts registers */
-
-	u32	bd_ram_ofs;   /* embedded buffer descriptor RAM offset*/
 	u32	bd_ram_size;  /*buffer descriptor ram size */
-	u32	hw_ram_addr; /*if the HW address for BD RAM is different */
-	bool	no_bd_ram; /* no embedded BD ram*/
-
 	u32	rx_descs;	/* Number of Rx Descriptios */
-
 	u32	mac_control;	/* Mac control register */
 };
 
-- 
1.7.0.4


^ permalink raw reply related

* [PATCH V5 4/7] net: cpsw: halt network stack before halting the device during suspend
From: Mugunthan V N @ 2012-11-14 19:07 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA
  Cc: Mugunthan V N, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <1352920080-6179-1-git-send-email-mugunthanvnm-l0cyMroinI0@public.gmane.org>

Move network stack halt APIs before halting the hardware to ensure no
packets are queued to hardware during closing the device during
suspend sequence.

Signed-off-by: Mugunthan V N <mugunthanvnm-l0cyMroinI0@public.gmane.org>
Acked-by: Richard Cochran <richardcochran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/net/ethernet/ti/cpsw.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 0da9c75..02c2477 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -698,12 +698,12 @@ static int cpsw_ndo_stop(struct net_device *ndev)
 	struct cpsw_priv *priv = netdev_priv(ndev);
 
 	cpsw_info(priv, ifdown, "shutting down cpsw device\n");
-	cpsw_intr_disable(priv);
-	cpdma_ctlr_int_ctrl(priv->dma, false);
-	cpdma_ctlr_stop(priv->dma);
 	netif_stop_queue(priv->ndev);
 	napi_disable(&priv->napi);
 	netif_carrier_off(priv->ndev);
+	cpsw_intr_disable(priv);
+	cpdma_ctlr_int_ctrl(priv->dma, false);
+	cpdma_ctlr_stop(priv->dma);
 	cpsw_ale_stop(priv->ale);
 	for_each_slave(priv, cpsw_slave_stop, priv);
 	pm_runtime_put_sync(&priv->pdev->dev);
-- 
1.7.0.4

^ permalink raw reply related

* [PATCH V5 5/7] ARM: OMAP3+: hwmod: Add AM33XX HWMOD data for davinci_mdio module
From: Mugunthan V N @ 2012-11-14 19:07 UTC (permalink / raw)
  To: netdev
  Cc: davem, devicetree-discuss, linux-arm-kernel, linux-omap,
	b-cousson, paul, Mugunthan V N, Vaibhav Hiremath
In-Reply-To: <1352920080-6179-1-git-send-email-mugunthanvnm@ti.com>

This patch adds hwmod entry for davinci MDIO module,
creating parent<->child relationship between CPSW and MDIO module.

This Parent-child relation is required in order to use common resources
like, clock, but still maintaining the logical separation between them.

CPGMAC SubSystem consist of various sub-modules, like, mdio, cpdma,
cpsw, etc... These sub-modules are also used in some of Davinci
family of devices, so separate and independent platform devices &
drivers for CPSW and MDIO is implemented.
In case of AM33XX, the resources are shared and common register
bit-field is provided to control module/clock enable/disable,
makes it difficult to handle common resources from both drivers.

So the solution is, create parent<->child relationship between
CPGMAC & MDIO modules.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Richard Cochran <richardcochran@gmail.com>
---
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |   31 ++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 59d5c1c..3125835 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -674,6 +674,7 @@ static struct omap_hwmod am33xx_cpgmac0_hwmod = {
 	.name		= "cpgmac0",
 	.class		= &am33xx_cpgmac0_hwmod_class,
 	.clkdm_name	= "cpsw_125mhz_clkdm",
+	.flags		= (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
 	.mpu_irqs	= am33xx_cpgmac0_irqs,
 	.main_clk	= "cpsw_125mhz_gclk",
 	.prcm		= {
@@ -685,6 +686,20 @@ static struct omap_hwmod am33xx_cpgmac0_hwmod = {
 };
 
 /*
+ * mdio class
+ */
+static struct omap_hwmod_class am33xx_mdio_hwmod_class = {
+	.name		= "davinci_mdio",
+};
+
+static struct omap_hwmod am33xx_mdio_hwmod = {
+	.name		= "davinci_mdio",
+	.class		= &am33xx_mdio_hwmod_class,
+	.clkdm_name	= "cpsw_125mhz_clkdm",
+	.main_clk	= "cpsw_125mhz_gclk",
+};
+
+/*
  * dcan class
  */
 static struct omap_hwmod_class am33xx_dcan_hwmod_class = {
@@ -2501,6 +2516,21 @@ static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = {
 	.user		= OCP_USER_MPU,
 };
 
+struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = {
+	{
+		.pa_start	= 0x4A101000,
+		.pa_end		= 0x4A101000 + SZ_256 - 1,
+	},
+	{ }
+};
+
+struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = {
+	.master		= &am33xx_cpgmac0_hwmod,
+	.slave		= &am33xx_mdio_hwmod,
+	.addr		= am33xx_mdio_addr_space,
+	.user		= OCP_USER_MPU,
+};
+
 static struct omap_hwmod_addr_space am33xx_elm_addr_space[] = {
 	{
 		.pa_start	= 0x48080000,
@@ -3371,6 +3401,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l3_main__tptc2,
 	&am33xx_l3_s__usbss,
 	&am33xx_l4_hs__cpgmac0,
+	&am33xx_cpgmac0__mdio,
 	NULL,
 };
 
-- 
1.7.0.4


^ permalink raw reply related

* [PATCH V5 6/7] ARM: OMAP2+: omap2plus_defconfig: Enable CPSW support
From: Mugunthan V N @ 2012-11-14 19:07 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA
  Cc: Mugunthan V N, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <1352920080-6179-1-git-send-email-mugunthanvnm-l0cyMroinI0@public.gmane.org>

Enable CPSW support in defconfig which is present in AM33xx SoC

Signed-off-by: Mugunthan V N <mugunthanvnm-l0cyMroinI0@public.gmane.org>
Acked-by: Richard Cochran <richardcochran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/configs/omap2plus_defconfig |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index a4b330e..41b595e 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -242,3 +242,6 @@ CONFIG_CRC_ITU_T=y
 CONFIG_CRC7=y
 CONFIG_LIBCRC32C=y
 CONFIG_SOC_OMAP5=y
+CONFIG_TI_DAVINCI_MDIO=y
+CONFIG_TI_DAVINCI_CPDMA=y
+CONFIG_TI_CPSW=y
-- 
1.7.0.4

^ permalink raw reply related

* [PATCH V5 7/7] arm/dts: am33xx: Add CPSW and MDIO module nodes for AM33XX
From: Mugunthan V N @ 2012-11-14 19:08 UTC (permalink / raw)
  To: netdev
  Cc: davem, devicetree-discuss, linux-arm-kernel, linux-omap,
	b-cousson, paul, Mugunthan V N, Vaibhav Hiremath
In-Reply-To: <1352920080-6179-1-git-send-email-mugunthanvnm@ti.com>

Add CPSW and MDIO related device tree data for AM33XX.
Also enable them into board/evm dts files by providing
respective phy-id.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Richard Cochran <richardcochran@gmail.com>
---
 arch/arm/boot/dts/am335x-bone.dts |    8 ++++++
 arch/arm/boot/dts/am335x-evm.dts  |    8 ++++++
 arch/arm/boot/dts/am33xx.dtsi     |   48 +++++++++++++++++++++++++++++++++++++
 3 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
index c634f87..4fcd218 100644
--- a/arch/arm/boot/dts/am335x-bone.dts
+++ b/arch/arm/boot/dts/am335x-bone.dts
@@ -78,3 +78,11 @@
 		};
 	};
 };
+
+&cpsw_emac0 {
+	phy_id = <&davinci_mdio>, <0>;
+};
+
+&cpsw_emac1 {
+	phy_id = <&davinci_mdio>, <1>;
+};
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index 185d632..366d929 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -118,3 +118,11 @@
 		};
 	};
 };
+
+&cpsw_emac0 {
+	phy_id = <&davinci_mdio>, <0>;
+};
+
+&cpsw_emac1 {
+	phy_id = <&davinci_mdio>, <1>;
+};
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index bb31bff..a4615b4 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -210,5 +210,53 @@
 			interrupt-parent = <&intc>;
 			interrupts = <91>;
 		};
+
+		mac: ethernet@4a100000 {
+			compatible = "ti,cpsw";
+			ti,hwmods = "cpgmac0";
+			cpdma_channels = <8>;
+			ale_entries = <1024>;
+			bd_ram_size = <0x2000>;
+			no_bd_ram = <0>;
+			rx_descs = <64>;
+			mac_control = <0x20>;
+			slaves = <2>;
+			cpts_active_slave = <0>;
+			cpts_clock_mult = <0x80000000>;
+			cpts_clock_shift = <29>;
+			reg = <0x4a100000 0x800
+			       0x4a101200 0x100>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			interrupt-parent = <&intc>;
+			/*
+			 * c0_rx_thresh_pend
+			 * c0_rx_pend
+			 * c0_tx_pend
+			 * c0_misc_pend
+			 */
+			interrupts = <40 41 42 43>;
+			ranges;
+
+			davinci_mdio: mdio@4a101000 {
+				compatible = "ti,davinci_mdio";
+				#address-cells = <1>;
+				#size-cells = <0>;
+				ti,hwmods = "davinci_mdio";
+				bus_freq = <1000000>;
+				reg = <0x4a101000 0x100>;
+			};
+
+			cpsw_emac0: slave@4a100200 {
+				/* Filled in by U-Boot */
+				mac-address = [ 00 00 00 00 00 00 ];
+			};
+
+			cpsw_emac1: slave@4a100300 {
+				/* Filled in by U-Boot */
+				mac-address = [ 00 00 00 00 00 00 ];
+			};
+
+		};
 	};
 };
-- 
1.7.0.4


^ permalink raw reply related

* [PATCH V5 1/7] net: davinci_mdio: Fix typo mistake in calling runtime-pm api
From: Mugunthan V N @ 2012-11-14 19:07 UTC (permalink / raw)
  To: netdev
  Cc: davem, devicetree-discuss, linux-arm-kernel, linux-omap,
	b-cousson, paul, Vaibhav Hiremath, Mugunthan V N
In-Reply-To: <1352920080-6179-1-git-send-email-mugunthanvnm@ti.com>

From: Vaibhav Hiremath <hvaibhav@ti.com>

By mistake (most likely a copy-paste), instead of pm_runtime_get_sync()
api, driver is calling pm_runtime_put_sync() api in resume callback
function. The bug was introduced by commit id (ae2c07aaf74:
davinci_mdio: runtime PM support).

Now, the reason why it didn't impact functionality is, the patch has
been tested on AM335x-EVM and BeagleBone platform while submitting;
and in case of AM335x the MDIO driver doesn't control the module
enable/disable part, which is handled by CPSW driver.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Richard Cochran <richardcochran@gmail.com>
---
 drivers/net/ethernet/ti/davinci_mdio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 51a96db..ae74280 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -465,7 +465,7 @@ static int davinci_mdio_resume(struct device *dev)
 	u32 ctrl;
 
 	spin_lock(&data->lock);
-	pm_runtime_put_sync(data->dev);
+	pm_runtime_get_sync(data->dev);
 
 	/* restart the scan state machine */
 	ctrl = __raw_readl(&data->regs->control);
-- 
1.7.0.4

^ permalink raw reply related

* pull request: wireless-next 2012-11-14
From: John W. Linville @ 2012-11-14 19:05 UTC (permalink / raw)
  To: davem; +Cc: linux-wireless, netdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 34856 bytes --]

commit 5bdf502dd9c8fd60dddaabfb9a3dc1671302afd2

Dave,

This pull request is intended for the 3.8 stream...

Included is a Bluetooth pull -- Gustavo says:

"These are the Bluetooth bits for inclusion in 3.8, there is basically one big
thing here which is the High Speed patches from Andrei, he did a lot of work on
A2MP and management of AMP devices. The rest are mostly clean up and bug
fixes."

Also included is an NFC pull -- Samuel says:

"With this one we have:

- pn544 p2p support.
- pn544 physical and HCI layers separation. We are getting the pn544 driver
  ready to support non i2c physical layers.
- LLCP SNL (Service Name Lookup). This is the NFC p2p service discovery
  protocol.
- LLCP datagram sockets (connection less) support.
- IDR library usage for NFC devices indexes assignement.
- NFC netlink extension for setting and getting LLCP link characteristics.
- Various code style fixes and cleanups spread over the pn533, LLCP, HCI and
  pn544 code."

There are a couple of mac80211 pulls as well -- Johannes says:

"Please pull my mac80211-next tree to get the first round of new features
for 3.8. We have:
 * finally, the mac80211 multi-channel work
 * scan improvements:
   - bg scan
   - scan flush
   - forced AP scan
 * cfg80211 tracing
 * a bit of new code to allow implementing SAE (secure authentication of
   equals) in managed mode

Along with a few random improvements, features and fixes."

and...

"Please pull from mac80211-next (per below pull request) to get a few
updates. Most important is probably the fix for the WDS regression that
my previous pull request introduced. Other than that, I have some
tracing code, two mesh updates and a change to allow drivers to
calculate the AES CMAC subkeys without having to implement the GF_mulx
operation themselves."

On top of that are the usual updates to iwlwifi, ath9k, rt2x00,
brcmfmac, mwifiex, and a few others here and there.  Of note is the
addition of the ar5523 driver, ported from an original FreeBSD driver.

Please let me know if there are problems!

Thanks,

John

---

The following changes since commit bf0098f22ca7b59e8844ac6882bbae230d34b98d:

  ARM: net: bpf_jit_32: add VLAN instructions for BPF JIT (2012-11-13 18:21:10 -0500)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git for-davem

for you to fetch changes up to 5bdf502dd9c8fd60dddaabfb9a3dc1671302afd2:

  Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem (2012-11-14 13:33:43 -0500)

----------------------------------------------------------------

Alan Cox (1):
      brcm80211: remove some truely barftastic code

Amitkumar Karwar (6):
      cfg80211: code rearrangement to avoid forward declarations
      mwifiex: use LOW_PRIORITY scan flag provided in scan request
      mwifiex: abort scan upon interface down
      mwifiex: minor cleanup and a fix in scan semaphore usage
      mwifiex: disable channel filtering for SSID specific scan from user
      Revert "mwifiex: retrieve correct max_power information in reg_notifier handler"

Andrei Emeltchenko (51):
      Bluetooth: Add HCI logical link cmds definitions
      Bluetooth: A2MP: Create amp_mgr global list
      Bluetooth: AMP: Use HCI cmd to Read AMP Info
      Bluetooth: AMP: Use HCI cmd to Read Loc AMP Assoc
      Bluetooth: A2MP: Process Discover Response
      Bluetooth: AMP: Physical link struct and helpers
      Bluetooth: AMP: Remote AMP ctrl definitions
      Bluetooth: AMP: Handle create / disc phylink req
      Bluetooth: A2MP: Process A2MP Getinfo Rsp
      Bluetooth: A2MP: Process A2MP Get AMP Assoc Rsp
      Bluetooth: Choose connection based on capabilities
      Bluetooth: AMP: Add AMP key calculation
      Bluetooth: AMP: Create Physical Link
      Bluetooth: AMP: Write remote AMP Assoc
      Bluetooth: A2MP: Add fallback to normal l2cap init sequence
      Bluetooth: AMP: Process Chan Selected event
      Bluetooth: AMP: Accept Physical Link
      Bluetooth: AMP: Handle Accept phylink command status evt
      Bluetooth: Use %pMR in debug instead of batostr
      Bluetooth: Use %pMR in sprintf/seq_printf instead of batostr
      Bluetooth: Use %pMR instead of baswap in seq_show
      bluetooth: Remove unneeded batostr function
      Bluetooth: Factor out hci_queue_acl
      Bluetooth: Factor out Create Configuration Response
      Bluetooth: Use %zu print specifier for size_t type
      Bluetooth: A2MP: Correct assoc_len size
      Bluetooth: btmrvl: Correct num_block name
      Bluetooth: btmrvl: Use DIV_ROUND_UP macro
      Bluetooth: btmrvl: Fix skb buffer overflow
      Bluetooth: A2MP: Fix potential NULL dereference
      Bluetooth: AMP: Fix possible NULL dereference
      Bluetooth: Fix dereference after NULL check
      Bluetooth: AMP: Factor out amp_ctrl_add
      Bluetooth: AMP: Factor out phylink_add
      Bluetooth: AMP: Use block_mtu for AMP controller
      Bluetooth: Adjust L2CAP Max PDU size for AMP packets
      Bluetooth: L2CAP: Fix using default Flush Timeout for EFS
      Bluetooth: btmrv: Use %*ph specifier instead of print_hex_dump_bytes
      Bluetooth: Allow to set flush timeout
      Bluetooth: AMP: Handle AMP_LINK timeout
      Bluetooth: AMP: Add handle to hci_chan structure
      Bluetooth: AMP: Handle number of compl blocks for AMP_LINK
      Bluetooth: AMP: Handle AMP_LINK connection
      Bluetooth: AMP: Hanlde AMP_LINK case in conn_put
      Bluetooth: AMP: Use Loglink handle in ACL Handle field
      Bluetooth: AMP: Handle complete frames in l2cap
      Bluetooth: AMP: Drop packets when no l2cap conn exist
      Bluetooth: Send EFS Conf Rsp only for BR/EDR chan
      Bluetooth: Zero bredr pointer when chan is deleted
      Bluetooth: AMP: Get amp_mgr reference in HS hci_conn
      mwifiex: Using %*phD instead of print_hex_dump_bytes

Andy Shevchenko (1):
      rtlwifi: rtl8192ce: rtl8192cu: use %*phC to dump small buffers

Antonio Quartulli (1):
      nl/cfg80211: force scan using an AP vif if requested

Arend van Spriel (23):
      wireless: drivers: make use of WLAN_EID_VENDOR_SPECIFIC
      wireless: gelic: make use of WLAN_EID_VENDOR_SPECIFIC
      wireless: remove duplicate enum ieee80211_eid definitions
      brcmfmac: remove 'always false' condition from brcmf_c_mkiovar_bsscfg
      brcmfmac: extend struct brcmf_if with bssidx field
      brcmfmac: rework driver initialization in brcmf_bus_start()
      brcmfmac: use bssidx from struct brcmf_if for bsscfg specific commands
      brcmfmac: add function converting ieee80211_channel to chanspec
      brcmfmac: use struct brcmf_if as interface object for fwil functions
      brcmfmac: change parameter list for send_key_to_dongle()
      brcmfmac: remove brcmf_find_bssidx() function
      brcmfmac: introduce brcmf_cfg80211_vif structure
      brcmfmac: store profile information per virtual interface
      brcmfmac: use vif struct to check_sys_up() function
      brcmfmac: separate connection status from scanning status
      brcmfmac: remove debugfs functionality from wl_cfg80211.c
      brcmfmac: cleanup brcmf_cfg80211_profile structure
      brcmfmac: remove unused enumeration wl_prof_list
      brcmfmac: rename check_sys_up() to check_vif_up()
      brcmfmac: use memset when setting a broadcast mac address
      brcmfmac: add virtual interface support in brcmf_cfg80211_suspend()
      brcmfmac: remove unnecessary macro usage in brcmf_cfg80211_resume()
      brcmfmac: store IEs per virtual interface

Arron Wang (7):
      NFC: Set local gb and DEP registries
      NFC: Pass hardware specific HCI event to driver
      NFC: Handle pn544 continue activation
      NFC: Implement HCI DEP link up and down
      NFC: Implement HCI DEP send and receive data
      NFC: Add pn544 presence check for different targets
      NFC: Fix sparse warnings due to missing static

Ashok Nagarajan (1):
      mac80211: move out the non-statistics variable estab_plinks from mesh_stat

Assaf Krauss (1):
      mac80211: expose AES-CMAC subkey calculation

Avinash Patil (2):
      mwifiex: handle extended supported rates IE for AP
      mwifiex: rx path enhancement to derive priv only once

Bala Shanmugam (2):
      ath9k: Set appropriate bit for AR9565 in btc control register
      ath9k: turn off RXIQ calibration while re-calibrating radio

Beni Lev (2):
      cfg80211: add tracing to rdev-ops
      cfg80211: add cfg80211 exported function tracing

Bing Zhao (1):
      mwifiex: use sizeof(array) to print_hex_dump_bytes

Christian Lamparter (3):
      carl9170: handle traps from firmware loader
      carl9170: fix spurious transmissions in sniffer mode
      carl9170: split up carl9170_handle_mpdu

Dan Carpenter (3):
      orinoco_usb: clean up some signedness issues
      brcmfmac: Using zero instead of NULL
      ar5523: make buffer size variable unsigned

Dmitry Kasatkin (1):
      Bluetooth: Add function to derive AMP key using hmac

Emmanuel Grumbach (5):
      iwlwifi: wipe out the status of the SCD when we disable a queue
      iwlwifi: use the new macro for the SCD Q STTS bits
      iwlwifi: first deactivate a queue, then wipe out its data
      iwlwifi: don't print the Intel banner twice
      iwlwifi: don't WARN when a non empty queue is disabled

Eric Lapuyade (2):
      NFC: HCI check presence must not fail when driver doesn't support it
      NFC: Separate pn544 hci driver in HW dependant and independant parts

Franky Lin (2):
      brcmfmac: fix sparse warnings
      brcmfmac: streamline header parse code of sdio glom read

Gustavo Padovan (9):
      Bluetooth: Fix two warnings in BT_DBG
      Bluetooth: Fix L2CAP coding style
      Bluetooth: Remove GFP_ATOMIC usage from l2cap_core.c
      Bluetooth: use l2cap_chan_set_err()
      Bluetooth: Use locked l2cap_state_change()
      Bluetooth: Call ops->teardown() without checking for NULL
      Bluetooth: Move bt_accept_enqueue() to l2cap_sock.c
      Bluetooth: Add chan->ops->defer()
      Bluetooth: Rename __l2cap_connect() to l2cap_connect()

Hante Meuleman (6):
      brcmfmac: refactor firmware interface layer.
      brcmfmac: remove unused iswl variable.
      brcmfmac: change testmode command to use new firmware interface layer
      brcmfmac: remove redundant function brcmf_c_mkiovar_bsscfg
      brcmfmac: clean usb download code.
      brcmfmac: use fwil for default configuration setup.

Hauke Mehrtens (14):
      bcma: just do the necessary things in early register on SoCs
      bcma: init sprom struct earlier
      bcma: mark pflash as present when available
      bcma: add and use constants for the flash windows
      bcma: mark nflash if it is the boot flash
      bcma: extract drv_cc in bcma_core_mips_flash_detect()
      bcma: add some more flash chips for serial flash
      ssb: move parallel flash config into an own struct
      ssb: add attribute to indicate a parallel flash is available
      bcma: use fallback sprom if sprom on card was not valid
      bcma: add an extra pcie core struct
      bcma: do not initialize deactivated PCIe cores
      ssb: add PCI ID 0x4350
      ssb: handle BCM43222 in pmu code.

Hila Gonen (1):
      cfg80211: add wrappers for registered_device_ops

Jefferson Delfes (1):
      Bluetooth: Force the process of unpair command if disconnect failed

Johannes Berg (16):
      iwlwifi: improve oversized command warning
      iwlwifi: make data frame tracing optional
      iwlwifi: remove unused variables
      mac80211: check channel context methods
      mac80211: track whether to use channel contexts
      mac80211: use channel contexts
      mac80211: track needed RX chains for channel contexts
      mac80211: add channel context iterator
      wireless: use OR operation to set wiphy features
      mac80211: remove unimplemented mesh vendor sync
      mac80211: remove some unused code
      mac80211: use __printf attribute in debugfs
      mac80211: fix WDS channel context test
      cfg80211: add tracing for P2P Device start/stop
      mac80211: use non-atomic bitmap operation for local variable
      mac80211: complete bss_info tracing

John W. Linville (8):
      Merge branch 'master' of git://git.kernel.org/.../bluetooth/bluetooth-next
      Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211-next
      Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless
      Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211-next
      Merge tag 'nfc-next-3.8-1' of git://git.kernel.org/.../sameo/nfc-3.0
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next into for-davem

Jouni Malinen (4):
      mac80211: Take status code as parameter to ieee80211_send_auth
      mac80211: Add debug print on unexpect authentication state
      cfg80211: Allow user space to specify non-IEs to SAE Authentication
      mac80211: Allow station mode SAE to be implemented in user space

Kees Cook (3):
      NFC: Remove CONFIG_EXPERIMENTAL
      NFC: Remove CONFIG_EXPERIMENTAL from the LLCP Makefile
      NFC: Remove CONFIG_EXPERIMENTAL from the NCI Makefile

Larry Finger (2):
      rtlwifi: rtl8192c: rtl8192ce: Add support for B-CUT version of RTL8188CE
      rtlwifi: rtl8192c: rtl8192ce: rtl8192cu: rtl8192se: rtl8192de: Shorten some variable names

Mahesh Palivela (3):
      ieee80211: Rename VHT cap struct
      mac80211: VHT peer STA caps
      {nl,cfg}80211: Peer STA VHT caps

Marco Porsch (2):
      mac80211: fix copy-paste typo in Kconfig
      mac80211: make client powersave independent of interface type

Mat Martineau (2):
      Bluetooth: Process create response and connect response identically
      Bluetooth: Factor out common L2CAP connection code

Michal Kazior (4):
      mac80211: introduce channel context skeleton code
      mac80211: introduce new ieee80211_ops
      mac80211: use channel context notifications
      mac80211: reuse channels for channel contexts

Mohammed Shafi Shajakhan (5):
      mac80211: Use appropriate debug wrapper
      ath9k: Ensure we set FTP_STOMP_LOW weight when WLAN is idle
      ath9k_htc: Advertise interface combinations supported
      ath9k_htc: Remove interface combination specific checks
      ath9k: Advertize beacon_int_infra_match

Peter Senna Tschudin (1):
      ath/ath9k/ar9003_eeprom.c: Remove semicolon after if

Pontus Fuchs (1):
      ar5523: Add new driver

Rajkumar Manoharan (19):
      ath9k: perform ANI cycle in idle state
      ath9k: Send WLAN channel info to BT
      ath9k: Add concurrent WLAN and BT tx support for MCI based chips
      ath9k: fill channel mode in caldata
      ath9k: adjust WLAN and BT concurrent transmission
      ath9k_hw: Enable OSLA hw fix for AR9565
      ath9k_hw: Fix selfgen chainmask for 9565
      ath9k_hw: Disable MCI stat counter by default for AR9565
      ath9k_hw: Fix frequent BT rx recovery
      ath9k_hw: Fix max rx rate drop for AR9565
      ath9k_hw: Configure new switch table for AR9565 BTCOEX
      ath9k_hw: Set default MCI config for AR9565
      ath9k: adjust duty cycle for FTP profile for AR9565
      ath9k: Add new BT profile info A2DP_Voice
      ath9k_hw: Enable hw PLL power save for AR9462
      ath9k_hw: Enable hw PLL power save for AR9565
      ath9k_hw: Fix concurrent tx on lower tx power
      ath9k_hw: validate MCI stuck after RTC wakeup
      ath9k: Dump BTCOEX tuning parameters

Rami Rosen (2):
      Bluetooth: remove unused member of hci_dev.
      mac80211: remove duplicate check in ieee80211_rx_mgmt_beacon

Sam Leffler (4):
      {nl,cfg}80211: add a flags word to scan requests
      cfg80211: add scan flag to indicate its priority
      cfg80211: add support for flushing old scan results
      mac80211: add support for tx to abort low priority scan requests

Samuel Ortiz (14):
      NFC: Avoid falling back to SYMM when sk is NULL
      NFC: Use llcp_allocate_pdu to build the DISC frames
      NFC: Add SNL frame building routine
      NFC: Initial SNL support
      NFC: Reserve LLCP ssap when replying to an SNL frame
      NFC: Check for connection less sockets when looking for a service name
      NFC: Keep connection less bound sockets alive when DEP link goes down
      NFC: Handle LLCP UI frames
      NFC: Forward LLCP datagrams to userspace
      NFC: UI frame sending routine implementation
      NFC: Implement LLCP connection less Tx path
      NFC: Return NULL when no LLCP socket for a dsap,ssap couple is found
      NFC: Use IDR library to assing NFC devices IDs
      NFC: Purge LLCP socket Tx queues when being disconnected

Sasha Levin (1):
      Bluetooth: don't attempt to free a channel that wasn't created

Stanislaw Gruszka (7):
      rt2800: use BBP_R1 for setting tx power
      rt2800: limit TX_PWR_CFG_ values to 0xc
      rt2800: compensate tx power also for non 11b rates on 2GHz
      rt2800: use eeprom OFDM 6M TX power as criterion
      rt2800: pass channel pointer to rt2800_config_txpower
      rt2800: allow to reduce tx power on devices not exporting power limit
      rt2800: comment tx power settings

Sujith Manoharan (4):
      mac80211: Notify new IBSS network creation
      cfg80211: Disallow HT/WEP in IBSS mode
      ath9k: Use a helper routine for MCI/FTP tuning
      ath9k: Fix BT_OP_SCAN usage

Sven Eckelmann (1):
      ath_hw: Use common REG_WRITE parameter order

Syam Sidhardhan (2):
      Bluetooth: Use __constant modifier for L2CAP SMP CID
      Bluetooth: Use __constant modifier for RFCOMM PSM

Szymon Janc (7):
      NFC: Use NFC_MAX_GT_LEN to check len in nci_set_local_general_bytes
      NFC: Remove not needed local variable in nci_set_local_general_bytes
      NFC: Remove unneeded LLCP function return calls
      NFC: Small nfc_hci_create_pipe refactoring
      NFC: Fix not propagating return code in nfc_hci_clear_all_pipes
      NFC: Fix style issues with logical operations
      NFC: Fix some code style and whitespace issues

Thierry Escande (3):
      NFC: Set rf_mode to NFC_RF_NONE where necessary
      NFC: Add NFC_ATTR_RF_MODE when sending device netlink properties
      NFC: Extend netlink interface for LTO, RW, and MIUX parameters support

Thomas Pedersen (1):
      mac80211: mesh STAs only process mesh beacons

Waldemar Rymarkiewicz (2):
      NFC: pn533: Fix in/out frame buffer allocation
      NFC: pn533: Remove unused arg parameter

Yuanhan Liu (1):
      bcma: suspend/resume callbacks should be conditionally compiled on CONFIG_PM_SLEEP

 MAINTAINERS                                        |    6 +
 arch/mips/bcm47xx/nvram.c                          |    4 +-
 arch/mips/bcm47xx/wgt634u.c                        |    8 +-
 drivers/bcma/driver_chipcommon.c                   |   23 +-
 drivers/bcma/driver_chipcommon_nflash.c            |    3 +
 drivers/bcma/driver_chipcommon_pmu.c               |    5 +-
 drivers/bcma/driver_chipcommon_sflash.c            |   35 +-
 drivers/bcma/driver_mips.c                         |   48 +-
 drivers/bcma/driver_pci_host.c                     |   14 +-
 drivers/bcma/host_pci.c                            |    6 +-
 drivers/bcma/main.c                                |   54 +-
 drivers/bcma/sprom.c                               |    5 +-
 drivers/bluetooth/btmrvl_sdio.c                    |   28 +-
 drivers/net/ethernet/toshiba/ps3_gelic_wireless.c  |    4 +-
 drivers/net/wireless/airo.c                        |    2 +-
 drivers/net/wireless/ath/Kconfig                   |    1 +
 drivers/net/wireless/ath/Makefile                  |    1 +
 drivers/net/wireless/ath/ar5523/Kconfig            |    7 +
 drivers/net/wireless/ath/ar5523/Makefile           |    1 +
 drivers/net/wireless/ath/ar5523/ar5523.c           | 1806 +++++++++++++++
 drivers/net/wireless/ath/ar5523/ar5523.h           |  152 ++
 drivers/net/wireless/ath/ar5523/ar5523_hw.h        |  431 ++++
 drivers/net/wireless/ath/ath6kl/cfg80211.c         |    4 +-
 drivers/net/wireless/ath/ath9k/ar9003_calib.c      |    5 +
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c     |   22 +-
 drivers/net/wireless/ath/ath9k/ar9003_hw.c         |    8 +-
 drivers/net/wireless/ath/ath9k/ar9003_mci.c        |   70 +-
 drivers/net/wireless/ath/ath9k/ar9003_mci.h        |    8 +-
 drivers/net/wireless/ath/ath9k/ar9003_phy.h        |    1 +
 .../net/wireless/ath/ath9k/ar9565_1p0_initvals.h   |    4 +-
 drivers/net/wireless/ath/ath9k/ath9k.h             |    9 +
 drivers/net/wireless/ath/ath9k/btcoex.c            |   62 +-
 drivers/net/wireless/ath/ath9k/btcoex.h            |    7 +
 drivers/net/wireless/ath/ath9k/calib.c             |    1 +
 drivers/net/wireless/ath/ath9k/debug.c             |   34 +-
 drivers/net/wireless/ath/ath9k/gpio.c              |  110 +-
 drivers/net/wireless/ath/ath9k/htc_drv_init.c      |   17 +
 drivers/net/wireless/ath/ath9k/htc_drv_main.c      |   20 -
 drivers/net/wireless/ath/ath9k/hw.c                |    6 +-
 drivers/net/wireless/ath/ath9k/hw.h                |    2 +
 drivers/net/wireless/ath/ath9k/init.c              |    1 +
 drivers/net/wireless/ath/ath9k/link.c              |   12 +-
 drivers/net/wireless/ath/ath9k/main.c              |   12 +-
 drivers/net/wireless/ath/ath9k/mci.c               |  171 +-
 drivers/net/wireless/ath/ath9k/mci.h               |   36 +
 drivers/net/wireless/ath/ath9k/recv.c              |    5 +-
 drivers/net/wireless/ath/ath9k/reg.h               |   13 +-
 drivers/net/wireless/ath/ath9k/wow.c               |    2 +-
 drivers/net/wireless/ath/carl9170/mac.c            |   21 +-
 drivers/net/wireless/ath/carl9170/rx.c             |   51 +-
 drivers/net/wireless/ath/carl9170/usb.c            |    7 +
 drivers/net/wireless/ath/hw.c                      |   20 +-
 drivers/net/wireless/b43/main.c                    |    2 +-
 drivers/net/wireless/brcm80211/brcmfmac/Makefile   |    1 +
 drivers/net/wireless/brcm80211/brcmfmac/dhd.h      |   73 +-
 drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h  |    3 -
 drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c  |   29 -
 .../net/wireless/brcm80211/brcmfmac/dhd_common.c   |  453 ++--
 drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c  |    2 +
 drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h  |    3 +
 .../net/wireless/brcm80211/brcmfmac/dhd_linux.c    |  198 +-
 .../net/wireless/brcm80211/brcmfmac/dhd_proto.h    |    8 +-
 drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c |  174 +-
 drivers/net/wireless/brcm80211/brcmfmac/fwil.c     |  336 +++
 drivers/net/wireless/brcm80211/brcmfmac/fwil.h     |   39 +
 drivers/net/wireless/brcm80211/brcmfmac/usb.c      |   41 +-
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c  | 1218 +++++------
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.h  |  145 +-
 drivers/net/wireless/brcm80211/brcmsmac/aiutils.c  |    4 +-
 drivers/net/wireless/brcm80211/brcmsmac/main.c     |    2 +-
 drivers/net/wireless/hostap/hostap_80211_rx.c      |    2 +-
 drivers/net/wireless/ipw2x00/libipw_rx.c           |    6 +-
 drivers/net/wireless/iwlwifi/dvm/main.c            |    9 +-
 drivers/net/wireless/iwlwifi/iwl-devtrace.h        |   95 +-
 drivers/net/wireless/iwlwifi/iwl-io.c              |    4 +-
 drivers/net/wireless/iwlwifi/iwl-io.h              |    2 +-
 drivers/net/wireless/iwlwifi/iwl-prph.h            |    3 +
 drivers/net/wireless/iwlwifi/iwl-trans.h           |    8 +
 drivers/net/wireless/iwlwifi/pcie/rx.c             |    3 +-
 drivers/net/wireless/iwlwifi/pcie/trans.c          |    9 +-
 drivers/net/wireless/iwlwifi/pcie/tx.c             |   18 +-
 drivers/net/wireless/libertas/mesh.c               |    2 +-
 drivers/net/wireless/mwifiex/11n_rxreorder.c       |    8 +-
 drivers/net/wireless/mwifiex/cfg80211.c            |   20 +-
 drivers/net/wireless/mwifiex/cmdevt.c              |   21 +-
 drivers/net/wireless/mwifiex/init.c                |   19 +-
 drivers/net/wireless/mwifiex/main.c                |    8 +
 drivers/net/wireless/mwifiex/main.h                |   13 +-
 drivers/net/wireless/mwifiex/scan.c                |   55 +-
 drivers/net/wireless/mwifiex/sta_cmdresp.c         |    4 -
 drivers/net/wireless/mwifiex/sta_ioctl.c           |    4 +-
 drivers/net/wireless/mwifiex/sta_rx.c              |   26 +-
 drivers/net/wireless/mwifiex/txrx.c                |   10 +-
 drivers/net/wireless/mwifiex/uap_cmd.c             |   11 +-
 drivers/net/wireless/mwifiex/uap_txrx.c            |   17 +-
 drivers/net/wireless/mwifiex/util.c                |   19 +-
 drivers/net/wireless/orinoco/main.h                |    2 +-
 drivers/net/wireless/orinoco/orinoco_usb.c         |    9 +-
 drivers/net/wireless/rt2x00/rt2800lib.c            |  100 +-
 drivers/net/wireless/rtlwifi/cam.c                 |    7 +-
 drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c  |  227 +-
 drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c |   88 +-
 drivers/net/wireless/rtlwifi/rtl8192ce/def.h       |    3 +
 drivers/net/wireless/rtlwifi/rtl8192ce/dm.c        |   30 +-
 drivers/net/wireless/rtlwifi/rtl8192ce/hw.c        |   93 +-
 drivers/net/wireless/rtlwifi/rtl8192ce/phy.c       |    2 +
 drivers/net/wireless/rtlwifi/rtl8192ce/rf.c        |   23 +-
 drivers/net/wireless/rtlwifi/rtl8192ce/sw.c        |    6 +-
 drivers/net/wireless/rtlwifi/rtl8192ce/trx.c       |   46 +-
 drivers/net/wireless/rtlwifi/rtl8192cu/dm.c        |   30 +-
 drivers/net/wireless/rtlwifi/rtl8192cu/hw.c        |   16 +-
 drivers/net/wireless/rtlwifi/rtl8192cu/mac.c       |   25 +-
 drivers/net/wireless/rtlwifi/rtl8192cu/rf.c        |   22 +-
 drivers/net/wireless/rtlwifi/rtl8192de/dm.c        |   95 +-
 drivers/net/wireless/rtlwifi/rtl8192de/phy.c       |   65 +-
 drivers/net/wireless/rtlwifi/rtl8192de/rf.c        |   18 +-
 drivers/net/wireless/rtlwifi/rtl8192de/trx.c       |   39 +-
 drivers/net/wireless/rtlwifi/rtl8192se/dm.c        |   89 +-
 drivers/net/wireless/rtlwifi/rtl8192se/hw.c        |    6 +-
 drivers/net/wireless/rtlwifi/rtl8192se/phy.c       |   64 +-
 drivers/net/wireless/rtlwifi/rtl8192se/rf.c        |   11 +-
 drivers/net/wireless/rtlwifi/rtl8192se/trx.c       |   21 +-
 drivers/net/wireless/rtlwifi/wifi.h                |   53 +-
 drivers/nfc/Makefile                               |    2 +-
 drivers/nfc/pn533.c                                |   18 +-
 drivers/nfc/pn544/Makefile                         |    7 +
 drivers/nfc/pn544/i2c.c                            |  500 +++++
 drivers/nfc/{pn544_hci.c => pn544/pn544.c}         |  679 +++---
 drivers/nfc/pn544/pn544.h                          |   32 +
 drivers/ssb/b43_pci_bridge.c                       |    1 +
 drivers/ssb/driver_chipcommon_pmu.c                |    3 +
 drivers/ssb/driver_mipscore.c                      |   16 +-
 include/linux/bcma/bcma.h                          |    2 +-
 include/linux/bcma/bcma_driver_chipcommon.h        |    5 +
 include/linux/bcma/bcma_driver_mips.h              |    3 +
 include/linux/bcma/bcma_regs.h                     |    5 +-
 include/linux/ieee80211.h                          |   47 +-
 include/linux/ssb/ssb_driver_mips.h                |   10 +-
 include/net/bluetooth/a2mp.h                       |   24 +-
 include/net/bluetooth/amp.h                        |   50 +
 include/net/bluetooth/bluetooth.h                  |    1 -
 include/net/bluetooth/hci.h                        |   40 +-
 include/net/bluetooth/hci_core.h                   |   48 +-
 include/net/bluetooth/l2cap.h                      |   14 +-
 include/net/cfg80211.h                             |   14 +
 include/net/mac80211.h                             |  114 +-
 include/net/nfc/hci.h                              |   18 +-
 include/net/nfc/nfc.h                              |    2 +-
 include/uapi/linux/nfc.h                           |   15 +
 include/uapi/linux/nl80211.h                       |   48 +
 net/bluetooth/Kconfig                              |    1 +
 net/bluetooth/Makefile                             |    2 +-
 net/bluetooth/a2mp.c                               |  459 +++-
 net/bluetooth/af_bluetooth.c                       |   10 +-
 net/bluetooth/amp.c                                |  374 ++++
 net/bluetooth/bnep/core.c                          |    3 +-
 net/bluetooth/cmtp/core.c                          |    2 +-
 net/bluetooth/hci_conn.c                           |   70 +-
 net/bluetooth/hci_core.c                           |   65 +-
 net/bluetooth/hci_event.c                          |  167 +-
 net/bluetooth/hci_sysfs.c                          |   10 +-
 net/bluetooth/hidp/core.c                          |    8 +-
 net/bluetooth/l2cap_core.c                         |  503 +++--
 net/bluetooth/l2cap_sock.c                         |   89 +-
 net/bluetooth/lib.c                                |   14 -
 net/bluetooth/mgmt.c                               |    5 +-
 net/bluetooth/rfcomm/core.c                        |   19 +-
 net/bluetooth/rfcomm/sock.c                        |    9 +-
 net/bluetooth/rfcomm/tty.c                         |    6 +-
 net/bluetooth/sco.c                                |   12 +-
 net/bluetooth/smp.c                                |    2 +-
 net/mac80211/Kconfig                               |    2 +-
 net/mac80211/Makefile                              |    1 +
 net/mac80211/aes_cmac.c                            |   17 +
 net/mac80211/cfg.c                                 |  284 +--
 net/mac80211/chan.c                                |  455 +++-
 net/mac80211/debugfs.h                             |    6 +-
 net/mac80211/debugfs_netdev.c                      |   10 +-
 net/mac80211/driver-ops.h                          |   65 +
 net/mac80211/ibss.c                                |   88 +-
 net/mac80211/ieee80211_i.h                         |  171 +-
 net/mac80211/iface.c                               |   44 +-
 net/mac80211/main.c                                |  105 +-
 net/mac80211/mesh.c                                |   52 +-
 net/mac80211/mesh.h                                |    4 +-
 net/mac80211/mesh_plink.c                          |   14 +-
 net/mac80211/mesh_sync.c                           |   55 +-
 net/mac80211/mlme.c                                |  228 +-
 net/mac80211/offchannel.c                          |    9 +-
 net/mac80211/pm.c                                  |    2 +
 net/mac80211/rate.h                                |   12 +-
 net/mac80211/rx.c                                  |   32 +-
 net/mac80211/scan.c                                |   29 +-
 net/mac80211/sta_info.c                            |   59 +-
 net/mac80211/status.c                              |   15 +-
 net/mac80211/trace.h                               |  146 +-
 net/mac80211/tx.c                                  |  281 ++-
 net/mac80211/util.c                                |  145 +-
 net/mac80211/vht.c                                 |   35 +
 net/nfc/Kconfig                                    |    4 +-
 net/nfc/core.c                                     |   33 +-
 net/nfc/hci/command.c                              |   24 +-
 net/nfc/hci/core.c                                 |   71 +-
 net/nfc/hci/llc.c                                  |    2 +-
 net/nfc/hci/llc_shdlc.c                            |    7 +-
 net/nfc/llcp/Kconfig                               |    4 +-
 net/nfc/llcp/commands.c                            |  120 +-
 net/nfc/llcp/llcp.c                                |  226 +-
 net/nfc/llcp/llcp.h                                |   13 +
 net/nfc/llcp/sock.c                                |   42 +-
 net/nfc/nci/Kconfig                                |    4 +-
 net/nfc/nci/core.c                                 |   29 +-
 net/nfc/netlink.c                                  |  157 +-
 net/nfc/nfc.h                                      |    6 +
 net/nfc/rawsock.c                                  |    1 -
 net/wireless/Makefile                              |    4 +-
 net/wireless/ap.c                                  |    3 +-
 net/wireless/chan.c                                |   16 +-
 net/wireless/core.c                                |   16 +-
 net/wireless/core.h                                |    6 +-
 net/wireless/ethtool.c                             |   15 +-
 net/wireless/ibss.c                                |    9 +-
 net/wireless/mesh.c                                |   11 +-
 net/wireless/mlme.c                                |   92 +-
 net/wireless/nl80211.c                             |  259 ++-
 net/wireless/rdev-ops.h                            |  879 ++++++++
 net/wireless/scan.c                                |  138 +-
 net/wireless/sme.c                                 |   12 +-
 net/wireless/sysfs.c                               |    5 +-
 net/wireless/trace.c                               |    7 +
 net/wireless/trace.h                               | 2296 ++++++++++++++++++++
 net/wireless/util.c                                |   14 +-
 net/wireless/wext-compat.c                         |   48 +-
 233 files changed, 13900 insertions(+), 4289 deletions(-)
 create mode 100644 drivers/net/wireless/ath/ar5523/Kconfig
 create mode 100644 drivers/net/wireless/ath/ar5523/Makefile
 create mode 100644 drivers/net/wireless/ath/ar5523/ar5523.c
 create mode 100644 drivers/net/wireless/ath/ar5523/ar5523.h
 create mode 100644 drivers/net/wireless/ath/ar5523/ar5523_hw.h
 create mode 100644 drivers/net/wireless/brcm80211/brcmfmac/fwil.c
 create mode 100644 drivers/net/wireless/brcm80211/brcmfmac/fwil.h
 create mode 100644 drivers/nfc/pn544/Makefile
 create mode 100644 drivers/nfc/pn544/i2c.c
 rename drivers/nfc/{pn544_hci.c => pn544/pn544.c} (58%)
 create mode 100644 drivers/nfc/pn544/pn544.h
 create mode 100644 include/net/bluetooth/amp.h
 create mode 100644 net/bluetooth/amp.c
 create mode 100644 net/mac80211/vht.c
 create mode 100644 net/wireless/rdev-ops.h
 create mode 100644 net/wireless/trace.c
 create mode 100644 net/wireless/trace.h
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: IPv6 bonding support?
From: Jay Vosburgh @ 2012-11-14 19:34 UTC (permalink / raw)
  To: Roy Sigurd Karlsbakk; +Cc: netdev
In-Reply-To: <5791379.6.1352881597330.JavaMail.root@zimbra>

Roy Sigurd Karlsbakk <roy@karlsbakk.net> wrote:

>I've setup bonding on a few machines here. They're all blades in a Dell
>blade chassis, so they're both connected to the four internal switches
>(2 gigE, 2 10GigE). Using 10GigE only, I've setup bonding in
>active-backup mode with the ARP driver. While this works well, we're
>planning ahead for running IPv6 only.
>
>Does anyone kow if something's in the works to allow redundant links in
>an IPv6-only setup?

	I am not aware of any implementation or plans to implement an
IPv6 equivalent to the ARP monitor (arp_interval, et al) in bonding.

	If the blade switches support a trunk failover system (wherein
the switch will drop carrier on internal facing ports when carrier is
lost on an external port), it is possible to implement approximately
equivalent functionality using trunk failover and the bonding mii
monitor (miimon).

	-J

---
	-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com

^ permalink raw reply

* pull request: batman-adv 2012-11-14
From: Antonio Quartulli @ 2012-11-14 20:16 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r

Hello David,

here is again our new patchset intended for net-next/linux-3.8.
Patch 1/11 has been modified to address the problems you pointed out last time;
however hash_bytes has kept its inline tag and it has been moved to hash.h (in
this way it becomes usable by the rest of the batman-adv code for new changes).

Let me know if there is any problem!

Thanks a lot!
	Antonio

The following changes since commit bf0098f22ca7b59e8844ac6882bbae230d34b98d:

  ARM: net: bpf_jit_32: add VLAN instructions for BPF JIT (2012-11-13 18:21:10 -0500)

are available in the git repository at:

  git://git.open-mesh.org/linux-merge.git tags/batman-adv-for-davem

for you to fetch changes up to 170173bf37342dab486daaa2a0381d802c10fb21:

  batman-adv: Remove instant overwritten variable initialization (2012-11-14 21:00:37 +0100)

----------------------------------------------------------------
Included changes:
- hash computation improvements
- Bridge Loop Avoidance set-up phase optimisations
- Roaming handling code redesign
- some code cleanups

----------------------------------------------------------------
Antonio Quartulli (6):
      batman-adv: fix wrong spinlock inline comment
      batman-adv: prevent using any virtual device created on batman-adv as hard-interface
      batman-adv: substitute tt_poss_change with a per-tt_entry flag
      batman-adv: refactor code to simplify long lines
      batman-adv: refactor tt_global_del_struct()
      batman-adv: roaming handling mechanism redesign

Simon Wunderlich (4):
      batman-adv: don't rely on positions in struct for hashing
      batman-adv: send announcement when backbone gw is registered
      batman-adv: allow bla traffic only after first worker period
      batman-adv: wait multiple periods before activating bla

Sven Eckelmann (1):
      batman-adv: Remove instant overwritten variable initialization

 net/batman-adv/bridge_loop_avoidance.c |  59 ++++---
 net/batman-adv/hard-interface.c        |  41 ++++-
 net/batman-adv/hash.h                  |  22 +++
 net/batman-adv/main.h                  |   1 +
 net/batman-adv/originator.c            |   1 -
 net/batman-adv/routing.c               | 173 +++++++++++++++------
 net/batman-adv/soft-interface.c        |   1 -
 net/batman-adv/sysfs.c                 |   2 +-
 net/batman-adv/translation-table.c     | 276 ++++++++++++++++++++++-----------
 net/batman-adv/translation-table.h     |   2 +
 net/batman-adv/types.h                 |  11 +-
 11 files changed, 416 insertions(+), 173 deletions(-)

^ permalink raw reply

* [PATCH 01/11] batman-adv: don't rely on positions in struct for hashing
From: Antonio Quartulli @ 2012-11-14 20:16 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r, Simon Wunderlich
In-Reply-To: <1352924189-18843-1-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>

From: Simon Wunderlich <simon.wunderlich-Y4E02TeZ33kaBlGTGt4zH4SGEyLTKazZ@public.gmane.org>

The hash functions in the bridge loop avoidance code expects the
VLAN vid to be right after the mac address, but this is not guaranteed.

Fix this by explicitly hashing over the right fields of the struct.

Reported-by: Marek Lindner <lindner_marek-LWAfsSFWpa4@public.gmane.org>
Signed-off-by: Simon Wunderlich <siwu-MaAgPAbsBIVS8oHt8HbXEIQuADTiUCJX@public.gmane.org>
Signed-off-by: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
---
 net/batman-adv/bridge_loop_avoidance.c | 20 ++++++--------------
 net/batman-adv/hash.h                  | 22 ++++++++++++++++++++++
 2 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index 29a5542..49c35a6 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -40,15 +40,11 @@ static void batadv_bla_send_announce(struct batadv_priv *bat_priv,
 /* return the index of the claim */
 static inline uint32_t batadv_choose_claim(const void *data, uint32_t size)
 {
-	const unsigned char *key = data;
+	struct batadv_claim *claim = (struct batadv_claim *)data;
 	uint32_t hash = 0;
-	size_t i;
 
-	for (i = 0; i < ETH_ALEN + sizeof(short); i++) {
-		hash += key[i];
-		hash += (hash << 10);
-		hash ^= (hash >> 6);
-	}
+	hash = batadv_hash_bytes(hash, &claim->addr, sizeof(claim->addr));
+	hash = batadv_hash_bytes(hash, &claim->vid, sizeof(claim->vid));
 
 	hash += (hash << 3);
 	hash ^= (hash >> 11);
@@ -61,15 +57,11 @@ static inline uint32_t batadv_choose_claim(const void *data, uint32_t size)
 static inline uint32_t batadv_choose_backbone_gw(const void *data,
 						 uint32_t size)
 {
-	const unsigned char *key = data;
+	struct batadv_claim *claim = (struct batadv_claim *)data;
 	uint32_t hash = 0;
-	size_t i;
 
-	for (i = 0; i < ETH_ALEN + sizeof(short); i++) {
-		hash += key[i];
-		hash += (hash << 10);
-		hash ^= (hash >> 6);
-	}
+	hash = batadv_hash_bytes(hash, &claim->addr, sizeof(claim->addr));
+	hash = batadv_hash_bytes(hash, &claim->vid, sizeof(claim->vid));
 
 	hash += (hash << 3);
 	hash ^= (hash >> 11);
diff --git a/net/batman-adv/hash.h b/net/batman-adv/hash.h
index 977de9c..e053339 100644
--- a/net/batman-adv/hash.h
+++ b/net/batman-adv/hash.h
@@ -82,6 +82,28 @@ static inline void batadv_hash_delete(struct batadv_hashtable *hash,
 }
 
 /**
+ *	batadv_hash_bytes - hash some bytes and add them to the previous hash
+ *	@hash: previous hash value
+ *	@data: data to be hashed
+ *	@size: number of bytes to be hashed
+ *
+ *	Returns the new hash value.
+ */
+static inline uint32_t batadv_hash_bytes(uint32_t hash, void *data,
+					 uint32_t size)
+{
+	const unsigned char *key = data;
+	int i;
+
+	for (i = 0; i < size; i++) {
+		hash += key[i];
+		hash += (hash << 10);
+		hash ^= (hash >> 6);
+	}
+	return hash;
+}
+
+/**
  *	batadv_hash_add - adds data to the hashtable
  *	@hash: storage hash table
  *	@compare: callback to determine if 2 hash elements are identical
-- 
1.8.0

^ permalink raw reply related

* [PATCH 02/11] batman-adv: fix wrong spinlock inline comment
From: Antonio Quartulli @ 2012-11-14 20:16 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <1352924189-18843-1-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>

Signed-off-by: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
---
 net/batman-adv/types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index 8ce16c1..e8a1b18 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -303,7 +303,7 @@ struct batadv_priv {
 	struct hlist_head forw_bcast_list;
 	struct batadv_hashtable *orig_hash;
 	spinlock_t forw_bat_list_lock; /* protects forw_bat_list */
-	spinlock_t forw_bcast_list_lock; /* protects  */
+	spinlock_t forw_bcast_list_lock; /* protects forw_bcast_list */
 	struct delayed_work orig_work;
 	struct batadv_hard_iface __rcu *primary_if;  /* rcu protected pointer */
 	struct batadv_algo_ops *bat_algo_ops;
-- 
1.8.0

^ permalink raw reply related

* [PATCH 03/11] batman-adv: prevent using any virtual device created on batman-adv as hard-interface
From: Antonio Quartulli @ 2012-11-14 20:16 UTC (permalink / raw)
  To: davem; +Cc: netdev, b.a.t.m.a.n, Antonio Quartulli
In-Reply-To: <1352924189-18843-1-git-send-email-ordex@autistici.org>

Any virtual device created on top of a batman-adv mesh interface must be
prevented to be used to create a new mesh network (this would lead to an
unwanted batman-over-batman configuration)

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 net/batman-adv/hard-interface.c | 41 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)

diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index 6b7a5d3..365ed74 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -59,6 +59,45 @@ out:
 	return hard_iface;
 }
 
+/**
+ * batadv_is_on_batman_iface - check if a device is a batman iface descendant
+ * @net_dev: the device to check
+ *
+ * If the user creates any virtual device on top of a batman-adv interface, it
+ * is important to prevent this new interface to be used to create a new mesh
+ * network (this behaviour would lead to a batman-over-batman configuration).
+ * This function recursively checks all the fathers of the device passed as
+ * argument looking for a batman-adv soft interface.
+ *
+ * Returns true if the device is descendant of a batman-adv mesh interface (or
+ * if it is a batman-adv interface itself), false otherwise
+ */
+static bool batadv_is_on_batman_iface(const struct net_device *net_dev)
+{
+	struct net_device *parent_dev;
+	bool ret;
+
+	/* check if this is a batman-adv mesh interface */
+	if (batadv_softif_is_valid(net_dev))
+		return true;
+
+	/* no more parents..stop recursion */
+	if (net_dev->iflink == net_dev->ifindex)
+		return false;
+
+	/* recurse over the parent device */
+	parent_dev = dev_get_by_index(&init_net, net_dev->iflink);
+	/* if we got a NULL parent_dev there is something broken.. */
+	if (WARN(!parent_dev, "Cannot find parent device"))
+		return false;
+
+	ret = batadv_is_on_batman_iface(parent_dev);
+
+	if (parent_dev)
+		dev_put(parent_dev);
+	return ret;
+}
+
 static int batadv_is_valid_iface(const struct net_device *net_dev)
 {
 	if (net_dev->flags & IFF_LOOPBACK)
@@ -71,7 +110,7 @@ static int batadv_is_valid_iface(const struct net_device *net_dev)
 		return 0;
 
 	/* no batman over batman */
-	if (batadv_softif_is_valid(net_dev))
+	if (batadv_is_on_batman_iface(net_dev))
 		return 0;
 
 	return 1;
-- 
1.8.0

^ permalink raw reply related

* [PATCH 04/11] batman-adv: send announcement when backbone gw is registered
From: Antonio Quartulli @ 2012-11-14 20:16 UTC (permalink / raw)
  To: davem
  Cc: netdev, b.a.t.m.a.n, Simon Wunderlich, Simon Wunderlich,
	Antonio Quartulli
In-Reply-To: <1352924189-18843-1-git-send-email-ordex@autistici.org>

From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>

To avoid loops in the startup phase until the first announcement is
sent, send an announcement immediately as soon as a backbone gw is
added.

This may happen due to various reasons, e.g. a packet passes the rx
or tx path.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 net/batman-adv/bridge_loop_avoidance.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index 49c35a6..c49cf24 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -354,7 +354,7 @@ out:
  */
 static struct batadv_backbone_gw *
 batadv_bla_get_backbone_gw(struct batadv_priv *bat_priv, uint8_t *orig,
-			   short vid)
+			   short vid, bool own_backbone)
 {
 	struct batadv_backbone_gw *entry;
 	struct batadv_orig_node *orig_node;
@@ -401,6 +401,10 @@ batadv_bla_get_backbone_gw(struct batadv_priv *bat_priv, uint8_t *orig,
 					  "became a backbone gateway");
 		batadv_orig_node_free_ref(orig_node);
 	}
+
+	if (own_backbone)
+		batadv_bla_send_announce(bat_priv, entry);
+
 	return entry;
 }
 
@@ -416,7 +420,7 @@ batadv_bla_update_own_backbone_gw(struct batadv_priv *bat_priv,
 
 	backbone_gw = batadv_bla_get_backbone_gw(bat_priv,
 						 primary_if->net_dev->dev_addr,
-						 vid);
+						 vid, true);
 	if (unlikely(!backbone_gw))
 		return;
 
@@ -624,7 +628,8 @@ static int batadv_handle_announce(struct batadv_priv *bat_priv,
 	if (memcmp(an_addr, batadv_announce_mac, 4) != 0)
 		return 0;
 
-	backbone_gw = batadv_bla_get_backbone_gw(bat_priv, backbone_addr, vid);
+	backbone_gw = batadv_bla_get_backbone_gw(bat_priv, backbone_addr, vid,
+						 false);
 
 	if (unlikely(!backbone_gw))
 		return 1;
@@ -722,7 +727,8 @@ static int batadv_handle_claim(struct batadv_priv *bat_priv,
 
 	/* register the gateway if not yet available, and add the claim. */
 
-	backbone_gw = batadv_bla_get_backbone_gw(bat_priv, backbone_addr, vid);
+	backbone_gw = batadv_bla_get_backbone_gw(bat_priv, backbone_addr, vid,
+						 false);
 
 	if (unlikely(!backbone_gw))
 		return 1;
-- 
1.8.0

^ permalink raw reply related

* [PATCH 05/11] batman-adv: allow bla traffic only after first worker period
From: Antonio Quartulli @ 2012-11-14 20:16 UTC (permalink / raw)
  To: davem
  Cc: netdev, b.a.t.m.a.n, Simon Wunderlich, Simon Wunderlich,
	Antonio Quartulli
In-Reply-To: <1352924189-18843-1-git-send-email-ordex@autistici.org>

From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>

When adding a backbone gateway for the first time, it might not yet
be known in the backbone, and therefore we should not forward
broadcasts yet. This behaviour is the same as when sending a request
to another backbone gw because of a CRC mismatch. The backbone gw
will operate normal after the next periodic bla work.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 net/batman-adv/bridge_loop_avoidance.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index c49cf24..8cd97d5 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -402,9 +402,14 @@ batadv_bla_get_backbone_gw(struct batadv_priv *bat_priv, uint8_t *orig,
 		batadv_orig_node_free_ref(orig_node);
 	}
 
-	if (own_backbone)
+	if (own_backbone) {
 		batadv_bla_send_announce(bat_priv, entry);
 
+		/* this will be decreased in the worker thread */
+		atomic_inc(&entry->request_sent);
+		atomic_inc(&bat_priv->bla.num_requests);
+	}
+
 	return entry;
 }
 
@@ -1138,6 +1143,19 @@ static void batadv_bla_periodic_work(struct work_struct *work)
 			backbone_gw->lasttime = jiffies;
 
 			batadv_bla_send_announce(bat_priv, backbone_gw);
+
+			/* request_sent is only set after creation to avoid
+			 * problems when we are not yet known as backbone gw
+			 * in the backbone.
+			 *
+			 * We can reset this now and allow traffic again.
+			 */
+
+			if (atomic_read(&backbone_gw->request_sent) == 0)
+				continue;
+
+			atomic_dec(&backbone_gw->bat_priv->bla.num_requests);
+			atomic_set(&backbone_gw->request_sent, 0);
 		}
 		rcu_read_unlock();
 	}
-- 
1.8.0

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox