Sven Eckelmann [Sun, 3 Jun 2012 20:19:17 +0000 (22:19 +0200)]
batman-adv: Prefix main defines with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Sun, 3 Jun 2012 20:19:16 +0000 (22:19 +0200)]
batman-adv: Prefix vis defines with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Sun, 3 Jun 2012 20:19:15 +0000 (22:19 +0200)]
batman-adv: Prefix unicast defines with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Sun, 3 Jun 2012 20:19:14 +0000 (22:19 +0200)]
batman-adv: Prefix types defines with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Sun, 3 Jun 2012 20:19:13 +0000 (22:19 +0200)]
batman-adv: Prefix packet defines with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Sun, 3 Jun 2012 20:19:12 +0000 (22:19 +0200)]
batman-adv: Prefix icmp_socket defines with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Sun, 3 Jun 2012 20:19:11 +0000 (22:19 +0200)]
batman-adv: Prefix gateway defines with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Sun, 3 Jun 2012 20:19:10 +0000 (22:19 +0200)]
batman-adv: Prefix bridge_loop_avoidance defines with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Sun, 3 Jun 2012 20:19:09 +0000 (22:19 +0200)]
batman-adv: Prefix sysfs defines with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Sun, 3 Jun 2012 20:19:08 +0000 (22:19 +0200)]
batman-adv: Prefix debugfs defines with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Sun, 3 Jun 2012 20:19:07 +0000 (22:19 +0200)]
batman-adv: Prefix local defines with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Antonio Quartulli [Thu, 24 May 2012 22:00:54 +0000 (00:00 +0200)]
batman-adv: beautify tt_global_add() argument list
Instead of adding a new bool argument each time it is needed, it is better (and
simpler) to pass an 8bit flag argument which contains all the needed flags
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Antonio Quartulli [Thu, 24 May 2012 22:00:42 +0000 (00:00 +0200)]
batman-adv: clear ADD+DEL (and viceversa) events in the same orig-interval
During an OGM-interval (time between two different OGM sendings) the same client
could roam away and then roam back to us. In this case the node would add two
events to the events list (that is going to be sent appended to the next OGM). A
DEL one and an ADD one. Obviously they will only increase the overhead (either in
the air and on the receiver side) and eventually trigger wrong states/events
without producing any real effect.
For this reason we can safely delete any ADD event with its related DEL one.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Wed, 16 May 2012 18:23:23 +0000 (20:23 +0200)]
batman-adv: Directly print to seq_file in vis
The vis output doesn't need to be buffered in an character buffer before it can
be send to the userspace program that reads from the vis debug file.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Wed, 16 May 2012 18:23:22 +0000 (20:23 +0200)]
batman-adv: Prefix remaining function like macros with batadv_
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Wed, 16 May 2012 18:23:19 +0000 (20:23 +0200)]
batman-adv: Prefix main 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>
Sven Eckelmann [Wed, 16 May 2012 18:23:18 +0000 (20:23 +0200)]
batman-adv: Prefix vis 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>