platform/kernel/linux-3.10.git
12 years agobnx2x: set maximal number of default RSS queues
Yuval Mintz [Sun, 1 Jul 2012 03:18:59 +0000 (03:18 +0000)]
bnx2x: set maximal number of default RSS queues

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2: set maximal number of default RSS queues
Yuval Mintz [Sun, 1 Jul 2012 03:18:58 +0000 (03:18 +0000)]
bnx2: set maximal number of default RSS queues

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: set maximal number of default RSS queues
Yuval Mintz [Sun, 1 Jul 2012 03:18:57 +0000 (03:18 +0000)]
tg3: set maximal number of default RSS queues

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomyri10ge: set maximal number of default RSS queues
Yuval Mintz [Sun, 1 Jul 2012 03:18:56 +0000 (03:18 +0000)]
myri10ge: set maximal number of default RSS queues

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Jon Mason <mason@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocxgb4: set maximal number of default RSS queues
Yuval Mintz [Sun, 1 Jul 2012 03:18:55 +0000 (03:18 +0000)]
cxgb4: set maximal number of default RSS queues

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocxgb3: set maximal number of default RSS queues
Yuval Mintz [Sun, 1 Jul 2012 03:18:54 +0000 (03:18 +0000)]
cxgb3: set maximal number of default RSS queues

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlge: set maximal number of default RSS queues
Yuval Mintz [Sun, 1 Jul 2012 03:18:53 +0000 (03:18 +0000)]
qlge: set maximal number of default RSS queues

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Cc: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Cc: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovxge: set maximal number of default RSS queues
Yuval Mintz [Sun, 1 Jul 2012 03:18:52 +0000 (03:18 +0000)]
vxge: set maximal number of default RSS queues

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4: set maximal number of default RSS queues
Yuval Mintz [Sun, 1 Jul 2012 03:18:51 +0000 (03:18 +0000)]
mlx4: set maximal number of default RSS queues

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet-next: Add netif_get_num_default_rss_queues
Yuval Mintz [Sun, 1 Jul 2012 03:18:50 +0000 (03:18 +0000)]
net-next: Add netif_get_num_default_rss_queues

Most multi-queue networking driver consider the number of online cpus when
configuring RSS queues.
This patch adds a wrapper to the number of cpus, setting an upper limit on the
number of cpus a driver should consider (by default) when allocating resources
for his queues.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: defer fib_compute_spec_dst() call
Eric Dumazet [Wed, 4 Jul 2012 22:30:09 +0000 (22:30 +0000)]
ipv4: defer fib_compute_spec_dst() call

ip_options_compile() can avoid calling fib_compute_spec_dst()
by default, and perform the call only if needed.

David suggested to add a helper to make the call only once.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Kill dst->_neighbour, accessors, and final uses.
David S. Miller [Tue, 3 Jul 2012 05:58:02 +0000 (22:58 -0700)]
net: Kill dst->_neighbour, accessors, and final uses.

No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoxfrm: No need to copy generic neighbour pointer.
David S. Miller [Tue, 3 Jul 2012 05:53:37 +0000 (22:53 -0700)]
xfrm: No need to copy generic neighbour pointer.

Nobody reads it any longer.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: No need to set generic neighbour pointer.
David S. Miller [Tue, 3 Jul 2012 08:07:44 +0000 (01:07 -0700)]
ipv4: No need to set generic neighbour pointer.

Nobody reads it any longer.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: Store route neighbour in rt6_info struct.
David S. Miller [Tue, 3 Jul 2012 05:43:47 +0000 (22:43 -0700)]
ipv6: Store route neighbour in rt6_info struct.

This makes for a simplified conversion away from dst_get_neighbour*().

All code outside of ipv6 will use neigh lookups via dst_neigh_lookup*().

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocxgb3: Convert t3_l2t_get() over to dst_neigh_lookup().
David S. Miller [Tue, 3 Jul 2012 05:35:31 +0000 (22:35 -0700)]
cxgb3: Convert t3_l2t_get() over to dst_neigh_lookup().

This means passing in a suitable destination address.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Pass neighbours and dest address into NETEVENT_REDIRECT events.
David S. Miller [Tue, 3 Jul 2012 08:01:51 +0000 (01:01 -0700)]
net: Pass neighbours and dest address into NETEVENT_REDIRECT events.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodecnet: Use neighbours privately in dn_route struct.
David S. Miller [Tue, 3 Jul 2012 05:22:18 +0000 (22:22 -0700)]
decnet: Use neighbours privately in dn_route struct.

This allows an easy conversion away from dst_get_neighbour*().

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoneigh: Convert over to dst_neigh_lookup_skb().
David S. Miller [Tue, 3 Jul 2012 05:15:37 +0000 (22:15 -0700)]
neigh: Convert over to dst_neigh_lookup_skb().

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobr_netfilter: Convert to dst_neigh_lookup_skb().
David S. Miller [Tue, 3 Jul 2012 05:12:59 +0000 (22:12 -0700)]
br_netfilter: Convert to dst_neigh_lookup_skb().

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocxgb4i: Convert over to dst_neigh_lookup().
David S. Miller [Tue, 3 Jul 2012 05:10:55 +0000 (22:10 -0700)]
cxgb4i: Convert over to dst_neigh_lookup().

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocxgbi: Convert over to dst_neigh_lookup().
David S. Miller [Tue, 3 Jul 2012 05:08:58 +0000 (22:08 -0700)]
cxgbi: Convert over to dst_neigh_lookup().

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqeth: Convert over to dst_neigh_lookup_skb().
David S. Miller [Tue, 3 Jul 2012 05:02:33 +0000 (22:02 -0700)]
qeth: Convert over to dst_neigh_lookup_skb().

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipoib: Convert over to dev_lookup_neigh_skb().
David S. Miller [Tue, 3 Jul 2012 05:00:03 +0000 (22:00 -0700)]
ipoib: Convert over to dev_lookup_neigh_skb().

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosch_teql: Convert over to dev_neigh_lookup_skb().
David S. Miller [Tue, 3 Jul 2012 04:57:45 +0000 (21:57 -0700)]
sch_teql: Convert over to dev_neigh_lookup_skb().

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Add optional SKB arg to dst_ops->neigh_lookup().
David S. Miller [Tue, 3 Jul 2012 04:52:24 +0000 (21:52 -0700)]
net: Add optional SKB arg to dst_ops->neigh_lookup().

Causes the handler to use the daddr in the ipv4/ipv6 header when
the route gateway is unspecified (local subnet).

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Do delayed neigh confirmation.
David S. Miller [Mon, 2 Jul 2012 09:21:03 +0000 (02:21 -0700)]
net: Do delayed neigh confirmation.

When a dst_confirm() happens, mark the confirmation as pending in the
dst.  Then on the next packet out, when we have the neigh in-hand, do
the update.

This removes the dependency in dst_confirm() of dst's having an
attached neigh.

While we're here, remove the explicit 'dst' NULL check, all except 2
or 3 call sites ensure it's not NULL.  So just fix those cases up.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosunrpc: Don't do a dst_confirm() on an input routes.
David S. Miller [Mon, 2 Jul 2012 09:15:37 +0000 (02:15 -0700)]
sunrpc: Don't do a dst_confirm() on an input routes.

xs_udp_data_ready() is operating on received packets, and tries to
do a dst_confirm() on the dst attached to the SKB.

This isn't right, dst confirmation is for output routes, not input
rights.  It's for resetting the timers on the nexthop neighbour entry
for the route, indicating that we've got good evidence that we've
successfully reached it.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Don't report neigh uptodate state in rtcache procfs.
David S. Miller [Mon, 2 Jul 2012 09:04:13 +0000 (02:04 -0700)]
ipv4: Don't report neigh uptodate state in rtcache procfs.

Soon routes will not have a cached neigh attached, nor will we
be able to necessarily go directly to a neigh from an arbitrary
route.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Make neigh lookups directly in output packet path.
David S. Miller [Mon, 2 Jul 2012 09:02:15 +0000 (02:02 -0700)]
ipv4: Make neigh lookups directly in output packet path.

Do not use the dst cached neigh, we'll be getting rid of that.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Fix crashes in ip_options_compile().
David S. Miller [Wed, 4 Jul 2012 23:13:17 +0000 (16:13 -0700)]
ipv4: Fix crashes in ip_options_compile().

The spec_dst uses should be guarded by skb_rtable() being non-NULL
not just the SKB being non-null.

Reported-by: Eric Dumazet <eric.dumazet@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, 2 Jul 2012 00:56:33 +0000 (17:56 -0700)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge

Included changes:
- The last batch of patches aimed to clean the batman-adv namespace
- a couple of style fixes
- a fix for the ethtool support
- a fix to prevent sending unicast packets with an uninitialised header
  field

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobatman-adv: Don't leak information through uninitialized packet fields
Sven Eckelmann [Thu, 28 Jun 2012 09:56:52 +0000 (11:56 +0200)]
batman-adv: Don't leak information through uninitialized packet fields

The reserved fields in batman-adv packets are not set to a constant value. The
content of these memory regions is leaked unintentionally to the network.

This regression was introduced in 3b27ffb00fbe9d9189715ea13ce8712e2f0cb0c5

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: fix counter summary length
Marek Lindner [Sat, 23 Jun 2012 09:46:05 +0000 (11:46 +0200)]
batman-adv: fix counter summary length

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: Fix alignment after opened parentheses
Sven Eckelmann [Tue, 19 Jun 2012 18:26:30 +0000 (20:26 +0200)]
batman-adv: Fix alignment after opened parentheses

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: Remove space before semicolon
Sven Eckelmann [Sun, 17 Jun 2012 14:27:22 +0000 (16:27 +0200)]
batman-adv: Remove space before semicolon

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: Remove bat_ prefix from bat_{debugfs, sysfs}.{c, h}
Sven Eckelmann [Sun, 10 Jun 2012 21:58:51 +0000 (23:58 +0200)]
batman-adv: Remove bat_ prefix from bat_{debugfs, sysfs}.{c, h}

The "bat_" prefix in the source files implementing the batman-adv sysfs and
debugfs interface doesn't have a special meaning and are only used by these
files and files that implement the actual B.A.T.M.A.N. path finding algorithm.

The prefix is better suited to mark files that are used to implement the main
part of the path finding. All other files should not use it and therefore gets
renamed.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Transform BATADV_LOG_BUFF(idx) into function
Sven Eckelmann [Tue, 5 Jun 2012 20:31:32 +0000 (22:31 +0200)]
batman-adv: Transform BATADV_LOG_BUFF(idx) into function

The linux Documentation/CodingStyle says that:
 * Chapter 12: "inline functions are preferable to macros resembling functions"
 * Chapter 12.2: Depending on local variables with a magic name is bad
 * Chapter 12.3: Macros with arguments used as l-value are bad

Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix types structs with batadv_
Sven Eckelmann [Tue, 5 Jun 2012 20:31:31 +0000 (22:31 +0200)]
batman-adv: Prefix types structs with batadv_

Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix packet structs with batadv_
Sven Eckelmann [Tue, 5 Jun 2012 20:31:30 +0000 (22:31 +0200)]
batman-adv: Prefix packet structs with batadv_

Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix local sysfs struct with batadv_
Sven Eckelmann [Tue, 5 Jun 2012 20:31:29 +0000 (22:31 +0200)]
batman-adv: Prefix local sysfs struct with batadv_

Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix hash struct and typedef with batadv_
Sven Eckelmann [Tue, 5 Jun 2012 20:31:28 +0000 (22:31 +0200)]
batman-adv: Prefix hash struct and typedef with batadv_

Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix local debugfs structs with batadv_
Sven Eckelmann [Tue, 5 Jun 2012 20:31:27 +0000 (22:31 +0200)]
batman-adv: Prefix local debugfs structs with batadv_

Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix main enum with BATADV_
Sven Eckelmann [Sun, 3 Jun 2012 20:19:22 +0000 (22:19 +0200)]
batman-adv: Prefix main enum with BATADV_

Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix packet enum with BATADV_
Sven Eckelmann [Sun, 3 Jun 2012 20:19:21 +0000 (22:19 +0200)]
batman-adv: Prefix packet enum with BATADV_

Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix types enum with BATADV_
Sven Eckelmann [Sun, 3 Jun 2012 20:19:20 +0000 (22:19 +0200)]
batman-adv: Prefix types enum with BATADV_

Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix hard-interface enum with BATADV_
Sven Eckelmann [Sun, 3 Jun 2012 20:19:19 +0000 (22:19 +0200)]
batman-adv: Prefix hard-interface enum with BATADV_

Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Prefix gateway enum with BATADV_
Sven Eckelmann [Sun, 3 Jun 2012 20:19:18 +0000 (22:19 +0200)]
batman-adv: Prefix gateway enum with BATADV_

Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agophy: add the EEE support and the way to access to the MMD registers.
Giuseppe CAVALLARO [Wed, 27 Jun 2012 21:14:38 +0000 (21:14 +0000)]
phy: add the EEE support and the way to access to the MMD registers.

This patch adds the support for the Energy-Efficient Ethernet (EEE)
to the Physical Abstraction Layer.
To support the EEE we have to access to the MMD registers 3.20 and
7.60/61. So two new functions have been added to read/write the MMD
registers (clause 45).

An Ethernet driver (I tested the stmmac) can invoke the phy_init_eee to properly
check if the EEE is supported by the PHYs and it can also set the clock
stop enable bit in the 3.0 register.
The phy_get_eee_err can be used for reporting the number of time where
the PHY failed to complete its normal wake sequence.

In the end, this patch also adds the EEE ethtool support implementing:
 o phy_ethtool_set_eee
 o phy_ethtool_get_eee

v1: initial patch
v2: fixed some errors especially on naming convention
v3: renamed again the mmd read/write functions thank to Ben's feedback
v4: moved file to phy.c and added the ethtool support.
v5: fixed phy_adv_to_eee, phy_eee_to_supported, phy_eee_to_adv return
    values according to ethtool API (thanks to Ben's feedback).
    Renamed some macros to avoid too long names.
v6: fixed kernel-doc comments to be properly parsed.
    Fixed the phy_init_eee function: we need to check which link mode
    was autonegotiated and then the corresponding bits in 7.60 and 7.61
    registers.
v7: reviewed the way to get the negotiated settings.
v8: fixed a problem in the phy_init_eee return value erroneously added
    when included the phy_read_status call.
v9: do not remove the MDIO_AN_EEE_ADV_100TX and MDIO_AN_EEE_ADV_1000T
    and fixed the eee_{cap,lp,adv} declaration as "int" instead of u16.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: add the Energy Efficient Ethernet support
Giuseppe CAVALLARO [Wed, 27 Jun 2012 21:14:37 +0000 (21:14 +0000)]
stmmac: add the Energy Efficient Ethernet support

This patch adds the Energy Efficient Ethernet support to the stmmac.

Please see the driver's documentation for further details about this support
in the driver.

Thanks also goes to Rayagond Kokatanur for his first implementation.

Note:
 to clearly manage and expose the lpi interrupt status and eee ethtool
 stats I've had to do some modifications to the driver's design and I
 found really useful to move other parts of the code (e.g. mmc irq stat)
 in the main directly. So this means that some core has been reworked
 to introduce the EEE.

v1: initial patch
v2: fixed some sparse issues (typos)
v3: erroneously sent the v2 renamed as v3
v4:
o Fixed the return value of the stmmac_eee_init as suggested by D.Miller
o Totally reviewed the ethtool support for EEE
o Added a new internal parameter to tune the SW timer for TX LPI.
v5: do not change any eee setting in case of the stmmac_ethtool_op_set_eee fails
    (it has to return -EOPNOTSUPP in that case).

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: update the driver Documentation and add EEE
Giuseppe CAVALLARO [Wed, 27 Jun 2012 21:14:36 +0000 (21:14 +0000)]
stmmac: update the driver Documentation and add EEE

This patch updates the stmmac's documentation adding
some missing files in the section used to describe the
internal driver's structure.

Also the patch adds a new section to describe the EEE support.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: do not use strict_strtoul but kstrtoint
Giuseppe CAVALLARO [Wed, 27 Jun 2012 21:14:35 +0000 (21:14 +0000)]
stmmac: do not use strict_strtoul but kstrtoint

This patch replaces the obsolete strict_strtoul with kstrtoint.

v2: also removed casting on kstrtoul.
v3: use kstrtoint instead of kstrtoul due to all vars are integer.
    thanks to E. Dumazet.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Clarify in docs that accept_local requires rp_filter.
David S. Miller [Sun, 1 Jul 2012 05:39:27 +0000 (22:39 -0700)]
ipv4: Clarify in docs that accept_local requires rp_filter.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetfilter: use kfree_skb() not kfree()
Dan Carpenter [Sat, 30 Jun 2012 01:48:53 +0000 (01:48 +0000)]
netfilter: use kfree_skb() not kfree()

This was should be a kfree_skb() here to free the sk_buff pointer.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodummy: use IFF_LIVE_ADDR_CHANGE priv_flag
Jiri Pirko [Fri, 29 Jun 2012 05:10:08 +0000 (05:10 +0000)]
dummy: use IFF_LIVE_ADDR_CHANGE priv_flag

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: use IFF_LIVE_ADDR_CHANGE priv_flag
Jiri Pirko [Fri, 29 Jun 2012 05:10:07 +0000 (05:10 +0000)]
team: use IFF_LIVE_ADDR_CHANGE priv_flag

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovirtio_net: use IFF_LIVE_ADDR_CHANGE priv_flag
Jiri Pirko [Fri, 29 Jun 2012 05:10:06 +0000 (05:10 +0000)]
virtio_net: use IFF_LIVE_ADDR_CHANGE priv_flag

Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: introduce new priv_flag indicating iface capable of change mac when running
Jiri Pirko [Fri, 29 Jun 2012 05:10:05 +0000 (05:10 +0000)]
net: introduce new priv_flag indicating iface capable of change mac when running

Introduce IFF_LIVE_ADDR_CHANGE priv_flag and use it to disable
netif_running() check in eth_mac_addr()

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetlink: add nlk->netlink_bind hook for module auto-loading
Pablo Neira Ayuso [Fri, 29 Jun 2012 06:15:22 +0000 (06:15 +0000)]
netlink: add nlk->netlink_bind hook for module auto-loading

This patch adds a hook in the binding path of netlink.

This is used by ctnetlink to allow module autoloading for the case
in which one user executes:

 conntrack -E

So far, this resulted in nfnetlink loaded, but not
nf_conntrack_netlink.

I have received in the past many complains on this behaviour.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetlink: add netlink_kernel_cfg parameter to netlink_kernel_create
Pablo Neira Ayuso [Fri, 29 Jun 2012 06:15:21 +0000 (06:15 +0000)]
netlink: add netlink_kernel_cfg parameter to netlink_kernel_create

This patch adds the following structure:

struct netlink_kernel_cfg {
        unsigned int    groups;
        void            (*input)(struct sk_buff *skb);
        struct mutex    *cb_mutex;
};

That can be passed to netlink_kernel_create to set optional configurations
for netlink kernel sockets.

I've populated this structure by looking for NULL and zero parameters at the
existing code. The remaining parameters that always need to be set are still
left in the original interface.

That includes optional parameters for the netlink socket creation. This allows
easy extensibility of this interface in the future.

This patch also adapts all callers to use this new interface.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
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 [Fri, 29 Jun 2012 23:28:28 +0000 (16:28 -0700)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next

John Linville says:

====================
Here is another batch of updates intended for 3.6.  This includes a
number of pulls, including ones from the mac80211, iwlwifi, ath6kl, and
wl12xx trees.  I also pulled from the wireless tree to avoid potential
build conflicts.  There are a number of other patches applied directly,
including a number for the Broadcom drivers and the mwifiex driver.

The updates cover the usual variety of new hardware support and feature
enhancements.  It's all good work, but there aren't any big headliners.
This does resolve a net-next/wireless-next merge conflict reported
by Stephen.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocnic: Fix mmap regression.
Michael Chan [Fri, 29 Jun 2012 09:32:45 +0000 (09:32 +0000)]
cnic: Fix mmap regression.

commit 1f85d58cdf15354a7120fc9ccc9bb9c45b53af88
    cnic: Remove uio mem[0].

introduced a regression as older versions of userspace app still rely
on this mmap.  Restore the mmap functionality and get the base address
from pci_resource_start() as the nedev->base_addr has been deprecated for
PCI devices.

Update version to 2.5.12.

Signed-off-by: Michael Chan <mchan@broadocm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Fri, 29 Jun 2012 16:42:14 +0000 (12:42 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into for-davem

Conflicts:
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c

12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Fri, 29 Jun 2012 16:07:37 +0000 (12:07 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless

12 years agoipv4: Elide fib_validate_source() completely when possible.
David S. Miller [Fri, 29 Jun 2012 08:32:45 +0000 (01:32 -0700)]
ipv4: Elide fib_validate_source() completely when possible.

If rpfilter is off (or the SKB has an IPSEC path) and there are not
tclassid users, we don't have to do anything at all when
fib_validate_source() is invoked besides setting the itag to zero.

We monitor tclassid uses with a counter (modified only under RTNL and
marked __read_mostly) and we protect the fib_validate_source() real
work with a test against this counter and whether rpfilter is to be
done.

Having a way to know whether we need no tclassid processing or not
also opens the door for future optimized rpfilter algorithms that do
not perform full FIB lookups.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: l2tp_eth: provide tx_dropped counter
Eric Dumazet [Thu, 28 Jun 2012 20:15:13 +0000 (20:15 +0000)]
net: l2tp_eth: provide tx_dropped counter

Change l2tp_xmit_skb() to return NET_XMIT_DROP in case skb is dropped.

Use kfree_skb() instead dev_kfree_skb() for drop_monitor pleasure.

Support tx_dropped counter for l2tp_eth

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetxen_nic: restrict force firmware dump when dump is disabled.
Manish chopra [Thu, 28 Jun 2012 20:12:21 +0000 (20:12 +0000)]
netxen_nic: restrict force firmware dump when dump is disabled.

o Set the ethtool_dump flag (=ETH_FW_DUMP_DISABLE) when dump is disabled.
o update driver version to 4.0.80

Signed-off-by: Manish chopra <manish.chopra@qlogic.com>
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6_tunnel: Allow receiving packets on the fallback tunnel if they pass sanity checks
Ville Nuorvala [Thu, 28 Jun 2012 18:15:52 +0000 (18:15 +0000)]
ipv6_tunnel: Allow receiving packets on the fallback tunnel if they pass sanity checks

At Facebook, we do Layer-3 DSR via IP-in-IP tunneling. Our load balancers wrap
an extra IP header on incoming packets so they can be routed to the backend.
In the v4 tunnel driver, when these packets fall on the default tunl0 device,
the behavior is to decapsulate them and drop them back on the stack. So our
setup is that tunl0 has the VIP and eth0 has (obviously) the backend's real
address.

In IPv6 we do the same thing, but the v6 tunnel driver didn't have this same
behavior - if you didn't have an explicit tunnel setup, it would drop the
packet.

This patch brings that v4 feature to the v6 driver.

The same IPv6 address checks are performed as with any normal tunnel,
but as the fallback tunnel endpoint addresses are unspecified, the checks
must be performed on a per-packet basis, rather than at tunnel
configuration time.

[Patch description modified by phil@ipom.com]

Signed-off-by: Ville Nuorvala <ville.nuorvala@gmail.com>
Tested-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoxen/netback: only non-freed SKB is queued into tx_queue
Annie Li [Wed, 27 Jun 2012 00:46:58 +0000 (00:46 +0000)]
xen/netback: only non-freed SKB is queued into tx_queue

After SKB is queued into tx_queue, it will be freed if request_gop is NULL.
However, no dequeue action is called in this situation, it is likely that
tx_queue constains freed SKB. This patch should fix this issue, and it is
based on 3.5.0-rc4+.

This issue is found through code inspection, no bug is seen with it currently.
I run netperf test for several hours, and no network regression was found.

Signed-off-by: Annie Li <annie.li@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif-hsi: Fix merge issues.
Sjur Brændeland [Thu, 28 Jun 2012 20:36:20 +0000 (20:36 +0000)]
caif-hsi: Fix merge issues.

Fix the failing merge in net-next by reverting the last
net-next merge for caif_hsi.c and then merge in the commit:
"caif-hsi: Bugfix - Piggyback'ed embedded CAIF frame lost"
from the net repository.

The commit:"caif-hsi: Add missing return in error path" from
net repository was dropped, as it changed code previously removed in the
net-next repository.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Remove extraneous assignment of dst->tclassid.
David S. Miller [Fri, 29 Jun 2012 05:17:39 +0000 (22:17 -0700)]
ipv4: Remove extraneous assignment of dst->tclassid.

We already set it several lines above.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Adjust in_dev handling in fib_validate_source()
David S. Miller [Fri, 29 Jun 2012 01:54:02 +0000 (18:54 -0700)]
ipv4: Adjust in_dev handling in fib_validate_source()

Checking for in_dev being NULL is pointless.

In fact, all of our callers have in_dev precomputed already,
so just pass it in and remove the NULL checking.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Fix bugs in fib_compute_spec_dst().
David S. Miller [Fri, 29 Jun 2012 01:33:24 +0000 (18:33 -0700)]
ipv4: Fix bugs in fib_compute_spec_dst().

Based upon feedback from Julian Anastasov.

1) Use route flags to determine multicast/broadcast, not the
   packet flags.

2) Leave saddr unspecified in flow key.

3) Adjust how we invoke inet_select_addr().  Pass ip_hdr(skb)->saddr as
   second arg, and if it was zeronet use link scope.

4) Use loopback as input interface in flow key.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Use NLMSG_DEFAULT_SIZE in combination with nlmsg_new()
Thomas Graf [Thu, 28 Jun 2012 03:57:45 +0000 (03:57 +0000)]
net: Use NLMSG_DEFAULT_SIZE in combination with nlmsg_new()

Using NLMSG_GOODSIZE results in multiple pages being used as
nlmsg_new() will automatically add the size of the netlink
header to the payload thus exceeding the page limit.

NLMSG_DEFAULT_SIZE takes this into account.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Cc: Jiri Pirko <jpirko@redhat.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: plug dst leak in tcp_v6_conn_request()
Neal Cardwell [Thu, 28 Jun 2012 12:34:21 +0000 (12:34 +0000)]
tcp: plug dst leak in tcp_v6_conn_request()

The code in tcp_v6_conn_request() was implicitly assuming that
tcp_v6_send_synack() would take care of dst_release(), much as
tcp_v4_send_synack() already does. This resulted in
tcp_v6_conn_request() leaking a dst if sysctl_tw_recycle is enabled.

This commit restructures tcp_v6_send_synack() so that it accepts a dst
pointer and takes care of releasing the dst that is passed in, to plug
the leak and avoid future surprises by bringing the IPv6 behavior in
line with the IPv4 side.

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: use inet6_csk_route_req() in tcp_v6_send_synack()
Neal Cardwell [Thu, 28 Jun 2012 12:34:20 +0000 (12:34 +0000)]
tcp: use inet6_csk_route_req() in tcp_v6_send_synack()

With the recent change (earlier in this patch series) to set
flowi6_oif to treq->iif in inet6_csk_route_req(), the dst lookup in
these two functions is now identical, so tcp_v6_send_synack() can now
just call inet6_csk_route_req(), to reduce code duplication and keep
things closer to the IPv4 side, which is structured this way.

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: pass fl6 to inet6_csk_route_req()
Neal Cardwell [Thu, 28 Jun 2012 12:34:19 +0000 (12:34 +0000)]
tcp: pass fl6 to inet6_csk_route_req()

This commit changes inet_csk_route_req() so that it uses a pointer to
a struct flowi6, rather than allocating its own on the stack. This
brings its behavior in line with its IPv4 cousin,
inet_csk_route_req(), and allows a follow-on patch to fix a dst leak.

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: fix inet6_csk_route_req() for link-local addresses
Neal Cardwell [Thu, 28 Jun 2012 12:34:18 +0000 (12:34 +0000)]
tcp: fix inet6_csk_route_req() for link-local addresses

Fix inet6_csk_route_req() to use as the flowi6_oif the treq->iif,
which is correctly fixed up in tcp_v6_conn_request() to handle the
case of link-local addresses. This brings it in line with the
tcp_v6_send_synack() code, which is already correctly using the
treq->iif in this way.

Signed-off-by: Neal Cardwell <ncardwell@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 [Fri, 29 Jun 2012 00:37:00 +0000 (17:37 -0700)]
Merge git://git./linux/kernel/git/davem/net

Conflicts:
drivers/net/caif/caif_hsi.c
drivers/net/usb/qmi_wwan.c

The qmi_wwan merge was trivial.

The caif_hsi.c, on the other hand, was not.  It's a conflict between
1c385f1fdf6f9c66d982802cd74349c040980b50 ("caif-hsi: Replace platform
device with ops structure.") in the net-next tree and commit
39abbaef19cd0a30be93794aa4773c779c3eb1f3 ("caif-hsi: Postpone init of
HIS until open()") in the net tree.

I did my best with that one and will ask Sjur to check it out.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodavinci_cpdma: include linux/module.h
Daniel Mack [Thu, 28 Jun 2012 06:12:32 +0000 (06:12 +0000)]
davinci_cpdma: include linux/module.h

This fixes a number of warnings such as:

  CC      drivers/net/ethernet/ti/davinci_cpdma.o
drivers/net/ethernet/ti/davinci_cpdma.c:279:1: warning: data definition
has no type or storage class
drivers/net/ethernet/ti/davinci_cpdma.c:279:1: warning: type defaults to
‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’
drivers/net/ethernet/ti/davinci_cpdma.c:279:1: warning: parameter names
(without types) in function declaration

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Christian Riesch <christian.riesch@omicron.at>
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 [Thu, 28 Jun 2012 23:58:09 +0000 (16:58 -0700)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless

John Linville says:

====================
Amitkumar Karwar gives us two mwifiex fixes: one fixes some skb
manipulations when handling some event messages; and another that
does some similar fixing on an error path.

Avinash Patil gives us a fix for for a memory leak in mwifiex.

Dan Rosenberg offers an NFC NCI fix to enforce some message length
limits to prevent buffer overflows.

Eliad Peller provides a mac80211 fix to prevent some frames from
being built with an invalid BSSID.

Eric Dumazet sends an NFC fix to prevent a BUG caused by a NULL
pointer dereference.

Felix Fietkau has an ath9k fix for a regression causing
LEAP-authenticated connection failures.

Johannes Berg provides an iwlwifi fix that eliminates some log SPAM
after an authentication/association timeout.  He also provides a
mac80211 fix to prevent incorrectly addressing certain action frames
(and in so doing, to comply with the 802.11 specs).

Larry Finger provides a few USB IDs for the rtl8192cu driver --
should be harmless.

Panayiotis Karabassis provices a one-liner to fix kernel bug 42903
(a system freeze).

Randy Dunlap provides a one-line Kconfig change to prevent build
failures with some configurations.

Stone Piao provides an mwifiex sequence numbering fix and a fix
to prevent mwifiex from attempting to include eapol frames in an
aggregation frame.

Finally, Tom Hughes provides an ath9k fix for a NULL pointer
dereference.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agogianfar: Fix RXICr/TXICr programming for multi-queue mode
Claudiu Manoil [Thu, 28 Jun 2012 04:40:53 +0000 (04:40 +0000)]
gianfar: Fix RXICr/TXICr programming for multi-queue mode

The correct behavior is to program the interrupt coalescing regs
(RXICr/TXICr) in accordance with the Rx/Tx Q's "rx/txcoalescing"
flag. That is, if the coalescing flag is 0 for a given Rx/Tx queue
then the corresponding coalescing register should be cleared.
This behavior is correctly implemented for the single-queue mode
(SQ_SG_MODE), but not for the multi-queue mode (MQ_MG_MODE).
This fixes the later case.

Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Downgrade CAP_SYS_MODULE deprecated message from error to warning.
Vinson Lee [Wed, 27 Jun 2012 14:32:07 +0000 (14:32 +0000)]
net: Downgrade CAP_SYS_MODULE deprecated message from error to warning.

Make logging level consistent with other deprecation messages in net
subsystem.

Signed-off-by: Vinson Lee <vlee@twitter.com>
Cc: David Mackey <tdmackey@twitter.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: qmi_wwan: fix Oops while disconnecting
Bjørn Mork [Thu, 21 Jun 2012 23:11:18 +0000 (23:11 +0000)]
net: qmi_wwan: fix Oops while disconnecting

usbnet_disconnect() will set intfdata to NULL before calling
the minidriver unbind function.  The cdc_wdm subdriver cannot
know that it is disconnecting until the qmi_wwan unbind
function has called its disconnect function.  This means that
we must be able to support the cdc_wdm subdriver operating
normally while usbnet_disconnect() is running, and in
particular that intfdata may be NULL.

The only place this matters is in qmi_wwan_cdc_wdm_manage_power
which is called from cdc_wdm.  Simply testing for NULL
intfdata there is sufficient to allow it to continue working
at all times.

Fixes this Oops where a cdc-wdm device was closed while the
USB device was disconnecting, causing wdm_release to call
qmi_wwan_cdc_wdm_manage_power after intfdata was set to
NULL by usbnet_disconnect:

[41819.087460] BUG: unable to handle kernel NULL pointer dereference at 00000080
[41819.087815] IP: [<f8640458>] qmi_wwan_manage_power+0x68/0x90 [qmi_wwan]
[41819.088028] *pdpt = 000000000314f001 *pde = 0000000000000000
[41819.088028] Oops: 0002 [#1] SMP
[41819.088028] Modules linked in: qmi_wwan option usb_wwan usbserial usbnet
cdc_wdm nls_iso8859_1 nls_cp437 vfat fat usb_storage bnep rfcomm bluetooth
parport_pc ppdev binfmt_misc iptable_nat nf_nat nf_conntrack_ipv4
nf_conntrack nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables
x_tables dm_crypt uvcvideo snd_hda_codec_realtek snd_hda_intel
videobuf2_core snd_hda_codec joydev videodev videobuf2_vmalloc
hid_multitouch snd_hwdep arc4 videobuf2_memops snd_pcm snd_seq_midi
snd_rawmidi snd_seq_midi_event ath9k mac80211 snd_seq ath9k_common ath9k_hw
ath snd_timer snd_seq_device sparse_keymap dm_multipath scsi_dh coretemp
mac_hid snd soundcore cfg80211 snd_page_alloc psmouse serio_raw microcode
lp parport dm_mirror dm_region_hash dm_log usbhid hid i915 drm_kms_helper
drm r8169 i2c_algo_bit wmi video [last unloaded: qmi_wwan]
[41819.088028]
[41819.088028] Pid: 23292, comm: qmicli Not tainted 3.4.0-5-generic #11-Ubuntu GIGABYTE T1005/T1005
[41819.088028] EIP: 0060:[<f8640458>] EFLAGS: 00010246 CPU: 1
[41819.088028] EIP is at qmi_wwan_manage_power+0x68/0x90 [qmi_wwan]
[41819.088028] EAX: 00000000 EBX: 00000000 ECX: 000000c3 EDX: 00000000
[41819.088028] ESI: c3b27658 EDI: 00000000 EBP: c298bea4 ESP: c298be98
[41819.088028]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[41819.088028] CR0: 8005003b CR2: 00000080 CR3: 3605e000 CR4: 000007f0
[41819.088028] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[41819.088028] DR6: ffff0ff0 DR7: 00000400
[41819.088028] Process qmicli (pid: 23292, ti=c298a000 task=f343b280 task.ti=c298a000)
[41819.088028] Stack:
[41819.088028]  00000000 c3b27658 e2a80d00 c298beb0 f864051a c3b27600 c298bec0 f9027099
[41819.088028]  c2fd6000 00000008 c298bef0 c1147f96 00000001 00000000 00000000 f4e54790
[41819.088028]  ecf43a00 ecf43a00 c2fd6008 c2fd6000 ebbd7600 ffffffb9 c298bf08 c1144474
[41819.088028] Call Trace:
[41819.088028]  [<f864051a>] qmi_wwan_cdc_wdm_manage_power+0x1a/0x20 [qmi_wwan]
[41819.088028]  [<f9027099>] wdm_release+0x69/0x70 [cdc_wdm]
[41819.088028]  [<c1147f96>] fput+0xe6/0x210
[41819.088028]  [<c1144474>] filp_close+0x54/0x80
[41819.088028]  [<c1046a65>] put_files_struct+0x75/0xc0
[41819.088028]  [<c1046b56>] exit_files+0x46/0x60
[41819.088028]  [<c1046f81>] do_exit+0x141/0x780
[41819.088028]  [<c107248f>] ? wake_up_state+0xf/0x20
[41819.088028]  [<c1053f48>] ? signal_wake_up+0x28/0x40
[41819.088028]  [<c1054f3b>] ? zap_other_threads+0x6b/0x80
[41819.088028]  [<c1047864>] do_group_exit+0x34/0xa0
[41819.088028]  [<c10478e8>] sys_exit_group+0x18/0x20
[41819.088028]  [<c15bb7df>] sysenter_do_call+0x12/0x28
[41819.088028] Code: 04 83 e7 01 c1 e7 03 0f b6 42 18 83 e0 f7 09 f8 88 42
18 8b 43 04 e8 48 9a dd c8 89 f0 8b 5d f4 8b 75 f8 8b 7d fc 89 ec 5d c3 90
<f0> ff 88 80 00 00 00 0f 94 c0 84 c0 75 b7 31 f6 8b 5d f4 89 f0
[41819.088028] EIP: [<f8640458>] qmi_wwan_manage_power+0x68/0x90 [qmi_wwan] SS:ESP 0068:c298be98
[41819.088028] CR2: 0000000000000080
[41819.149492] ---[ end trace 0944479ff8257f55 ]---

Reported-by: Marius Bjørnstad Kotsbak <marius.kotsbak@gmail.com>
Cc: <stable@vger.kernel.org> # v3.4
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Thu, 28 Jun 2012 19:38:51 +0000 (12:38 -0700)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

Pull hwmon changes from Guenter Roeck:
 "Just e-mail address updates"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: Update my e-mail address
  hwmon: (applesmc) correct email address for Jesper Juhl

12 years agoMerge git://www.linux-watchdog.org/linux-watchdog
Linus Torvalds [Thu, 28 Jun 2012 18:51:19 +0000 (11:51 -0700)]
Merge git://www.linux-watchdog.org/linux-watchdog

Pull watchdog fixes from Wim Van Sebroeck:
 "This fixes:
   - the WDIOC_GETSTATUS return value
   - the unregister of all NMI events on exit
   - the loading of the iTCO_wdt driver after the conversion to the
     lpc_ich mfd model."

* git://www.linux-watchdog.org/linux-watchdog:
  watchdog: core: fix WDIOC_GETSTATUS return value
  watchdog: hpwdt: Unregister NMI events on exit.
  watchdog: iTCO_wdt: add platform driver module alias

12 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Linus Torvalds [Thu, 28 Jun 2012 18:43:45 +0000 (11:43 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-fs

Pull UDF fixes from Jan Kara:
 "Make UDF more robust in presence of corrupted filesystem"

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  udf: Fortify loading of sparing table
  udf: Avoid run away loop when partition table length is corrupted
  udf: Use 'ret' instead of abusing 'i' in udf_load_logicalvol()

12 years agoMerge tag 'upstream-3.5-rc5' of git://git.infradead.org/linux-ubifs
Linus Torvalds [Thu, 28 Jun 2012 18:41:43 +0000 (11:41 -0700)]
Merge tag 'upstream-3.5-rc5' of git://git.infradead.org/linux-ubifs

Pull ubi/ubifs fixes from Artem Bityutskiy:
 "Fix the debugfs regression - we never enable it because incorrect
  'IS_ENABLED()' macro usage: should be 'IS_ENABLED(CONFIG_DEBUG_FS)',
  but we had 'IS_ENABLED(DEBUG_FS)'.  Also fix incorrect assertion."

* tag 'upstream-3.5-rc5' of git://git.infradead.org/linux-ubifs:
  UBI: correct usage of IS_ENABLED()
  UBIFS: correct usage of IS_ENABLED()
  UBIFS: fix assertion

12 years agowatchdog: core: fix WDIOC_GETSTATUS return value
Wim Van Sebroeck [Tue, 26 Jun 2012 18:07:21 +0000 (20:07 +0200)]
watchdog: core: fix WDIOC_GETSTATUS return value

In commit 7a87982420e5e126bfefeb42232d1fd92052794e we added
a wrapper for the WDIOC_GETSTATUS ioctl call. The code results
however in a different behaviour: it returns an error if the
driver doesn't support the status operation. This is not
according to the API that says that when we don't support
the status operation, that we just should return a 0 value.
Only when the device isn't there anymore, we should return an
error.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: hpwdt: Unregister NMI events on exit.
Mingarelli, Thomas [Tue, 26 Jun 2012 08:27:00 +0000 (10:27 +0200)]
watchdog: hpwdt: Unregister NMI events on exit.

This patch is to unregister for NMI events upon exit. Also we are now
making the default setting for allow_kdump enabled.

Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: iTCO_wdt: add platform driver module alias
Jan Beulich [Fri, 22 Jun 2012 15:41:00 +0000 (16:41 +0100)]
watchdog: iTCO_wdt: add platform driver module alias

The recent conversion of iTCO_wdt resulted in the driver no longer
getting loaded automatically, since it no longer has a
MODULE_DEVICE_TABLE() included. As the lpc_ich driver now creates a
platform device, auto-loading can easily be done by having a respective
module alias in place.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Aaron Sierra <asierra@xes-inc.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agomwifiex: retrieve correct max_power information in reg_notifier handler
Amitkumar Karwar [Thu, 28 Jun 2012 02:57:59 +0000 (19:57 -0700)]
mwifiex: retrieve correct max_power information in reg_notifier handler

As we don't provide custom regulatory rules to cfg80211,
"chan->max_power" remains uninitialized (0dbm) and
"chan->max_reg_power" will contain maximum power for a channel
extracted from regulatory rules provided by CRDA; hence use
"chan->max_reg_power" in reg_notifier handler instead of
"chan->max_power" to set max_power in firmware.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: do not advertise custom regulatory domain capability
Amitkumar Karwar [Thu, 28 Jun 2012 02:57:58 +0000 (19:57 -0700)]
mwifiex: do not advertise custom regulatory domain capability

Since we don't support custom regulatory domains,
WIPHY_FLAG_CUSTOM_REGULATORY should not be enabled during wiphy
registration.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: use correct firmware command to get power limits
Amitkumar Karwar [Thu, 28 Jun 2012 02:57:57 +0000 (19:57 -0700)]
mwifiex: use correct firmware command to get power limits

"priv->max_tx_power_level" and "priv->min_tx_power_level" variables
are initialized to maximum and minimum power levels supported by
hardware by sending correct firmware command.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: wakeup main thread to handle command queued
Amitkumar Karwar [Thu, 28 Jun 2012 02:57:56 +0000 (19:57 -0700)]
mwifiex: wakeup main thread to handle command queued

We miss to wakeup main thread after adding command to cmd pending
queue at follwing places. These commands are handled later when
main thread is woken up for handling an interrupt for sleep event
from firmware. This adds worst case delay of 50msec.

1) We don't wakeup main thread when asynchronous command is added
to cmd pending queue. Move queue_work() call from
mwifiex_wait_queue_complete() to mwifiex_send_cmd_async() to wakeup
main thread for sync as well as async commands.

2) Scan operation is triggered due to following reasons
   a) request from user (ex. "iw scan" command)
   b) Scan performed by driver internally.
   In first case main thread is woken up when first scan command is
queued in cmd pending queue (we don't need to wakeup main thread for
subsequent scan commands, because they are queued in scan command
response handler), but it is not done for second case. queue_work()
is moved inside mwifiex_scan_networks() to handle both the cases.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: de-duplicate initvals
Felix Fietkau [Thu, 28 Jun 2012 00:33:41 +0000 (02:33 +0200)]
ath9k: de-duplicate initvals

The initvals tool from https://github.com/mcgrof/qca-swiss-army-knife has
been modified to detect identical initval tables and replace them with
macros. This patch contains the generated changes.

On MIPS this reduces the binary size by 24 KB with no runtime changes.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: update AR934x initvals to latest version
Felix Fietkau [Thu, 28 Jun 2012 00:33:40 +0000 (02:33 +0200)]
ath9k: update AR934x initvals to latest version

Generated using the initvals tool from the qca-swiss-army-knife repository
from https://github.com/mcgrof/qca-swiss-army-knife

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix signedness in a MCI debug message
Mohammed Shafi Shajakhan [Wed, 27 Jun 2012 14:30:27 +0000 (20:00 +0530)]
ath9k: Fix signedness in a MCI debug message

seems i got a message like this
ath: phy0: BT_Status_Update: is_link=0, linkId=2,
state=1, SEQ=-2085766476 initially.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: make use of the wrapper to check for MCI init
Mohammed Shafi Shajakhan [Wed, 27 Jun 2012 14:30:26 +0000 (20:00 +0530)]
ath9k_hw: make use of the wrapper to check for MCI init

ath9k_hw_mci_is_enabled wrapper also takes care of
ATH9K_HW_CAP_MCI being set for the AR9462 under test.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix ANI operation in AP mode
Felix Fietkau [Wed, 27 Jun 2012 12:58:19 +0000 (14:58 +0200)]
ath9k: fix ANI operation in AP mode

ath9k_ani_reset (which is called at reset time) uses a state variable
ani->update_ani to prevent the ANI noise immunity state on the operating
channel from being overwritten by background scans. Unfortunately this
is also being set for AP mode, since it's mixed with code that is only
supposed to change the default settings after a reset.

In AP mode this has the side effect of having ANI run, but being unable to
change its runtime noise immunity level, making it effectively useless.

Fix this by getting rid of ani->update_ani and passing a parameter to
ath9k_hw_set_ofdm_nil and ath9k_hw_set_cck_nil instead.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>