firefly-linux-kernel-4.4.55.git
12 years agoaf_iucv: support ancillary data with HS transport
Ursula Braun [Mon, 19 Dec 2011 22:56:27 +0000 (22:56 +0000)]
af_iucv: support ancillary data with HS transport

The AF_IUCV address family offers support for ancillary data.
This patch enables usage of ancillary data with the new
HiperSockets transport.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomacvtap: Fix macvtap_get_queue to use rxhash first
Krishna Kumar [Wed, 23 Nov 2011 22:17:14 +0000 (22:17 +0000)]
macvtap: Fix macvtap_get_queue to use rxhash first

It was reported that the macvtap device selects a
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_en: FIX: Setting default_qpn before using it
Yevgeny Petrilin [Mon, 19 Dec 2011 21:53:38 +0000 (21:53 +0000)]
mlx4_en: FIX: Setting default_qpn before using it

When UDP RSS is enabled, we use same QPN for TCP and UDP ranges
The bug is that the default_qpn was used base UDP qpn before it
was set.
Fixes bug introduced in commit: 1202d460b1df3a77fda66f4ba5f90ae3527dd42f

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: unix -- Add missing module.h inclusion
Cyrill Gorcunov [Tue, 20 Dec 2011 04:33:03 +0000 (04:33 +0000)]
net: unix -- Add missing module.h inclusion

Otherwise getting

 | net/unix/diag.c:312:16: error: expected declaration specifiers or ‘...’ before string constant
 | net/unix/diag.c:313:1: error: expected declaration specifiers or ‘...’ before string constant

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomodule_param: make bool parameters really bool (net & drivers/net)
Rusty Russell [Mon, 19 Dec 2011 14:08:01 +0000 (14:08 +0000)]
module_param: make bool parameters really bool (net & drivers/net)

module_param(bool) used to counter-intuitively take an int.  In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option.  For this version
it'll simply give a warning, but it'll break next kernel version.

(Thanks to Joe Perches for suggesting coccinelle for 0/1 -> true/false).

Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: fix assignment of 0/1 to bool variables.
Rusty Russell [Mon, 19 Dec 2011 13:56:45 +0000 (13:56 +0000)]
net: fix assignment of 0/1 to bool variables.

DaveM said:
   Please, this kind of stuff rots forever and not using bool properly
   drives me crazy.

Joe Perches <joe@perches.com> gave me the spatch script:

@@
bool b;
@@
-b = 0
+b = false
@@
bool b;
@@
-b = 1
+b = true

I merely installed coccinelle, read the documentation and took credit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agophy: Micrel KS8995MA 5-ports 10/100 managed Ethernet switch support added
Frederic LAMBERT [Sun, 18 Dec 2011 07:33:41 +0000 (07:33 +0000)]
phy: Micrel KS8995MA 5-ports 10/100 managed Ethernet switch support added

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Frederic Lambert <frdrc66@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agode4x5/PCI: use list_for_each_entry() for bus->devices traversal
Bjorn Helgaas [Fri, 16 Dec 2011 12:31:54 +0000 (12:31 +0000)]
de4x5/PCI: use list_for_each_entry() for bus->devices traversal

Replace open-coded list traversal with list_for_each_entry().

CC: Grant Grundler <grundler@parisc-linux.org>
CC: netdev@vger.kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosunhme/PCI: use list_for_each_entry() for bus->devices traversal
Bjorn Helgaas [Fri, 16 Dec 2011 12:31:49 +0000 (12:31 +0000)]
sunhme/PCI: use list_for_each_entry() for bus->devices traversal

Replace open-coded list traversal with list_for_each_entry().

CC: David S. Miller <davem@davemloft.net>
CC: netdev@vger.kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqla3xxx: Adding Maintainer.
Jitendra Kalsaria [Fri, 16 Dec 2011 11:41:37 +0000 (11:41 +0000)]
qla3xxx: Adding Maintainer.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: two vzalloc() cleanups
Eric Dumazet [Mon, 19 Dec 2011 21:01:38 +0000 (16:01 -0500)]
net: two vzalloc() cleanups

We can use vzalloc() helper now instead of __vmalloc() trick

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Make the RSS indir tbl admin configurable
Matt Carlson [Fri, 16 Dec 2011 13:33:23 +0000 (13:33 +0000)]
tg3: Make the RSS indir tbl admin configurable

This patch adds the ethtool callbacks necessary to change the rss
indirection table from userspace.  Should the number of interrupts
change (e.g.  across a close / open call, or through a reset) and
any one of the indirection table values fall out-of-range, the driver
will reset the indirection table to a default layout.

[Integrated many suggestions made by Ben Hutchings.]

Changes since v3

* Removed TG3_FLAG_SUPPORT_MSIX checks at the start of
  tg3_get_rxfh_indir() and tg3_set_rxfh_indir().

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2: Update driver to use new mips firmware.
Michael Chan [Sun, 18 Dec 2011 18:15:09 +0000 (18:15 +0000)]
bnx2: Update driver to use new mips firmware.

bnx2-mips-06-6.2.3 and bnx2-mips-09-6.2.1.b

New firmware fixes iSCSI problems with some LeftHand targets that don't
set TTT=0xffffffff for Data-In according to spec.  Firmware generates
exception warnings for this condition and becomes very slow.  This is
fixed by suppressing these warnings when using default error mask.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix INTx processing for Lancer
Padmanabh Ratnakar [Mon, 19 Dec 2011 01:53:35 +0000 (01:53 +0000)]
be2net: Fix INTx processing for Lancer

Lancer does not have HW registers to indicate the EQ causing the INTx
interrupt. As a result EQE entries of one EQ may be consumed when interrupt
is caused by another EQ. Fix this by arming CQs at the end of NAPI poll
routine to regenerate the EQEs.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomyri10ge: Fix typo of 'VMware' in comment.
Vinson Lee [Mon, 19 Dec 2011 10:17:55 +0000 (10:17 +0000)]
myri10ge: Fix typo of 'VMware' in comment.

Signed-off-by: Vinson Lee <vlee@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoRevert "net: Remove unused neighbour layer ops."
David S. Miller [Mon, 19 Dec 2011 20:04:41 +0000 (15:04 -0500)]
Revert "net: Remove unused neighbour layer ops."

This reverts commit 5c3ddec73d01a1fae9409c197078cb02c42238c3.

S390 qeth driver actually still uses the setup ops.

Reported-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4: Fixing wrong error codes in communication channel
Yevgeny Petrilin [Mon, 19 Dec 2011 04:03:53 +0000 (04:03 +0000)]
mlx4: Fixing wrong error codes in communication channel

The communication channel is HW interface from PF point of view
So the command return status should be stored as HW error code
and only then translated to errno values.

Reporetd-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4: not using spin_lock_irq when getting vf by resource.
Yevgeny Petrilin [Mon, 19 Dec 2011 04:03:05 +0000 (04:03 +0000)]
mlx4: not using spin_lock_irq when getting vf by resource.

The function is always called from irq context, changing the call
to spin_lock().

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_en: nullify cached multicast address list after cleanup
Alexander Guller [Mon, 19 Dec 2011 04:02:58 +0000 (04:02 +0000)]
mlx4_en: nullify cached multicast address list after cleanup

Solves an issue where we tried to free the same page twice after
the port has been opened and closed.

Signed-off-by: Alexander Guller <alexg@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_core: Changing link sensing logic
Yevgeny Petrilin [Mon, 19 Dec 2011 04:00:34 +0000 (04:00 +0000)]
mlx4_core: Changing link sensing logic

New FW can give clues to driver regarding default port type
and whether or not we should default to link sensing on the port.

2 bits are added to QUERY_PORT command:
1. suggested_type: This bit gives a hint whether the default port type should be
   IB or Ethernet.
   The driver will use this hint in case the user didn't specify explicitly the link layer
   type he wants to set.
2. default_sense: If this bit is set, we would sense the port type on start-up
   and default the port to link sensing

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4: capability for link sensing
Yevgeny Petrilin [Mon, 19 Dec 2011 04:00:26 +0000 (04:00 +0000)]
mlx4: capability for link sensing

For ConnectX3 devices, we allow link sensing only if FW explicitly
reported it supports the feature.
For older versions (ConnectX1 and 2), if the card supports both link layer types
(Ethenet and Infiniband), link sensing is supported.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
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 [Mon, 19 Dec 2011 18:54:26 +0000 (13:54 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into for-davem

12 years agowimax/i2400m: remove an unused variable
Dan Carpenter [Fri, 16 Dec 2011 00:22:42 +0000 (00:22 +0000)]
wimax/i2400m: remove an unused variable

"result" isn't used.  We ignore errors here because there is not much we
can do about them.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet:bridge: use IS_ENABLED
Igor Maravić [Mon, 12 Dec 2011 02:58:25 +0000 (02:58 +0000)]
net:bridge: use IS_ENABLED

Use IS_ENABLED(CONFIG_FOO)
instead of defined(CONFIG_FOO) || defined (CONFIG_FOO_MODULE)

Signed-off-by: Igor Maravić <igorm@etf.rs>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet:netfilter: use IS_ENABLED
Igor Maravić [Mon, 12 Dec 2011 02:58:24 +0000 (02:58 +0000)]
net:netfilter: use IS_ENABLED

Use IS_ENABLED(CONFIG_FOO)
instead of defined(CONFIG_FOO) || defined (CONFIG_FOO_MODULE)

Signed-off-by: Igor Maravić <igorm@etf.rs>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet:x25: use IS_ENABLED
Igor Maravić [Mon, 12 Dec 2011 02:58:23 +0000 (02:58 +0000)]
net:x25: use IS_ENABLED

Use IS_ENABLED(CONFIG_FOO)
instead of defined(CONFIG_FOO) || defined (CONFIG_FOO_MODULE)

Signed-off-by: Igor Maravić <igorm@etf.rs>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet:core: use IS_ENABLED
Igor Maravić [Mon, 12 Dec 2011 02:58:22 +0000 (02:58 +0000)]
net:core: use IS_ENABLED

Use IS_ENABLED(CONFIG_FOO)
instead of defined(CONFIG_FOO) || defined (CONFIG_FOO_MODULE)

Signed-off-by: Igor Maravić <igorm@etf.rs>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Add support for Skyhawk cards
Ajit Khaparde [Thu, 15 Dec 2011 06:31:38 +0000 (06:31 +0000)]
be2net: Add support for Skyhawk cards

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosch_gred: prefer GFP_KERNEL allocations
Eric Dumazet [Thu, 15 Dec 2011 22:09:45 +0000 (22:09 +0000)]
sch_gred: prefer GFP_KERNEL allocations

In control path, its better to use GFP_KERNEL allocations where
possible.

Before taking qdisc spinlock, we preallocate memory just in case we'll
need it in gred_change_vq()

This is a followup to commit 3f1e6d3fd37b (sch_gred: should not use
GFP_KERNEL while holding a spinlock)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: fix compilation with !CONFIG_NET
Glauber Costa [Fri, 16 Dec 2011 00:52:00 +0000 (00:52 +0000)]
net: fix compilation with !CONFIG_NET

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Glauber Costa <glommer@parallels.com>
CC: Hiroyouki Kamezawa <kamezawa.hiroyu@jp.fujitsu.com>
CC: David S. Miller <davem@davemloft.net>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: fix sleeping while atomic problem in sock mem_cgroup.
Glauber Costa [Fri, 16 Dec 2011 00:51:59 +0000 (00:51 +0000)]
net: fix sleeping while atomic problem in sock mem_cgroup.

We can't scan the proto_list to initialize sock cgroups, as it
holds a rwlock, and we also want to keep the code generic enough to
avoid calling the initialization functions of protocols directly,

Convert proto_list_lock into a mutex, so we can sleep and do the
necessary allocations. This lock is seldom taken, so there shouldn't
be any performance penalties associated with that

Signed-off-by: Glauber Costa <glommer@parallels.com>
CC: Hiroyouki Kamezawa <kamezawa.hiroyu@jp.fujitsu.com>
CC: David S. Miller <davem@davemloft.net>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
CC: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4: Fix compile error when driver is comiled-in
Joerg Roedel [Thu, 15 Dec 2011 06:48:37 +0000 (06:48 +0000)]
mlx4: Fix compile error when driver is comiled-in

This patch fixes a compile error that occurs when the driver
is compile into the kernel and not as a module.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
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/bwh/sfc...
David S. Miller [Fri, 16 Dec 2011 20:23:22 +0000 (15:23 -0500)]
Merge branch 'for-davem' of git://git./linux/kernel/git/bwh/sfc-next

12 years agobatman-adv: Fix merge error.
David S. Miller [Fri, 16 Dec 2011 20:07:28 +0000 (15:07 -0500)]
batman-adv: Fix merge error.

I didn't resolve the merge properly during the last pull of the net
tree into net-next.

The code in the final resolution should set flags to TT_CLIENT_ROAM
not TT_CLIENT_PENDING.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosfc: Use skb_fill_page_desc() to simplify passing of page buffers to GRO
Ben Hutchings [Fri, 16 Dec 2011 19:14:15 +0000 (19:14 +0000)]
sfc: Use skb_fill_page_desc() to simplify passing of page buffers to GRO

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
12 years agoethtool: Define and apply a default policy for RX flow hash indirection
Ben Hutchings [Thu, 15 Dec 2011 13:56:49 +0000 (13:56 +0000)]
ethtool: Define and apply a default policy for RX flow hash indirection

All drivers that support modification of the RX flow hash indirection
table initialise it in the same way: RX rings are assigned to table
entries in rotation.  Make that default policy explicit by having them
call a ethtool_rxfh_indir_default() function.

In the ethtool core, add support for a zero size value for
ETHTOOL_SRXFHINDIR, which resets the table to this default.

Partly-suggested-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoethtool: Centralise validation of ETHTOOL_{G, S}RXFHINDIR parameters
Ben Hutchings [Thu, 15 Dec 2011 13:55:01 +0000 (13:55 +0000)]
ethtool: Centralise validation of ETHTOOL_{G, S}RXFHINDIR parameters

Add a new ethtool operation (get_rxfh_indir_size) to get the
indirectional table size.  Use this to validate the user buffer size
before calling get_rxfh_indir or set_rxfh_indir.  Use get_rxnfc to get
the number of RX rings, and validate the contents of the new
indirection table before calling set_rxfh_indir.  Remove this
validation from drivers.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoethtool: Clarify use of size field for ETHTOOL_GRXFHINDIR
Ben Hutchings [Thu, 15 Dec 2011 13:51:16 +0000 (13:51 +0000)]
ethtool: Clarify use of size field for ETHTOOL_GRXFHINDIR

In order to find out the device's RX flow hash table size, ethtool
initially uses ETHTOOL_GRXFHINDIR with a buffer size of zero.  This
must be supported, but it is not necessary to support any other user
buffer size less than the device table size.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agounix_diag: Write it into kbuild
Pavel Emelyanov [Thu, 15 Dec 2011 02:46:50 +0000 (02:46 +0000)]
unix_diag: Write it into kbuild

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agounix_diag: Receive queue lenght NLA
Pavel Emelyanov [Thu, 15 Dec 2011 02:46:31 +0000 (02:46 +0000)]
unix_diag: Receive queue lenght NLA

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agounix_diag: Pending connections IDs NLA
Pavel Emelyanov [Thu, 15 Dec 2011 02:46:14 +0000 (02:46 +0000)]
unix_diag: Pending connections IDs NLA

When establishing a unix connection on stream sockets the
server end receives an skb with socket in its receive queue.

Report who is waiting for these ends to be accepted for
listening sockets via NLA.

There's a lokcing issue with this -- the unix sk state lock is
required to access the peer, and it is taken under the listening
sk's queue lock. Strictly speaking the queue lock should be taken
inside the state lock, but since in this case these two sockets
are different it shouldn't lead to deadlock.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agounix_diag: Unix peer inode NLA
Pavel Emelyanov [Thu, 15 Dec 2011 02:45:58 +0000 (02:45 +0000)]
unix_diag: Unix peer inode NLA

Report the peer socket inode ID as NLA. With this it's finally
possible to find out the other end of an interesting unix connection.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agounix_diag: Unix inode info NLA
Pavel Emelyanov [Thu, 15 Dec 2011 02:45:43 +0000 (02:45 +0000)]
unix_diag: Unix inode info NLA

Actually, the socket path if it's not anonymous doesn't give
a clue to which file the socket is bound to. Even if the path
is absolute, it can be unlinked and then new socket can be
bound to it.

With this NLA it's possible to check which file a particular
socket is really bound to.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agounix_diag: Unix socket name NLA
Pavel Emelyanov [Thu, 15 Dec 2011 02:45:24 +0000 (02:45 +0000)]
unix_diag: Unix socket name NLA

Report the sun_path when requested as NLA. With leading '\0' if
present but without the leading AF_UNIX bits.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agounix_diag: Dumping exact socket core
Pavel Emelyanov [Thu, 15 Dec 2011 02:45:07 +0000 (02:45 +0000)]
unix_diag: Dumping exact socket core

The socket inode is used as a key for lookup. This is effectively
the only really unique ID of a unix socket, but using this for
search currently has one problem -- it is O(number of sockets) :(

Does it worth fixing this lookup or inventing some other ID for
unix sockets?

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agounix_diag: Dumping all sockets core
Pavel Emelyanov [Thu, 15 Dec 2011 02:44:52 +0000 (02:44 +0000)]
unix_diag: Dumping all sockets core

Walk the unix sockets table and fill the core response structure,
which includes type, state and inode.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agounix_diag: Basic module skeleton
Pavel Emelyanov [Thu, 15 Dec 2011 02:44:35 +0000 (02:44 +0000)]
unix_diag: Basic module skeleton

Includes basic module_init/_exit functionality, dump/get_exact stubs
and declares the basic API structures for request and response.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoaf_unix: Export stuff required for diag module
Pavel Emelyanov [Thu, 15 Dec 2011 02:44:03 +0000 (02:44 +0000)]
af_unix: Export stuff required for diag module

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosock_diag: Generalize requests cookies managements
Pavel Emelyanov [Thu, 15 Dec 2011 02:43:44 +0000 (02:43 +0000)]
sock_diag: Generalize requests cookies managements

The sk address is used as a cookie between dump/get_exact calls.
It will be required for unix socket sdumping, so move it from
inet_diag to sock_diag.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosock_diag: Fix module netlink aliases
Pavel Emelyanov [Thu, 15 Dec 2011 02:43:27 +0000 (02:43 +0000)]
sock_diag: Fix module netlink aliases

I've made a mistake when fixing the sock_/inet_diag aliases :(

1. The sock_diag layer should request the family-based alias,
   not just the IPPROTO_IP one;
2. The inet_diag layer should request for AF_INET+protocol alias,
   not just the protocol one.

Thus fix this.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosock_diag: Move the SOCK_DIAG_BY_FAMILY cmd declaration
Pavel Emelyanov [Thu, 15 Dec 2011 02:42:42 +0000 (02:42 +0000)]
sock_diag: Move the SOCK_DIAG_BY_FAMILY cmd declaration

It should belong to sock_diag, not inet_diag.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoath9k: Support RSN Mesh
Chun-Yeow Yeoh [Wed, 7 Dec 2011 20:45:46 +0000 (12:45 -0800)]
ath9k: Support RSN Mesh

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: Restore orig channel values upon disconnect
Rajkumar Manoharan [Wed, 7 Dec 2011 16:20:08 +0000 (21:50 +0530)]
cfg80211: Restore orig channel values upon disconnect

When we restore regulatory settings the world regulatory domain
is properly reset on cfg80211 (or user prefered regulatory domain)
but we were never setting back channel values for drivers that use
WIPHY_FLAG_CUSTOM_REGULATORY. Set these values up again by using
the orig_ channel parameters.

This fixes restoring custom regulatory settings upon disconnect
events.

Cc: compat@orbit-lab.org
Cc: Paul Stewart <pstew@google.com>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: Senthilkumar Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: allow following country IE power for custom regdom cards
Luis R. Rodriguez [Wed, 7 Dec 2011 16:20:07 +0000 (21:50 +0530)]
cfg80211: allow following country IE power for custom regdom cards

By definition WIPHY_FLAG_STRICT_REGULATORY was intended to allow the
wiphy to adjust itself to the country IE power information if the
card had no regulatory data but we had no way to tell cfg80211 that if
the card also had its own custom regulatory domain (these are typically
custom world regulatory domains) that we want to follow the country IE's
noted values for power for each channel. We add support for this and
document it.

This is not a critical fix but a performance optimization for cards
with custom regulatory domains that associate to an AP with sends
out country IEs with a higher EIRP than the one on the custom
regulatory domain. In practice the only driver affected right now
are the Atheros drivers as they are the only drivers using both
WIPHY_FLAG_STRICT_REGULATORY and WIPHY_FLAG_CUSTOM_REGULATORY --
used on cards that have an Atheros world regulatory domain. Cards
that have been programmed to follow a country specifically will not
follow the country IE power. So although not a stable fix distributions
should consider cherry picking this.

Cc: compat@orbit-lab.org
Cc: Paul Stewart <pstew@google.com>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: Senthilkumar Balasubramanian <senthilb@qca.qualcomm.com>
Reported-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211_hwsim: fix wmediumd_pid
Johannes Berg [Wed, 7 Dec 2011 11:35:17 +0000 (12:35 +0100)]
mac80211_hwsim: fix wmediumd_pid

Fix a few minor issues with wmediumd_pid:
a) make static
b) use u32 to match the snd_pid type
c) use ACCESS_ONCE since we don't lock it
d) don't explicitly initialize to 0

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove ATH9K_HW_CAP_CST
Mohammed Shafi Shajakhan [Wed, 7 Dec 2011 11:21:39 +0000 (16:51 +0530)]
ath9k_hw: remove ATH9K_HW_CAP_CST

its not used anywhere in the current code

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: validate for non-zero BSSID
Mohammed Shafi Shajakhan [Wed, 7 Dec 2011 11:21:38 +0000 (16:51 +0530)]
ath9k: validate for non-zero BSSID

before concluding that the recieved beacon is for us, let us make sure
that the BSSID is non-zero. when I configured ad-hoc mode as creator and
left it for some time without joining I found we recieved few frames whose
BSSID is zero, which we concluded wrongly as 'my_beacons'

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Fri, 16 Dec 2011 07:11:14 +0000 (02:11 -0500)]
Merge git://git./linux/kernel/git/davem/net

Conflicts:
drivers/net/ethernet/freescale/fsl_pq_mdio.c
net/batman-adv/translation-table.c
net/ipv6/route.c

12 years agob43: N-PHY: check for bustype before touching BCMA CC PLLs
Rafał Miłecki [Thu, 15 Dec 2011 13:17:21 +0000 (14:17 +0100)]
b43: N-PHY: check for bustype before touching BCMA CC PLLs

Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: precendence bug in wlc_phy_attach()
Dan Carpenter [Thu, 15 Dec 2011 11:23:32 +0000 (14:23 +0300)]
brcm80211: smac: precendence bug in wlc_phy_attach()

Negate has higher precendence than compare and since neither zero nor
one are equal to four or eight the original condition is always false.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: add DFS radar pulse processing
Zefir Kurtisi [Thu, 15 Dec 2011 04:16:34 +0000 (20:16 -0800)]
ath9k: add DFS radar pulse processing

This initial DFS module provides basic functionality to deal
with radar pulses reported by the Atheros DFS HW pulse detector.

The reported data is evaluated and basic plausibility checks
are performed to filter false pulses. Passing radar pulses are
forwarded to pattern detectors which are not yet implemented.

(Some modifications to actually use ATH9K_DFS_DEBUGFS based on comments
from Julian Calaby <julian.calaby@gmail.com>. -- JWL)

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: add DFS testing check
Zefir Kurtisi [Thu, 15 Dec 2011 04:16:33 +0000 (20:16 -0800)]
ath9k_hw: add DFS testing check

In order to enable DFS upstream we want to be sure
DFS has been tested for each chipset. Push for public
documentation of the requirements we want in place and
allow for enabling each chipset through a single upstream
commit.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath: add a debug level for DFS
Zefir Kurtisi [Thu, 15 Dec 2011 04:16:32 +0000 (20:16 -0800)]
ath: add a debug level for DFS

This can later be used by other drivers that implement
DFS support.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: Replace kmalloc/memset with kzalloc
Larry Finger [Thu, 15 Dec 2011 02:23:03 +0000 (20:23 -0600)]
brcmsmac: Replace kmalloc/memset with kzalloc

In ai_attach(), space is allocated for an si_info struct. Immediately
after the allocation, routine ai_doattach() is called and that allocated
space is set to zero. As no other routine calls ai_doattach(), kzalloc()
can be utilized.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath: document ATH_DBG_MCI
Luis R. Rodriguez [Wed, 14 Dec 2011 21:56:36 +0000 (13:56 -0800)]
ath: document ATH_DBG_MCI

A debug level was added to the ath module for printing
MCI messages but no documentation was provided. Clarify that
MCI is the Message Coexistence Interface, a private protocol
used exclusively for WLAN-BT coexistence starting from
AR9462.

Cc: wtsao@qca.qualcomm.com
Cc: rmanohar@qca.qualcomm.com
Cc: mohammed@qca.qualcomm.com
Cc: senthilb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: avoid retransmitting aggregation frames that a BAR was sent for
Felix Fietkau [Wed, 14 Dec 2011 21:08:08 +0000 (22:08 +0100)]
ath9k: avoid retransmitting aggregation frames that a BAR was sent for

The receiver will discard them anyway.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: simplify tx locking
Felix Fietkau [Wed, 14 Dec 2011 21:08:07 +0000 (22:08 +0100)]
ath9k: simplify tx locking

Instead of releasing and taking back the lock over and over again in the
tx path, hold the lock a bit longer, requiring much fewer lock/unlock pairs.
This makes locking much easier to review and should not have any noticeable
performance/latency impact.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove bogus sequence number increment
Felix Fietkau [Wed, 14 Dec 2011 21:08:06 +0000 (22:08 +0100)]
ath9k: remove bogus sequence number increment

tid->seq_next is initialized on A-MPDU start anyway, and the comment next
to this chunk of code seems to be bogus as well.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: reduce indentation level in a few places
Felix Fietkau [Wed, 14 Dec 2011 21:08:05 +0000 (22:08 +0100)]
ath9k: reduce indentation level in a few places

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: reduce the number of unnecessary BAR tx packets
Felix Fietkau [Wed, 14 Dec 2011 21:08:04 +0000 (22:08 +0100)]
ath9k: reduce the number of unnecessary BAR tx packets

When processing A-MPDU tx status, only send a BAR for the failed packet
with the highest sequence number.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: change maximum software retransmission handling
Felix Fietkau [Wed, 14 Dec 2011 21:08:03 +0000 (22:08 +0100)]
ath9k: change maximum software retransmission handling

Instead of limiting a subframe to 10 A-MPDU software transmission attempts,
count hardware retransmissions as well and raise the limit a bit. That way
there will be fewer software retransmission attempts when traffic suffers
from lots of hardware retransmissions.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Fix power save in change interface
Mohammed Shafi Shajakhan [Wed, 14 Dec 2011 14:16:08 +0000 (19:46 +0530)]
mac80211: Fix power save in change interface

we found that power save is not getting enabled when we do
change interface in this order STA->IBSS->STA. this is
because ieee80211_setup_sdata clears type-dependent union

Reported-by: Leela Kella <leela@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove an unnecessary paraenthesis
Mohammed Shafi Shajakhan [Wed, 14 Dec 2011 14:16:07 +0000 (19:46 +0530)]
mac80211: remove an unnecessary paraenthesis

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames
Helmut Schaa [Thu, 15 Dec 2011 09:18:34 +0000 (10:18 +0100)]
mac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames

Currently BAR, ADDBA and DELBA frames are always sent using AC_VO. If
the TID for which a BA session is established is assigned to a different
queue BAR, ADDBA and DELBA frames can "overtake" frames of the according
BA session.

Hence, always put BA session related frames into the same queue as the
BA sessions data frames.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: reduce station management complexity
Johannes Berg [Thu, 15 Dec 2011 10:24:20 +0000 (11:24 +0100)]
mac80211: reduce station management complexity

Now that IBSS no longer needs to insert stations
from atomic context, we can get rid of all the
special cases for that, and even get rid of the
sta_lock (though it needs to stay as tim_lock.)

This makes the station management code much more
straight-forward.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: delay IBSS station insertion
Johannes Berg [Thu, 15 Dec 2011 10:17:37 +0000 (11:17 +0100)]
mac80211: delay IBSS station insertion

In order to notify drivers and simplify the station
management code, defer IBSS station insertion to a
work item and don't do it directly while receiving
a frame.

This increases the complexity in IBSS a little bit,
but it's pretty straight forward and it allows us
to reduce the station management complexity (next
patch) considerably.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: make address arguments to sta_info_alloc const
Johannes Berg [Wed, 14 Dec 2011 12:28:46 +0000 (13:28 +0100)]
mac80211: make address arguments to sta_info_alloc const

No real changes, just note that they are const.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: count authorized stations per BSS
Johannes Berg [Wed, 14 Dec 2011 11:20:31 +0000 (12:20 +0100)]
mac80211: count authorized stations per BSS

Currently, each AP interface will send multicast
traffic if any interface has a station entry even
if that station entry is allocated only. With the
new station state management we can easily fix it
by adding a counter that counts each authorized
station only and send multicast traffic only when
the correct interface has at least one authorized
station.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: refactor station state transitions
Johannes Berg [Wed, 14 Dec 2011 11:35:30 +0000 (12:35 +0100)]
mac80211: refactor station state transitions

Station entries can have various states, the most
important ones being auth, assoc and authorized.
This patch prepares us for telling the driver about
these states, we don't want to confuse drivers with
strange transitions, so with this we enforce that
they move in the right order between them (back and
forth); some transitions might happen before the
driver even knows about the station, but at least
runtime transitions will be ordered correctly.

As a consequence, IBSS and MESH stations will now
have the ASSOC flag set (so they can transition to
AUTHORIZED), and we can get rid of a special case
in TX processing.

When freeing a station, unwind the state so that
other parts of the code (or drivers later) can rely
on the transitions.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: use station mutex in configuration
Johannes Berg [Wed, 14 Dec 2011 11:20:29 +0000 (12:20 +0100)]
mac80211: use station mutex in configuration

There's no need to use RCU here, we can just lock
the station mutex instead. This allows the code
to sleep, which is necessary for later patches.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove duplicate TDLS peer verification
Johannes Berg [Wed, 14 Dec 2011 11:20:28 +0000 (12:20 +0100)]
mac80211: remove duplicate TDLS peer verification

This is already checked in cfg80211, so no need
to repeat the checks here.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: validate nl80211 station handling better
Johannes Berg [Wed, 14 Dec 2011 11:20:27 +0000 (12:20 +0100)]
cfg80211: validate nl80211 station handling better

The nl80211 station handling code is a bit messy
and doesn't do a lot of validation. It seems like
this could be an issue for drivers that don't use
mac80211 to validate everything.

As cfg80211 doesn't keep station state, move the
validation of allowing supported_rates to change
for TDLS only in station mode to mac80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211: add TDLS peer flag to policy
Johannes Berg [Wed, 14 Dec 2011 08:29:15 +0000 (09:29 +0100)]
nl80211: add TDLS peer flag to policy

This was evidently missed in the TDLS patch (07ba55d7).

Cc: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agotg3: Break out RSS indir table init and assignment
Matt Carlson [Wed, 14 Dec 2011 11:10:01 +0000 (11:10 +0000)]
tg3: Break out RSS indir table init and assignment

This patch creates a new device member to hold the RSS indirection table
and separates out the code that initializes the table from the code that
programs the table into device registers.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Use mii_advertise_flowctrl
Matt Carlson [Wed, 14 Dec 2011 11:10:00 +0000 (11:10 +0000)]
tg3: Use mii_advertise_flowctrl

This patch replaces tg3's internal tg3_advert_flowctrl_1000T function
with mii_advertise_flowctrl provided by the kernel headers.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Add 57766 ASIC rev support
Matt Carlson [Wed, 14 Dec 2011 11:09:59 +0000 (11:09 +0000)]
tg3: Add 57766 ASIC rev support

This patch adds support for the 57766 ASIC revision.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Make the TX BD DMA limit configurable
Matt Carlson [Wed, 14 Dec 2011 11:09:58 +0000 (11:09 +0000)]
tg3: Make the TX BD DMA limit configurable

The 57766 ASIC rev will impose a new TX BD DMA limit on the driver.
This patch prepares for 57766 support by making the tx BD DMA limit
tunable.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Enable EEE support for capable 10/100 devs
Matt Carlson [Wed, 14 Dec 2011 11:09:57 +0000 (11:09 +0000)]
tg3: Enable EEE support for capable 10/100 devs

There are some devices in the 57765 ASIC rev that are EEE capable.
Unfortunately the EEE setup code only gets executed if the device is
gigabit capable.  This patch fixes the problem.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp_memcontrol: fix reversed if condition
Dan Carpenter [Thu, 15 Dec 2011 01:05:10 +0000 (01:05 +0000)]
tcp_memcontrol: fix reversed if condition

We should only dereference the pointer if it's valid, not the other way
round.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMove limit definitions outside CONFIG_INET
Glauber Costa [Wed, 14 Dec 2011 23:34:31 +0000 (23:34 +0000)]
Move limit definitions outside CONFIG_INET

They need to be available for other protocols as well, since
they are used in sock.c openly

Signed-off-by: Glauber Costa <glommer@parallels.com>
CC: Hiroyouki Kamezawa <kamezawa.hiroyu@jp.fujitsu.com>
CC: David S. Miller <davem@davemloft.net>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agowl12xx: alloc buffer in driver_state_read to prevent compilation warning
Luciano Coelho [Thu, 15 Dec 2011 12:58:08 +0000 (14:58 +0200)]
wl12xx: alloc buffer in driver_state_read to prevent compilation warning

When compiling wl12xx for x86, there was a warning complaining about
the size of the buffer we were allocating in the stack:

drivers/net/wireless/wl12xx/debugfs.c: In function 'driver_state_read':
drivers/net/wireless/wl12xx/debugfs.c:380:1: warning: the frame size of 1040 bytes is larger than 1024 bytes

To prevent this, allocate the buffer in the heap instead.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agoSet wlvif->ps_compl to NULL in before return
Pontus Fuchs [Wed, 14 Dec 2011 13:32:23 +0000 (14:32 +0100)]
Set wlvif->ps_compl to NULL in before return

wl1271_configure_suspend_sta leaves a stale stack declared
completion in wlvif->ps_compl. Set it to NULL before returning.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
[small fix to use wlvif->ps_compl instead of wl->ps_compl]
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: remove unused firmware version macros
Luciano Coelho [Wed, 14 Dec 2011 12:57:58 +0000 (14:57 +0200)]
wl12xx: remove unused firmware version macros

We don't use WL12XX_BA_SUPPORT_FW_COST_VER2_START nor
WL12XX_BA_SUPPORT_FW_COST_VER2_END anymore.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: remove deprecated packet detection threshold config
Luciano Coelho [Tue, 13 Dec 2011 13:45:54 +0000 (15:45 +0200)]
wl12xx: remove deprecated packet detection threshold config

The ACX_PD_THRESHOLD configuration command is deprecated and should
not be used anymore.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: use ieee80211_free_txskb()
Eliad Peller [Tue, 13 Dec 2011 13:26:38 +0000 (15:26 +0200)]
wl12xx: use ieee80211_free_txskb()

Use the newly introduced ieee80211_free_txskb() instead
of dev_kfree_skb() for failed tx packets.

Additionally, if the skb is a dummy packet, re-enqueue
it (as the fw expects it) instead of freeing it.

Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: call extended radio parameters for wl127x AP mode
Luciano Coelho [Tue, 13 Dec 2011 09:39:50 +0000 (11:39 +0200)]
wl12xx: call extended radio parameters for wl127x AP mode

We need to set the extended radio parameters for wl127x only.
Currently, we were only calling this command with wl127x STA mode, but
we should also do it for AP mode.

Move the call to the extended radio paramaters to the common hw_init
and use a single if for the chip type to do everything at once.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: don't write out of bounds when hlid > WL12XX_MAX_LINKS
Luciano Coelho [Tue, 13 Dec 2011 09:39:02 +0000 (11:39 +0200)]
wl12xx: don't write out of bounds when hlid > WL12XX_MAX_LINKS

We should not get an hlid value bigger than WL12XX_MAX_LINKS from
wl1271_rx_handle_data().  We have a WARN_ON in case it happens.  But
despite the warning, we would still go ahead and write the hlid bit
into active_hlids (a stack variable).  This would cause us to
overwrite other data in the stack.

To avoid this problem, we now skip the write when issuing the warning,
so at least we don't corrupt data.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: Restore testmode ABI
Pontus Fuchs [Thu, 1 Dec 2011 11:13:44 +0000 (12:13 +0100)]
wl12xx: Restore testmode ABI

Commit 80900d0140a7648587982c8f299830e900e49165 accidently broke
the ABI for testmode commands. Restore the ABI again.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agoNFC: Initial LLCP support
Samuel Ortiz [Wed, 14 Dec 2011 15:43:12 +0000 (16:43 +0100)]
NFC: Initial LLCP support

This patch is an initial implementation for the NFC Logical Link Control
protocol. It's also known as NFC peer to peer mode.
This is a basic implementation as it lacks SDP (services Discovery
Protocol), frames aggregation support, and frame rejecion parsing.
Follow up patches will implement those missing features.
This code has been tested against a Nexus S phone implementing LLCP 1.0.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: DEP link hook implementation for pn533
Samuel Ortiz [Wed, 14 Dec 2011 15:43:11 +0000 (16:43 +0100)]
NFC: DEP link hook implementation for pn533

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>