platform/upstream/kernel-adaptation-pc.git
12 years agobatman-adv: Reformat multiline comments to consistent style
Sven Eckelmann [Sat, 12 May 2012 00:09:43 +0000 (02:09 +0200)]
batman-adv: Reformat multiline comments to consistent style

batman-adv doesn't follow the style for multiline comments that David S. Miller
prefers. All comments should be reformatted to follow this consistent style to
make the code slightly more readable.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix main non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:42 +0000 (02:09 +0200)]
batman-adv: Prefix main non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix vis non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:41 +0000 (02:09 +0200)]
batman-adv: Prefix vis non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix unicast non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:40 +0000 (02:09 +0200)]
batman-adv: Prefix unicast non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix translation-table non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:39 +0000 (02:09 +0200)]
batman-adv: Prefix translation-table non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix soft-interface non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:38 +0000 (02:09 +0200)]
batman-adv: Prefix soft-interface non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix send non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:37 +0000 (02:09 +0200)]
batman-adv: Prefix send non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix routing non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:36 +0000 (02:09 +0200)]
batman-adv: Prefix routing non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix ring_buffer non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:35 +0000 (02:09 +0200)]
batman-adv: Prefix ring_buffer non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix originator non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:34 +0000 (02:09 +0200)]
batman-adv: Prefix originator non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix icmp-socket non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:33 +0000 (02:09 +0200)]
batman-adv: Prefix icmp-socket non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix hash non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:32 +0000 (02:09 +0200)]
batman-adv: Prefix hash non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix hard-interface non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:31 +0000 (02:09 +0200)]
batman-adv: Prefix hard-interface non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix gateway-common non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:30 +0000 (02:09 +0200)]
batman-adv: Prefix gateway-common non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix gateway-client non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:29 +0000 (02:09 +0200)]
batman-adv: Prefix gateway-client non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix bridge_loop_avoidance non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 11:38:47 +0000 (13:38 +0200)]
batman-adv: Prefix bridge_loop_avoidance non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix bitarray non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:25 +0000 (02:09 +0200)]
batman-adv: Prefix bitarray non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix bat_sysfs non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:24 +0000 (02:09 +0200)]
batman-adv: Prefix bat_sysfs non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix bat_debugfs non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:23 +0000 (02:09 +0200)]
batman-adv: Prefix bat_debugfs non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix bat_algo non-static functions with batadv_
Sven Eckelmann [Sat, 12 May 2012 00:09:22 +0000 (02:09 +0200)]
batman-adv: Prefix bat_algo non-static functions with batadv_

batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agoipv4: Early TCP socket demux.
David S. Miller [Wed, 20 Jun 2012 04:22:05 +0000 (21:22 -0700)]
ipv4: Early TCP socket demux.

Input packet processing for local sockets involves two major demuxes.
One for the route and one for the socket.

But we can optimize this down to one demux for certain kinds of local
sockets.

Currently we only do this for established TCP sockets, but it could
at least in theory be expanded to other kinds of connections.

If a TCP socket is established then it's identity is fully specified.

This means that whatever input route was used during the three-way
handshake must work equally well for the rest of the connection since
the keys will not change.

Once we move to established state, we cache the receive packet's input
route to use later.

Like the existing cached route in sk->sk_dst_cache used for output
packets, we have to check for route invalidations using dst->obsolete
and dst->ops->check().

Early demux occurs outside of a socket locked section, so when a route
invalidation occurs we defer the fixup of sk->sk_rx_dst until we are
actually inside of established state packet processing and thus have
the socket locked.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoinet: Sanitize inet{,6} protocol demux.
David S. Miller [Wed, 20 Jun 2012 01:56:21 +0000 (18:56 -0700)]
inet: Sanitize inet{,6} protocol demux.

Don't pretend that inet_protos[] and inet6_protos[] are hashes, thay
are just a straight arrays.  Remove all unnecessary hash masking.

Document MAX_INET_PROTOS.

Use RAW_HTABLE_SIZE when appropriate.

Reported-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: qmi_wwan: use module_usb_driver macro
Bjørn Mork [Tue, 19 Jun 2012 00:42:03 +0000 (00:42 +0000)]
net: qmi_wwan: use module_usb_driver macro

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: qmi_wwan: shorten driver description
Bjørn Mork [Tue, 19 Jun 2012 00:42:02 +0000 (00:42 +0000)]
net: qmi_wwan: shorten driver description

The description is used in ethtool fixed length fields.  Make
it shorter to avoid truncation.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: qmi_wwan: bind to both control and data interface
Bjørn Mork [Tue, 19 Jun 2012 00:42:01 +0000 (00:42 +0000)]
net: qmi_wwan: bind to both control and data interface

Always bind to control interface regardless of whether
it is a shared interface or not.

A QMI/wwan function is required to provide both a control
interface (QMI) and a data interface (wwan).  All devices
supported by this driver do so.  But the vendors may
choose to use different USB descriptor layouts, and some
vendors even allow the same device to present different
layouts.

Most of these devices use a USB descriptor layout with a
single USB interface for both control and data.  But some
split control and data into two interfaces, bound together
by a CDC Union descriptor on the control interface. Before
the cdc-wdm subdriver support was added, this split was
used to let cdc-wdm drive the QMI control interface and
qmi_wwan drive the wwna data interface.

This split driver model has a number of issues:
 - qmi_wwan must match on the data interface descriptor,
   which often are indistiguishable from data interfaces
   belonging to other CDC (like) functions like ACM
 - supporting a single QMI/wwan function requires adding
   the device to two drivers
 - syncronizing the probes among a number of drivers, to
   ensure selecting the correct driver, is difficult unless
   all drivers match on the same interface

This patch resolves these problems by using the same
probing mechanism as cdc-ether for devices with a two-
interface USB descriptor layout.  This makes the driver
behave consistently, supporting both the control and data
part of the QMI/wwan function, regardless of the USB
descriptors.

Cc: Thomas Schäfer <tschaefer@t-online.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: qmi_wwan: rearranging to prepare for code sharing
Bjørn Mork [Tue, 19 Jun 2012 00:42:00 +0000 (00:42 +0000)]
net: qmi_wwan: rearranging to prepare for code sharing

Most of the subdriver registration code can be reused for devices
with separate control and data interfaces.  Move the code a bit
around to prepare for such reuse.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: qmi_wwan: define a structure for driver specific state
Bjørn Mork [Tue, 19 Jun 2012 00:41:59 +0000 (00:41 +0000)]
net: qmi_wwan: define a structure for driver specific state

usbnet allocates a fixed size array for minidriver specific
state.  Naming the fields and taking advantage of type checking
is a bit more failsafe than casting array elements each time
they are referenced.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: use rcu_dereference_bh() in tx path
Jiri Pirko [Tue, 19 Jun 2012 05:54:21 +0000 (05:54 +0000)]
team: use rcu_dereference_bh() in tx path

Should be used instead of rcu_dereference, since rcu_read_lock_bh is
held.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: allow to send multiple set events in one message
Jiri Pirko [Tue, 19 Jun 2012 05:54:20 +0000 (05:54 +0000)]
team: allow to send multiple set events in one message

When multiple sets are done, event message is generated for each. This
patch accumulates these messages into one.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: ensure correct order of netlink messages delivery
Jiri Pirko [Tue, 19 Jun 2012 05:54:19 +0000 (05:54 +0000)]
team: ensure correct order of netlink messages delivery

currently, when port is created and per-port options are present, there
options are sent to userspace with ifindex of port which userspace does
not know about. Port add message goes right after.

This patch corrects message ordering so userspace would not be confused.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: implement multipart netlink messages for options transfers
Jiri Pirko [Tue, 19 Jun 2012 05:54:18 +0000 (05:54 +0000)]
team: implement multipart netlink messages for options transfers

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: lb: introduce infrastructure for userspace driven tx loadbalancing
Jiri Pirko [Tue, 19 Jun 2012 05:54:17 +0000 (05:54 +0000)]
team: lb: introduce infrastructure for userspace driven tx loadbalancing

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: add port_[enabled/disabled] mode callbacks
Jiri Pirko [Tue, 19 Jun 2012 05:54:16 +0000 (05:54 +0000)]
team: add port_[enabled/disabled] mode callbacks

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: pass NULL to __team_option_inst_add() instead of 0
Jiri Pirko [Tue, 19 Jun 2012 05:54:15 +0000 (05:54 +0000)]
team: pass NULL to __team_option_inst_add() instead of 0

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: allow to specify one option instance to be send to userspace
Jiri Pirko [Tue, 19 Jun 2012 05:54:14 +0000 (05:54 +0000)]
team: allow to specify one option instance to be send to userspace

No need to walk through option instance list and look for ->changed ==
true when called knows exactly what one option instance changed.

Also use lists to pass option instances needed to be present in netlink
message.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: fix error path in team_nl_fill_port_list_get()
Jiri Pirko [Tue, 19 Jun 2012 05:54:13 +0000 (05:54 +0000)]
team: fix error path in team_nl_fill_port_list_get()

genlmsg_cancel() needs to be called in case nest fails

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: fix error path in team_nl_fill_options_get()
Jiri Pirko [Tue, 19 Jun 2012 05:54:12 +0000 (05:54 +0000)]
team: fix error path in team_nl_fill_options_get()

genlmsg_cancel() needs to be called in case nest fails

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: allow async option changes
Jiri Pirko [Tue, 19 Jun 2012 05:54:11 +0000 (05:54 +0000)]
team: allow async option changes

This patch adds two exported functions. One allows to mark option
instance as changed and the second processes change check and does
transfer of changed options to userspace.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: push array_index and port into separate structure
Jiri Pirko [Tue, 19 Jun 2012 05:54:10 +0000 (05:54 +0000)]
team: push array_index and port into separate structure

Introduce struct team_option_inst_info and push option instance info
there. It can be then easily passed to gsetter context and used for
feature async option changes.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: comments: s/net\/drivers\/team/drivers\/net\/team/
Jiri Pirko [Tue, 19 Jun 2012 05:54:09 +0000 (05:54 +0000)]
team: comments: s/net\/drivers\/team/drivers\/net\/team/

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: introduce array options
Jiri Pirko [Tue, 19 Jun 2012 05:54:08 +0000 (05:54 +0000)]
team: introduce array options

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: allow read/write-only options
Jiri Pirko [Tue, 19 Jun 2012 05:54:07 +0000 (05:54 +0000)]
team: allow read/write-only options

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: lb: push hash counting into separate function
Jiri Pirko [Tue, 19 Jun 2012 05:54:06 +0000 (05:54 +0000)]
team: lb: push hash counting into separate function

Also squash hash into one byte

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: add mode priv to port
Jiri Pirko [Tue, 19 Jun 2012 05:54:05 +0000 (05:54 +0000)]
team: add mode priv to port

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: for nomode use dummy struct team_mode
Jiri Pirko [Tue, 19 Jun 2012 05:54:04 +0000 (05:54 +0000)]
team: for nomode use dummy struct team_mode

That leaves team->mode and all its values valid so no checks would be
needed (for example in team_mode_option_get()).

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: make team_mode struct const
Jiri Pirko [Tue, 19 Jun 2012 05:54:03 +0000 (05:54 +0000)]
team: make team_mode struct const

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://gitorious.org/linux-can/linux-can-next
David S. Miller [Tue, 19 Jun 2012 21:47:13 +0000 (14:47 -0700)]
Merge branch 'master' of git://gitorious.org/linux-can/linux-can-next

Marc Kleine-Budde says:

====================
here is our second pull request for net-next. In this series Federico
Vaga adds a pci driver for c_can/d_can hardware using the existing
generic c_can driver. The remaining 6 patches are by Oliver Hartkopp.
He adds CANFD support to the CAN stack while keeping binary
compatibility for existing applications. CANFD is an extension to the
existing CAN standard, it allows longer CAN frames and/or higher data
rates. There's no real hardware available yet, but this series adds
CANFD support to the vcan driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Tue, 19 Jun 2012 21:37:15 +0000 (14:37 -0700)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next

John Linville says:

====================
This is a sizeable batch of updates intended for 3.6...

The bulk of the changes here are Bluetooth.  Gustavo says:

Here goes the first Bluetooth pull request for 3.6, we have
queued quite a lot of work. Andrei Emeltchenko added the AMP
Manager code, a lot of work is needed, but the first bit are
already there. This code is disabled by default.  Mat Martineau
changed the whole L2CAP ERTM state machine code, replacing
the old one with a new implementation. Besides that we had
lot of coding style fixes (to follow net rules), more l2cap
core separation from socket and many clean ups and fixed all
over the tree.

Along with the above, there is a healthy dose of ath9k, iwlwifi,
and other driver updates.  There is also another pull from the
wireless tree to resolve some merge issues.  I also fixed-up some
merge discrepencies between net-next and wireless-next.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Change date and version to 1.72.51-0
Merav Sicron [Tue, 19 Jun 2012 07:48:32 +0000 (07:48 +0000)]
bnx2x: Change date and version to 1.72.51-0

This change updates the date and version of the bnx2x driver.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Support DCBX for all functions
Barak Witkowski [Tue, 19 Jun 2012 07:48:31 +0000 (07:48 +0000)]
bnx2x: Support DCBX for all functions

In multi-function device, allow configuring dcbx admin params from all drivers
on a single physical port.

Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Add support for ethtool -L
Merav Sicron [Tue, 19 Jun 2012 07:48:30 +0000 (07:48 +0000)]
bnx2x: Add support for ethtool -L

Add support for ethtool -L/-l for setting and getting the number of RSS queues.
The 'combined' field is used as we don't support separate IRQ for Rx and Tx.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Allow up to 63 RSS queues
Merav Sicron [Tue, 19 Jun 2012 07:48:29 +0000 (07:48 +0000)]
bnx2x: Allow up to 63 RSS queues

This patch removed the limitation in the code for 16 RSS queues.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Split the FP structure
Barak Witkowski [Tue, 19 Jun 2012 07:48:28 +0000 (07:48 +0000)]
bnx2x: Split the FP structure

This patch moves some fields out of the FP structure to different structures, in
order to minimize size of contigiuous memory allocated.

Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Move the CNIC L2 CIDs to be right after the RSS CIDs
Merav Sicron [Tue, 19 Jun 2012 07:48:27 +0000 (07:48 +0000)]
bnx2x: Move the CNIC L2 CIDs to be right after the RSS CIDs

Currently the CNIC-related L2 CIDs (for sending control FCoE / iSCSI packets)
were at fixed position, according to the maximal number of RSS queues multiplied
by the number of traffic-classes. This change makes the CIDs dynamic, as they
are defined to be right after the highest RSS CID. This decreases the memory
allocated for the context.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Make the transmission queues adjacent
Merav Sicron [Tue, 19 Jun 2012 07:48:26 +0000 (07:48 +0000)]
bnx2x: Make the transmission queues adjacent

In the current scheme the transmission queues of traffic-class 0 were 0-15, the
transmission queues of traffic-class 1 were 16-31 and so on. If the number of
RSS queues was smaller than 16, there were gaps in transmission queues
numbering, as well as in CIDs numbering. This is both a waste (especially when
16 is increased to 64), and may causes problems with flushing queues when
reducing the number of RSS queues (using ethtool -L). The new scheme eliminates
the gaps.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Allow more than 64 L2 CIDs
Merav Sicron [Tue, 19 Jun 2012 07:48:25 +0000 (07:48 +0000)]
bnx2x: Allow more than 64 L2 CIDs

With increased number of RSS queues, each multiplied by the number of traffic-
classes, we may have up to 64*3=192 CIDs. The current driver scheme with regard
to context allocation supports only 64 CIDs. The new scheme enables scatter-
gatehr list of pages for the context.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Add support for 4-tupple UDP RSS
Merav Sicron [Tue, 19 Jun 2012 07:48:24 +0000 (07:48 +0000)]
bnx2x: Add support for 4-tupple UDP RSS

This change enables to control via ethtool whether to do UDP RSS on 2-tupple
(IP source / destination only) or on 4-tupple (include UDP source / destination
port). It also enables to read back the RSS configuration.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Return only online tests for MF
Merav Sicron [Tue, 19 Jun 2012 07:48:23 +0000 (07:48 +0000)]
bnx2x: Return only online tests for MF

1. In multi-function device, show only the online tests in self-test results as
   only these test are performed (offline tests cannot be performed as they may
   corrupt the traffic of other functions on the same physical port). Note that
   multi-function mode cannot change while the driver is up.
2. Check result code in NIC load and act accordingly.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Add support for external LB
Merav Sicron [Tue, 19 Jun 2012 07:48:22 +0000 (07:48 +0000)]
bnx2x: Add support for external LB

This change enables to do self-test with external loopback via ethtool.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocanfd: update documentation according to CAN FD extensions
Oliver Hartkopp [Sat, 16 Jun 2012 10:01:58 +0000 (12:01 +0200)]
canfd: update documentation according to CAN FD extensions

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agovcan: add CAN FD support
Oliver Hartkopp [Wed, 13 Jun 2012 18:56:59 +0000 (20:56 +0200)]
vcan: add CAN FD support

- move the length calculation from dlc to real length (using canfd_frame)
- allow to switch the driver between CAN and CAN FD (change of MTU)

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocandev: add/update helpers for CAN FD
Oliver Hartkopp [Wed, 13 Jun 2012 18:48:21 +0000 (20:48 +0200)]
candev: add/update helpers for CAN FD

- update sanity checks
- add DLC to length conversion helpers
  - can_dlc2len() - get data length from can_dlc with sanitized can_dlc
  - can_len2dlc() - map the sanitized data length to an appropriate DLC

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocanfd: add support for CAN FD in CAN_RAW sockets
Oliver Hartkopp [Wed, 13 Jun 2012 18:41:31 +0000 (20:41 +0200)]
canfd: add support for CAN FD in CAN_RAW sockets

- introduce a new sockopt CAN_RAW_FD_FRAMES to allow CAN FD frames
- handle CAN frames and CAN FD frames simultaneously when enabled

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocanfd: add support for CAN FD in PF_CAN core
Oliver Hartkopp [Wed, 13 Jun 2012 18:33:02 +0000 (20:33 +0200)]
canfd: add support for CAN FD in PF_CAN core

- handle ETH_P_CAN and ETH_P_CANFD skbuffs
- update sanity checks for CAN and CAN FD
- make sure the CAN frame can pass the selected CAN netdevice on send
- bump core version and abi version to indicate the new CAN FD support

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocanfd: add new data structures and constants
Oliver Hartkopp [Wed, 13 Jun 2012 18:04:33 +0000 (20:04 +0200)]
canfd: add new data structures and constants

- add new struct canfd_frame
- check identical element offsets in struct can_frame and struct canfd_frame
- new ETH_P_CANFD definition to tag CAN FD skbs correctly
- add CAN_MTU and CANFD_MTU definitions for easy frame and mode detection
- add CAN[FD]_MAX_[DLC|DLEN] helper constants to remove hard coded values
- update existing struct can_frame with helper constants and comments

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agoc_can_pci: generic module for C_CAN/D_CAN on PCI
Federico Vaga [Thu, 14 Jun 2012 11:43:42 +0000 (13:43 +0200)]
c_can_pci: generic module for C_CAN/D_CAN on PCI

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Cc: Alan Cox <alan@linux.intel.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Bhupesh Sharma <bhupesh.sharma@st.com>
[mkl: fix call to pci_iounmap]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Tue, 19 Jun 2012 18:41:22 +0000 (14:41 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into for-davem

Conflicts:
drivers/net/wireless/iwlwifi/dvm/testmode.c
drivers/net/wireless/iwlwifi/pcie/trans.c

12 years agonet: lpc_eth: Driver cleanup
stigge@antcom.de [Mon, 18 Jun 2012 10:14:42 +0000 (10:14 +0000)]
net: lpc_eth: Driver cleanup

This patch removes some nowadays superfluous definitions (one unused define and
an obsolete function forward declaration) and corrects a netdev_err() to
netdev_dbg().

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetfilter: fix missing symbols if CONFIG_NETFILTER_NETLINK_QUEUE_CT unset
Pablo Neira Ayuso [Tue, 19 Jun 2012 03:25:46 +0000 (05:25 +0200)]
netfilter: fix missing symbols if CONFIG_NETFILTER_NETLINK_QUEUE_CT unset

ERROR: "nfqnl_ct_parse" [net/netfilter/nfnetlink_queue.ko] undefined!
ERROR: "nfqnl_ct_seq_adjust" [net/netfilter/nfnetlink_queue.ko] undefined!
ERROR: "nfqnl_ct_put" [net/netfilter/nfnetlink_queue.ko] undefined!
ERROR: "nfqnl_ct_get" [net/netfilter/nfnetlink_queue.ko] undefined!

We have to use CONFIG_NETFILTER_NETLINK_QUEUE_CT in
include/net/netfilter/nfnetlink_queue.h, not CONFIG_NF_CONNTRACK.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://1984.lsi.us.es/nf-next
David S. Miller [Tue, 19 Jun 2012 03:26:06 +0000 (20:26 -0700)]
Merge branch 'master' of git://1984.lsi.us.es/nf-next

Pablo says:

====================
The following patchset provides fixes for issues that were recently introduced
by my new cthelper infrastructure. They have been spotted by Randy Dunlap,
Andrew Morton and Dan Carpenter.

The patches provide:

* compilation fixes if CONFIG_NF_CONNTRACK is disabled: I moved all the
  conntrack code from nfnetlink_queue.c to nfnetlink_queue_ct.c to avoid
  peppering the entire code with lots of ifdefs. I needed to rename
  nfnetlink_queue.c to nfnetlink_queue_core.c to get it working with the
  Makefile tweaks I've added.

* fix NULL pointer dereference via ctnetlink while trying to change the helper
  for an existing conntrack entry. I don't find any reasonable use case for
  changing the helper from one to another in run-time. Thus, now ctnetlink
  returns -EOPNOTSUPP for this operation.

* fix possible out-of-bound zeroing of the conntrack extension area due to
  the helper automatic assignation routine.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
David S. Miller [Tue, 19 Jun 2012 03:23:55 +0000 (20:23 -0700)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge

Included changes:

* major skb->data pointer usage fix
* interval version update
* added get_ethtool_stats() support
* endianess clean up
* routing protocol API improvement wrt TT commit code
* fix locking in hash table code
* minor cleanups and fixes

12 years agonetfilter: nfnetlink_queue: fix compilation with NF_CONNTRACK disabled
Pablo Neira Ayuso [Tue, 19 Jun 2012 00:10:57 +0000 (02:10 +0200)]
netfilter: nfnetlink_queue: fix compilation with NF_CONNTRACK disabled

In "9cb0176 netfilter: add glue code to integrate nfnetlink_queue and ctnetlink"
the compilation with NF_CONNTRACK disabled is broken. This patch fixes this
issue.

I have moved the conntrack part into nfnetlink_queue_ct.c to avoid
peppering the entire nfnetlink_queue.c code with ifdefs.

I also needed to rename nfnetlink_queue.c to nfnetlink_queue_pkt.c
to update the net/netfilter/Makefile to support conditional compilation
of the conntrack integration.

This patch also adds CONFIG_NETFILTER_QUEUE_CT in case you want to explicitly
disable the integration between nf_conntrack and nfnetlink_queue.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agonetfilter: fix compilation of the nfnl_cthelper if NF_CONNTRACK is unset
Pablo Neira Ayuso [Mon, 18 Jun 2012 19:14:30 +0000 (21:14 +0200)]
netfilter: fix compilation of the nfnl_cthelper if NF_CONNTRACK is unset

This patch fixes the compilation of net/netfilter/nfnetlink_cthelper.c
if CONFIG_NF_CONNTRACK is not set.

This patch also moves the definition of the cthelper infrastructure to
the scope of NF_CONNTRACK things.

I have also renamed NETFILTER_NETLINK_CTHELPER by NF_CT_NETLINK_HELPER,
to use similar names to other nf_conntrack_netlink extensions. Better now
that this has been only for two days in David's tree.

Two new dependencies have been added:

* NF_CT_NETLINK
* NETFILTER_NETLINK_QUEUE

Since these infrastructure requires both ctnetlink and nfqueue.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agonetfilter: nf_ct_helper: disable automatic helper re-assignment of different type
Pablo Neira Ayuso [Mon, 18 Jun 2012 15:29:53 +0000 (17:29 +0200)]
netfilter: nf_ct_helper: disable automatic helper re-assignment of different type

This patch modifies __nf_ct_try_assign_helper in a way that invalidates support
for the following scenario:

1) attach the helper A for first time when the conntrack is created
2) attach new (different) helper B due to changes the reply tuple caused by NAT

eg. port redirection from TCP/21 to TCP/5060 with both FTP and SIP helpers
loaded, which seems to be a quite unorthodox scenario.

I can provide a more elaborated patch to support this scenario but explicit
helper attachment provides a better solution for this since now the use can
attach the helpers consistently, without relying on the automatic helper
lookup magic.

This patch fixes a possible out of bound zeroing of the conntrack helper
extension if the helper B uses more memory for its private data than
helper A.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agonetfilter: ctnetlink: fix NULL dereference while trying to change helper
Pablo Neira Ayuso [Mon, 18 Jun 2012 15:29:53 +0000 (17:29 +0200)]
netfilter: ctnetlink: fix NULL dereference while trying to change helper

The patch 1afc56794e03: "netfilter: nf_ct_helper: implement variable
length helper private data" from Jun 7, 2012, leads to the following
Smatch complaint:

net/netfilter/nf_conntrack_netlink.c:1231 ctnetlink_change_helper()
         error: we previously assumed 'help->helper' could be null (see line 1228)

This NULL dereference can be triggered with the following sequence:

1) attach the helper for first time when the conntrack is created.
2) remove the helper module or detach the helper from the conntrack
   via ctnetlink.
3) attach helper again (the same or different one, no matter) to the
   that existing conntrack again via ctnetlink.

This patch fixes the problem by removing the use case that allows you
to re-assign again a helper for one conntrack entry via ctnetlink since
I cannot find any practical use for it.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agobatman-adv: only store changed gw_bandwidth values
Marek Lindner [Fri, 11 May 2012 08:10:50 +0000 (16:10 +0800)]
batman-adv: only store changed gw_bandwidth values

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: fix locking in hash_add()
Matthias Schiffer [Tue, 8 May 2012 20:31:57 +0000 (22:31 +0200)]
batman-adv: fix locking in hash_add()

To ensure an entry isn't added twice all comparisons have to be protected by the
hash line write spinlock. This doesn't really hurt as the case that it is tried
to add an element already present to the hash shouldn't occur very often, so in
most cases the lock would have have to be taken anyways.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Acked-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: use DBG_ALL in log_level sysfs definition
Antonio Quartulli [Wed, 9 May 2012 07:50:45 +0000 (09:50 +0200)]
batman-adv: use DBG_ALL in log_level sysfs definition

Each time a new log level is added the developer must change either the DBG_ALL
enum definition and the hard coded value in the bat_sysfs.c for the log_level
attribute max value. This is extremely error prone.
With this patch the code directly uses DBG_ALL in the sysfs definition

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: turn tt commit code into routing protocol agnostic API
Marek Lindner [Sun, 6 May 2012 20:22:05 +0000 (04:22 +0800)]
batman-adv: turn tt commit code into routing protocol agnostic API

Prior to this patch the translation table code made assumptions about how
the routing protocol works and where its buffers are stored (to directly
modify them).
Each protocol now calls the tt code with the relevant pointers, thereby
abstracting the code.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: fix visualization output without neighbors on the primary interface
Matthias Schiffer [Sat, 5 May 2012 15:51:53 +0000 (17:51 +0200)]
batman-adv: fix visualization output without neighbors on the primary interface

The primary entry and the corresponding secondary entries are missing when there
are no neighbors on the primary interface. This also causes the TT entries to
miss and makes nodes with multiply secondary interface fall apart since there
is no way to see they are related without a primary entry.

Fix this by always emitting a primary entry.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: don't bother flipping ->tt_crc
Al Viro [Sun, 22 Apr 2012 06:45:29 +0000 (07:45 +0100)]
batman-adv: don't bother flipping ->tt_crc

Keep it net-endian

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: don't bother flipping ->tt_data
Al Viro [Sun, 22 Apr 2012 06:44:27 +0000 (07:44 +0100)]
batman-adv: don't bother flipping ->tt_data

just keep it net-endian all along

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[lindner_marek@yahoo.de: fix checkpatch warnings]
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Return error codes instead of -1 on failures
Sven Eckelmann [Sat, 5 May 2012 11:27:28 +0000 (13:27 +0200)]
batman-adv: Return error codes instead of -1 on failures

Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: keep batman_ogm_packet ->seqno net-endian all along
Al Viro [Sun, 22 Apr 2012 06:46:29 +0000 (07:46 +0100)]
batman-adv: keep batman_ogm_packet ->seqno net-endian all along

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: trivial endianness annotations
Al Viro [Sun, 22 Apr 2012 06:47:50 +0000 (07:47 +0100)]
batman-adv: trivial endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: get rid of pointless cast in memcpy()
Al Viro [Sun, 22 Apr 2012 06:50:29 +0000 (07:50 +0100)]
batman-adv: get rid of pointless cast in memcpy()

memcpy() arguments are void *, precisely to avoid that kind of pointless
casts.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: return added entries instead of number of possibly added entries
Marek Lindner [Mon, 23 Apr 2012 08:32:55 +0000 (16:32 +0800)]
batman-adv: return added entries instead of number of possibly added entries

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: ignore trailing CR when comparing protocol names
Marek Lindner [Wed, 18 Apr 2012 09:16:39 +0000 (17:16 +0800)]
batman-adv: ignore trailing CR when comparing protocol names

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: avoid characters requiring shell escapes in protocol names
Marek Lindner [Wed, 18 Apr 2012 09:15:57 +0000 (17:15 +0800)]
batman-adv: avoid characters requiring shell escapes in protocol names

Reported-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Add get_ethtool_stats() support
Martin Hundebøll [Fri, 20 Apr 2012 15:02:45 +0000 (17:02 +0200)]
batman-adv: Add get_ethtool_stats() support

Added additional counters in a bat_stats structure, which are exported
through the ethtool api. The counters are specific to batman-adv and
includes:
 forwarded packets and bytes
 management packets and bytes (aggregated OGMs at this point)
 translation table packets

New counters are added by extending "enum bat_counters" in types.h and
adding corresponding  descriptive string(s) to bat_counters_strings in
soft-iface.c.

Counters are increased by calling batadv_add_counter() and incremented
by one by calling batadv_inc_counter().

Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: convert bat_priv->tt_crc from atomic_t to uint16_t
Antonio Quartulli [Sat, 14 Apr 2012 11:15:26 +0000 (13:15 +0200)]
batman-adv: convert bat_priv->tt_crc from atomic_t to uint16_t

In the code we neever need to atomically check and set the bat_priv->tt_crc
field value. It is simply set and read once in different pieces of the code.
Therefore this field can be safely be converted from atomic_t to uint16_t.

Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Initialize lockdep class keys for hashes
Sven Eckelmann [Thu, 29 Mar 2012 10:38:20 +0000 (12:38 +0200)]
batman-adv: Initialize lockdep class keys for hashes

The hash for claim and backbone hash in the bridge loop avoidance code receive
the same key because they are getting initialized by hash_new with the same
key. Lockdep will create a backtrace when they are used recursively. This can
be avoided by reinitializing the key directly after the hash_new.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: fix skb->data assignment
Antonio Quartulli [Thu, 14 Jun 2012 20:21:28 +0000 (22:21 +0200)]
batman-adv: fix skb->data assignment

skb_linearize(skb) possibly rearranges the skb internal data and then changes
the skb->data pointer value. For this reason any other pointer in the code that
was assigned skb->data before invoking skb_linearise(skb) must be re-assigned.

In the current tt_query message handling code this is not done and therefore, in
case of skb linearization, the pointer used to handle the packet header ends up
in pointing to poisoned memory. The packet is then dropped but the
translation-table mechanism is corrupted.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: update internal version number
Sven Eckelmann [Sun, 17 Jun 2012 11:26:37 +0000 (13:26 +0200)]
batman-adv: update internal version number

Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agoipv4: Cap ADVMSS metric in the FIB rather than the routing cache.
David S. Miller [Mon, 18 Jun 2012 02:47:34 +0000 (19:47 -0700)]
ipv4: Cap ADVMSS metric in the FIB rather than the routing cache.

It makes no sense to execute this limit test every time we create a
routing cache entry.

We can't simply error out on these things since we've silently
accepted and truncated them forever.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: lpc_eth: free skbs in start_xmit
Eric Dumazet [Tue, 12 Jun 2012 23:58:16 +0000 (23:58 +0000)]
net: lpc_eth: free skbs in start_xmit

Transmitted skbs can be freed immediately in lpc_eth_hard_start_xmit()
instead of at TX completion, since driver copies the frames in DMA area.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: correct LPI pass-through configuration
Yuval Mintz [Sun, 17 Jun 2012 02:04:50 +0000 (02:04 +0000)]
bnx2x: correct LPI pass-through configuration

Commit c8c60d88c59cbb48737732ba948663a3efe882aa contained
an incorrect logic which enabled a buffer overflow when accessing
an array during LPI pass-through configuration.
This patch fixes this issue by removing that logic altogether.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2: Update version 2.2.2
Michael Chan [Sat, 16 Jun 2012 15:45:44 +0000 (15:45 +0000)]
bnx2: Update version 2.2.2

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2: Read PCI function number from internal register
Michael Chan [Sat, 16 Jun 2012 15:45:43 +0000 (15:45 +0000)]
bnx2: Read PCI function number from internal register

so that it will work on any hypervisor.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2: Dump additional BC_STATE during firmware sync timeout.
Michael Chan [Sat, 16 Jun 2012 15:45:42 +0000 (15:45 +0000)]
bnx2: Dump additional BC_STATE during firmware sync timeout.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>