platform/adaptation/renesas_rcar/renesas_kernel.git
12 years agobatman-adv: Prefix unicast local static functions with batadv_
Sven Eckelmann [Wed, 16 May 2012 18:23:17 +0000 (20:23 +0200)]
batman-adv: Prefix unicast local static functions with batadv_

All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agoipv4: Kill early demux method return value.
David S. Miller [Thu, 28 Jun 2012 05:01:22 +0000 (22:01 -0700)]
ipv4: Kill early demux method return value.

It's completely unnecessary.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoxfrm_user: Propagate netlink error codes properly.
David S. Miller [Thu, 28 Jun 2012 04:57:03 +0000 (21:57 -0700)]
xfrm_user: Propagate netlink error codes properly.

Instead of using a fixed value of "-1" or "-EMSGSIZE", propagate what
the nla_*() interfaces actually return.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agophy: Fix warning in get_phy_device().
David S. Miller [Thu, 28 Jun 2012 04:28:14 +0000 (21:28 -0700)]
phy: Fix warning in get_phy_device().

drivers/net/phy/phy_device.c: In function ‘get_phy_device’:
drivers/net/phy/phy_device.c:340:14: warning: ‘phy_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]

GCC can't see that when we return zero we always initialize
phy_id and that's the only path where we use it.

Initialize phy_id to zero to shut it up.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovirtio_net: allow to change mac when iface is running
Jiri Pirko [Wed, 27 Jun 2012 05:27:46 +0000 (05:27 +0000)]
virtio_net: allow to change mac when iface is running

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetdev/phy: Add driver for Broadcom BCM87XX 10G Ethernet PHYs
David Daney [Wed, 27 Jun 2012 07:33:38 +0000 (07:33 +0000)]
netdev/phy: Add driver for Broadcom BCM87XX 10G Ethernet PHYs

Add a driver for BCM8706 and BCM8727 devices.  These are a 10Gig PHYs
which use MII_ADDR_C45 addressing.  They are always 10G full duplex, so
there is no autonegotiation.  All we do is report link state and send
interrupts when it changes.

If the PHY has a device tree of_node associated with it, the
"broadcom,c45-reg-init" property is used to supply register
initialization values when config_init() is called.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetdev/phy/of: Add more methods for binding PHY devices to drivers.
David Daney [Wed, 27 Jun 2012 07:33:37 +0000 (07:33 +0000)]
netdev/phy/of: Add more methods for binding PHY devices to drivers.

Allow PHY drivers to supply their own device matching function
(match_phy_device()), or to be matched OF compatible properties.

PHYs following IEEE802.3 clause 45 have more than one device
identifier constants, which breaks the default device matching code.
Other 10G PHYs don't follow the standard manufacturer/device
identifier register layout standards, but they do use the standard
MDIO bus protocols for register access.  Both of these require
adjustments to the PHY driver to device matching code.

If the there is an of_node associated with such a PHY, we can match it
to its driver using the "compatible" properties, just as we do with
certain platform devices.  If the "compatible" property match fails,
first check if there is a driver supplied matching function, and if
not fall back to the existing identifier matching rules.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetdev/phy/of: Handle IEEE802.3 clause 45 Ethernet PHYs in of_mdiobus_register()
David Daney [Wed, 27 Jun 2012 07:33:36 +0000 (07:33 +0000)]
netdev/phy/of: Handle IEEE802.3 clause 45 Ethernet PHYs in of_mdiobus_register()

Define two new "compatible" values for Ethernet
PHYs. "ethernet-phy-ieee802.3-c22" and "ethernet-phy-ieee802.3-c45"
are used to indicate a PHY uses the corresponding protocol.

If a PHY is "compatible" with "ethernet-phy-ieee802.3-c45", we
indicate this so that get_phy_device() can properly probe the device.

If get_phy_device() fails, it was probably due to failing the probe of
the PHY identifier registers.  Since we have the device tree telling
us the PHY exists, go ahead and add it anyhow with a phy_id of zero.
There may be a driver match based on the "compatible" property.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetdev/phy: Handle IEEE802.3 clause 45 Ethernet PHYs
David Daney [Wed, 27 Jun 2012 07:33:35 +0000 (07:33 +0000)]
netdev/phy: Handle IEEE802.3 clause 45 Ethernet PHYs

The IEEE802.3 clause 45 MDIO bus protocol allows for directly
addressing PHY registers using a 21 bit address, and is used by many
10G Ethernet PHYS.  Already existing is the ability of MDIO bus
drivers to use clause 45, with the MII_ADDR_C45 flag.  Here we add
struct phy_c45_device_ids to hold the device identifier registers
present in clause 45. struct phy_device gets a couple of new fields:
c45_ids to hold the identifiers and is_c45 to signal that it is clause
45.

get_phy_device() gets a new parameter is_c45 to indicate that the PHY
device should use the clause 45 protocol, and its callers are adjusted
to pass false.  The follow-on patch to of_mdio.c will pass true where
appropriate.

EXPORT phy_device_create() so that the follow-on patch to of_mdio.c
can use it to create phy devices for PHYs, that have non-standard
device identifier registers, based on the device tree bindings.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: fec: add phy-reset-duration for device tree probe
Shawn Guo [Wed, 27 Jun 2012 03:45:24 +0000 (03:45 +0000)]
net: fec: add phy-reset-duration for device tree probe

Different boards may require different phy reset duration.  Add property
phy-reset-duration for device tree probe, so that the boards that need
a longer reset duration can specify it in their device tree.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: fec: phy-reset-gpios is optional
Shawn Guo [Wed, 27 Jun 2012 03:45:23 +0000 (03:45 +0000)]
net: fec: phy-reset-gpios is optional

The phy-reset-gpios is an optional property for fec device tree boot.
Change the binding document to match the driver code.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: fec: use managed function devm_gpio_request_one
Shawn Guo [Wed, 27 Jun 2012 03:45:22 +0000 (03:45 +0000)]
net: fec: use managed function devm_gpio_request_one

Using gpio_request_one will require the probe fail-out call gpio_free,
which is missing currently.  Change to use devm_gpio_request_one to
fix the problem.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: fec: enable regulator for fec phy
Shawn Guo [Wed, 27 Jun 2012 03:45:21 +0000 (03:45 +0000)]
net: fec: enable regulator for fec phy

If bootloader or platform initialization code does not enable the
power supply to fec phy, we need to do it in fec driver before calling
fec_reset_phy to have the phy powered on.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: fec: reset phy after pinctrl setup
Shawn Guo [Wed, 27 Jun 2012 03:45:20 +0000 (03:45 +0000)]
net: fec: reset phy after pinctrl setup

In case that bootloader or platform initialization does not set up
fec pins, the fec_reset_phy will not be able to succeed, because
fec_reset_phy is currently called before devm_pinctrl_get_select_default.
Move fec_reset_phy call to the place between devm_pinctrl_get_select_default
and fec_enet_init to have above case be taken care.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2: Add missing netif_tx_disable() in bnx2_close()
Michael Chan [Wed, 27 Jun 2012 15:08:24 +0000 (15:08 +0000)]
bnx2: Add missing netif_tx_disable() in bnx2_close()

to stop all tx queues.  Update version to 2.2.3.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2: Add "fall through" comments
Michael Chan [Wed, 27 Jun 2012 15:08:23 +0000 (15:08 +0000)]
bnx2: Add "fall through" comments

to indicate that the mising break statements are intended.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocnic: Handle RAMROD_CMD_ID_CLOSE error.
Eddie Wai [Wed, 27 Jun 2012 15:08:22 +0000 (15:08 +0000)]
cnic: Handle RAMROD_CMD_ID_CLOSE error.

If firmware returns error status, proceed to close the iSCSI connection.
Update version to 2.5.11.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocnic: Remove uio mem[0].
Michael Chan [Wed, 27 Jun 2012 15:08:21 +0000 (15:08 +0000)]
cnic: Remove uio mem[0].

This memory region is no longer used.  Userspace gets the BAR address
directly from sysfs.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocnic: Read bnx2x function number from internal register
Eddie Wai [Wed, 27 Jun 2012 15:08:20 +0000 (15:08 +0000)]
cnic: Read bnx2x function number from internal register

so that it will work on any hypervisor.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocnic: Fix occasional NULL pointer dereference during reboot.
Michael Chan [Wed, 27 Jun 2012 15:08:19 +0000 (15:08 +0000)]
cnic: Fix occasional NULL pointer dereference during reboot.

We register with bnx2x before we allocate ctx_tbl structure, so it is
possible for bnx2x to call cnic_ctl before the structure is allocated.
This can sometimes cause NULL pointer dereference of cp->ctx_tbl.  We
fix this by adding simple checking for valid state before proceeding.
The cnic_ctl call is RCU protected so we don't have to deal with race
conditions.

Because of the additional checking, we need to finish the shutdown
before clearing the CNIC_UP flag.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoRevert "ipv4: tcp: dont cache unconfirmed intput dst"
David S. Miller [Thu, 28 Jun 2012 00:05:06 +0000 (17:05 -0700)]
Revert "ipv4: tcp: dont cache unconfirmed intput dst"

This reverts commit c074da2810c118b3812f32d6754bd9ead2f169e7.

This change has several unwanted side effects:

1) Sockets will cache the DST_NOCACHE route in sk->sk_rx_dst and we'll
   thus never create a real cached route.

2) All TCP traffic will use DST_NOCACHE and never use the routing
   cache at all.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: added support for 40GbE link.
parav.pandit@emulex.com [Wed, 27 Jun 2012 03:56:12 +0000 (03:56 +0000)]
net: added support for 40GbE link.

1. removed code replication for tov calculation for 1G, 10G and
made is common for speed > 1G (1G, 10G, 40G, 100G).
2. defines values for #4 different 40G Phys (KR4, LF4, SR4, CR4)

Signed-off-by: Parav Pandit <parav.pandit@emulex.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: skb_free_datagram_locked() doesnt drop all packets
Eric Dumazet [Wed, 27 Jun 2012 00:23:44 +0000 (00:23 +0000)]
net: skb_free_datagram_locked() doesnt drop all packets

dropwatch wrongly diagnose all received UDP packets as drops.

This patch removes trace_kfree_skb() done in skb_free_datagram_locked().

Locations calling skb_free_datagram_locked() should do it on their own.

As a result, drops are accounted on the right function.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetlink: Get rid of obsolete rtnetlink macros
Thomas Graf [Tue, 26 Jun 2012 23:36:16 +0000 (23:36 +0000)]
netlink: Get rid of obsolete rtnetlink macros

Removes all RTA_GET*() and RTA_PUT*() variations, as well as the
the unused rtattr_strcmp(). Get rid of rtm_get_table() by moving
it to its only user decnet.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodecnet: Do not use RTA_PUT() macros
Thomas Graf [Tue, 26 Jun 2012 23:36:15 +0000 (23:36 +0000)]
decnet: Do not use RTA_PUT() macros

Also, no need to trim on nlmsg_put() failure, nothing has been added
yet.  We also want to use nlmsg_end(), nlmsg_new() and nlmsg_free().

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoip6mr: Do not use RTA_PUT() macros
Thomas Graf [Tue, 26 Jun 2012 23:36:14 +0000 (23:36 +0000)]
ip6mr: Do not use RTA_PUT() macros

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipmr: Do not use RTA_PUT() macros
Thomas Graf [Tue, 26 Jun 2012 23:36:13 +0000 (23:36 +0000)]
ipmr: Do not use RTA_PUT() macros

Also fix a needless skb tailroom check for a 4 bytes area
after after each rtnexthop block.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoinet_diag: Do not use RTA_PUT() macros
Thomas Graf [Tue, 26 Jun 2012 23:36:12 +0000 (23:36 +0000)]
inet_diag: Do not use RTA_PUT() macros

Also, no need to trim on nlmsg_put() failure, nothing has been added
yet.  We also want to use nlmsg_end(), nlmsg_new() and nlmsg_free().

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosock_diag: Do not use RTA_PUT() macros
Thomas Graf [Tue, 26 Jun 2012 23:36:11 +0000 (23:36 +0000)]
sock_diag: Do not use RTA_PUT() macros

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agounix_diag: Do not use RTA_PUT() macros
Thomas Graf [Tue, 26 Jun 2012 23:36:10 +0000 (23:36 +0000)]
unix_diag: Do not use RTA_PUT() macros

Also, no need to trim on nlmsg_put() failure, nothing has been added
yet.  We also want to use nlmsg_end(), nlmsg_new() and nlmsg_free().

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: tcp: dont cache unconfirmed intput dst
Eric Dumazet [Tue, 26 Jun 2012 23:14:15 +0000 (23:14 +0000)]
ipv4: tcp: dont cache unconfirmed intput dst

DDOS synflood attacks hit badly IP route cache.

On typical machines, this cache is allowed to hold up to 8 Millions dst
entries, 256 bytes for each, for a total of 2GB of memory.

rt_garbage_collect() triggers and tries to cleanup things.

Eventually route cache is disabled but machine is under fire and might
OOM and crash.

This patch exploits the new TCP early demux, to set a nocache
boolean in case incoming TCP frame is for a not yet ESTABLISHED or
TIMEWAIT socket.

This 'nocache' boolean is then used in case dst entry is not found in
route cache, to create an unhashed dst entry (DST_NOCACHE)

SYN-cookie-ACK sent use a similar mechanism (ipv4: tcp: dont cache
output dst for syncookies), so after this patch, a machine is able to
absorb a DDOS synflood attack without polluting its IP route cache.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Hans Schillstrom <hans.schillstrom@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix to trim skb for padded vlan packets to workaround an ASIC Bug
Somnath Kotur [Tue, 26 Jun 2012 22:32:10 +0000 (22:32 +0000)]
be2net: Fix to trim skb for padded vlan packets to workaround an ASIC Bug

Fixed spelling error in a comment as pointed out by DaveM.
Also refactored existing code a bit to provide placeholders for another ASIC
Bug workaround that will be checked-in soon after this.

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: sh_eth: add support for set_ringparam/get_ringparam
Yoshihiro Shimoda [Tue, 26 Jun 2012 20:00:03 +0000 (20:00 +0000)]
net: sh_eth: add support for set_ringparam/get_ringparam

This patch supports the ethtool's set_ringparam() and get_ringparam().

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: sh_eth: fix up the buffer pointers
Yoshihiro Shimoda [Tue, 26 Jun 2012 20:00:01 +0000 (20:00 +0000)]
net: sh_eth: fix up the buffer pointers

After freeing the buffer, the driver should change the value of
the pointer to NULL.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: sh_eth: remove unnecessary members/definitions
Yoshihiro Shimoda [Tue, 26 Jun 2012 19:59:58 +0000 (19:59 +0000)]
net: sh_eth: remove unnecessary members/definitions

This patch removes unnecessary members in sh_th_private.
This patch also removes unnecessary definitions in sh_eth.h

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: sh_eth: remove unnecessary function
Yoshihiro Shimoda [Tue, 26 Jun 2012 19:59:51 +0000 (19:59 +0000)]
net: sh_eth: remove unnecessary function

The sh_eth_timer() called mod_timer() for itself. So, this patch
removes the function.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Change bnx2x_tests_str_arr to static char
Merav Sicron [Tue, 26 Jun 2012 06:11:03 +0000 (06:11 +0000)]
bnx2x: Change bnx2x_tests_str_arr to static char

This patch changes the definition of bnx2x_tests_str_arr from char to static
char. This correction will also eliminate the sparse warning created in commit
cf2c1df62e065bfc15e38daf2d3479a56b320f29.

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, bnx2fc, bnx2i, cnic: Add statistics support and FCoE capabilities advertisement
Barak Witkowski [Tue, 26 Jun 2012 01:31:19 +0000 (01:31 +0000)]
bnx2x, bnx2fc, bnx2i, cnic: Add statistics support and FCoE capabilities advertisement

1. When FCoE offload driver is registered, copy its capabilities to the chip
   scratchpad.
2. Copy FCoE/iSCSI MAC addresses in aligned manner to chip scratchpad.
3. Add FCoE/iSCSI statistics collection support

Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years ago6lowpan: double unlock on an error path
Dan Carpenter [Tue, 26 Jun 2012 20:53:09 +0000 (20:53 +0000)]
6lowpan: double unlock on an error path

We already unlocked a few lines earlier here, so we can go directly to
drop without passing through unlock.  This was introduced recently in
c5d3687f6c ('6lowpan: read data from skb safely').

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetlink: Delete NLMSG_PUT and NLMSG_NEW.
David S. Miller [Wed, 27 Jun 2012 04:51:35 +0000 (21:51 -0700)]
netlink: Delete NLMSG_PUT and NLMSG_NEW.

No longer used and a poor interface as they were macros
with embedded gotos.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agopkt_sched: sch_api: Move away from NLMSG_NEW().
David S. Miller [Wed, 27 Jun 2012 04:50:05 +0000 (21:50 -0700)]
pkt_sched: sch_api: Move away from NLMSG_NEW().

And use nlmsg_data() while we're here too, as well as remove
a useless cast.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agopkt_sched: cls_api: Move away from NLMSG_NEW().
David S. Miller [Wed, 27 Jun 2012 04:48:50 +0000 (21:48 -0700)]
pkt_sched: cls_api: Move away from NLMSG_NEW().

And use nlmsg_data() while we're here too, as well as remove
a useless cast.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodecnet: dn_table: Move away from NLMSG_NEW().
David S. Miller [Wed, 27 Jun 2012 04:47:21 +0000 (21:47 -0700)]
decnet: dn_table: Move away from NLMSG_NEW().

And use nlmsg_data() while we're here too.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodecnet: dn_route: Move away from NLMSG_NEW().
David S. Miller [Wed, 27 Jun 2012 04:46:19 +0000 (21:46 -0700)]
decnet: dn_route: Move away from NLMSG_NEW().

And use nlmsg_data() while we're here too.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoaudit: netlink: Move away from NLMSG_NEW().
David S. Miller [Wed, 27 Jun 2012 04:45:21 +0000 (21:45 -0700)]
audit: netlink: Move away from NLMSG_NEW().

And use nlmsg_data() while we're here too.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoinfiniband: netlink: Move away from NLMSG_NEW().
David S. Miller [Wed, 27 Jun 2012 04:43:19 +0000 (21:43 -0700)]
infiniband: netlink: Move away from NLMSG_NEW().

And use nlmsg_data() while we're here too.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoselinux: netlink: Move away from NLMSG_PUT().
David S. Miller [Wed, 27 Jun 2012 04:41:57 +0000 (21:41 -0700)]
selinux: netlink: Move away from NLMSG_PUT().

And use nlmsg_data() while we're here too.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agounix_diag: Move away from NLMSG_PUT().
David S. Miller [Wed, 27 Jun 2012 04:41:00 +0000 (21:41 -0700)]
unix_diag: Move away from NLMSG_PUT().

And use nlmsg_data() while we're here too and remove useless
casts.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agopkt_sched: act_api: Move away from NLMSG_PUT().
David S. Miller [Wed, 27 Jun 2012 04:39:32 +0000 (21:39 -0700)]
pkt_sched: act_api: Move away from NLMSG_PUT().

Move away from NLMSG_NEW() as well.

And use nlmsg_data() while we're here too.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetfilter: nfnetlink_queue_core: Move away from NLMSG_PUT().
David S. Miller [Wed, 27 Jun 2012 04:35:27 +0000 (21:35 -0700)]
netfilter: nfnetlink_queue_core: Move away from NLMSG_PUT().

And use nlmsg_data() while we're here too.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetfilter: nfnetlink_log: Move away from NLMSG_PUT().
David S. Miller [Wed, 27 Jun 2012 04:34:03 +0000 (21:34 -0700)]
netfilter: nfnetlink_log: Move away from NLMSG_PUT().

And use nlmsg_data() while we're here too.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetfilter: ipt_ULOG: Move away from NLMSG_PUT().
David S. Miller [Wed, 27 Jun 2012 04:30:49 +0000 (21:30 -0700)]
netfilter: ipt_ULOG: Move away from NLMSG_PUT().

And use nlmsg_data() while we're here too.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoinet_diag: Move away from NLMSG_PUT().
David S. Miller [Wed, 27 Jun 2012 04:28:54 +0000 (21:28 -0700)]
inet_diag: Move away from NLMSG_PUT().

And use nlmsg_data() while we're here too, and remove useless
casts.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodecnet: dn_rtmsg: Move away from NLMSG_PUT().
David S. Miller [Wed, 27 Jun 2012 04:25:55 +0000 (21:25 -0700)]
decnet: dn_rtmsg: Move away from NLMSG_PUT().

And use nlmsg_data() while we're here too.

Also, remove pointless kernel log message.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetfilter: ebt_ulog: Move away from NLMSG_PUT().
David S. Miller [Wed, 27 Jun 2012 04:23:42 +0000 (21:23 -0700)]
netfilter: ebt_ulog: Move away from NLMSG_PUT().

And use nlmsg_data() while we're here too.

Also, free and NULL out skb when nlmsg_put() fails and remove
pointless kernel log message.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agogdm72xx: Move away from NLMSG_PUT().
David S. Miller [Wed, 27 Jun 2012 04:20:52 +0000 (21:20 -0700)]
gdm72xx: Move away from NLMSG_PUT().

And use nlmsg_data() while we're here too.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoconnector: Move cn_test.c away from NLMSG_PUT().
David S. Miller [Wed, 27 Jun 2012 04:19:02 +0000 (21:19 -0700)]
connector: Move cn_test.c away from NLMSG_PUT().

And use nlmsg_data() while we're here too.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoconnector: use nlmsg_put() instead of NLMSG_PUT() macro.
Javier Martinez Canillas [Tue, 26 Jun 2012 05:41:24 +0000 (05:41 +0000)]
connector: use nlmsg_put() instead of NLMSG_PUT() macro.

The NLMSG_PUT() macro contains a hidden goto which makes the code hard
to audit and very error prone.

While been there also use the inline function nlmsg_data() instead of the
NLMSG_DATA() macro to do explicit type checking.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: remove unused rcu_head field from team_port struct
Jiri Pirko [Tue, 26 Jun 2012 06:52:47 +0000 (06:52 +0000)]
team: remove unused rcu_head field from team_port struct

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: do not allow to map disabled ports
Jiri Pirko [Tue, 26 Jun 2012 06:52:46 +0000 (06:52 +0000)]
team: do not allow to map disabled ports

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: fix team_adjust_ops with regard to enabled ports
Jiri Pirko [Tue, 26 Jun 2012 06:52:45 +0000 (06:52 +0000)]
team: fix team_adjust_ops with regard to enabled ports

team_adjust_ops should check for enabled ports, not all ports.
This may lead to division by zero. This patch fixes this.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: add monitor listener to TX datapath
alex.bluesman.smirnov@gmail.com [Mon, 25 Jun 2012 23:24:54 +0000 (23:24 +0000)]
mac802154: add monitor listener to TX datapath

Add monitor receive callback to the TX datapath to catch all the
data sent to transceivers.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodrivers/ieee802154: add support for the at86rf230/231 transceivers
alex.bluesman.smirnov@gmail.com [Mon, 25 Jun 2012 23:24:53 +0000 (23:24 +0000)]
drivers/ieee802154: add support for the at86rf230/231 transceivers

The AT86RF231 is a feature rich, low-power 2.4 GHz radio transceiver
designed for industrial and consumer ZigBee/IEEE 802.15.4, 6LoWPAN,
RF4CE and high data rate 2.4 GHz ISM band applications.

This patch adds support for the Atmel RF230/231 radio transceivers.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: mlme start request
alex.bluesman.smirnov@gmail.com [Mon, 25 Jun 2012 23:24:52 +0000 (23:24 +0000)]
mac802154: mlme start request

Basic preparations to start the interface.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: page and channel setter
alex.bluesman.smirnov@gmail.com [Mon, 25 Jun 2012 23:24:51 +0000 (23:24 +0000)]
mac802154: page and channel setter

A new method to set page and channel values for a transceiver
was added to the MIB.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: short address setter
alex.bluesman.smirnov@gmail.com [Mon, 25 Jun 2012 23:24:50 +0000 (23:24 +0000)]
mac802154: short address setter

A method to assign the IEEE802.15.4 short address was added to the
MIB implementation.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: set and get PAN id
alex.bluesman.smirnov@gmail.com [Mon, 25 Jun 2012 23:24:49 +0000 (23:24 +0000)]
mac802154: set and get PAN id

Two methods intended to get and set the Private Area Network identifier
were added to the MIB implementation.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac802154: add wpan device-class support
alex.bluesman.smirnov@gmail.com [Mon, 25 Jun 2012 23:24:48 +0000 (23:24 +0000)]
mac802154: add wpan device-class support

Every real 802.15.4 transceiver, which works with software MAC layer,
can be classified as a wpan device in this stack. So the wpan device
implementation provides missing link in datapath between the device
drivers and the Linux network queue.

According to the IEEE 802.15.4 standard each packet can be one of the
following types:
 - beacon
 - MAC layer command
 - ACK
 - data

This patch adds support for the data packet-type only, but this is
enough to perform data transmission and receiving over radio.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: qmi_wwan: simplify a check in qmi_wwan_bind()
Dan Carpenter [Mon, 25 Jun 2012 22:39:45 +0000 (22:39 +0000)]
net: qmi_wwan: simplify a check in qmi_wwan_bind()

This code is easier to read if we specify which flags we want at the
condition instead of at the top of the function.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Cache ip_error() routes even when not forwarding.
David S. Miller [Tue, 26 Jun 2012 23:27:09 +0000 (16:27 -0700)]
ipv4: Cache ip_error() routes even when not forwarding.

And account for the fact that, when we are not forwarding, we should
bump statistic counters rather than emit an ICMP response.

RP-filter rejected lookups are still not cached.

Since -EHOSTUNREACH and -ENETUNREACH can now no longer be seen in
ip_rcv_finish(), remove those checks.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Remove unnecessary code from rt_check_expire().
David S. Miller [Tue, 26 Jun 2012 07:10:09 +0000 (00:10 -0700)]
ipv4: Remove unnecessary code from rt_check_expire().

IPv4 routing cache entries no longer use dst->expires, because the
metrics, PMTU, and redirect information are stored in the inetpeer
cache.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobatman-adv: fix global TT entry deletion
Antonio Quartulli [Mon, 25 Jun 2012 20:49:51 +0000 (20:49 +0000)]
batman-adv: fix global TT entry deletion

During the last merge involving translation-table.c something went wrong and two
lines disappeared from translation-table.c. This patch recovers them.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobatman-adv: fix condition in AP isolation
Antonio Quartulli [Mon, 25 Jun 2012 20:49:50 +0000 (20:49 +0000)]
batman-adv: fix condition in AP isolation

During the last conflict resolution involving translation-table.c something went
wrong and a condition in the AP isolation code was reversed. This patch fixes
this problem.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/sh-eth: Check return value of sh_eth_reset when chip reset fail
Nobuhiro Iwamatsu [Mon, 25 Jun 2012 17:35:12 +0000 (17:35 +0000)]
net/sh-eth: Check return value of sh_eth_reset when chip reset fail

The sh_eth_reset function resets chip, but this performs nothing when failed.
This changes sh_eth_reset return an error, when this failed in reset.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/sh-eth: Add support selecting MII function for SH7734 and R8A7740
Nobuhiro Iwamatsu [Mon, 25 Jun 2012 17:34:14 +0000 (17:34 +0000)]
net/sh-eth: Add support selecting MII function for SH7734 and R8A7740

Ethernet IP of SH7734 and R8A7740 has selecting MII register.
The user needs to change a value according to MII to be used.
This adds the function to change the value of this register.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/ipv6/route.c: packets originating on device match lo
David McCullough [Mon, 25 Jun 2012 15:42:26 +0000 (15:42 +0000)]
net/ipv6/route.c: packets originating on device match lo

Fix to allow IPv6 packets originating locally to match rules with the "iff"
set to "lo".  This allows IPv6 rule matching work the same as it does for
IPv4.  From the iproute2 man page:

   iif NAME
  select  the incoming device to match.  If the interface is loop‐
  back, the rule only matches packets originating from this  host.
  This  means that you may create separate routing tables for for‐
  warded and local packets and, hence, completely segregate them.

Signed-off-by: David McCullough <david_mccullough@mcafee.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif-hsi: Remove use of module parameters
Sjur Brændeland [Mon, 25 Jun 2012 07:49:43 +0000 (07:49 +0000)]
caif-hsi: Remove use of module parameters

Remove use of module parameters on caif hsi device, as
rtnl configuration parameters are already supported.

All caif hsi configuration data is put in cfhsi_config,
and default values in hsi_default_config.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif-hsi: Replace platform device with ops structure.
Sjur Brændeland [Mon, 25 Jun 2012 07:49:42 +0000 (07:49 +0000)]
caif-hsi: Replace platform device with ops structure.

Remove use of struct platform_device, and replace it with
struct cfhsi_ops. Updated variable names in the same
spirit:
cfhsi_get_dev to cfhsi_get_ops,
cfhsi->dev to cfhsi->ops and,
cfhsi->dev.drv to cfhsi->ops->cb_ops.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif-hsi: Add rtnl support
Sjur Brændeland [Mon, 25 Jun 2012 07:49:41 +0000 (07:49 +0000)]
caif-hsi: Add rtnl support

Add RTNL support for managing the caif hsi interface.
The HSI HW interface is no longer registering as a device,
instead we use symbol_get to get hold of the HSI API.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoDocumentation/networking/caif: Update documentation
Sjur Brændeland [Mon, 25 Jun 2012 07:49:40 +0000 (07:49 +0000)]
Documentation/networking/caif: Update documentation

Update drawing and remove description of old features.
Add HSI and USB link layers to the drawing.

Reported-by: Joerg Reisenweber <joerg.reisenweber@stericssion.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericssion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif-hsi: Remove uncecessary assignments
Sjur Brændeland [Mon, 25 Jun 2012 07:49:39 +0000 (07:49 +0000)]
caif-hsi: Remove uncecessary assignments

Remove assignment at declaration when not needed.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericssion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif-hsi: Use netdev_X instead of dev_X for printing
Sjur Brændeland [Mon, 25 Jun 2012 07:49:38 +0000 (07:49 +0000)]
caif-hsi: Use netdev_X instead of dev_X for printing

Replace dev_X with the corresponding netdev_X print
function when applicable.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericssion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif-hsi: changed test on aggregation_timeout
Kim Lilliestierna XX [Mon, 25 Jun 2012 07:49:37 +0000 (07:49 +0000)]
caif-hsi: changed test on aggregation_timeout

Aggregation_timeout is an unsigned long,
a test for less than zero can never become true,
compare with zero instead.

Signed-off-by: Kim Lilliestierna <kim.xx.lilliestierna@stericsson.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif-hsi: Removed dead code
Kim Lilliestierna XX [Mon, 25 Jun 2012 07:49:36 +0000 (07:49 +0000)]
caif-hsi: Removed dead code

Simplify logic and remove dead code.

Signed-off-by: Kim Lilliestierna <kim.xx.lilliestierna@stericsson.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif: Fixed potential memory leak
Kim Lilliestierna XX [Mon, 25 Jun 2012 07:49:35 +0000 (07:49 +0000)]
caif: Fixed potential memory leak

Rearranged the allocation and packet creations to
avoid potential leaks in error path.

Signed-off-by: Kim Lilliestierna <kim.xx.lilliestierna@stericsson.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericssion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif: added check for potential null return
Kim Lilliestierna XX [Mon, 25 Jun 2012 07:49:34 +0000 (07:49 +0000)]
caif: added check for potential null return

Add check on NULL return from caif_get().

Signed-off-by: Kim Lilliestierna <Kim.xx.Lilliestierna@stericsson.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericssion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif: Remove unused pointer and code
Kim Lilliestierna XX [Mon, 25 Jun 2012 07:49:33 +0000 (07:49 +0000)]
caif: Remove unused pointer and code

Removed surplus call to caif_device_list() in caif_dev.c

Signed-off-by: Kim Lilliestierna <kim.xx.lilliestierna@stericsson.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years ago6lowpan: remove excessive argument in pr_debug
alex.bluesman.smirnov@gmail.com [Mon, 25 Jun 2012 03:49:03 +0000 (03:49 +0000)]
6lowpan: remove excessive argument in pr_debug

Remove excessive __func__ argument in pr_debug function and some
excessive debug messages.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years ago6lowpan: fix hop limit compression
alex.bluesman.smirnov@gmail.com [Mon, 25 Jun 2012 03:49:02 +0000 (03:49 +0000)]
6lowpan: fix hop limit compression

Add missing pointer shift for the 'default' case.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Cc: Tony Cheneau <tony.cheneau+zigbeedev@amnesiak.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years ago6lowpan: read data from skb safely
alex.bluesman.smirnov@gmail.com [Mon, 25 Jun 2012 03:49:01 +0000 (03:49 +0000)]
6lowpan: read data from skb safely

Check if skb buffer can pull requested amount of bytes and return
an error in opposite case.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
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 [Mon, 25 Jun 2012 23:15:58 +0000 (16:15 -0700)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge

Included changes:
- yet another batch of 'namespace cleaning' patches

Conflicts:
net/batman-adv/translation-table.c

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Regression bug wherein VFs creation broken for multiple cards.
Somnath Kotur [Sun, 24 Jun 2012 19:42:00 +0000 (19:42 +0000)]
be2net: Regression bug wherein VFs creation broken for multiple cards.

Fix be_find_vfs() to check for matching bus number as well along with devfn

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Explicitly clear the reserved field in the Tx Descriptor
Somnath Kotur [Sun, 24 Jun 2012 19:40:55 +0000 (19:40 +0000)]
be2net: Explicitly clear the reserved field in the Tx Descriptor

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: struct sock cleanups
Eric Dumazet [Sun, 24 Jun 2012 20:22:49 +0000 (20:22 +0000)]
net: struct sock cleanups

Add missing kernel doc for sk_rx_dst

Move sk_rx_dst to avoid two 32bit holes on 64bit arches

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Remove 'unlikely' qualifier in skb_steal_sock()
Vijay Subramanian [Sun, 24 Jun 2012 13:03:07 +0000 (13:03 +0000)]
net: Remove 'unlikely' qualifier in skb_steal_sock()

With early demux enabled by default for TCP flows, there is high chance that
skb->sk will be non-null. 'unlikely()' was removed from __inet_lookup_skb() but
maybe it can be removed from skb_steal_sock() as well.

Note: skb_steal_sock() is also called by __inet6_lookup_skb() and
__udp4_lib_lookup_skb() but they are protected by their own 'unlikely' calls.

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Mon, 25 Jun 2012 22:50:32 +0000 (15:50 -0700)]
Merge git://git./linux/kernel/git/davem/net

Conflicts:
drivers/net/usb/qmi_wwan.c
net/batman-adv/translation-table.c
net/ipv6/route.c

qmi_wwan.c resolution provided by Bjørn Mork.

batman-adv conflict is dealing merely with the changes
of global function names to have a proper subsystem
prefix.

ipv6's route.c conflict is merely two side-by-side additions
of network namespace methods.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: fib: fix fib dump restart
Eric Dumazet [Mon, 25 Jun 2012 22:37:19 +0000 (15:37 -0700)]
ipv6: fib: fix fib dump restart

Commit 2bec5a369ee79576a3 (ipv6: fib: fix crash when changing large fib
while dumping it) introduced ability to restart the dump at tree root,
but failed to skip correctly a count of already dumped entries. Code
didn't match Patrick intent.

We must skip exactly the number of already dumped entries.

Note that like other /proc/net files or netlink producers, we could
still dump some duplicates entries.

Reported-by: Debabrata Banerjee <dbavatar@gmail.com>
Reported-by: Josh Hunt <johunt@akamai.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetxen: Error return off by one for XG port.
Santosh Nayak [Wed, 20 Jun 2012 00:52:58 +0000 (00:52 +0000)]
netxen: Error return off by one for XG port.

There are  NETXEN_NIU_MAX_XG_PORTS ports.
Port indexing starts from zero.
Hence we should also return error for  'port == NETXEN_NIU_MAX_XG_PORTS'.

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
12 years agonetxen: Error return off by one in 'netxen_nic_set_pauseparam()'.
Santosh Nayak [Tue, 19 Jun 2012 21:27:39 +0000 (21:27 +0000)]
netxen: Error return off by one in 'netxen_nic_set_pauseparam()'.

There are 'NETXEN_NIU_MAX_GBE_PORTS'  GBE ports. Port indexing starts
from zero.
Hence we should also return error for "port == NETXEN_NIU_MAX_GBE_PORTS"

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
12 years agobatman-adv: Prefix translation-table local static functions with batadv_
Sven Eckelmann [Wed, 16 May 2012 18:23:16 +0000 (20:23 +0200)]
batman-adv: Prefix translation-table local static functions with batadv_

All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.

Signed-off-by: Sven Eckelmann <sven@narfation.org>