GitHub/exynos8895/android_kernel_samsung_universal8895.git
12 years agonet: Move all of the network sysctls without a namespace into init_net.
Eric W. Biederman [Thu, 19 Apr 2012 13:24:33 +0000 (13:24 +0000)]
net: Move all of the network sysctls without a namespace into init_net.

This makes it clearer which sysctls are relative to your current network
namespace.

This makes it a little less error prone by not exposing sysctls for the
initial network namespace in other namespaces.

This is the same way we handle all of our other network interfaces to
userspace and I can't honestly remember why we didn't do this for
sysctls right from the start.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Kill register_sysctl_rotable
Eric W. Biederman [Thu, 19 Apr 2012 13:22:55 +0000 (13:22 +0000)]
net: Kill register_sysctl_rotable

register_sysctl_rotable never caught on as an interesting way to
register sysctls.  My take on the situation is that what we want are
sysctls that we can only see in the initial network namespace.  What we
have implemented with register_sysctl_rotable are sysctls that we can
see in all of the network namespaces and can only change in the initial
network namespace.

That is a very silly way to go.  Just register the network sysctls
in the initial network namespace and we don't have any weird special
cases to deal with.

The sysctls affected are:
/proc/sys/net/ipv4/ipfrag_secret_interval
/proc/sys/net/ipv4/ipfrag_max_dist
/proc/sys/net/ipv6/ip6frag_secret_interval
/proc/sys/net/ipv6/mld_max_msf

I really don't expect anyone will miss them if they can't read them in a
child user namespace.

CC: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet sysctl: Initialize the network sysctls sooner to avoid problems.
Eric W. Biederman [Thu, 19 Apr 2012 13:20:32 +0000 (13:20 +0000)]
net sysctl: Initialize the network sysctls sooner to avoid problems.

If the netfilter code is modified to use register_net_sysctl_table the
kernel fails to boot because the per net sysctl infrasturce is not setup
soon enough.  So to avoid races call net_sysctl_init from sock_init().

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet sysctl: Register an empty /proc/sys/net
Eric W. Biederman [Thu, 19 Apr 2012 13:19:46 +0000 (13:19 +0000)]
net sysctl: Register an empty /proc/sys/net

Implementation limitations of the sysctl core won't let /proc/sys/net
reside in a network namespace.  /proc/sys/net at least must be registered
as a normal sysctl.  So register /proc/sys/net early as an empty directory
to guarantee we don't violate this constraint and hit bugs in the sysctl
implementation.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Implement register_net_sysctl.
Eric W. Biederman [Thu, 19 Apr 2012 13:18:47 +0000 (13:18 +0000)]
net: Implement register_net_sysctl.

Right now all of the networking sysctl registrations are running in a
compatibiity mode.  The natvie sysctl registration api takes a cstring
for a path and a simple ctl_table.  Implement register_net_sysctl so
that we can register network sysctls without needing to use
compatiblity code in the sysctl core.

Switching from a ctl_path to a cstring results in less boiler plate
and denser code that is a little easier to read.

I would simply have changed the arguments to register_net_sysctl_table
instead of keeping two functions in parallel but gcc will allow a
ctl_path pointer to be passed to a char * pointer with only issuing a
warning resulting in completely incorrect code can be built.  Since I
have to change the function name I am taking advantage of the situation
to let both register_net_sysctl and register_net_sysctl_table live for a
short time in parallel which makes clean conversion patches a bit easier
to read and write.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'tipc_net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg...
David S. Miller [Sat, 21 Apr 2012 00:40:31 +0000 (20:40 -0400)]
Merge branch 'tipc_net-next' of git://git./linux/kernel/git/paulg/linux

12 years agoatl1c: remove MDIO_REG_ADDR_MASK in atl1c_mdio_read/write
Huang, Xiong [Wed, 18 Apr 2012 22:01:31 +0000 (22:01 +0000)]
atl1c: remove MDIO_REG_ADDR_MASK in atl1c_mdio_read/write

MDIO_REG_ADDR_MASK is already applied in function
atl1c_write_phy_reg and atl1c_read_phy_reg

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: fix WoL(magic) issue for l2cb 1.1
Huang, Xiong [Wed, 18 Apr 2012 22:01:30 +0000 (22:01 +0000)]
atl1c: fix WoL(magic) issue for l2cb 1.1

l2cb 1.1 hardware has a bug for magic wakeup,
the workaround is to add pattern enable.
WoL related registers are refined as well.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: refine atl1c_pcie_patch
Huang, Xiong [Wed, 18 Apr 2012 22:01:29 +0000 (22:01 +0000)]
atl1c: refine atl1c_pcie_patch

bit PCIE_PHYMISC_FORCE_RCV_DET is only for l1c&l2c to fix WoL issue,
other chips set bit5 of REG_MASTER_CTRL --- this way could save more
power than the former, and the bit should be kept all time.
l2cb 1.x has special setting for L0S/L1
l2cb 1.x & l1d 1.x should clear Vendor Message on some platforms,
otherwise it will cause the root complex hang.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: refine/update ASPM configuration
Huang, Xiong [Wed, 18 Apr 2012 22:01:28 +0000 (22:01 +0000)]
atl1c: refine/update ASPM configuration

some platforms(BIOS or OS) may change ASPM configuration in
PCI Express Link Control Register directly and dynamically
regardless the device driver installation.
Checking if ASPM support during the driver init phase by reading
PCI Express Link Contrl Register doesn't make sense.
This refine/update assume L0S/L1 is defalut enabled as hw->ctrl_flags
inited. atl1c_set_aspm will set real configuration based on chip
capability to hardware register.
atl1c_disable_l0s_l1 and register definition of REG_PM_CTRL are
refined as well.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: clear bit MASTER_CTRL_CLK_SEL_DIS in atl1c_pcie_patch
Huang, Xiong [Wed, 18 Apr 2012 22:01:27 +0000 (22:01 +0000)]
atl1c: clear bit MASTER_CTRL_CLK_SEL_DIS in atl1c_pcie_patch

bit MASTER_CTRL_CLK_SEL_DIS could be set before enter suspend
clear it after resume to enable pclk(PCIE clock) switch to
low frequency(25M) in some circumstances to save power.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: refine reg definition of REG_MASTER_CTRL
Huang, Xiong [Wed, 18 Apr 2012 22:01:26 +0000 (22:01 +0000)]
atl1c: refine reg definition of REG_MASTER_CTRL

refine/update register REG_MASTER_CTRL definition according with
hardware spec.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: clear PCIE error status in atl1c_reset_pcie
Huang, Xiong [Wed, 18 Apr 2012 22:01:25 +0000 (22:01 +0000)]
atl1c: clear PCIE error status in atl1c_reset_pcie

clear PCIE error status (error log is write-1-clear).
REG_PCIE_UC_SEVERITY is removed as it's a standard pcie register,
and using kernle API to access it.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: remove dmar_dly_cnt and dmaw_dly_cnt
Huang, Xiong [Wed, 18 Apr 2012 22:01:24 +0000 (22:01 +0000)]
atl1c: remove dmar_dly_cnt and dmaw_dly_cnt

dmar_dly_cnt and dmaw_dly_cnt aren't used by hardware/driver any more.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: update right threshold for TSO
Huang, Xiong [Wed, 18 Apr 2012 22:01:23 +0000 (22:01 +0000)]
atl1c: update right threshold for TSO

atl1c_configure_tx used a wrong value of MAX_TX_OFFLOAD_THRESH(9KB)
for TSO threshold.
the right value should be 7KB
Fast Ethernet controller doesn't support Jumbo frame.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: add module parameter for l1c_wait_until_idle
Huang, Xiong [Wed, 18 Apr 2012 22:01:22 +0000 (22:01 +0000)]
atl1c: add module parameter for l1c_wait_until_idle

l1c_wait_until_idle is called for serval modules (TXQ/RXQ/TXMAC/RXMAC).
specific moudle have specific idle/busy status in reg REG_IDLE_STATUS.
the previous code return wrongly if all modules are in idle status,
regardless the 'stop' action is applied on individual module.
Refine the reg REG_IDLE_STATUS definition as well.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: threshold for ASPM is changed based on chip capability
Huang, Xiong [Wed, 18 Apr 2012 22:01:21 +0000 (22:01 +0000)]
atl1c: threshold for ASPM is changed based on chip capability

threshold setting to control ASPM for diff chips are different.
currently, all gigabit-capability chips have limited-ASPM under
100M throughput.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: do not fail when probe and there is no csr clk defined
Giuseppe CAVALLARO [Wed, 18 Apr 2012 19:48:22 +0000 (19:48 +0000)]
stmmac: do not fail when probe and there is no csr clk defined

On some platforms, for example where we are doing the bring-up,
the csr clock is not passed from the framework and the Ethernet
device driver is failing when it can work w/o any issues and
using the default values. So this patch just warnings the case
of the csr clock cannot be acquired but w/o failing the probe
step. I have just tested it on ST STiH415 SoC (ARM).

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: verify the dma_cfg platform fields
Giuseppe CAVALLARO [Wed, 18 Apr 2012 19:48:21 +0000 (19:48 +0000)]
stmmac: verify the dma_cfg platform fields

Recently the dma parameters that can be passed from the platform
have been moved from the plat_stmmacenet_data to the stmmac_dma_cfg.

In case of this new structure is not well allocated the driver can
fails. This is an example how this field is managed in ST platforms

static struct stmmac_dma_cfg gmac_dma_setting = {
        .pbl = 32,
};

static struct plat_stmmacenet_data stih415_ethernet_platform_data[] = {
{
.dma_cfg = &gmac_dma_setting,
.has_gmac = 1,
[snip]

This patch so verifies that the dma_cfg passed from the platform.
In case of it is NULL there is no reason that the driver has to fail
and some default values can be passed. These are ok for all the
Synopsys chips and could impact on performances, only.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
cc: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: Move the mdio_register/_unregister in probe/remove
Francesco Virlinzi [Wed, 18 Apr 2012 19:48:20 +0000 (19:48 +0000)]
stmmac: Move the mdio_register/_unregister in probe/remove

This patch moves the mdio_register/_unregister in probe/remove
functions and this also is required when hibernation on disk
is done.

Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st,com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st,com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: use custom init/exit functions in pm ops
Francesco Virlinzi [Wed, 18 Apr 2012 19:48:19 +0000 (19:48 +0000)]
stmmac: use custom init/exit functions in pm ops

Freeze and restore can call the custom init/exit functions.
Also the patch adds a custom data field that can be used
for storing platform data useful on restore the embedded
setup (e.g. GPIO, SYSCFG).

Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoiwlwifi: Remove inconsistent and redundant declaration
David Spinadel [Thu, 19 Apr 2012 20:46:38 +0000 (13:46 -0700)]
iwlwifi: Remove inconsistent and redundant declaration

Remove declaration of iwl_alloc_traffic_mem from iwl-agn.h,
from methods that was exposed to support MVM.

MVM doesn't have to use this declaration.

CC: netdev@vger.kernel.org
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotipc: Ensure network address change doesn't impact configuration service
Allan Stephens [Wed, 18 Apr 2012 13:42:56 +0000 (09:42 -0400)]
tipc: Ensure network address change doesn't impact configuration service

Enhances command validation done by TIPC's configuration service so
that it works properly even if the node's network address is changed in
mid-operation. The default node address of <0.0.0> is now recognized as an
alias for "this node" even after a new network address has been assigned.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: Ensure network address change doesn't impact rejected message
Allan Stephens [Wed, 18 Apr 2012 13:42:29 +0000 (09:42 -0400)]
tipc: Ensure network address change doesn't impact rejected message

Revises handling of a rejected message to ensure that a locally
originated message is returned properly even if the node's network
address is changed in mid-operation. The routine now treats the
default node address of <0.0.0> as an alias for "this node" when
determining where to send a returned message.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: handle <0.0.0> as an alias for this node on outgoing msgs
Allan Stephens [Wed, 18 Apr 2012 13:27:22 +0000 (09:27 -0400)]
tipc: handle <0.0.0> as an alias for this node on outgoing msgs

Revises handling of send routines for payload messages to ensure that
they are processed properly even if the node's network address is
changed in mid-operation. The routines now treat the default node
address of <0.0.0> as an alias for "this node" when determining where
to send an outgoing message.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: properly handle off-node send requests with invalid addr
Allan Stephens [Wed, 18 Apr 2012 13:22:56 +0000 (09:22 -0400)]
tipc: properly handle off-node send requests with invalid addr

There are two send routines that might conceivably be asked by an
application to send a message off-node when the node is still using
the default network address.  These now have an added check that
detects this and rejects the message gracefully.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: take lock while updating node network address
Allan Stephens [Wed, 18 Apr 2012 13:12:09 +0000 (09:12 -0400)]
tipc: take lock while updating node network address

The routine that changes the node's network address now takes TIPC's
network lock in write mode while the main address variable and associated
data structures are being changed; this is needed to ensure that the
link subsystem won't attempt to send a message off-node until the sending
port's message header template has been updated with the node's new
network address.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: Ensure network address change doesn't impact local connections
Allan Stephens [Tue, 17 Apr 2012 22:42:28 +0000 (18:42 -0400)]
tipc: Ensure network address change doesn't impact local connections

Revises routines that deal with connections between two ports on
the same node to ensure the connection is not impacted if the node's
network address is changed in mid-operation. The routines now treat
the default node address of <0.0.0> as an alias for "this node" in
the following situations:

1) Incoming messages destined to a connected port now handle the alias
properly when validating that the message was sent by the expected
peer port, ensuring that the message will be accepted regardless of
whether it specifies the node's old network address or it's current one.

2) The code which completes connection establishment now handles the
alias properly when determining if the peer port is on the same node
as the connected port.

An added benefit of addressing issue 1) is that some peer port
validation code has been relocated to TIPC's socket subsystem, which
means that validation is no longer done twice when a message is
sent to a non-socket port (such as TIPC's configuration service or
network topology service).

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: delete duplicate peerport/peernode helper functions
Allan Stephens [Tue, 17 Apr 2012 22:36:42 +0000 (18:36 -0400)]
tipc: delete duplicate peerport/peernode helper functions

Prior to commit 23dd4cce387124ec3ea06ca30d17854ae4d9b772

    "tipc: Combine port structure with tipc_port structure"

there was a need for the two sets of helper functions.  But
now they are just duplicates.  Remove the globally visible
ones, and mark the remaining ones as inline.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: Ensure network address change doesn't impact new port
Allan Stephens [Tue, 17 Apr 2012 22:22:49 +0000 (18:22 -0400)]
tipc: Ensure network address change doesn't impact new port

Re-orders port creation logic so that the initialization of a new
port's message header template occurs while the port list lock is
held. This ensures that a change to the node's network address that
occurs at the same time as the port is being created does not result
in the template identifying the sender using the former network
address. The new approach guarantees that the new port's template is
using the current network address or that it will be updated when
the address changes.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: Optimize re-initialization of port message header templates
Allan Stephens [Tue, 17 Apr 2012 22:17:35 +0000 (18:17 -0400)]
tipc: Optimize re-initialization of port message header templates

Removes an unnecessary check in the logic that updates the message
header template for existing ports when a node's network address is
first assigned. There is no longer any need to check to see if the
node's network address has actually changed since the calling routine
has already verified that this is so.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: Ensure network address change doesn't impact name table updates
Allan Stephens [Tue, 17 Apr 2012 22:16:34 +0000 (18:16 -0400)]
tipc: Ensure network address change doesn't impact name table updates

Revises routines that add and remove an entry from a node's name table
so that the publication scope lists are updated properly even if the
node's network address is changed in mid-operation. The routines now
recognize the default node address of <0.0.0> as an alias for "this node"
even after a new network address has been assigned.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: Add routines for safe checking of node's network address
Allan Stephens [Tue, 17 Apr 2012 22:02:01 +0000 (18:02 -0400)]
tipc: Add routines for safe checking of node's network address

Introduces routines that test whether a given network address is
equal to a node's own network address or if it lies within the node's
own network cluster, and which work properly regardless of whether
the node is using the default network address <0.0.0> or a non-zero
network address that is assigned later on. In essence, these routines
ensure that address <0.0.0> is treated as an alias for "this node",
regardless of which network address the node is actually using.

Old users of the pre-existing more strict match in_own_cluster()
have been accordingly redirected to what is now called
in_own_cluster_exact() --- which does not extend matching to <0,0,0>.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: Don't record failed publication attempt as a success
Allan Stephens [Wed, 9 Nov 2011 19:22:52 +0000 (14:22 -0500)]
tipc: Don't record failed publication attempt as a success

No longer increments counter of number of publications by a node
if an attempt to add a new publication fails. This prevents TIPC from
incorrectly blocking future publications because the configured maximum
number of publications has been reached.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: Update node-scope publications when network address is assigned
Allan Stephens [Tue, 17 Apr 2012 21:57:52 +0000 (17:57 -0400)]
tipc: Update node-scope publications when network address is assigned

Ensures that node-scope name publications that exist prior to the
configuration of a node's network address are properly re-initialized
with that address when it is assigned. TIPC's node-scope publications
are now tracked using a publications list like the lists used for
cluster-scope and zone-scope publications so they can be easily updated
when required.

The inclusion of node scope name publications in a conventional publication
list means that they must now also be withdrawn, just like cluster and zone
scope publications are currently withdrawn.  So some conditional tests on
scope ==/!= TIPC_NODE_SCOPE are inserted/removed accordingly.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: Separate cluster-scope and zone-scope names into distinct lists
Allan Stephens [Tue, 17 Apr 2012 21:57:52 +0000 (17:57 -0400)]
tipc: Separate cluster-scope and zone-scope names into distinct lists

Utilizes distinct lists to track zone-scope and cluster-scope names
published by a node. For now, TIPC continues to process the entries
in both lists in the same way; however, an upcoming patch will utilize
the existence of the lists to prevent the sending of cluster-scope names
to nodes that are not part of the local cluster.

To achieve this, an array of publication lists is introduced, so
that they can be iterated over and accessed via publ->scope as
an index where convenient.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agobonding: start slaves with link down for ARP monitor
Michal Kubeček [Tue, 17 Apr 2012 02:02:06 +0000 (02:02 +0000)]
bonding: start slaves with link down for ARP monitor

Initialize slave device link state as down if ARP monitor is
active and net_carrier_ok() returns zero. Also shift initial
value of its last_arp_tx so that it doesn't immediately cause
fake detection of "up" state.

When ARP monitoring is used, initializing the slave device with
up link state can cause ARP monitor to detect link failure
before the device is really up (with igb driver, this can take
more than two seconds).

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonf_bridge: remove holes in struct nf_bridge_info
Eric Dumazet [Wed, 18 Apr 2012 23:19:25 +0000 (23:19 +0000)]
nf_bridge: remove holes in struct nf_bridge_info

Put use & mask on same location to avoid two holes on 64bit arches

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: dont drop packet in defrag but consume it
Eric Dumazet [Thu, 19 Apr 2012 06:10:26 +0000 (06:10 +0000)]
ipv4: dont drop packet in defrag but consume it

When defragmentation is finalized, we clone a packet and kfree_skb() it.

Call consume_skb() to not confuse dropwatch, since its not a drop.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: gro: GRO_MERGED_FREE consumes packets
Eric Dumazet [Thu, 19 Apr 2012 07:07:40 +0000 (07:07 +0000)]
net: gro: GRO_MERGED_FREE consumes packets

As part of GRO processing, merged skbs should be consumed, not freed, to
not confuse dropwatch/drop_monitor.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: dont drop packet but consume it
Eric Dumazet [Thu, 19 Apr 2012 02:24:53 +0000 (02:24 +0000)]
net: dont drop packet but consume it

When we need to clone skb, we dont drop a packet.
Call consume_skb() to not confuse dropwatch.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: dccp: dont drop packet but consume it
Eric Dumazet [Thu, 19 Apr 2012 02:24:48 +0000 (02:24 +0000)]
ipv6: dccp: dont drop packet but consume it

When we need to clone skb, we dont drop a packet.
Call consume_skb() to not confuse dropwatch.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agopacket: dont drop packet but consume it
Eric Dumazet [Thu, 19 Apr 2012 02:24:42 +0000 (02:24 +0000)]
packet: dont drop packet but consume it

When we need to clone skb, we dont drop a packet.
Call consume_skb() to not confuse dropwatch.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: tcp: dont drop packet but consume it
Eric Dumazet [Thu, 19 Apr 2012 02:24:36 +0000 (02:24 +0000)]
ipv6: tcp: dont drop packet but consume it

When we need to clone skb, we dont drop a packet.
Call consume_skb() to not confuse dropwatch.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetlink: dont drop packet but consume it
Eric Dumazet [Thu, 19 Apr 2012 02:24:28 +0000 (02:24 +0000)]
netlink: dont drop packet but consume it

When we need to clone skb, we dont drop a packet.
Call consume_skb() to not confuse dropwatch.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoip6_tunnel: dont drop packet but consume it
Eric Dumazet [Thu, 19 Apr 2012 02:24:17 +0000 (02:24 +0000)]
ip6_tunnel: dont drop packet but consume it

When we need to reallocate skb, we dont drop a packet.
Call consume_skb() to not confuse dropwatch.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: fix compile error of leaking kmemleak.h header
Shan Wei [Wed, 18 Apr 2012 18:05:46 +0000 (18:05 +0000)]
net: fix compile error of leaking kmemleak.h header

net/core/sysctl_net_core.c: In function ‘sysctl_core_init’:
net/core/sysctl_net_core.c:259: error: implicit declaration of function ‘kmemleak_not_leak’

with same error in net/ipv4/route.c

Signed-off-by: Shan Wei <davidshan@tencent.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: restore max-read-request-size in Device Conrol Register
Huang, Xiong [Tue, 17 Apr 2012 19:32:36 +0000 (19:32 +0000)]
atl1c: restore max-read-request-size in Device Conrol Register

in some platforms, we found the max-read-request-size in Device Control
Register is set to 0 by (BIOS?) during bootup, this will cause the
performance(throughput) very bad.
Restore it to a min-value.
register definition of REG_DEVICE_CTRL is removed, using kernel API to
access it as it's a standard pcie register.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: using fixed TXQ configuration for l2cb and l1c
Huang, Xiong [Tue, 17 Apr 2012 19:32:35 +0000 (19:32 +0000)]
atl1c: using fixed TXQ configuration for l2cb and l1c

using fixed TXQ config for l2cb and l1c regardless dmar_block
to make tx-DMA more stable.
register REG_TXQ_CTRL is refined as well.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: remove dmaw_block
Huang, Xiong [Tue, 17 Apr 2012 19:32:34 +0000 (19:32 +0000)]
atl1c: remove dmaw_block

dmaw_block is never used in the driver, remove it.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: correct wrong definition of REG_DMA_CTRL
Huang, Xiong [Tue, 17 Apr 2012 19:32:33 +0000 (19:32 +0000)]
atl1c: correct wrong definition of REG_DMA_CTRL

some fields of REG_DMA_CTRL(15C0) are wrong, replace with the newest one.
haredware uses fixed dma-write-block size, remove dmaw_block related code
in function atl1c_configure_dma.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: wrong register used to stop TXQ
Huang, Xiong [Tue, 17 Apr 2012 19:32:32 +0000 (19:32 +0000)]
atl1c: wrong register used to stop TXQ

function atl1c_stop_mac uses wrong register of REG_TWSI_CTRL
to stop mac, replace it with REG_TXQ_CTRL.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: remove code related to rxq 1/2/3
Huang, Xiong [Tue, 17 Apr 2012 19:32:31 +0000 (19:32 +0000)]
atl1c: remove code related to rxq 1/2/3

remove code related to rxq 1/2/3 since multi-q not support.
refine REG_RXQ_CTRL definition as well.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: split 2 32bit registers of TPD to 4 16bit registers
Huang, Xiong [Tue, 17 Apr 2012 19:32:30 +0000 (19:32 +0000)]
atl1c: split 2 32bit registers of TPD to 4 16bit registers

TPD producer/consumer index is 16bit wide.
16bit read/write reduce the dependency of the 2 tpd rings (hi and lo)
rename reg(157C/1580) to keep name coninsistency.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: remove SMB/CMB DMA related code
Huang, Xiong [Tue, 17 Apr 2012 19:32:29 +0000 (19:32 +0000)]
atl1c: remove SMB/CMB DMA related code

l1c & later chips don't support DMA for SMB.
CMB is removed from hardware.
reg(15C8) is used to trig interrupt by tpd threshold.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: remove VPD register
Huang, Xiong [Tue, 17 Apr 2012 19:32:28 +0000 (19:32 +0000)]
atl1c: remove VPD register

VPD register is only used for L1(devid=PCI_DEVICE_ID_ATTANSIC_L1) to
access external NV-memory.
l1c & later chip doesn't use it any more.
PHY 0/1 registers occupy the last 2 slots of the dump table.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: remove HDS register
Huang, Xiong [Tue, 17 Apr 2012 19:32:27 +0000 (19:32 +0000)]
atl1c: remove HDS register

remove HDS register as it doesn't exist in hardware.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: remove multiple-RX-Q code
Huang, Xiong [Tue, 17 Apr 2012 19:32:26 +0000 (19:32 +0000)]
atl1c: remove multiple-RX-Q code

the multiple-RX-Q in hardware doesn't work,
all related register definition & code are removed.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatl1c: update author contact info & company/driver desciption
Huang, Xiong [Tue, 17 Apr 2012 19:32:25 +0000 (19:32 +0000)]
atl1c: update author contact info & company/driver desciption

replace unavailable email of the author since he left with a mail-list.
update company info as well, Atheros was acquired by Qualcomm.
insert "100" to driver description since it support 100M controller.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.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 [Wed, 18 Apr 2012 18:17:13 +0000 (14:17 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into for-davem

Conflicts:
drivers/net/wireless/iwlwifi/iwl-testmode.c
include/net/nfc/nfc.h
net/nfc/netlink.c
net/wireless/nl80211.c

12 years agoMerge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
David S. Miller [Wed, 18 Apr 2012 17:21:59 +0000 (13:21 -0400)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge

Included changes:
* remove duplicated line in comment
* add htons() invocation for tt_crc as suggested by Al Viro
* OriGinator Message seqno initial value is now random
* some cleanups and fixes

12 years agotipc: Factor out name publication code to a separate function
Allan Stephens [Tue, 17 Apr 2012 21:57:52 +0000 (17:57 -0400)]
tipc: Factor out name publication code to a separate function

This is done so that it can be reused with differing publication
lists, instead of being hard coded to the cluster publicaton list.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agotipc: introduce publication lists struct
Allan Stephens [Tue, 17 Apr 2012 21:57:52 +0000 (17:57 -0400)]
tipc: introduce publication lists struct

There is currently a single list that is containing both cluster-scope and
zone-scope publications, and the list count is a separate free floating
variable.  Create a struct to bind the count to the list, and to pave
the way for factoring out the publications into zone/cluster/node scope.

The current "publ_root" most matches what will be the cluster scope
list, so it is named accordingly in this commit.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agobatman-adv: skip the window protection test when the originator has no neighbours
Antonio Quartulli [Sun, 26 Feb 2012 14:39:42 +0000 (15:39 +0100)]
batman-adv: skip the window protection test when the originator has no neighbours

When we receive an OGM from from a node for the first time, the last_real_seqno
field of the orig_node structure has not been initialised yet. The value of this
field is used to compute the current ogm-seqno window and therefore the
protection mechanism will probably drop the packet due to an out-of-window error.
To avoid this situation this patch adds a check to skip the window protection
mechanism if no neighbour nodes have already been added. When the first
neighbour node is added, the last_real_seqno field is initialised too.

Reported-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: print OGM seq numbers as unsigned int
Antonio Quartulli [Sun, 26 Feb 2012 14:39:41 +0000 (15:39 +0100)]
batman-adv: print OGM seq numbers as unsigned int

OGM sequence numbers are declared as uint32_t and so they have to printed
using %u instead of %d in order to avoid wrong representations.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: use ETH_HLEN instead of sizeof(struct ethhdr)
Antonio Quartulli [Sat, 18 Feb 2012 10:27:34 +0000 (11:27 +0100)]
batman-adv: use ETH_HLEN instead of sizeof(struct ethhdr)

Instead of using sizeof(struct ethhdr) it is strongly recommended to use the
kernel macro ETH_HLEN. This patch substitute each occurrence of the former
expressione with the latter one.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: mark existing ogm variables as batman iv
Marek Lindner [Tue, 7 Feb 2012 09:20:51 +0000 (17:20 +0800)]
batman-adv: mark existing ogm variables as batman iv

The coming protocol changes also will have a part called "OGM". That
makes it necessary to introduce a distinction in the code base.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: rename BATMAN_OGM_LEN to BATMAN_OGM_HLEN
Marek Lindner [Tue, 7 Feb 2012 09:20:50 +0000 (17:20 +0800)]
batman-adv: rename BATMAN_OGM_LEN to BATMAN_OGM_HLEN

Using BATMAN_OGM_LEN leaves one with the impression that this is
the full packet size which is not the case. Therefore the variable
is renamed.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: refactoring API: find generalized name for bat_ogm_init_primary callback
Marek Lindner [Tue, 7 Feb 2012 09:20:49 +0000 (17:20 +0800)]
batman-adv: refactoring API: find generalized name for bat_ogm_init_primary callback

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: handle routing code initialization properly
Marek Lindner [Tue, 7 Feb 2012 09:20:48 +0000 (17:20 +0800)]
batman-adv: handle routing code initialization properly

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: add iface_disable() callback to routing API
Marek Lindner [Tue, 7 Feb 2012 09:20:47 +0000 (17:20 +0800)]
batman-adv: add iface_disable() callback to routing API

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: randomize initial seqno to avoid collision
Marek Lindner [Tue, 7 Feb 2012 09:20:46 +0000 (17:20 +0800)]
batman-adv: randomize initial seqno to avoid collision

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: refactoring API: find generalized name for bat_ogm_init callback
Marek Lindner [Tue, 7 Feb 2012 09:20:45 +0000 (17:20 +0800)]
batman-adv: refactoring API: find generalized name for bat_ogm_init callback

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: move ogm initialization into the proper function
Marek Lindner [Tue, 7 Feb 2012 09:19:58 +0000 (17:19 +0800)]
batman-adv: move ogm initialization into the proper function

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: remove duplicated line in comment
Antonio Quartulli [Wed, 18 Apr 2012 07:47:57 +0000 (09:47 +0200)]
batman-adv: remove duplicated line in comment

Remove an accidentally added duplicated line in a function comment

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agobatman-adv: convert the tt_crc to network order
Antonio Quartulli [Sat, 14 Apr 2012 11:15:27 +0000 (13:15 +0200)]
batman-adv: convert the tt_crc to network order

Before sending out a TT_Request packet we must convert the tt_crc field value
to network order (since it is 16bits long).

Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
12 years agonet/core:Remove memleak reports by kmemleak_not_leak.
majianpeng [Mon, 16 Apr 2012 19:58:28 +0000 (19:58 +0000)]
net/core:Remove memleak reports by kmemleak_not_leak.

Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/ipv4:Remove two memleak reports by kmemleak_not_leak.
majianpeng [Mon, 16 Apr 2012 19:33:31 +0000 (19:33 +0000)]
net/ipv4:Remove two memleak reports by kmemleak_not_leak.

Signed-off-by: majianpeng <majianpeng@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: filter: remove unused cpu_off in sparc JIT
Eric Dumazet [Tue, 17 Apr 2012 16:51:19 +0000 (16:51 +0000)]
net: filter: remove unused cpu_off in sparc JIT

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodmfe: enforce consistent timing delay.
françois romieu [Tue, 17 Apr 2012 11:11:40 +0000 (11:11 +0000)]
dmfe: enforce consistent timing delay.

The driver does not always use the same timing for what looks like
the same operations.

- DCR0
  Use the same udelay everywhere for reset. Upper bound is 100 us.
- DCR9
  Use 5us delay for srom clock. 1us delay for phy_write_1bit (writes
  PHY_DATA_[01]) are not changed as they stay withing a 2,5MHz MDIO
  clock range.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Reviewed-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: filter: Fix some more small issues in sparc JIT.
David S. Miller [Tue, 17 Apr 2012 20:38:16 +0000 (16:38 -0400)]
net: filter: Fix some more small issues in sparc JIT.

Fix mixed space and tabs.

Put bpf_jit_load_*[] externs into bpf_jit.h

"while(0)" --> "while (0)"
"COND (X)" --> "COND(X)"
Document branch offset calculations, and bpf_error's return
sequence.

Document the reason we need to emit three nops between the
%y register write and the divide instruction.

Remove erroneous trailing semicolons from emit_read_y() and
emit_write_y().

Based upon feedback from Sam Ravnborg.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: filter: Fix some minor issues in sparc JIT.
David S. Miller [Tue, 17 Apr 2012 20:08:29 +0000 (16:08 -0400)]
net: filter: Fix some minor issues in sparc JIT.

Correct conventions comments.  %o4 and %o5 were swapped,
%g3 was not documented.

Use r_TMP instead of r_SKB_DATA + r_OFF where possible in
assembler stubs.

Correct discussion of %o4 and %o5 in one of bpf_jit_compile()'s
comments.

Based upon feedback from Richard Mortimer.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomwifiex: corrections in timestamp related code
Amitkumar Karwar [Tue, 17 Apr 2012 04:36:52 +0000 (21:36 -0700)]
mwifiex: corrections in timestamp related code

We get two timing related fields for each bss from firmware in scan
results.
1) timestamp - Actual timestamp information in probe response/beacon
2) network_tsf - firmware's TSF value at the time the beacon or probe
response was received.
Both are needed while associating by firmware.

The patch takes care of following things.
1) We should pass "timestamp" to cfg80211_inform_bss(), but currently
"network_tsf" is being provided. This error is corrected here.
2) Rename "network_tsf" to "fw_tsf"
3) Make use of u64 variable instead of an array of u8/u32 to save
parsed "timestamp" information.
4) Use timestamp provided to stack in scan results using
cfg80211_inform_bss() while associating. (bss->tsf)
5) Allocate space to save fw_tsf in "priv" of cfg80211_bss
and retrieve it while associating.

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: code cleanup in BSS handling
Amitkumar Karwar [Tue, 17 Apr 2012 04:36:51 +0000 (21:36 -0700)]
mwifiex: code cleanup in BSS handling

Rearrange some code to save extra parameters to the functions.

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 agolibertas USB: convert to asynchronous firmware loading
Daniel Drake [Mon, 16 Apr 2012 22:53:55 +0000 (23:53 +0100)]
libertas USB: convert to asynchronous firmware loading

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas SDIO: convert to asynchronous firmware loading
Daniel Drake [Mon, 16 Apr 2012 22:53:43 +0000 (23:53 +0100)]
libertas SDIO: convert to asynchronous firmware loading

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas: add asynchronous firmware loading capability
Daniel Drake [Mon, 16 Apr 2012 22:53:26 +0000 (23:53 +0100)]
libertas: add asynchronous firmware loading capability

As described at
http://article.gmane.org/gmane.linux.kernel.wireless.general/86084
libertas is taking a long time to load because it loads firmware
during module loading.

Add a new API for interface drivers to load their firmware
asynchronously. The same semantics of the firmware table are followed
like before.

Interface drivers will be converted in follow-up patches, then we can
remove the old, synchronous firmware loading function.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas: harden-up exit paths
Daniel Drake [Mon, 16 Apr 2012 22:53:02 +0000 (23:53 +0100)]
libertas: harden-up exit paths

These simple sanity check avoids extra complexity in error paths when
moving to asynchronous firmware loading (which means the device may fail to
init some time after its creation).

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas: Firmware loading simplifications
Daniel Drake [Mon, 16 Apr 2012 22:52:42 +0000 (23:52 +0100)]
libertas: Firmware loading simplifications

Remove the ability to pass module parameters with firmware filenames
for USB and SDIO interfaces.

Remove the ability to pass custom "user" filenames to lbs_get_firmware().

Remove the ability to reprogram internal device memory with a different
firmware from the USB driver (we don't know of any users), and simplify
the OLPC firmware loading quirk to simply placing the OLPC firmware
at the top of the list (we don't know of any users other than OLPC).

Move lbs_get_firmware() into its own file.

These simplifications should have no real-life effect but make the
upcoming transition to asynchronous firmware loading considerably less
painful.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails
Andreas Hartmann [Mon, 16 Apr 2012 22:25:28 +0000 (00:25 +0200)]
rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails

There are connection stalls or very poor throughputs with rt2800
hardware using 802.11n in AP mode since patch "mac80211: retry sending
failed BAR frames later instead of tearing down aggr"[1][2].

Since rt2800 hardware is not able to correctly report the tx status of
BAR frames, this patch removes as workaround the existing error handling
on AP side, which lets mac80211 send a BAR when an AMPDU subframe fails.

As a result, most wifi clients (aside from Intel STAs on Windows)
instead will timeout now the reorder buffer and request the lost frame
again.

The correct solution would be, to tear down BA session on AP side.

This patch was born on the basis of "[RFT] rt2x00: Tear down BA
session on QoS frame failure"[3].

Thanks to Helmut Schaa for his support!

[1] http://thread.gmane.org/gmane.linux.kernel.wireless.general/83297/focus=83304
[2] http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=commit;h=f0425beda4d404a6e751439b562100b902ba9c98
[3] http://thread.gmane.org/gmane.linux.drivers.rt2x00.user/569

Signed-off-by: Andreas Hartmann <andihartmann@01019freenet.de>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: use ath9k_hw_fbin2freq instead of FBIN2FREQ
Gabor Juhos [Mon, 16 Apr 2012 20:46:32 +0000 (22:46 +0200)]
ath9k: use ath9k_hw_fbin2freq instead of FBIN2FREQ

The FBIN2FREQ macro and the ath9k_hw_fbin2freq function
does the same thing. Remove the macro, and use the inline
function instead.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: move ath9k_hw_fbin2freq function to eeprom.h
Gabor Juhos [Mon, 16 Apr 2012 20:46:31 +0000 (22:46 +0200)]
ath9k: move ath9k_hw_fbin2freq function to eeprom.h

Both eeprom.c and ar9003_eeprom.c has an indentical
'ath9k_hw_fbin2freq' function. Move the function to
a common place and remove the duplicates.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove unused PWRINC_*_TO_*_CHAIN defines
Gabor Juhos [Mon, 16 Apr 2012 20:22:50 +0000 (22:22 +0200)]
ath9k: remove unused PWRINC_*_TO_*_CHAIN defines

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: merge power correction constants
Gabor Juhos [Mon, 16 Apr 2012 20:22:49 +0000 (22:22 +0200)]
ath9k: merge power correction constants

The existing constants are used for reduction/increase
tx power level on devices with 2x2 and 3x3 chainmask.

Both reduction and increase must use the same value, so
it makes no sense to use separate constants for them.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agodrivers/net/wireless/libertas/if_usb.c: add missing debugging code
Julia Lawall [Mon, 16 Apr 2012 15:44:00 +0000 (17:44 +0200)]
drivers/net/wireless/libertas/if_usb.c: add missing debugging code

Add a corresponding leave call on error failure.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agor8169: support the new RTL8411 chip.
Hayes Wang [Fri, 30 Mar 2012 06:48:06 +0000 (14:48 +0800)]
r8169: support the new RTL8411 chip.

Compared with previous chipsets, it needs no special action trough the
jumbo{enable/disable} helpers to operate with jumbo frames.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
12 years agor8169: adjust some functions of 8111f
Hayes Wang [Fri, 30 Mar 2012 06:33:03 +0000 (14:33 +0800)]
r8169: adjust some functions of 8111f

Put some settings of 8111f into one function which may be reused.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
12 years agor8169: support the new RTL8402 chip.
Hayes Wang [Fri, 30 Mar 2012 06:33:02 +0000 (14:33 +0800)]
r8169: support the new RTL8402 chip.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
12 years agor8169: add device specific CSI access helpers.
Hayes Wang [Fri, 30 Mar 2012 06:33:01 +0000 (14:33 +0800)]
r8169: add device specific CSI access helpers.

New chipsets need it.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
12 years agor8169: modify pll power function
Hayes Wang [Fri, 30 Mar 2012 06:33:00 +0000 (14:33 +0800)]
r8169: modify pll power function

Adjust r810x_pll_power_down, r810x_pll_power_up, and r8168_pll_power_up.
Always power up device during rtl_open. For r810x, turn off more power
when the WOL is disabled.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>