]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
10 years agoirda: remove unnecessary break after return
Fabian Frederick [Mon, 14 Jul 2014 16:36:37 +0000 (18:36 +0200)]
irda: remove unnecessary break after return

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agocaif: remove unnecessary break after goto
Fabian Frederick [Mon, 14 Jul 2014 16:36:36 +0000 (18:36 +0200)]
caif: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoNFC: remove unnecessary break after goto
Fabian Frederick [Mon, 14 Jul 2014 16:36:35 +0000 (18:36 +0200)]
NFC: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoipv6: remove unnecessary break after return
Fabian Frederick [Mon, 14 Jul 2014 16:36:34 +0000 (18:36 +0200)]
ipv6: remove unnecessary break after return

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonetfilter: remove unnecessary break after return
Fabian Frederick [Mon, 14 Jul 2014 16:36:33 +0000 (18:36 +0200)]
netfilter: remove unnecessary break after return

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoaf_key: remove unnecessary break after return
Fabian Frederick [Mon, 14 Jul 2014 16:30:59 +0000 (18:30 +0200)]
af_key: remove unnecessary break after return

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agomac80211: remove unnecessary break after return
Fabian Frederick [Mon, 14 Jul 2014 16:30:58 +0000 (18:30 +0200)]
mac80211: remove unnecessary break after return

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agodrop_monitor: remove unnecessary break after return
Fabian Frederick [Mon, 14 Jul 2014 16:30:57 +0000 (18:30 +0200)]
drop_monitor: remove unnecessary break after return

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agopktgen: remove unnecessary break after goto
Fabian Frederick [Mon, 14 Jul 2014 16:30:56 +0000 (18:30 +0200)]
pktgen: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonetlabel: remove unnecessary break after goto
Fabian Frederick [Mon, 14 Jul 2014 16:30:55 +0000 (18:30 +0200)]
netlabel: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoaf_iucv: remove unnecessary break after goto
Fabian Frederick [Mon, 14 Jul 2014 16:30:54 +0000 (18:30 +0200)]
af_iucv: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years ago9P: remove unnecessary break after return
Fabian Frederick [Mon, 14 Jul 2014 16:30:53 +0000 (18:30 +0200)]
9P: remove unnecessary break after return

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agotipc: remove unnecessary break after return
Fabian Frederick [Mon, 14 Jul 2014 16:30:52 +0000 (18:30 +0200)]
tipc: remove unnecessary break after return

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agopacket: remove unnecessary break after return
Fabian Frederick [Mon, 14 Jul 2014 16:30:51 +0000 (18:30 +0200)]
packet: remove unnecessary break after return

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'cxgb4-next'
David S. Miller [Tue, 15 Jul 2014 23:25:23 +0000 (16:25 -0700)]
Merge branch 'cxgb4-next'

Hariprasad Shenai says:

====================
Misc. fixes for iw_cxgb4

This patch series adds support to determine ingress padding boundary at runtime.
Advertise a larger max read queue depth for qps, and gather the resource limits
from fw and use them to avoid exhausting all the resources and display TPTE on
errors and add support for work request logging feature.

The patches series is created against 'net-next' tree.
And includes patches on cxgb4 and iw_cxgb4 driver.

Since this patch-series contains changes which are dependent on commit id
fc5ab02 ("cxgb4: Replaced the backdoor mechanism to access the HW memory with
PCIe Window method") we would like to request this patch series to get merged
via David Miller's 'net-next' tree.

We have included all the maintainers of respective drivers. Kindly review the
change and let us know in case of any review comments.

V2:
 Optimized alloc_ird function, and several other changes related to debug prints
 based on review comments given by Yann Droneaud.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agocxgb4/iw_cxgb4: work request logging feature
Hariprasad Shenai [Mon, 14 Jul 2014 16:04:54 +0000 (21:34 +0530)]
cxgb4/iw_cxgb4: work request logging feature

This commit enhances the iwarp driver to optionally keep a log of rdma
work request timining data for kernel mode QPs.  If iw_cxgb4 module option
c4iw_wr_log is set to non-zero, each work request is tracked and timing
data maintained in a rolling log that is 4096 entries deep by default.
Module option c4iw_wr_log_size_order allows specifing a log2 size to use
instead of the default order of 12 (4096 entries). Both module options
are read-only and must be passed in at module load time to set them. IE:

modprobe iw_cxgb4 c4iw_wr_log=1 c4iw_wr_log_size_order=10

The timing data is viewable via the iw_cxgb4 debugfs file "wr_log".
Writing anything to this file will clear all the timing data.
Data tracked includes:

- The host time when the work request was posted, just before ringing
the doorbell.  The host time when the completion was polled by the
application.  This is also the time the log entry is created.  The delta
of these two times is the amount of time took processing the work request.

- The qid of the EQ used to post the work request.

- The work request opcode.

- The cqe wr_id field.  For sq completions requests this is the swsqe
index.  For recv completions this is the MSN of the ingress SEND.
This value can be used to match log entries from this log with firmware
flowc event entries.

- The sge timestamp value just before ringing the doorbell when
posting,  the sge timestamp value just after polling the completion,
and CQE.timestamp field from the completion itself.  With these three
timestamps we can track the latency from post to poll, and the amount
of time the completion resided in the CQ before being reaped by the
application.  With debug firmware, the sge timestamp is also logged by
firmware in its flowc history so that we can compute the latency from
posting the work request until the firmware sees it.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agocxgb4/iw_cxgb4: display TPTE on errors
Hariprasad Shenai [Mon, 14 Jul 2014 16:04:53 +0000 (21:34 +0530)]
cxgb4/iw_cxgb4: display TPTE on errors

With ingress WRITE or READ RESPONSE errors, HW provides the offending
stag from the packet.  This patch adds logic to log the parsed TPTE
in this case. cxgb4 now exports a function to read a TPTE entry
from adapter memory.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agocxgb4/iw_cxgb4: use firmware ord/ird resource limits
Hariprasad Shenai [Mon, 14 Jul 2014 16:04:52 +0000 (21:34 +0530)]
cxgb4/iw_cxgb4: use firmware ord/ird resource limits

Advertise a larger max read queue depth for qps, and gather the resource limits
from fw and use them to avoid exhaustinq all the resources.

Design:

cxgb4:

Obtain the max_ordird_qp and max_ird_adapter device params from FW
at init time and pass them up to the ULDs when they attach.  If these
parameters are not available, due to older firmware, then hard-code
the values based on the known values for older firmware.
iw_cxgb4:

Fix the c4iw_query_device() to report these correct values based on
adapter parameters.  ibv_query_device() will always return:

max_qp_rd_atom = max_qp_init_rd_atom = min(module_max, max_ordird_qp)
max_res_rd_atom = max_ird_adapter

Bump up the per qp max module option to 32, allowing it to be increased
by the user up to the device max of max_ordird_qp.  32 seems to be
sufficient to maximize throughput for streaming read benchmarks.

Fail connection setup if the negotiated IRD exhausts the available
adapter ird resources.  So the driver will track the amount of ird
resource in use and not send an RI_WR/INIT to FW that would reduce the
available ird resources below zero.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoiw_cxgb4: Detect Ing. Padding Boundary at run-time
Hariprasad Shenai [Mon, 14 Jul 2014 16:04:51 +0000 (21:34 +0530)]
iw_cxgb4: Detect Ing. Padding Boundary at run-time

Updates iw_cxgb4 to determine the Ingress Padding Boundary from
cxgb4_lld_info, and take subsequent actions.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agotcp: Remove unnecessary arg from tcp_enter_cwr and tcp_init_cwnd_reduction
Christoph Paasch [Mon, 14 Jul 2014 14:58:32 +0000 (16:58 +0200)]
tcp: Remove unnecessary arg from tcp_enter_cwr and tcp_init_cwnd_reduction

Since Yuchung's 9b44190dc11 (tcp: refactor F-RTO), tcp_enter_cwr is always
called with set_ssthresh = 1. Thus, we can remove this argument from
tcp_enter_cwr. Further, as we remove this one, tcp_init_cwnd_reduction
is then always called with set_ssthresh = true, and so we can get rid of
this argument as well.

Cc: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: rtnetlink - make create_link take name_assign_type
Tom Gundersen [Mon, 14 Jul 2014 14:37:25 +0000 (16:37 +0200)]
net: rtnetlink - make create_link take name_assign_type

This passes down NET_NAME_USER (or NET_NAME_ENUM) to alloc_netdev(),
for any device created over rtnetlink.

v9: restore reverse-christmas-tree order of local variables

Signed-off-by: Tom Gundersen <teg@jklm.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: set name_assign_type in alloc_netdev()
Tom Gundersen [Mon, 14 Jul 2014 14:37:24 +0000 (16:37 +0200)]
net: set name_assign_type in alloc_netdev()

Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert
all users to pass NET_NAME_UNKNOWN.

Coccinelle patch:

@@
expression sizeof_priv, name, setup, txqs, rxqs, count;
@@

(
-alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs)
+alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs)
|
-alloc_netdev_mq(sizeof_priv, name, setup, count)
+alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count)
|
-alloc_netdev(sizeof_priv, name, setup)
+alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup)
)

v9: move comments here from the wrong commit

Signed-off-by: Tom Gundersen <teg@jklm.no>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: set name assign type for renamed devices
Tom Gundersen [Mon, 14 Jul 2014 14:37:23 +0000 (16:37 +0200)]
net: set name assign type for renamed devices

Based on a patch from David Herrmann.

This is the only place devices can be renamed.

v9: restore revers-christmas-tree order of local variables

Signed-off-by: Tom Gundersen <teg@jklm.no>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: add name_assign_type netdev attribute
Tom Gundersen [Mon, 14 Jul 2014 14:37:22 +0000 (16:37 +0200)]
net: add name_assign_type netdev attribute

Based on a patch by David Herrmann.

The name_assign_type attribute gives hints where the interface name of a
given net-device comes from. These values are currently defined:
  NET_NAME_ENUM:
    The ifname is provided by the kernel with an enumerated
    suffix, typically based on order of discovery. Names may
    be reused and unpredictable.
  NET_NAME_PREDICTABLE:
    The ifname has been assigned by the kernel in a predictable way
    that is guaranteed to avoid reuse and always be the same for a
    given device. Examples include statically created devices like
    the loopback device and names deduced from hardware properties
    (including being given explicitly by the firmware). Names
    depending on the order of discovery, or in any other way on the
    existence of other devices, must not be marked as PREDICTABLE.
  NET_NAME_USER:
    The ifname was provided by user-space during net-device setup.
  NET_NAME_RENAMED:
    The net-device has been renamed from userspace. Once this type is set,
    it cannot change again.
  NET_NAME_UNKNOWN:
    This is an internal placeholder to indicate that we yet haven't yet
    categorized the name. It will not be exposed to userspace, rather
    -EINVAL is returned.

The aim of these patches is to improve user-space renaming of interfaces. As
a general rule, userspace must rename interfaces to guarantee that names stay
the same every time a given piece of hardware appears (at boot, or when
attaching it). However, there are several situations where userspace should
not perform the renaming, and that depends on both the policy of the local
admin, but crucially also on the nature of the current interface name.

If an interface was created in repsonse to a userspace request, and userspace
already provided a name, we most probably want to leave that name alone. The
main instance of this is wifi-P2P devices created over nl80211, which currently
have a long-standing bug where they are getting renamed by udev. We label such
names NET_NAME_USER.

If an interface, unbeknown to us, has already been renamed from userspace, we
most probably want to leave also that alone. This will typically happen when
third-party plugins (for instance to udev, but the interface is generic so could
be from anywhere) renames the interface without informing udev about it. A
typical situation is when you switch root from an installer or an initrd to the
real system and the new instance of udev does not know what happened before
the switch. These types of problems have caused repeated issues in the past. To
solve this, once an interface has been renamed, its name is labelled
NET_NAME_RENAMED.

In many cases, the kernel is actually able to name interfaces in such a
way that there is no need for userspace to rename them. This is the case when
the enumeration order of devices, or in fact any other (non-parent) device on
the system, can not influence the name of the interface. Examples include
statically created devices, or any naming schemes based on hardware properties
of the interface. In this case the admin may prefer to use the kernel-provided
names, and to make that possible we label such names NET_NAME_PREDICTABLE.
We want the kernel to have tho possibilty of performing predictable interface
naming itself (and exposing to userspace that it has), as the information
necessary for a proper naming scheme for a certain class of devices may not
be exposed to userspace.

The case where renaming is almost certainly desired, is when the kernel has
given the interface a name using global device enumeration based on order of
discovery (ethX, wlanY, etc). These naming schemes are labelled NET_NAME_ENUM.

Lastly, a fallback is left as NET_NAME_UNKNOWN, to indicate that a driver has
not yet been ported. This is mostly useful as a transitionary measure, allowing
us to label the various naming schemes bit by bit.

v8: minor documentation fixes
v9: move comment to the right commit

Signed-off-by: Tom Gundersen <teg@jklm.no>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Kay Sievers <kay@vrfy.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: mvpp2: Fix a typo in the license
Ezequiel Garcia [Mon, 14 Jul 2014 13:34:47 +0000 (10:34 -0300)]
net: mvpp2: Fix a typo in the license

The proper string for this license is "GPL v2", instead of "GPLv2".
This commit fixes that.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'amd811e-cleanups'
David S. Miller [Tue, 15 Jul 2014 02:14:44 +0000 (19:14 -0700)]
Merge branch 'amd811e-cleanups'

Varka Bhadram says:

====================
This series cleanup for AMD8111E ethernet driver

v1: fix checkpatch warnings.
v2: added new line in debug messages
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoethernet: amd: fix 'foo* bar'
Varka Bhadram [Mon, 14 Jul 2014 08:39:09 +0000 (14:09 +0530)]
ethernet: amd: fix 'foo* bar'

This patch fix the 'foo*' bar with 'foo *bar' and (foo*) with (foo *).

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoethernet: amd: fix pci device ids
Varka Bhadram [Mon, 14 Jul 2014 08:39:08 +0000 (14:09 +0530)]
ethernet: amd: fix pci device ids

Normally any device ids will be above the corresponding device driver
structure. This patch moves the pci device ids and MODULE_DEVICE_TABLE()
above the pci driver structure.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoethernet: amd: fix comment styles
Varka Bhadram [Mon, 14 Jul 2014 08:39:07 +0000 (14:09 +0530)]
ethernet: amd: fix comment styles

This patch fixes the comment style issues

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoethernet: amd: dynamic debug fixes
Varka Bhadram [Mon, 14 Jul 2014 08:39:06 +0000 (14:09 +0530)]
ethernet: amd: dynamic debug fixes

This patch convert printk() to netdev_dbg/info/err or dev_info/err/dbg

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoethernet: amd: use devm_ioremap()
Varka Bhadram [Mon, 14 Jul 2014 08:39:05 +0000 (14:09 +0530)]
ethernet: amd: use devm_ioremap()

This patch replace ioremap() with the devm_ioremap() so that
the resource will be freed automatically with the probe failed.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoethernet: amd: move amd111e_remove_one after probe
Varka Bhadram [Mon, 14 Jul 2014 08:39:04 +0000 (14:09 +0530)]
ethernet: amd: move amd111e_remove_one after probe

This patch moves the remove functionalities after the probe
so that we can see the registered and released resources properly.
Every driver follows the same concept.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'sfc-next'
David S. Miller [Tue, 15 Jul 2014 02:11:59 +0000 (19:11 -0700)]
Merge branch 'sfc-next'

Shradha Shah says:

====================
sfc: Add 40G support

This patch series adds support for Solarflare 7000 series
40G Solarflare network adapters starting with the SFN7X42Q.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agosfc: Add 40G link capability decoding
Edward Cree [Mon, 14 Jul 2014 07:39:07 +0000 (08:39 +0100)]
sfc: Add 40G link capability decoding

Needed to select 40G mode on a 10G/40G capable card.

Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agosfc: Adding PCI ID for Solarflare 7000 series 40G network adapter.
Mateusz Wrzesinski [Mon, 14 Jul 2014 07:38:49 +0000 (08:38 +0100)]
sfc: Adding PCI ID for Solarflare 7000 series 40G network adapter.

Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'udp_tunnel'
David S. Miller [Mon, 14 Jul 2014 23:12:24 +0000 (16:12 -0700)]
Merge branch 'udp_tunnel'

Tom Herbert says:

====================
udp: UDP tunnel enhancements

- Add udp_sock_create in new helper module udp_tunnel. Tunnel
  implementations call this function to create listener UDP ports.
- Make vxlan and l2tp call udp_sock_create.
- Move udp_tunnel_segment into udp_offload.c.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoudp: Move udp_tunnel_segment into udp_offload.c
Tom Herbert [Mon, 14 Jul 2014 02:49:56 +0000 (19:49 -0700)]
udp: Move udp_tunnel_segment into udp_offload.c

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agol2tp: Call udp_sock_create
Tom Herbert [Mon, 14 Jul 2014 02:49:48 +0000 (19:49 -0700)]
l2tp: Call udp_sock_create

In l2tp driver call common function udp_sock_create to create the
listener UDP port.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovxlan: Call udp_sock_create
Tom Herbert [Mon, 14 Jul 2014 02:49:42 +0000 (19:49 -0700)]
vxlan: Call udp_sock_create

In vxlan driver call common function udp_sock_create to create the
listener UDP port.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoudp: Add udp_sock_create for UDP tunnels to open listener socket
Tom Herbert [Mon, 14 Jul 2014 02:49:37 +0000 (19:49 -0700)]
udp: Add udp_sock_create for UDP tunnels to open listener socket

Added udp_tunnel.c which can contain some common functions for UDP
tunnels. The first function in this is udp_sock_create which is used
to open the listener port for a UDP tunnel.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'unnecessary_break'
David S. Miller [Mon, 14 Jul 2014 06:45:55 +0000 (23:45 -0700)]
Merge branch 'unnecessary_break'

Fabian Frederick says:

====================
drivers/net: remove unnecessary break after goto

Small patchset addressing break redundancy on drivers/net branch
(suggested by Joe Perches).

V2: cc to maintainers of each section.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoslip: remove unnecessary break after goto
Fabian Frederick [Sat, 12 Jul 2014 18:09:48 +0000 (20:09 +0200)]
slip: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agortlwifi: remove unnecessary break after goto
Fabian Frederick [Sat, 12 Jul 2014 18:09:47 +0000 (20:09 +0200)]
rtlwifi: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agowcn36xx: remove unnecessary break after goto
Fabian Frederick [Sat, 12 Jul 2014 18:09:46 +0000 (20:09 +0200)]
wcn36xx: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoorinoco_usb: remove unnecessary break after goto
Fabian Frederick [Sat, 12 Jul 2014 18:09:45 +0000 (20:09 +0200)]
orinoco_usb: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agops3_gelic: remove unnecessary break after goto
Fabian Frederick [Sat, 12 Jul 2014 18:09:44 +0000 (20:09 +0200)]
ps3_gelic: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoi40evf: remove unnecessary break after goto
Fabian Frederick [Sat, 12 Jul 2014 18:09:43 +0000 (20:09 +0200)]
i40evf: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoi40e: remove unnecessary break after goto
Fabian Frederick [Sat, 12 Jul 2014 18:09:42 +0000 (20:09 +0200)]
i40e: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoixgbe: remove unnecessary break after goto
Fabian Frederick [Sat, 12 Jul 2014 18:09:41 +0000 (20:09 +0200)]
ixgbe: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoigb: remove unnecessary break after goto
Fabian Frederick [Sat, 12 Jul 2014 18:09:40 +0000 (20:09 +0200)]
igb: remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: filter: sk_chk_filter() no longer mangles filter
Eric Dumazet [Sat, 12 Jul 2014 13:49:16 +0000 (15:49 +0200)]
net: filter: sk_chk_filter() no longer mangles filter

Add const attribute to filter argument to make clear it is no
longer modified.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Mon, 14 Jul 2014 05:42:17 +0000 (22:42 -0700)]
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next

John W. Linville says:

====================
Please pull this batch of updates intended for the 3.17 stream...

This is primarily a Bluetooth pull.  Gustavo says:

"A lot of patches to 3.17. The bulk of changes here are for LE support.
The 6loWPAN over Bluetooth now has it own module, we also have support for
background auto-connection and passive scanning, Bluetooth device address
provisioning, support for reading Bluetooth clock values and LE connection
parameters plus many many fixes."

The balance is just a pull of the wireless.git tree, to avoid some
pending merge problems.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoipv6: Use BUG_ON
Himangi Saraogi [Fri, 11 Jul 2014 20:27:17 +0000 (01:57 +0530)]
ipv6: Use BUG_ON

The semantic patch that makes this transformation is as follows:

// <smpl>
@@ expression e; @@
-if (e) BUG();
+BUG_ON(e);
// </smpl>

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: ipv6: Use BUG_ON
Himangi Saraogi [Fri, 11 Jul 2014 20:25:38 +0000 (01:55 +0530)]
net: ipv6: Use BUG_ON

The semantic patch that makes the transformation is as follows:

// <smpl>
@@ expression e; @@
-if (e) BUG();
+BUG_ON(e);
// </smpl>

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoipv6: addrconf: implement address generation modes
Jiri Pirko [Fri, 11 Jul 2014 19:10:18 +0000 (21:10 +0200)]
ipv6: addrconf: implement address generation modes

This patch introduces a possibility for userspace to set various (so far
two) modes of generating addresses. This is useful for example for
NetworkManager because it can set the mode to NONE and take care of link
local addresses itself. That allow it to have the interface up,
monitoring carrier but still don't have any addresses on it.

One more use-case by Dan Williams:
<quote>
WWAN devices often have their LL address provided by the firmware of the
device, which sometimes refuses to respond to incorrect LL addresses
when doing DHCPv6 or IPv6 ND.  The kernel cannot generate the correct LL
address for two reasons:

1) WWAN pseudo-ethernet interfaces often construct a fake MAC address,
or read a meaningless MAC address from the firmware.  Thus the EUI64 and
the IPv6LL address the kernel assigns will be wrong.  The real LL
address is often retrieved from the firmware with AT or proprietary
commands.

2) WWAN PPP interfaces receive their LL address from IPV6CP, not from
kernel assignments.  Only after IPV6CP has completed do we know the LL
address of the PPP interface and its peer.  But the kernel has already
assigned an incorrect LL address to the interface.

So being able to suppress the kernel LL address generation and assign
the one retrieved from the firmware is less complicated and more robust.
</quote>

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet/hsr: Remove left-over never-true conditional code.
Arvid Brodin [Fri, 11 Jul 2014 16:21:12 +0000 (18:21 +0200)]
net/hsr: Remove left-over never-true conditional code.

MacAddressB is an array (unsigned char MacAddressB[ETH_ALEN]) and is allocated
as a part of *node_dst (which is a struct hsr_node). So the condition is always
false.

Detected by Dan Carpenter.

Signed-off-by: Arvid Brodin <arvid.brodin@alten.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'r8169_tso_ipv6'
David S. Miller [Fri, 11 Jul 2014 21:33:31 +0000 (14:33 -0700)]
Merge branch 'r8169_tso_ipv6'

Hayes Wang says:

====================
r8169: support IPv6

The RTL8168C and the later chips support the hardware checksum
for IPv6. Adjust some code and add the relative code.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agor8169: support IPv6
hayeswang [Fri, 11 Jul 2014 08:25:58 +0000 (16:25 +0800)]
r8169: support IPv6

Support the IPv6 hw checksum for RTL8111C and later chips. Note
that the hw has the limitation for the transport offset. The
checksum must be calculated by sw, when the transport offset is
out of the range which the hw accepts.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agor8169: use Giant Send
hayeswang [Fri, 11 Jul 2014 08:25:57 +0000 (16:25 +0800)]
r8169: use Giant Send

Replace large send with giant send for TSO for RTL8111C and later ICs.
The large send setting of the RTL8111DP is different from the other
chips. However, the giant send setting is the same for all the chips
which support it. Use the giant send to synchronize the settings.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agor8169: split rtl8169_tso_csum
hayeswang [Fri, 11 Jul 2014 08:25:56 +0000 (16:25 +0800)]
r8169: split rtl8169_tso_csum

According to the txd_version, split rtl8169_tso_csum() into
rtl8169_tso_csum_v1() and rtl8169_tso_csum_v2().

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoipv4: remove the unnecessary variable in udp_mcast_next
Li RongQing [Fri, 11 Jul 2014 06:32:17 +0000 (14:32 +0800)]
ipv4: remove the unnecessary variable in udp_mcast_next

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agodp83640: Adjust ptp event timestamps
Stefan Sørensen [Fri, 11 Jul 2014 06:18:26 +0000 (08:18 +0200)]
dp83640: Adjust ptp event timestamps

  Event timestamp values should be adjusted by 3*reference clock period +
  11 ns = 35 ns to compensate for input path and synchronization delays.

So subtract 35ns from event timestamps.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Fri, 11 Jul 2014 19:52:57 +0000 (15:52 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem

10 years agoMerge branch 'mvebu'
David S. Miller [Fri, 11 Jul 2014 00:19:38 +0000 (17:19 -0700)]
Merge branch 'mvebu'

Ezequiel Garcia says:

====================
Network driver for Armada 375 SoC

This is the fourth round of the Armada 375 network support patchset. I've
tried to address all the feedback provided for last version and I hope the
driver looks better now.

If there's nothing else to fix, we'd like to merge this for v3.17. The first
patch should go through the network tree, and the other patches through
the mvebu tree.

Thanks a lot for all the great review, and feel free to comment some more!

Changes from v3:

  * Further optimization of the MTU, MAC and ring parameter change to make
    it smoothier.

  * Lots of cleanups in the parser configuration code, most of them addressing
    the feedback from Francois. This include fixing: missing curly braces,
    excessive parenthesis, excessive scope, and making several functions
    more readable.

  * Removed the Rx/Tx queue number module parameter. There's no reason to
    use any other than the default hardware-defined value.

Changes from v2:

  * Reworked mvpp2_prs_tcam_first_free() as suggested by Joe and Francois,
    to have a single loop instead of two.

  * Replaced mvpp2_cpu_interrupts_enable/disable(pp, cpu) with one function
    that enables/disable interrupts on all the CPUs at once.

  * Factor out Tx descriptor DMA unmap + descriptor put sequence to have
    more readable code, as suggested by Francois.

  * Remove redundant netif_running() checks in the ingress and egress path,
    as suggested by Francois.

  * Reworked ring parameter, MTU and MAC address setting to produce a
    more gentle modification of the parameter, and have a fallback in the
    event of a failure.

  * Fixed a percpu memory leak on error path, also noted by Francois.

  * Removed the usage of the legacy net_device irq field, requested by
    Francois.

  * Removed the unneeded multiple Tx port support. It was hardcoded to a single
    Tx port in the previous version so we decided to drop it and simplify the
    code.

  * Optimize the on_each_cpu() calls to clear the sent counters and the
    TX_DONE pkts coalescing setting. on_each_cpu is expensive so it's better
    to minize the calls to it.

Changes from v1:

  * Marcin Wojtas is the author of the driver, so I fixed authorship
    for patch 1/3:
    "ethernet: Add new driver for Marvell Armada 375 network unit"

This patchset adds a new network driver to support the network controller
in Armada 375 SoC.

The network interfaces share a common hardware unit called Packet Processor,
which contains a common register space and per-port register spaces.

The new network unit has different RXQ and TXQ management. The ports
associate so-called per-port "logical queues" which are mapped to "physical
queues". The latter are shared among the ports.

Fo the egress part, the mapping for each port is predefined by hardware.
The egress path incorporates so-called aggregation queues (one per CPU),
from where the data is passed to the physical queues and then via prefetch
buffer to the TxDMA.

The ingress path has a Parser and Classifier (PnC) and a Buffer Manager (BM)
whose usage is obligatory. We are only implementing a simple configuration
for the Parser and Classifier, yet the code is considerably large.

This network unit has other optional features like xPON, WoL, Hardware
Forwarding, and more. This initial commit doesn't provide support for these.

The mvpp2 network driver has been written by Marcin Wojtas and then reviewed
and cleaned up by Ezequiel Garcia.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoethernet: Add new driver for Marvell Armada 375 network unit
Marcin Wojtas [Thu, 10 Jul 2014 19:52:13 +0000 (16:52 -0300)]
ethernet: Add new driver for Marvell Armada 375 network unit

This commit adds a new network driver for the network controller in Marvell
Armada 375 SoC.

Given the controller is very different from the ones in the other Marvell
SoCs that use the mv643xx_eth (Kirkwood, Orion, Discovery) and mvneta
(Armada 370/38x/XP) drivers, a new driver is needed.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
[Ezequiel: coding style cleanup]
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoipv6: fix the check when handle RA
Li RongQing [Thu, 10 Jul 2014 10:02:46 +0000 (18:02 +0800)]
ipv6: fix the check when handle RA

d9333196572(ipv6:  Allow accepting RA from local IP addresses.) made the wrong
check, whether or not to accept RA with source-addr found on local machine, when
accept_ra_from_local is 0.

Fixes: d9333196572(ipv6: Allow accepting RA from local IP addresses.)
Cc: Ben Greear <greearb@candelatech.com>
Cc: Hannes Frederic Sowa <hannes@redhat.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: cpmac: fix in debug messages
Varka Bhadram [Thu, 10 Jul 2014 09:59:38 +0000 (15:29 +0530)]
net: cpmac: fix in debug messages

This patch fix the debug message format. This patch changes to the
commit f160a2d0b524eeebd97a68e2fbb59fad4cdd3fee: net: cpmac: dynamic debug fixes

When we use pr_debug()/netdev_dbg() new lines are inserting in b/w
the values. The format when i use the printk()

These formats used in skb dump and reg dump. This functions
called from the entire code. So this will be enabled all the lines.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Thu, 10 Jul 2014 21:00:34 +0000 (17:00 -0400)]
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next

10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Thu, 10 Jul 2014 21:00:24 +0000 (17:00 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

10 years agoMerge branch 'bridge-fdb-dump-filter'
David S. Miller [Thu, 10 Jul 2014 19:38:07 +0000 (12:38 -0700)]
Merge branch 'bridge-fdb-dump-filter'

Jamal Hadi Salim says:

====================
bridge: fdb dumping takes a filter device

v7:
Vxlan driver was not updated with new API. Found by DaveM

v6:
Missed checkpatch > 80 chars lines found by Varka Bhadram

v5:
 Embarassing qlnic compile failure found by DaveM

v4:
 Request from DaveM to use proper comment tagging and remove if-stmnt braces

V3:
 Suggestion from Eric D. to use for_each_netdev
 Suggestion from Stephen H. to reduce level of indentation

V2:
Suggestions from Vlad
 Get rid of rcu read lock since rtnl_lock is being held
 simplify for readability
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobridge: netlink dump interface at par with brctl
Jamal Hadi Salim [Thu, 10 Jul 2014 11:01:59 +0000 (07:01 -0400)]
bridge: netlink dump interface at par with brctl

Actually better than brctl showmacs because we can filter by bridge
port in the kernel.
The current bridge netlink interface doesnt scale when you have many
bridges each with large fdbs or even bridges with many bridge ports

And now for the science non-fiction novel you have all been
waiting for..

//lets see what bridge ports we have
root@moja-1:/configs/may30-iprt/bridge# ./bridge link show
8: eth1 state DOWN : <BROADCAST,MULTICAST> mtu 1500 master br0 state
disabled priority 32 cost 19
17: sw1-p1 state DOWN : <BROADCAST,NOARP> mtu 1500 master br0 state
disabled priority 32 cost 100

// show all..
root@moja-1:/configs/may30-iprt/bridge# ./bridge fdb show
33:33:00:00:00:01 dev bond0 self permanent
33:33:00:00:00:01 dev dummy0 self permanent
33:33:00:00:00:01 dev ifb0 self permanent
33:33:00:00:00:01 dev ifb1 self permanent
33:33:00:00:00:01 dev eth0 self permanent
01:00:5e:00:00:01 dev eth0 self permanent
33:33:ff:22:01:01 dev eth0 self permanent
02:00:00:12:01:02 dev eth1 vlan 0 master br0 permanent
00:17:42:8a:b4:05 dev eth1 vlan 0 master br0 permanent
00:17:42:8a:b4:07 dev eth1 self permanent
33:33:00:00:00:01 dev eth1 self permanent
33:33:00:00:00:01 dev gretap0 self permanent
da:ac:46:27:d9:53 dev sw1-p1 vlan 0 master br0 permanent
33:33:00:00:00:01 dev sw1-p1 self permanent

//filter by bridge
root@moja-1:/configs/may30-iprt/bridge# ./bridge fdb show br br0
02:00:00:12:01:02 dev eth1 vlan 0 master br0 permanent
00:17:42:8a:b4:05 dev eth1 vlan 0 master br0 permanent
00:17:42:8a:b4:07 dev eth1 self permanent
33:33:00:00:00:01 dev eth1 self permanent
da:ac:46:27:d9:53 dev sw1-p1 vlan 0 master br0 permanent
33:33:00:00:00:01 dev sw1-p1 self permanent

// bridge sw1 has no ports attached..
root@moja-1:/configs/may30-iprt/bridge# ./bridge fdb show br sw1

//filter by port
root@moja-1:/configs/may30-iprt/bridge# ./bridge fdb show brport eth1
02:00:00:12:01:02 vlan 0 master br0 permanent
00:17:42:8a:b4:05 vlan 0 master br0 permanent
00:17:42:8a:b4:07 self permanent
33:33:00:00:00:01 self permanent

// filter by port + bridge
root@moja-1:/configs/may30-iprt/bridge# ./bridge fdb show br br0 brport
sw1-p1
da:ac:46:27:d9:53 vlan 0 master br0 permanent
33:33:00:00:00:01 self permanent

// for shits and giggles (as they say in New Brunswick), lets
// change the mac that br0 uses
// Note: a magical fdb entry with no brport is added ...
root@moja-1:/configs/may30-iprt/bridge# ip link set dev br0 address
02:00:00:12:01:04

// lets see if we can see the unicorn ..
root@moja-1:/configs/may30-iprt/bridge# ./bridge fdb show
33:33:00:00:00:01 dev bond0 self permanent
33:33:00:00:00:01 dev dummy0 self permanent
33:33:00:00:00:01 dev ifb0 self permanent
33:33:00:00:00:01 dev ifb1 self permanent
33:33:00:00:00:01 dev eth0 self permanent
01:00:5e:00:00:01 dev eth0 self permanent
33:33:ff:22:01:01 dev eth0 self permanent
02:00:00:12:01:02 dev eth1 vlan 0 master br0 permanent
00:17:42:8a:b4:05 dev eth1 vlan 0 master br0 permanent
00:17:42:8a:b4:07 dev eth1 self permanent
33:33:00:00:00:01 dev eth1 self permanent
33:33:00:00:00:01 dev gretap0 self permanent
02:00:00:12:01:04 dev br0 vlan 0 master br0 permanent <=== there it is
da:ac:46:27:d9:53 dev sw1-p1 vlan 0 master br0 permanent
33:33:00:00:00:01 dev sw1-p1 self permanent

//can we see it if we filter by bridge?
root@moja-1:/configs/may30-iprt/bridge# ./bridge fdb show br br0
02:00:00:12:01:02 dev eth1 vlan 0 master br0 permanent
00:17:42:8a:b4:05 dev eth1 vlan 0 master br0 permanent
00:17:42:8a:b4:07 dev eth1 self permanent
33:33:00:00:00:01 dev eth1 self permanent
02:00:00:12:01:04 dev br0 vlan 0 master br0 permanent <=== there it is
da:ac:46:27:d9:53 dev sw1-p1 vlan 0 master br0 permanent
33:33:00:00:00:01 dev sw1-p1 self permanent

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobridge: fdb dumping takes a filter device
Jamal Hadi Salim [Thu, 10 Jul 2014 11:01:58 +0000 (07:01 -0400)]
bridge: fdb dumping takes a filter device

Dumping a bridge fdb dumps every fdb entry
held. With this change we are going to filter
on selected bridge port.

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agor8152: support jumbo frame for RTL8153
hayeswang [Thu, 10 Jul 2014 02:58:54 +0000 (10:58 +0800)]
r8152: support jumbo frame for RTL8153

The maximum jumbo frame size for RTL8153 is 9K bytes.
Change the max rx packet size to 9K.
Change the use of the shared fifo from 6K (default) to 12K for tx.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'cpmac-next'
David S. Miller [Thu, 10 Jul 2014 07:41:06 +0000 (00:41 -0700)]
Merge branch 'cpmac-next'

Varka Bhadram says:

====================
This patch series cleanup for AR7 CPMAC Ethernet controller driver
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: cpmac: fix in releasing resources
Varka Bhadram [Thu, 10 Jul 2014 05:35:45 +0000 (11:05 +0530)]
net: cpmac: fix in releasing resources

before registering the the net device this code freeing net device
by using the label 'fail'

fixed by introducing an another label 'out'

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: cpmac: fix proper spacing before return statement
Varka Bhadram [Thu, 10 Jul 2014 05:35:44 +0000 (11:05 +0530)]
net: cpmac: fix proper spacing before return statement

This patch insert proper spaces before return statement.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: cpmac: fix missing a blank line after declarations
Varka Bhadram [Thu, 10 Jul 2014 05:35:43 +0000 (11:05 +0530)]
net: cpmac: fix missing a blank line after declarations

This patch insert a blank line after declaration

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: cpmac: fix cpmac driver structure
Varka Bhadram [Thu, 10 Jul 2014 05:35:42 +0000 (11:05 +0530)]
net: cpmac: fix cpmac driver structure

This patch changes to style of declarattion which follows every driver

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: cpmac: dynamic debug fixes
Varka Bhadram [Thu, 10 Jul 2014 05:35:41 +0000 (11:05 +0530)]
net: cpmac: dynamic debug fixes

This patch does the following changes
1. convert printk(KERN_DEBUG.. to netdev_dbg() if we have net_device object
   or convert to dev_dbg() if we have device object.
2. convert printk(KERN_WARNING.. to netdev_warn() if we have net_device object
   or convert to dev_warn() if we have device object
3. convert printk() to pr_*

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: cpmac: fix comments
Varka Bhadram [Thu, 10 Jul 2014 05:35:40 +0000 (11:05 +0530)]
net: cpmac: fix comments

This patch convert the normal comments to networking subsystem
style comments.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: cpmac: remove space in macro defination
Varka Bhadram [Thu, 10 Jul 2014 05:35:39 +0000 (11:05 +0530)]
net: cpmac: remove space in macro defination

This patch fix the space after '#' in macro defination

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoipconfig: Only bootp paths should reference ic_dev_xid.
David S. Miller [Thu, 10 Jul 2014 05:25:18 +0000 (22:25 -0700)]
ipconfig: Only bootp paths should reference ic_dev_xid.

It is only tested, and declared, in the bootp code.

So, in ic_dynamic() guard it's setting with IPCONFIG_BOOTP.

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'systemport-next'
David S. Miller [Thu, 10 Jul 2014 01:20:23 +0000 (18:20 -0700)]
Merge branch 'systemport-next'

Florian Fainelli says:

====================
net: systemport: checkpatch fixes

These two patches fixes the multiple line alignment issues and
kzalloc on array reported by checkpatch.pl
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: systemport: use kcalloc instead of kzalloc
Florian Fainelli [Thu, 10 Jul 2014 00:36:47 +0000 (17:36 -0700)]
net: systemport: use kcalloc instead of kzalloc

checkpatch.pl flagged two uses of kzalloc() for allocating and zeroing
arrays, use kcalloc() instead as recommended.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: systemport: align multiple lines correctly
Florian Fainelli [Thu, 10 Jul 2014 00:36:46 +0000 (17:36 -0700)]
net: systemport: align multiple lines correctly

checkpatch.pl flagged a bunch of: "CHECK: Alignment should match open
parenthesis" problems, fix all of them.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agohyperv: Add netpoll support
Richard Weinberger [Wed, 9 Jul 2014 14:23:59 +0000 (16:23 +0200)]
hyperv: Add netpoll support

In order to have at least a netconsole to debug kernel issues on
Windows Azure this patch implements netpoll support.
Sending packets is easy, netvsc_start_xmit() does already everything
needed.

Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoarc_emac: Remove unused pointer to net_device from arc_emac_priv
Tobias Klauser [Wed, 9 Jul 2014 09:07:56 +0000 (11:07 +0200)]
arc_emac: Remove unused pointer to net_device from arc_emac_priv

The pointer to the struct net_device in the private data is only
assigned but never used, so delete it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoarc_emac: Use net_device_stats from struct net_device
Tobias Klauser [Wed, 9 Jul 2014 09:07:37 +0000 (11:07 +0200)]
arc_emac: Use net_device_stats from struct net_device

Instead of using a private copy of struct net_device_stats in struct
arc_emac_priv, use stats from struct net_device.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoipconfig: move ic_dev_xid under IPCONFIG_BOOTP
Fabian Frederick [Wed, 9 Jul 2014 18:35:21 +0000 (20:35 +0200)]
ipconfig: move ic_dev_xid under IPCONFIG_BOOTP

ic_dev_xid is only used in __init ic_bootp_recv under IPCONFIG_BOOTP
and __init ic_dynamic under IPCONFIG_DYNAMIC(which is itself defined
with the same IPCONFIG_BOOTP)

This patch fixes the following warning when IPCONFIG_BOOTP is not set:
>> net/ipv4/ipconfig.c:146:15: warning: 'ic_dev_xid' defined but not used [-Wunused-variable]
    static __be32 ic_dev_xid;  /* Device under configuration */

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: netdev@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoBluetooth: Don't send ERTM configuration option when disabled
Marcel Holtmann [Wed, 9 Jul 2014 09:53:35 +0000 (11:53 +0200)]
Bluetooth: Don't send ERTM configuration option when disabled

When ERTM support is disabled, then do not even send ERTM configuration
option even if the remote side supports it.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
10 years agoBluetooth: Fix setting HCI_CONNECTABLE from ioctl code
Johan Hedberg [Wed, 9 Jul 2014 10:28:26 +0000 (13:28 +0300)]
Bluetooth: Fix setting HCI_CONNECTABLE from ioctl code

When the white list is in use the code would not update the
HCI_CONNECTABLE flag if it gets changed through the ioctl code (e.g.
hciconfig hci0 pscan). Since the flag is important for properly
accepting incoming connections add code to fix it up if necessary and
emit a New Settings mgmt event.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
10 years agoBluetooth: Add white list lookup for incoming connection requests
Johan Hedberg [Wed, 9 Jul 2014 09:59:19 +0000 (12:59 +0300)]
Bluetooth: Add white list lookup for incoming connection requests

This patch adds support for looking up entries in the white list when
HCI_CONNECTABLE is not set. The logic is fairly simple: if we're
connectable check the black list, if we're not connectable check the
white list.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
10 years agoBluetooth: Enable page scan also if there are white list entries
Johan Hedberg [Wed, 9 Jul 2014 09:59:18 +0000 (12:59 +0300)]
Bluetooth: Enable page scan also if there are white list entries

Page scan should be enabled either if the connectable setting is set or
if there are any entries in the BR/EDR white list. This patch implements
such behavior by updating the two places that were making decisions on
whether to enable page scan or not.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
10 years agoBluetooth: Refactor connection request handling
Johan Hedberg [Wed, 9 Jul 2014 09:59:17 +0000 (12:59 +0300)]
Bluetooth: Refactor connection request handling

The conditions for accepting an incoming connections are already
non-trivial and will become more so once a white list is added. This
patch breaks up the checks for when to reject the request by creating a
helper function for it.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
10 years agoBluetooth: Fix incorrectly setting HCI_CONNECTABLE
Johan Hedberg [Wed, 9 Jul 2014 09:59:16 +0000 (12:59 +0300)]
Bluetooth: Fix incorrectly setting HCI_CONNECTABLE

Since page scan might be enabled by Add Device we should not implicitly
set connectable whenever something else than Set Connectable changes it.
This patch makes sure that we don't set HCI_CONNECTABLE for these cases
if there are any entries in the white list.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
10 years agoBluetooth: Update page scan when necessary for Add/Remove Device
Johan Hedberg [Wed, 9 Jul 2014 09:59:15 +0000 (12:59 +0300)]
Bluetooth: Update page scan when necessary for Add/Remove Device

When we're removing the last item in the white list or adding the first
one to it and HCI_CONNECTABLE is not set we need to update the current
page scan. This patch adds a simple helper function for the purpose and
calls it from the respective mgmt command handlers.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
10 years agoBluetooth: Introduce a whitelist for BR/EDR devices
Johan Hedberg [Wed, 9 Jul 2014 09:59:14 +0000 (12:59 +0300)]
Bluetooth: Introduce a whitelist for BR/EDR devices

This patch extends the Add/Remove device commands by letting user space
pass BR/EDR addresses to them. The resulting entries get stored in a new
hdev->whitelist list. The idea is that we can now selectively accept
connections from devices in the list even though HCI_CONNECTABLE is not
set (the actual implementation of this is coming in a subsequent patch).

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
10 years agoBluetooth: Unify helpers for bdaddr_list manipulations
Johan Hedberg [Wed, 9 Jul 2014 09:59:13 +0000 (12:59 +0300)]
Bluetooth: Unify helpers for bdaddr_list manipulations

We already have several lists with struct bdaddr_list entries, and there
will be more in the future. Since the operations for adding, removing,
looking up and clearing entries in these lists are exactly the same it
doesn't make sense to define new functions for every single list. This
patch unifies the functions by passing the list_head to them instead of
a hci_dev pointer.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
10 years agoBluetooth: Fix enabling Authenticated Payload Timeout Expired event
Marcel Holtmann [Wed, 9 Jul 2014 07:49:05 +0000 (09:49 +0200)]
Bluetooth: Fix enabling Authenticated Payload Timeout Expired event

The Authenticated Payload Timeout Expired event is valid for
controllers with BR/EDR Secure Connections support, but also for
LE only controllers supporting LE Ping feature. When either of them
is available enable this event. Previous it was not enabled when
the controller was only supporting LE operation.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
10 years agonet: phy: export phy_suspend and phy_resume
Florian Fainelli [Tue, 8 Jul 2014 17:38:36 +0000 (10:38 -0700)]
net: phy: export phy_suspend and phy_resume

phy_suspend and phy_resume are two commonly used helper functions that
need to be exported for Ethernet drivers to be built as modules

Fixes: 40755a0fce17 ("net: systemport: add suspend and resume support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>