]> Git Repo - linux.git/log
linux.git
9 years agohv_netvsc: Fix the packet free when it is in skb headroom
Haiyang Zhang [Mon, 6 Apr 2015 22:22:54 +0000 (15:22 -0700)]
hv_netvsc: Fix the packet free when it is in skb headroom

In the two places changed, we now use netvsc_xmit_completion() which properly
frees hv_netvsc_packet in or not in skb headroom.

Signed-off-by: Haiyang Zhang <[email protected]>
Reviewed-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agohv_netvsc: Define a macro RNDIS_AND_PPI_SIZE
Haiyang Zhang [Mon, 6 Apr 2015 22:22:53 +0000 (15:22 -0700)]
hv_netvsc: Define a macro RNDIS_AND_PPI_SIZE

The sum of RNDIS msg and PPI struct sizes is used in multiple places, so we define
a macro for them.

Signed-off-by: Haiyang Zhang <[email protected]>
Reviewed-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agohv_netvsc: Clean up two unused variables
Haiyang Zhang [Mon, 6 Apr 2015 22:22:52 +0000 (15:22 -0700)]
hv_netvsc: Clean up two unused variables

Signed-off-by: Haiyang Zhang <[email protected]>
Reviewed-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agotcp: RFC7413 option support for Fast Open client
Daniel Lee [Mon, 6 Apr 2015 21:37:27 +0000 (14:37 -0700)]
tcp: RFC7413 option support for Fast Open client

Fast Open has been using an experimental option with a magic number
(RFC6994). This patch makes the client by default use the RFC7413
option (34) to get and send Fast Open cookies.  This patch makes
the client solicit cookies from a given server first with the
RFC7413 option. If that fails to elicit a cookie, then it tries
the RFC6994 experimental option. If that also fails, it uses the
RFC7413 option on all subsequent connect attempts.  If the server
returns a Fast Open cookie then the client caches the form of the
option that successfully elicited a cookie, and uses that form on
later connects when it presents that cookie.

The idea is to gradually obsolete the use of experimental options as
the servers and clients upgrade, while keeping the interoperability
meanwhile.

Signed-off-by: Daniel Lee <[email protected]>
Signed-off-by: Yuchung Cheng <[email protected]>
Signed-off-by: Neal Cardwell <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agotcp: RFC7413 option support for Fast Open server
Daniel Lee [Mon, 6 Apr 2015 21:37:26 +0000 (14:37 -0700)]
tcp: RFC7413 option support for Fast Open server

Fast Open has been using the experimental option with a magic number
(RFC6994) to request and grant Fast Open cookies. This patch enables
the server to support the official IANA option 34 in RFC7413 in
addition.

The change has passed all existing Fast Open tests with both
old and new options at Google.

Signed-off-by: Daniel Lee <[email protected]>
Signed-off-by: Yuchung Cheng <[email protected]>
Signed-off-by: Neal Cardwell <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agocxgb4: Move ethtool related code to a separate file
Hariprasad Shenai [Mon, 6 Apr 2015 14:53:23 +0000 (20:23 +0530)]
cxgb4: Move ethtool related code to a separate file

Signed-off-by: Hariprasad Shenai <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoBluetooth: Add local SSP OOB data to OOB ext data mgmt command
Johan Hedberg [Tue, 7 Apr 2015 18:52:22 +0000 (21:52 +0300)]
Bluetooth: Add local SSP OOB data to OOB ext data mgmt command

The Read Local Out Of Band Extended Data mgmt command is specified to
return the SSP values when given a BR/EDR address type as input
parameter. The returned values may include either the 192-bit variants
of C and R, or their 256-bit variants, or both, depending on the status
of Secure Connections and Secure Connections Only modes. If SSP is not
enabled the command will only return the Class of Device value (like it
has done so far).

Signed-off-by: Johan Hedberg <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
9 years agonetdevice.h: remove iflink description
Nicolas Dichtel [Tue, 7 Apr 2015 10:10:16 +0000 (12:10 +0200)]
netdevice.h: remove iflink description

Also move 'group' description to match the order of the net_device structure.

Fixes: 7a66bbc96ce9 ("net: remove iflink field from struct net_device")
Reported-by: Fengguang Wu <[email protected]>
Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge branch 'netns-next'
David S. Miller [Tue, 7 Apr 2015 21:29:47 +0000 (17:29 -0400)]
Merge branch 'netns-next'

Nicolas Dichtel says:

====================
netns: enhance netlink interface for nsid

The first patch is a small cleanup. The second patch implements notifications
for netns id events. And the last one allows to dump existing netns id from
userland.

iproute2 patches are available, I can send them on demand.

v2: drop the first patch (the fix is now in net-next)
====================

Signed-off-by: David S. Miller <[email protected]>
9 years agonetns: allow to dump netns ids
Nicolas Dichtel [Tue, 7 Apr 2015 09:51:54 +0000 (11:51 +0200)]
netns: allow to dump netns ids

Which this patch, it's possible to dump the list of ids allocated for peer
netns.

Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonetns: notify netns id events
Nicolas Dichtel [Tue, 7 Apr 2015 09:51:53 +0000 (11:51 +0200)]
netns: notify netns id events

With this patch, netns ids that are created and deleted are advertised into the
group RTNLGRP_NSID.

Because callers of rtnl_net_notifyid() already know the id of the peer, there is
no need to call __peernet2id() in rtnl_net_fill().

Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonetns: minor cleanup in rtnl_net_getid()
Nicolas Dichtel [Tue, 7 Apr 2015 09:51:52 +0000 (11:51 +0200)]
netns: minor cleanup in rtnl_net_getid()

No need to initialize err, it will be overridden by the value of nlmsg_parse().

Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoBluetooth: Update SSP OOB data EIR definitions
Johan Hedberg [Tue, 7 Apr 2015 18:52:21 +0000 (21:52 +0300)]
Bluetooth: Update SSP OOB data EIR definitions

Since Bluetooth 4.1 there are two additional values for SSP OOB data,
namely C-256 and R-256. This patch updates the EIR definitions to take
into account both the 192 and 256 bit variants of C and R.

Signed-off-by: Johan Hedberg <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
9 years agoMerge branch 'udp_tunnel_sk'
David S. Miller [Tue, 7 Apr 2015 19:29:30 +0000 (15:29 -0400)]
Merge branch 'udp_tunnel_sk'

Prevent UDP tunnels from operating on garbage socket

So this should do the rest of the work such that when we encapsulate
into a UDP tunnel, the output path works on the UDP tunnel's socket
rather than skb->sk.

Part of this work is based upon changes done by Jiri Pirko some time
ago.

Basically the first step is to pass the socket through the nf_hook
okfn(), and then next we do the same for the UDP tunnel xmit routines.

Signed-off-by: David S. Miller <[email protected]>
9 years agoudp_tunnel: Pass UDP socket down through udp_tunnel{, 6}_xmit_skb().
David Miller [Mon, 6 Apr 2015 02:19:09 +0000 (22:19 -0400)]
udp_tunnel: Pass UDP socket down through udp_tunnel{, 6}_xmit_skb().

That was we can make sure the output path of ipv4/ipv6 operate on
the UDP socket rather than whatever random thing happens to be in
skb->sk.

Based upon a patch by Jiri Pirko.

Signed-off-by: David S. Miller <[email protected]>
Acked-by: Hannes Frederic Sowa <[email protected]>
9 years agonetfilter: Pass socket pointer down through okfn().
David Miller [Mon, 6 Apr 2015 02:19:04 +0000 (22:19 -0400)]
netfilter: Pass socket pointer down through okfn().

On the output paths in particular, we have to sometimes deal with two
socket contexts.  First, and usually skb->sk, is the local socket that
generated the frame.

And second, is potentially the socket used to control a tunneling
socket, such as one the encapsulates using UDP.

We do not want to disassociate skb->sk when encapsulating in order
to fix this, because that would break socket memory accounting.

The most extreme case where this can cause huge problems is an
AF_PACKET socket transmitting over a vxlan device.  We hit code
paths doing checks that assume they are dealing with an ipv4
socket, but are actually operating upon the AF_PACKET one.

Signed-off-by: David S. Miller <[email protected]>
9 years agonetfilter: Add socket pointer to nf_hook_state.
David Miller [Mon, 6 Apr 2015 02:19:00 +0000 (22:19 -0400)]
netfilter: Add socket pointer to nf_hook_state.

It is currently always set to NULL, but nf_queue is adjusted to be
prepared for it being set to a real socket by taking and releasing a
reference to that socket when necessary.

Signed-off-by: David S. Miller <[email protected]>
9 years agonetfilter: Add nf_hook_state initializer function.
David Miller [Mon, 6 Apr 2015 02:18:54 +0000 (22:18 -0400)]
netfilter: Add nf_hook_state initializer function.

This way we can consolidate where we setup new nf_hook_state objects,
to make sure the entire thing is initialized.

The only other place an nf_hook_object is instantiated is nf_queue,
wherein a structure copy is used.

Signed-off-by: David S. Miller <[email protected]>
9 years agocosa: fix error return code
Julia Lawall [Sun, 5 Apr 2015 12:06:28 +0000 (14:06 +0200)]
cosa: fix error return code

Return a negative error code on failure.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agowan: lmc: fix error return code
Julia Lawall [Sun, 5 Apr 2015 12:06:21 +0000 (14:06 +0200)]
wan: lmc: fix error return code

Return a negative error code on failure.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agossb: add delay after PCI reset to fix SoC reboots
Rafał Miłecki [Sun, 5 Apr 2015 16:39:27 +0000 (18:39 +0200)]
ssb: add delay after PCI reset to fix SoC reboots

Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoath9k: add extra GPIO led support
Miaoqing Pan [Wed, 1 Apr 2015 02:19:57 +0000 (10:19 +0800)]
ath9k: add extra GPIO led support

ar9550 or later chips, the AR_GPIO_IN_OUT register only can
control GPIO[0:3]. For the extra GPIO, use standard GPIO calls
instead of WMAC internal registers.

Signed-off-by: Miaoqing Pan <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agowl1251: Fix typo in MODULE_DESCRIPTION in wl1251/main.c
Masanari Iida [Mon, 30 Mar 2015 13:27:47 +0000 (22:27 +0900)]
wl1251: Fix typo in MODULE_DESCRIPTION in wl1251/main.c

This patch fix a spelling typo in MODULE_DESCRIPTION in
wl1251/main.c

Signed-off-by: Masanari Iida <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agowireless: Use bool function returns of true/false instead of 1/0
Joe Perches [Mon, 30 Mar 2015 01:29:42 +0000 (18:29 -0700)]
wireless: Use bool function returns of true/false instead of 1/0

Use bool constants as the return values instead of 1 and 0.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agortlwifi: Add encryption argument in rtl_is_special_data for checking DHCP packet.
Taehee Yoo [Fri, 27 Mar 2015 15:22:39 +0000 (00:22 +0900)]
rtlwifi: Add encryption argument in rtl_is_special_data for checking DHCP packet.

rtl8192cu can't connect to AP after physical reconnect.
according to dmesg, that problem's cause was DHCP timeout.

rtl_is_special_data function checks packet type for adjusting rate.
when that function is called from _rtl_rc_get_highest_rix, it can not
calculate offset correctly. so i add argument is_encn in rtl_is_special_data.
is_enc variable mean that iv header is added in skb parameter.

i test only rtl8192cu chipset. because i doesn't have other rtlwifi chipsets.

Signed-off-by: Taehee Yoo <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoath9k_htc: check seq number instead of cmd id for timeout
Fred Chou [Fri, 13 Mar 2015 08:32:38 +0000 (16:32 +0800)]
ath9k_htc: check seq number instead of cmd id for timeout

As the driver may send multiple wmi commands with identical cmd id,
it is more robust to check seq number for timeout instead.

Signed-off-by: Fred Chou <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoMerge tag 'iwlwifi-next-for-kalle-2015-04-02' of https://git.kernel.org/pub/scm/linux...
Kalle Valo [Tue, 7 Apr 2015 16:55:57 +0000 (19:55 +0300)]
Merge tag 'iwlwifi-next-for-kalle-2015-04-02' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

* some more work on LAR
* fixes for UMAC scan
* more work on debugging framework
* more work for 8000 devices
* cleanups and small bugfixes

9 years agoBluetooth: hci_uart: Use generic Intel support for address setting
Marcel Holtmann [Mon, 6 Apr 2015 07:52:14 +0000 (00:52 -0700)]
Bluetooth: hci_uart: Use generic Intel support for address setting

The Bluetooth address setting for Intel devices is provided by a generic
module now. Start using that module instead of relying it being included
in the driver.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: btusb: Move Intel command structs into its own header
Marcel Holtmann [Mon, 6 Apr 2015 07:52:13 +0000 (00:52 -0700)]
Bluetooth: btusb: Move Intel command structs into its own header

Since the Intel Bluetooth support has its own header, it makes sense
to move all command structs into it.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: btusb: Use generic Intel support for address support
Marcel Holtmann [Mon, 6 Apr 2015 07:52:12 +0000 (00:52 -0700)]
Bluetooth: btusb: Use generic Intel support for address support

The Bluetooth address handling for Intel devices is provided by a generic
module now. Start using that module instead of relying it being included
in the driver.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: btintel: Introduce generic Intel Bluetooth support
Marcel Holtmann [Mon, 6 Apr 2015 07:52:11 +0000 (00:52 -0700)]
Bluetooth: btintel: Introduce generic Intel Bluetooth support

The majority of Intel Bluetooth vendor commands are shared between USB
and UART transports. This creates a separate module that eventually
will hold all Intel specific commands, but for now just start with the
commands to change the Bluetooth public address and check for the
default address.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Provide generic H:4 receive framework
Marcel Holtmann [Mon, 6 Apr 2015 06:44:59 +0000 (23:44 -0700)]
Bluetooth: hci_uart: Provide generic H:4 receive framework

Future H:4 based UART drivers require custom packet types and custom
receive functions. To support this, extended the h4_recv_buf function
with a packet definition table.

For the default H:4 packets types of ACL data, SCO data and events,
provide helpers to reduce the amount of code duplication.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: btbcm: Add firmware table for UART based devices
Marcel Holtmann [Mon, 6 Apr 2015 05:52:19 +0000 (22:52 -0700)]
Bluetooth: btbcm: Add firmware table for UART based devices

The Broadcom UART based devices seem to use a little bit different
firmare naming prefix. So add a separate table for these devices.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Add protocol support for Broadcom UART devices
Marcel Holtmann [Mon, 6 Apr 2015 05:52:18 +0000 (22:52 -0700)]
Bluetooth: hci_uart: Add protocol support for Broadcom UART devices

This adds the protocol support for Broadcom based UART devices to
enable firmware and patchram download procedure. It is a pretty
straight forward H:4 driver with the exception of actually having
its own setup and address configuration callbacks.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Move setup callback into different location
Marcel Holtmann [Mon, 6 Apr 2015 05:52:17 +0000 (22:52 -0700)]
Bluetooth: hci_uart: Move setup callback into different location

The setup callback got wrongly inserted between the enqueue and dequeue
callbacks. Move it to a better location.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: btusb: Update version number of the module
Marcel Holtmann [Mon, 6 Apr 2015 05:52:16 +0000 (22:52 -0700)]
Bluetooth: btusb: Update version number of the module

The version number is cosmetic, but pretty handy for debugging purposes
and since the Broadcom protocol support is now optional, just increase
it to indicate the difference.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: btusb: Move Broadcom quirk setting into support module
Marcel Holtmann [Mon, 6 Apr 2015 05:52:15 +0000 (22:52 -0700)]
Bluetooth: btusb: Move Broadcom quirk setting into support module

The quirks for Broadcom devices can be set from the setup function and
to keep the code simple, just move them into Broadcom support module.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: btusb: Add option for Broadcom protocol support
Marcel Holtmann [Mon, 6 Apr 2015 05:52:14 +0000 (22:52 -0700)]
Bluetooth: btusb: Add option for Broadcom protocol support

With the generic Broadcom Bluetooth support module, it is possible to
turn support for firmware and patchram download into an optional
feature.

To keep backwards compatibility with previous kernel configurations,
the new option defaults to enabled.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: btbcm: Add support for Broadcom controller setup
Marcel Holtmann [Mon, 6 Apr 2015 05:52:13 +0000 (22:52 -0700)]
Bluetooth: btbcm: Add support for Broadcom controller setup

To unify the controller setup of Broadcom devices between USB and UART
transport, add the patchram download support into the Broadcom module.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Use generic functionality from Broadcom module
Marcel Holtmann [Mon, 6 Apr 2015 05:52:12 +0000 (22:52 -0700)]
Bluetooth: hci_uart: Use generic functionality from Broadcom module

The new Broadcom Bluetooth support module provides generic functionality
for changing and checking the Bluetooth device address. Use these new
features instead of keeping a duplicate in the driver.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: btusb: Use generic functionality by Broadcom module
Marcel Holtmann [Mon, 6 Apr 2015 05:52:11 +0000 (22:52 -0700)]
Bluetooth: btusb: Use generic functionality by Broadcom module

The new Broadcom Bluetooth support module provides generic functionality
for changing and checking the Bluetooth device address. Use these new
features instead of keeping a duplicate in the driver.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: btbcm: Introduce generic Broadcom Bluetooth support
Marcel Holtmann [Mon, 6 Apr 2015 05:52:10 +0000 (22:52 -0700)]
Bluetooth: btbcm: Introduce generic Broadcom Bluetooth support

The majority of Broadcom Bluetooth vendor commands are shared between
USB and UART transports. This creates a separate module that eventually
will hold all Broadcom specific commands, but for now just start with
the commands to change the Bluetooth public address and check for the
default address.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Update version number driver
Marcel Holtmann [Sun, 5 Apr 2015 05:36:04 +0000 (22:36 -0700)]
Bluetooth: hci_uart: Update version number driver

This version number is more cosmetic and for debugging purposes, but
since there has been a few changes lately, increase it now.

Two left-over and not used version constants that were never exposed
anywhere are removed since they have no actual value.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Remove the manual protocol init message
Marcel Holtmann [Sun, 5 Apr 2015 05:27:35 +0000 (22:27 -0700)]
Bluetooth: hci_uart: Remove the manual protocol init message

The init function for each HCI UART protocol prints the same on success
and failure. This information is so generic, remove it and let the main
HCI UART handling print it instead.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Add name information to hci_uart_proto struct
Marcel Holtmann [Sun, 5 Apr 2015 05:27:34 +0000 (22:27 -0700)]
Bluetooth: hci_uart: Add name information to hci_uart_proto struct

This adds an extra name field to the hci_uart_proto struct that provides
a simple way of adding a string identifier to the protocol.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Make struct hci_uart_proto always const
Marcel Holtmann [Sun, 5 Apr 2015 05:11:43 +0000 (22:11 -0700)]
Bluetooth: hci_uart: Make struct hci_uart_proto always const

The usage of struct hci_uart_proto should always be const. Change the
function headers and individual protocol drivers.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: Remove hci_recv_stream_fragment function
Marcel Holtmann [Sun, 5 Apr 2015 04:59:27 +0000 (21:59 -0700)]
Bluetooth: Remove hci_recv_stream_fragment function

The hci_recv_stream_fragment function should have never been introduced
in the first place. The Bluetooth core does not need to know anything
about the HCI transport protocol.

With all transport protocol specific detailed moved back into the
drivers where they belong (mainly generic USB and UART drivers), this
function can now be removed.

This reduces the size of hci_dev structure and also removes an exported
symbol from the Bluetooth core module.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Use h4_recv_buf helper for Atheros AR300x
Marcel Holtmann [Sun, 5 Apr 2015 04:59:26 +0000 (21:59 -0700)]
Bluetooth: hci_uart: Use h4_recv_buf helper for Atheros AR300x

Instead of using hci_recv_stream_fragment, use the local available
h4_recv_buf helper function.

To ensure that the function is available select BT_HCIUART_H4.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Use h4_recv_buf helper for H:4 protocol
Marcel Holtmann [Sun, 5 Apr 2015 04:59:25 +0000 (21:59 -0700)]
Bluetooth: hci_uart: Use h4_recv_buf helper for H:4 protocol

Instead of using hci_recv_stream_fragment, use the local available
h4_recv_buf helper function.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Introduce h4_recv_buf helper function
Marcel Holtmann [Sun, 5 Apr 2015 04:59:24 +0000 (21:59 -0700)]
Bluetooth: hci_uart: Introduce h4_recv_buf helper function

The h4_recv_buf helper function can be used for receiving H:4 packets
out of a TTY stream. It is self-contained and allows for reuse by all
HCI UART protocols.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Use const data pointer for received data
Marcel Holtmann [Sun, 5 Apr 2015 03:59:41 +0000 (20:59 -0700)]
Bluetooth: hci_uart: Use const data pointer for received data

The TTY layer provides its data pointers as const, but the HCI UART
callbacks expect them as general data pointers. This is of course
wrong and instead of casting them, just fix the individual drivers
to actually take a const data pointer.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: Make data pointer of hci_recv_stream_fragment const
Marcel Holtmann [Sun, 5 Apr 2015 03:59:40 +0000 (20:59 -0700)]
Bluetooth: Make data pointer of hci_recv_stream_fragment const

The data pointer provided to hci_recv_stream_fragment function should
have been marked const. The function has no business in modifying the
original data. So fix this now.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Remove unused h4->rx_state and h4->rx_count field
Marcel Holtmann [Sun, 5 Apr 2015 03:29:27 +0000 (20:29 -0700)]
Bluetooth: hci_uart: Remove unused h4->rx_state and h4->rx_count field

The fields h4->rx_state and h4->rx_count are not used at all and with
that they can be just removed.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Remove unused h4->rx_skb field
Marcel Holtmann [Sun, 5 Apr 2015 03:25:50 +0000 (20:25 -0700)]
Bluetooth: hci_uart: Remove unused h4->rx_skb field

The h4->rx_skb is not used anymore and with that just remove it. Seems
this was a leftover and even the kfree_skb call freeing it is rather
pointless since it got never allocated.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Fix indentation issues for multi-line functions
Marcel Holtmann [Sun, 5 Apr 2015 02:57:22 +0000 (19:57 -0700)]
Bluetooth: hci_uart: Fix indentation issues for multi-line functions

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Remove unneeded cast of tty->disc_data
Marcel Holtmann [Sun, 5 Apr 2015 02:57:21 +0000 (19:57 -0700)]
Bluetooth: hci_uart: Remove unneeded cast of tty->disc_data

Casting the tty->disc_data to (void *) is not needed at all. So just
remove this cast and assign the object without a cast.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Add support Broadcom address configuration
Marcel Holtmann [Sat, 4 Apr 2015 23:13:03 +0000 (16:13 -0700)]
Bluetooth: hci_uart: Add support Broadcom address configuration

When using vendor detection, this adds support for the Broadcom
specific address configuration command.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Add support Intel address configuration
Marcel Holtmann [Sat, 4 Apr 2015 23:13:02 +0000 (16:13 -0700)]
Bluetooth: hci_uart: Add support Intel address configuration

When using vendor detection, this adds support for the Intel specific
address configuration command.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoBluetooth: hci_uart: Add support for vendor detection flag
Marcel Holtmann [Sat, 4 Apr 2015 23:13:01 +0000 (16:13 -0700)]
Bluetooth: hci_uart: Add support for vendor detection flag

This adds a new HCI_UART_VND_DETECT flag to allow automatic vendor
detection. This allows to enable known vendor commands (for example
for setting the public device address) when using a standard H:4
UART protocol or when running in virtual machines.

When this new flag is configured and no vendor specific setup
routine is provided, then the local version information are read
and the provided manufacturer information can be evaluated to
configure extra vendor callbacks.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
9 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
David S. Miller [Tue, 7 Apr 2015 15:47:52 +0000 (11:47 -0400)]
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next

Johan Hedberg says:

====================
pull request: bluetooth-next 2015-04-04

Here's what's probably the last bluetooth-next pull request for 4.1:

 - Fixes for LE advertising data & advertising parameters
 - Fix for race condition with HCI_RESET flag
 - New BNEPGETSUPPFEAT ioctl, needed for certification
 - New HCI request callback type to get the resulting skb
 - Cleanups to use BIT() macro wherever possible
 - Consolidate Broadcom device entries in the btusb HCI driver
 - Check for valid flags in CMTP, HIDP & BNEP
 - Disallow local privacy & OOB data combo to prevent a potential race
 - Expose SMP & ECDH selftest results through debugfs
 - Expose current Device ID info through debugfs

Please let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: David S. Miller <[email protected]>
9 years agocfg80211: send extended capabilities IE in connect
Johannes Berg [Tue, 31 Mar 2015 14:09:13 +0000 (16:09 +0200)]
cfg80211: send extended capabilities IE in connect

If the connect request from userspace didn't include an extended
capabilities IE, create one using the driver capabilities. This
fixes VHT associations, since those need to set the operating mode
notification capability.

Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
9 years agocfg80211: move IE split utilities here from mac80211
Johannes Berg [Tue, 31 Mar 2015 13:36:22 +0000 (15:36 +0200)]
cfg80211: move IE split utilities here from mac80211

As the next patch will require the IE splitting utility functions
in cfg80211, move them there from mac80211.

Signed-off-by: Johannes Berg <[email protected]>
9 years agoNFC: logging neatening
Joe Perches [Tue, 7 Apr 2015 07:17:00 +0000 (00:17 -0700)]
NFC: logging neatening

Add missing terminating newlines to nfc_info and nfc_err
to avoid possible interleaving from other messages.

Miscellanea:

o typo fix of "unknonwn" in message
o remove unnecessary OOM messages as there's a generic dump_stack()
o realign arguments

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
9 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Tue, 7 Apr 2015 01:52:19 +0000 (21:52 -0400)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Conflicts:
drivers/net/ethernet/mellanox/mlx4/cmd.c
net/core/fib_rules.c
net/ipv4/fib_frontend.c

The fib_rules.c and fib_frontend.c conflicts were locking adjustments
in 'net' overlapping addition and removal of code in 'net-next'.

The mlx4 conflict was a bug fix in 'net' happening in the same
place a constant was being replaced with a more suitable macro.

Signed-off-by: David S. Miller <[email protected]>
9 years agoLinux 4.0-rc7 v4.0-rc7
Linus Torvalds [Mon, 6 Apr 2015 22:39:45 +0000 (15:39 -0700)]
Linux 4.0-rc7

9 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Mon, 6 Apr 2015 22:19:59 +0000 (15:19 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) In TCP, don't register an FRTO for cumulatively ACK'd data that was
    previously SACK'd, from Neal Cardwell.

 2) Need to hold RNL mutex in ipv4 multicast code namespace cleanup,
    from Cong WANG.

 3) Similarly we have to hold RNL mutex for fib_rules_unregister(), also
    from Cong WANG.

 4) Revert and rework netns nsid allocation fix, from Nicolas Dichtel.

 5) When we encapsulate for a tunnel device, skb->sk still points to the
    user socket.  So this leads to cases where we retraverse the
    ipv4/ipv6 output path with skb->sk being of some other address
    family (f.e. AF_PACKET).  This can cause things to crash since the
    ipv4 output path is dereferencing an AF_PACKET socket as if it were
    an ipv4 one.

    The short term fix for 'net' and -stable is to elide these socket
    checks once we've entered an encapsulation sequence by testing
    xmit_recursion.

    Longer term we have a better solution wherein we pass the tunnel's
    socket down through the output paths, but that is way too invasive
    for 'net' and -stable.

    From Hannes Frederic Sowa.

 6) l2tp_init() failure path forgets to unregister per-net ops, from
    Cong WANG.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  net/mlx4_core: Fix error message deprecation for ConnectX-2 cards
  net: dsa: fix filling routing table from OF description
  l2tp: unregister l2tp_net_ops on failure path
  mvneta: dont call mvneta_adjust_link() manually
  ipv6: protect skb->sk accesses from recursive dereference inside the stack
  netns: don't allocate an id for dead netns
  Revert "netns: don't clear nsid too early on removal"
  ip6mr: call del_timer_sync() in ip6mr_free_table()
  net: move fib_rules_unregister() under rtnl lock
  ipv4: take rtnl_lock and mark mrt table as freed on namespace cleanup
  tcp: fix FRTO undo on cumulative ACK of SACKed range
  xen-netfront: transmit fully GSO-sized packets

9 years agonet/mlx4_core: Fix error message deprecation for ConnectX-2 cards
Jack Morgenstein [Sun, 5 Apr 2015 14:50:48 +0000 (17:50 +0300)]
net/mlx4_core: Fix error message deprecation for ConnectX-2 cards

Commit 1daa4303b4ca ("net/mlx4_core: Deprecate error message at
ConnectX-2 cards startup to debug") did the deprecation only for port 1
of the card. Need to deprecate for port 2 as well.

Fixes: 1daa4303b4ca ("net/mlx4_core: Deprecate error message at ConnectX-2 cards startup to debug")
Signed-off-by: Jack Morgenstein <[email protected]>
Signed-off-by: Amir Vadai <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet: dsa: fix filling routing table from OF description
Pavel Nakonechny [Sat, 4 Apr 2015 21:46:21 +0000 (00:46 +0300)]
net: dsa: fix filling routing table from OF description

According to description in 'include/net/dsa.h', in cascade switches
configurations where there are more than one interconnected devices,
'rtable' array in 'dsa_chip_data' structure is used to indicate which
port on this switch should be used to send packets to that are destined
for corresponding switch.

However, dsa_of_setup_routing_table() fills 'rtable' with port numbers
of the _target_ switch, but not current one.

This commit removes redundant devicetree parsing and adds needed port
number as a function argument. So dsa_of_setup_routing_table() now just
looks for target switch number by parsing parent of 'link' device node.

To remove possible misunderstandings with the way of determining target
switch number, a corresponding comment was added to the source code and
to the DSA device tree bindings documentation file.

This was tested on a custom board with two Marvell 88E6095 switches with
following corresponding routing tables: { -1, 10 } and { 8, -1 }.

Signed-off-by: Pavel Nakonechny <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Mon, 6 Apr 2015 21:10:08 +0000 (14:10 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:
 "Updates for the input subsystem - two more tweaks for ALPS driver to
  work out kinks after splitting the touchpad, trackstick, and potential
  external PS/2 mouse into separate input devices.

  Changes to support ALPS SS4 devices (protocol V8) will be coming in
  4.1..."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: alps - document stick behavior for protocol V2
  Input: alps - report V2 Dualpoint Stick events via the right evdev node
  Input: alps - report interleaved bare PS/2 packets via dev3

9 years agol2tp: unregister l2tp_net_ops on failure path
WANG Cong [Fri, 3 Apr 2015 20:46:09 +0000 (13:46 -0700)]
l2tp: unregister l2tp_net_ops on failure path

Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agovirtio: document queue state logic
Michael S. Tsirkin [Thu, 2 Apr 2015 11:05:47 +0000 (13:05 +0200)]
virtio: document queue state logic

commit d631b94e7a15277858ec5f88d674d93080506999
    virtio: change comment in transmit

started clarifying the logic behind queue state management,
but introduced an inaccuracy: TX_BUSY does not cause
a BUG message.

Clean this up some more, explaining the tradeoffs in detail.

Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agotc: bpf: add checksum helpers
Alexei Starovoitov [Thu, 2 Apr 2015 00:12:13 +0000 (17:12 -0700)]
tc: bpf: add checksum helpers

Commit 608cd71a9c7c ("tc: bpf: generalize pedit action") has added the
possibility to mangle packet data to BPF programs in the tc pipeline.
This patch adds two helpers bpf_l3_csum_replace() and bpf_l4_csum_replace()
for fixing up the protocol checksums after the packet mangling.

It also adds 'flags' argument to bpf_skb_store_bytes() helper to avoid
unnecessary checksum recomputations when BPF programs adjusting l3/l4
checksums and documents all three helpers in uapi header.

Moreover, a sample program is added to show how BPF programs can make use
of the mangle and csum helpers.

Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agomvneta: dont call mvneta_adjust_link() manually
Stas Sergeev [Wed, 1 Apr 2015 16:23:29 +0000 (19:23 +0300)]
mvneta: dont call mvneta_adjust_link() manually

mvneta_adjust_link() is a callback for of_phy_connect() and should
not be called directly. The result of calling it directly is as below:

Signed-off-by: David S. Miller <[email protected]>
9 years agoipv6: protect skb->sk accesses from recursive dereference inside the stack
[email protected] [Wed, 1 Apr 2015 15:07:44 +0000 (17:07 +0200)]
ipv6: protect skb->sk accesses from recursive dereference inside the stack

We should not consult skb->sk for output decisions in xmit recursion
levels > 0 in the stack. Otherwise local socket settings could influence
the result of e.g. tunnel encapsulation process.

ipv6 does not conform with this in three places:

1) ip6_fragment: we do consult ipv6_npinfo for frag_size

2) sk_mc_loop in ipv6 uses skb->sk and checks if we should
   loop the packet back to the local socket

3) ip6_skb_dst_mtu could query the settings from the user socket and
   force a wrong MTU

Furthermore:
In sk_mc_loop we could potentially land in WARN_ON(1) if we use a
PF_PACKET socket ontop of an IPv6-backed vxlan device.

Reuse xmit_recursion as we are currently only interested in protecting
tunnel devices.

Cc: Jiri Pirko <[email protected]>
Signed-off-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoNFC: pn533: fix error return code
Julia Lawall [Sun, 5 Apr 2015 12:06:36 +0000 (14:06 +0200)]
NFC: pn533: fix error return code

Return a negative error code on failure.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
9 years agoNFC: nxp-nci: Release firmware when switching to FW mode fails
Samuel Ortiz [Sun, 5 Apr 2015 22:58:51 +0000 (00:58 +0200)]
NFC: nxp-nci: Release firmware when switching to FW mode fails

In that case, the firmware work will never be scheduled, will
never complete and thus the firmware will never be released.

Signed-off-by: Samuel Ortiz <[email protected]>
9 years agoNFC: nxp-nxi: Remove useless fw pointer check
Samuel Ortiz [Sun, 5 Apr 2015 22:51:17 +0000 (00:51 +0200)]
NFC: nxp-nxi: Remove useless fw pointer check

It request_firmware returns 0, the request succeeded and the
firmware pointer is valid. No need to check for it.

Signed-off-by: Samuel Ortiz <[email protected]>
9 years agonfc: st21nfca: Add additional comments about EVT_TRANSACTION
Christophe Ricard [Tue, 31 Mar 2015 06:02:23 +0000 (08:02 +0200)]
nfc: st21nfca: Add additional comments about EVT_TRANSACTION

Add comments about HCI EVT_TRANSACTION in order to make the code
understandable by other readers.

Signed-off-by: Christophe Ricard <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
9 years agonfc: st21nfcb: Add additional comments about EVT_TRANSACTION
Christophe Ricard [Tue, 31 Mar 2015 06:02:22 +0000 (08:02 +0200)]
nfc: st21nfcb: Add additional comments about EVT_TRANSACTION

Add comments about HCI EVT_TRANSACTION in order to make the code
understandable by other readers.

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Christophe Ricard <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
9 years agonfc: nci: Add comment to explain NCI_HCI_MAX_PIPES
Christophe Ricard [Tue, 31 Mar 2015 06:02:21 +0000 (08:02 +0200)]
nfc: nci: Add comment to explain NCI_HCI_MAX_PIPES

According to specification etsi 102 622 chapter 4.4 pipes
identifier is 7 bits long giving a 127 possible pipes value.

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Christophe Ricard <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
9 years agonfc: st21nfcb: Add missing break statement in switch section
Christophe Ricard [Tue, 31 Mar 2015 06:02:20 +0000 (08:02 +0200)]
nfc: st21nfcb: Add missing break statement in switch section

Add missing break statement when ST21NFCB_EVT_TRANSACTION switch
section ends.

Signed-off-by: Christophe Ricard <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
9 years agonfc: Reduce nfc_evt_transaction params length to 0
Christophe Ricard [Tue, 31 Mar 2015 06:02:19 +0000 (08:02 +0200)]
nfc: Reduce nfc_evt_transaction params length to 0

According to etsi 102 622 chapter 11.2.2.4 EVT_TRANSACTION,
the nfc_evt_transaction parameters can be 0 up to 255 byte long.

Signed-off-by: Christophe Ricard <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
9 years agonfc: hci: Add comment to explain NFC_HCI_MAX_PIPES
Christophe Ricard [Tue, 31 Mar 2015 06:02:18 +0000 (08:02 +0200)]
nfc: hci: Add comment to explain NFC_HCI_MAX_PIPES

According to specification etsi 102 622 chapter 4.4 pipes identifier
is 7 bits long giving a 127 possible pipes value.

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Christophe Ricard <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
9 years agoNFC: st21nfca: Change st21nfca_get_iso14443_3_uid parameter name
Christophe Ricard [Tue, 31 Mar 2015 06:02:17 +0000 (08:02 +0200)]
NFC: st21nfca: Change st21nfca_get_iso14443_3_uid parameter name

st21nfca_get_iso14443_3_uid gate parameter name is incorrect
and should be uid.

Signed-off-by: Christophe Ricard <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
9 years agoNFC: st21nfca: fix st21nfca_get_iso14443_3_uid data copy
Christophe Ricard [Tue, 31 Mar 2015 06:02:16 +0000 (08:02 +0200)]
NFC: st21nfca: fix st21nfca_get_iso14443_3_uid data copy

st21nfca_get_iso14443_3_uid() does not correctly copy the uid from
uid_skb->data to its gate parameter. "gate = uid_skb->data;" only
puts a pointer to uid_skb->data to the local variable gate.
This means that in st21nfca_hci_target_from_gate() the content
of "u8 uid[NFC_NFCID1_MAXSIZE]" local variable is never initialized
before being used in memcpy(target->nfcid1, uid, len).

Fix this by replacing the local variable assignment with a memcpy.

This was found by compiling Linux with
"gcc -Wunused-but-set-parameter".

Acked-by: Christophe Ricard <[email protected]>
Signed-off-by: Nicolas Iooss <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
9 years agoNFC: st21nfcb: Retry i2c_master_send if it returns a negative value
Christophe Ricard [Tue, 31 Mar 2015 06:02:15 +0000 (08:02 +0200)]
NFC: st21nfcb: Retry i2c_master_send if it returns a negative value

i2c_master_send may return many negative values different than
-EREMOTEIO.
In case an i2c transaction is NACK'ed, on raspberry pi B+
kernel 3.18, -EIO is generated instead.

Cc: [email protected]
Signed-off-by: Christophe Ricard <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
9 years agoNFC: st21nfcb: Fix memory leak in secure element probing stage
Christophe Ricard [Tue, 31 Mar 2015 06:02:14 +0000 (08:02 +0200)]
NFC: st21nfcb: Fix memory leak in secure element probing stage

In case the hci session is successfully initialized we never
release the nci_core_conn_create dest_params.

Signed-off-by: Christophe Ricard <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
9 years agoInput: alps - document stick behavior for protocol V2
Hans de Goede [Sat, 4 Apr 2015 00:30:31 +0000 (17:30 -0700)]
Input: alps - document stick behavior for protocol V2

Document that protocol V2 uses standard (bare) PS/2 mouse packets for the
DualPoint stick.

Signed-off-by: Hans de Goede <[email protected]>
Acked-By: Pali Rohár <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
9 years agoInput: alps - report V2 Dualpoint Stick events via the right evdev node
Hans de Goede [Sat, 4 Apr 2015 00:20:05 +0000 (17:20 -0700)]
Input: alps - report V2 Dualpoint Stick events via the right evdev node

On V2 devices the DualPoint Stick reports bare packets, these should be
reported via the "AlpsPS/2 ALPS DualPoint Stick" dev2 evdev node, which also
has the INPUT_PROP_POINTING_STICK propbit set.

Note that since there is no way to distinguish these packets from an external
PS/2 mouse (insofar as these laptops have an external PS/2 port) this means
that we will be reporting PS/2 mouse events via this evdev node too, as we've
been doing in kernel 3.19 and older.

This has been tested on a Dell Latitude D620 and a Dell Latitude E6400,
which both have a V2 touchpad + a DualPoint Stick which reports bare packets.

Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Pali Rohár <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
9 years agoInput: alps - report interleaved bare PS/2 packets via dev3
Hans de Goede [Sat, 4 Apr 2015 00:14:40 +0000 (17:14 -0700)]
Input: alps - report interleaved bare PS/2 packets via dev3

Bare packets should be reported via the same evdev device independent on
whether they are detected on the beginning of a packet or in the middle
of a packet.

This has been tested on a Dell Latitude E6400, where the DualPoint Stick
reports bare packets, which get reported via dev3 when the touchpad is
idle, and via dev2 when the touchpad and stick are used simultaneously.

This commit fixes this inconsistency by always reporting bare packets via
dev3. Note that since the come from a DualPoint Stick they really should be
reported via dev2, this gets fixed in a later commit.

Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Pali Rohár <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
9 years agoMerge tag 'usb-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sat, 4 Apr 2015 19:26:28 +0000 (12:26 -0700)]
Merge tag 'usb-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some small USB fixes and new device ids for 4.0-rc6.  Nothing
  major, some xhci fixes for reported problems, and some usb-serial
  device ids.

  All have been in linux-next for a while"

* tag 'usb-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: ftdi_sio: Use jtag quirk for SNAP Connect E10
  usb: isp1760: fix spin unlock in the error path of isp1760_udc_start
  usb: xhci: apply XHCI_AVOID_BEI quirk to all Intel xHCI controllers
  usb: xhci: handle Config Error Change (CEC) in xhci driver
  USB: keyspan_pda: add new device id
  USB: ftdi_sio: Added custom PID for Synapse Wireless product

9 years agoMerge branch 'nf-hook-compress'
David S. Miller [Sat, 4 Apr 2015 19:23:15 +0000 (15:23 -0400)]
Merge branch 'nf-hook-compress'

netfilter: Compress hook function signatures.

Currently netfilter hooks have a function signature that is huge and
has many arguments.  This propagates from the hook entry points down
into the individual hook implementations themselves.

This means that if, for example, we want to change the type of one of
these arguments then we have to touch hundreds of locations.

The main initial motivation behind this is that we'd like to change
the signature of "okfn" so that a socket pointer can be passed in (and
reference counted properly) for the sake of using the proper socket
context in the case of tunnels whilst not releasing the top level user
socket from skb->sk (and thus releasing it's socket memory quota
usage) in order to accomodate this.

This also makes it clear who actually uses 'okfn', nf_queue().  It is
absolutely critical to make this obvious because any user of 'okfn'
down in these hook chains have the be strictly audited for
escapability.  Specifically, escapability of references to objects
outside of the packet processing path.  And that's exactly what
nf_queue() does via it's packet reinjection framework.

In fact this points out a bug in Jiri's original attempt to push the
socket pointer down through netfilter's okfn.  It didn't grab and drop
a reference to the socket in net/netfilter/nf_queue.c as needed.

Furthermore, so many code paths are simplified, and should in fact be
more efficient because we aren't passing in arguments that often are
simply not used by the netfilter hook at all.

Further simplifications are probably possible, but this series takes
care of the main cases.

Unfortunately I couldn't convert ebt_do_table() because ebtables is
complete and utter crap and uses ebt_do_table() outside of the hook
call chains.  But that should not be news to anyone.

Signed-off-by: David S. Miller <[email protected]>
Acked-by: Pablo Neira Ayuso <[email protected]>
9 years agoMerge tag 'staging-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 4 Apr 2015 19:22:31 +0000 (12:22 -0700)]
Merge tag 'staging-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver fixes from Greg KH:
 "Here are some staging driver fixes, well, really all just IIO driver
  fixes, for 4.0-rc6.  They fix issues that have been reported with
  these drivers.

  All of these patches have been in linux-next for a while"

* tag 'staging-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  iio: imu: Use iio_trigger_get for indio_dev->trig assignment
  iio: adc: vf610: use ADC clock within specification
  iio/adc/cc10001_adc.c: Fix !HAS_IOMEM build
  iio: core: Fix double free.
  iio:inv-mpu6050: Fix inconsistency for the scale channel
  staging: iio: dummy: Fix undefined symbol build error
  iio: inv_mpu6050: Clear timestamps fifo while resetting hardware fifo
  staging: iio: hmc5843: Set iio name property in sysfs
  iio: bmc150: change sampling frequency
  iio: fix drivers that check buffer->scan_mask

9 years agoMerge tag 'tty-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sat, 4 Apr 2015 19:11:57 +0000 (12:11 -0700)]
Merge tag 'tty-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are 3 serial driver fixes for 4.0-rc6.  They fix some reported
  issues with the samsung and fsl_lpuart drivers.

  All have been in linux-next for a while"

* tag 'tty-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: serial: fsl_lpuart: clear receive flag on FIFO flush
  tty: serial: fsl_lpuart: specify transmit FIFO size
  serial: samsung: Clear operation mode on UART shutdown

9 years agonetfilter: Pass nf_hook_state through arpt_do_table().
David S. Miller [Sat, 4 Apr 2015 01:18:46 +0000 (21:18 -0400)]
netfilter: Pass nf_hook_state through arpt_do_table().

Signed-off-by: David S. Miller <[email protected]>
9 years agonetfilter: Pass nf_hook_state through nft_set_pktinfo*().
David S. Miller [Sat, 4 Apr 2015 01:16:25 +0000 (21:16 -0400)]
netfilter: Pass nf_hook_state through nft_set_pktinfo*().

Signed-off-by: David S. Miller <[email protected]>
9 years agonetfilter: Pass nf_hook_state through ip6t_do_table().
David S. Miller [Sat, 4 Apr 2015 01:09:51 +0000 (21:09 -0400)]
netfilter: Pass nf_hook_state through ip6t_do_table().

Signed-off-by: David S. Miller <[email protected]>
9 years agonetfilter: Pass nf_hook_state through nf_nat_ipv6_{in,out,fn,local_fn}().
David S. Miller [Sat, 4 Apr 2015 01:05:07 +0000 (21:05 -0400)]
netfilter: Pass nf_hook_state through nf_nat_ipv6_{in,out,fn,local_fn}().

Signed-off-by: David S. Miller <[email protected]>
9 years agonetfilter: Pass nf_hook_state through ipt_do_table().
David S. Miller [Sat, 4 Apr 2015 00:56:08 +0000 (20:56 -0400)]
netfilter: Pass nf_hook_state through ipt_do_table().

Signed-off-by: David S. Miller <[email protected]>
9 years agonetfilter: Pass nf_hook_state through nf_nat_ipv4_{in,out,fn,local_fn}().
David S. Miller [Sat, 4 Apr 2015 00:51:13 +0000 (20:51 -0400)]
netfilter: Pass nf_hook_state through nf_nat_ipv4_{in,out,fn,local_fn}().

Signed-off-by: David S. Miller <[email protected]>
This page took 0.10909 seconds and 4 git commands to generate.