Commit Graph

19929 Commits

Author SHA1 Message Date
showp1984
8feb8791ac compile fixups for netfilter 2012-01-23 02:56:26 -06:00
Linux Build Service Account
e7f5fcd146 Merge changes I4b01ddca,I15b9ab7d into msm-3.0
* changes:
  Bluetooth: Use hci dev number as AMP controller ID
  Bluetooth: Release module reference counts
2011-11-29 16:58:29 -08:00
Linux Build Service Account
5f6e33654c Merge "Bluetooth: Fix erroneous Pairing Failure condition" into msm-3.0 2011-11-23 07:59:32 -08:00
Mat Martineau
4106b99f11 Bluetooth: Keep persistent hdev flags after the device is closed.
Change-Id: Ifb9ccf93be53f2f3e6bb7773b4d39a6328dce73f
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
2011-11-22 07:51:27 -08:00
Linux Build Service Account
201e87ef10 Merge "Bluetooth: Clear RFCOMM session timer when disconnecting last channel" into msm-3.0 2011-11-21 04:16:33 -08:00
Linux Build Service Account
2f0ec1450b Merge "Merge remote-tracking branch 'common/android-3.0' into msm-3.0" into msm-3.0 2011-11-18 21:35:29 -08:00
Linux Build Service Account
808cb2b2a7 Merge "Bluetooth: Remove _bh locking for AMP Manager" into msm-3.0 2011-11-17 21:34:56 -08:00
Mat Martineau
6890394894 Bluetooth: Clear RFCOMM session timer when disconnecting last channel
When the last RFCOMM data channel is closed, a timer is normally set
up to disconnect the control channel at a later time.  If the control
channel disconnect command is sent with the timer pending, the timer
needs to be cancelled.

If the timer is not cancelled in this situation, the reference
counting logic for the RFCOMM session does not work correctly when the
remote device closes the L2CAP connection.  The session is freed at
the wrong time, leading to a kernel panic.

CRs-fixed: 317859
Change-Id: I778fdf8dbff8afe0a1c157b02d39872262088584
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
2011-11-17 14:24:46 -08:00
Brian Gix
2a335267a4 Bluetooth: Fix erroneous Pairing Failure condition
When local device is done sending LE pairing keys, it should not
be sending a pairing failure event to User space.

Change-Id: I49d77040e8f72567c0c7ece053aa58227c87a0f0
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-11-17 13:02:23 -08:00
Bryan Huntsman
d074fa2796 Merge remote-tracking branch 'common/android-3.0' into msm-3.0
* common/android-3.0: (570 commits)
  misc: remove kernel debugger core
  ARM: common: fiq_debugger: dump sysrq directly to console if enabled
  ARM: common: fiq_debugger: add irq context debug functions
  net: wireless: bcmdhd: Call init_ioctl() only if was started properly for WEXT
  net: wireless: bcmdhd: Call init_ioctl() only if was started properly
  net: wireless: bcmdhd: Fix possible memory leak in escan/iscan
  cpufreq: interactive governor: default 20ms timer
  cpufreq: interactive governor: go to intermediate hi speed before max
  cpufreq: interactive governor: scale to max only if at min speed
  cpufreq: interactive governor: apply intermediate load on current speed
  ARM: idle: update idle ticks before call idle end notifier
  input: gpio_input: don't print debounce message unless flag is set
  net: wireless: bcm4329: Skip dhd_bus_stop() if bus is already down
  net: wireless: bcmdhd: Skip dhd_bus_stop() if bus is already down
  net: wireless: bcmdhd: Improve suspend/resume processing
  net: wireless: bcmdhd: Check if FW is Ok for internal FW call
  tcp: Don't nuke connections for the wrong protocol
  ARM: common: fiq_debugger: make uart irq be no_suspend
  net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT
  mm: avoid livelock on !__GFP_FS allocations
  ...

Conflicts:
	arch/arm/mm/cache-l2x0.c
	arch/arm/vfp/vfpmodule.c
	drivers/mmc/core/host.c
	kernel/power/wakelock.c
	net/bluetooth/hci_event.c

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-11-16 13:52:50 -08:00
Peter Krystad
4e1c9fa806 Bluetooth: Use hci dev number as AMP controller ID
Previously an offset was added to the hci dev number to generate the
AMP controller ID, because it was possible for the PAL to register
as hci0, and 0 is invalid for an AMP controller ID. Since this commit
462bf76d29 it is not possible for
the PAL to register as hci0, so this offset is no longer necessary.

Change-Id: I4b01ddca5fad3aebeb4c138b5aee8819bb146f3d
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
2011-11-16 09:47:51 -08:00
Peter Krystad
f7dcc79902 Bluetooth: Release module reference counts
In three places a reference was taken without being returned.

Change-Id: I15b9ab7de530a77832d8b10fe756cfdf0b01760f
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
2011-11-15 14:40:45 -08:00
Peter Krystad
f52892066f Bluetooth: Remove _bh locking for AMP Manager
Since all AMP Manager processing is done on work queues no
bottom-half locking is required.

CRs-fixed: 318632
Change-Id: I3a07c412ccf30d62d68cc80124fad5700bcc0917
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
2011-11-15 14:40:37 -08:00
Brian Gix
dbf5929927 Bluetooth: Allow auto-accept if remote NoInNoOut
If we initiated a Dedicated pairing, and the remote device
is a NoInputNoOutput capable device, allow auto-acceptance
of pairing.

Change-Id: Ia5cc3e3d458cee98aef0493a423d29e9955638c3
CRs-fixed: 318144
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-11-11 21:51:10 -08:00
Lorenzo Colitti
adfa7bc8b4 tcp: Don't nuke connections for the wrong protocol
Currently, calling tcp_nuke_addr to reset IPv6 connections
resets IPv4 connections as well, because all Android
framework sockets are dual-stack (i.e., IPv6) sockets, and
we don't check the source address to see if the connection
was in fact an IPv4 connection.

Fix this by checking the source address and not resetting
the connection if it's a mapped address.

Also slightly tweak the IPv4 code path, which doesn't check
for mapped addresses either. This was not causing any
problems because tcp_is_local normally always returns true
for LOOPBACK4_IPV6 (127.0.0.6), because the loopback
interface is configured as as 127.0.0.0/8. However,
checking explicitly for LOOPBACK4_IPV6 makes the code a bit
more robust.

Bug: 5535055
Change-Id: I4d6ed3497c5b8643c864783cf681f088cf6b8d2a
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
2011-11-03 17:08:47 -07:00
Brian Gix
6e4531c6fb Bluetooth: Fix Init sequence when device is restarted
On some platforms, device state data can be left around, and some
commands may take longer than 1 second to execute. This change increases
the per command time-out, and reinitializes the features mask.

Change-Id: Ib707996b97139c97e9a0deacd4a11019cf75da8c
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-11-03 11:17:15 -07:00
Brian Gix
7f7e16c279 Bluetooth: Add API to set LE Connection Parameters
Include auto-setting connection parameters during Pairing for
low latenecy, and default (high latency) settings for non-Pairing
connections.

Change-Id: Ie8e3f65da52213451dcc01fce38d95ae07d1b13b
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-11-02 09:04:14 -07:00
Linux Build Service Account
0716b5e34f Merge "Bluetooth: Use proper sock reference counting in L2CAP" into msm-3.0 2011-11-01 09:26:52 -07:00
Linux Build Service Account
ca3690dbae Merge "Bluetooth: EIR to carry update local device name." into msm-3.0 2011-10-31 18:53:36 -07:00
Mat Martineau
f00ffac82c Bluetooth: Align socket option definitions with upstream kernel
The upstream kernel has acquired new BT socket options since
BT_AMP_POLICY was first defined, now BT_FLUSHABLE is option 8 and
BT_POWER is option 9.  It will save us some future pain if we align
with upstream code now and make BT_AMP_POLICY be option 10.

In addition, the option values for BT_AMP_POLICY were changed during
the upstreaming process.

CRs-fixed: 313757
Change-Id: Ia31e9c8cfd5207a6dd44e40a605d3021f5ce9fd9
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
2011-10-31 15:08:45 -07:00
Mat Martineau
2f0cd84428 Bluetooth: Use proper sock reference counting in L2CAP
A socket can be shut down while pointer to that socket is stored in a
queued skbuff or in a pending workqueue struct. Correct use of socket
reference counting will make sure the socket struct stays around until
there are no remaining references.

Change-Id: Ic3679e023a46b224929b3cefb6370d7871e3368a
CRs-fixed: 313736
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
2011-10-31 14:59:18 -07:00
Royston Rodrigues
c58c0c2253 Bluetooth: EIR to carry update local device name.
Whenever local device name is changed, EIR payload
is updated with the modified local device name.

CRs-fixed: 314228
Change-Id: Ib2ec05b6ac4f4a55612716f0567ee04056579ed6
Signed-off-by: Royston Rodrigues <roystonr@codeaurora.org>
2011-10-31 10:47:09 +05:30
Brian Gix
cf95677cc3 Bluetooth: Cache LE Address Type with LTK, and use for reconnections
LE-Only devices require that an Address Type (Public or Random) be
included in Connection Requests. This info is available at Pairing
but must be cached so that it is available at reconnection time.
This change includes the Address type with the Pairing data.

Change-Id: I50c78ad31d8be70f5c3f49a0529039e4a26daaac
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-10-30 18:32:10 -07:00
Linux Build Service Account
9e9224d409 Merge "Bluetooth: Don't use incomplete LE LTKs to secure link" into msm-3.0 2011-10-30 04:35:55 -07:00
Dmitry Shmidt
9f135b3d8d net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-10-28 10:35:37 -07:00
Linux Build Service Account
b89e7c3714 Merge "cne: Add reference count for Smart Wireless Interface Manager" into msm-3.0 2011-10-27 18:42:13 -07:00
Colin Cross
2bb3e31015 Merge commit 'v3.0.8' into android-3.0 2011-10-27 15:01:19 -07:00
Chinh Tran
bbebbfed74 cne: Add reference count for Smart Wireless Interface Manager
Add the reference count for Smart Wireless Interface Manager to
know whether there are any process who still has the socket in
question in use or not.
Enable INET DIAG.
Redefine the TCP_FLAG as it gives compiling error when an enum is defined
by a function return.

Change-Id: I1aa9c810fec2e332048c9ef4199ec3f996bc3a75
Signed-off-by: Chinh Tran <chinht@codeaurora.org>
2011-10-27 09:23:11 -07:00
Brian Gix
372257b957 Bluetooth: Don't use incomplete LE LTKs to secure link
If LE link gets terminated during the pairing process, it
may leave SMP with half of a Long Term Key. This fix ensures
that this partial information is not used for future links.

Change-Id: Ib834fc81d7b4b558cc3d242522acef80dd1d8827
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-10-27 08:41:00 -07:00
Peter Krystad
c446d2111a Bluetooth: Check that remote supports A2MP before creating channel
Before attempting to create a channel directly on an AMP check
that the remote device supports A2MP signalling before starting
the physical link creation process.

Change-Id: Iac2bcebf9630368685e24e636e39ffa82651705d
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
2011-10-25 16:06:49 -07:00
Matthew Daley
4ea7f3aa5d x25: Prevent skb overreads when checking call user data
commit 7f81e25befdfb3272345a2e775f520e1d515fa20 upstream.

x25_find_listener does not check that the amount of call user data given
in the skb is big enough in per-socket comparisons, hence buffer
overreads may occur.  Fix this by adding a check.

Signed-off-by: Matthew Daley <mattjd@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Andrew Hendry <andrew.hendry@gmail.com>
Acked-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-25 07:10:17 +02:00
Linux Build Service Account
ede570c880 Merge "Bluetooth: Generate generic Fails for undeliverable ATT messages" into msm-3.0 2011-10-20 22:35:31 -07:00
Brian Gix
7eaa64dda6 Bluetooth: Generate generic Fails for undeliverable ATT messages
Change-Id: I04f9ec62b15abb090cb90d81442a83caf8caa447
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-10-19 13:20:02 -07:00
Brian Gix
8a7f164195 Bluetooth: Fix Limited Discoverability for MGMTOPS
CRs-fixed: 309551
Change-Id: I42c46c62dcb4b227d9ac48146ee61cb52063a6ae
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-10-18 13:13:57 -07:00
Dmitry Shmidt
fdfcbc682a net: wireless: Fix CFG80211_ALLOW_RECONNECT option for disconnect
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-10-18 12:30:02 -07:00
Jason Wang
a1b7ab0836 ipv6: fix NULL dereference in udp6_ufo_fragment()
This patch fixes the issue caused by ef81bb40bf
which is a backport of upstream 87c48fa3b4630905f98268dde838ee43626a060c. The
problem does not exist in upstream.

We do not check whether route is attached before trying to assign ip
identification through route dest which lead NULL pointer dereference. This
happens when host bridge transmit a packet from guest.

This patch changes ipv6_select_ident() to accept in6_addr as its paramter and
fix the issue by using the destination address in ipv6 header when no route is
attached.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-16 14:14:54 -07:00
Brian Gix
570efc917a Bluetooth: Fix error returned to bluez on LE Pairing Failure
Change-Id: I1e7908e133d53b41bdd58a54a2e293526e96e160
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-10-14 13:55:25 -07:00
Brian Gix
8d0b7d6797 Bluetooth: Fix LE pairing scenarios when initiated remotely
Fix setting of ENCRYPTION_PENDING and Connection refcnt's that could
be out of sync due to remote slave issued security requests.

Change-Id: Ie72abd0648182db0ef60693820139f40ef2e4bf6
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-10-14 13:55:24 -07:00
Linux Build Service Account
e4fe87773c Merge "Bluetooth: Socket lookup for a fixed L2CAP channel" into msm-3.0 2011-10-14 01:07:55 -07:00
Linux Build Service Account
4e4b1b1d69 Merge "Bluetooth: Timeout LE Connection requests" into msm-3.0 2011-10-12 19:55:56 -07:00
Inga Stotland
f214b6e656 Bluetooth: Socket lookup for a fixed L2CAP channel
Socket lookup for a fixed channel should be done based on both remote and
local device addresses.

Change-Id: I35f39bea8ade6fd5d8695640251efc54bf21beae
Signed-off-by: Inga Stotland <ingas@codeaurora.org>
2011-10-12 13:09:28 -07:00
Brian Gix
114f3a6d3c Bluetooth: Timeout LE Connection requests
If LE devices stop advertising or go out of range, we need
to apply a timeout because the baseband doesn't.

Change-Id: I115672e21fd8aef56ac688b2df4664bb74b725e4
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-10-11 11:03:06 -07:00
Brian Gix
58ba077931 Bluetooth: Complete LE Auth failure notification
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-10-11 09:59:28 -07:00
Peter Krystad
462bf76d29 Bluetooth: Guarantee BR-EDR device will be registered as hci0
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
2011-10-11 09:59:24 -07:00
JP Abgrall
8493beb104 netfilter: xt_qtaguid: fix crash on ctrl delete command
Because for now the xt_qtaguid module allows procs to use tags without
having /dev/xt_qtaguid open, there was a case where it would try
to delete a resources from a list that was proc specific.
But that resource was never added to that list which is only
used when /dev/xt_qtaguid has been opened by the proc.

Once our userspace is fully updated, we won't need those exceptions.

Change-Id: Idd4bfea926627190c74645142916e10832eb2504
Signed-off-by: JP Abgrall <jpa@google.com>
2011-10-07 22:16:01 -07:00
Ashish Sharma
3bc18c7282 bridge: Have tx_bytes count headers like rx_bytes.
Since rx_bytes accounting does not include Ethernet Headers in
br_input.c, excluding ETH_HLEN on the transmit path for consistent
measurement of packet length on both the Tx and Rx chains.

The clean way would be for Rx to include the eth header, but the
skb len has already been adjusted by the time the br code sees the skb.
This is only a temporary workaround until we can completely ignore or
cleanly fix the skb->len handling.

Change-Id: I910de95a4686b2119da7f1f326e2154ef31f9972
Signed-off-by: Ashish Sharma <ashishsharma@google.com>
2011-10-07 17:54:30 -07:00
Ashish Sharma
ca37d833b0 netfilter: xt_qtaguid: Fix the stats info display order
Change-Id: I3bf165c31f35a6c7dc212f23df5eefaeb8129d0d
Signed-off-by: Ashish Sharma <ashishsharma@google.com>
2011-10-06 17:02:06 -07:00
Brian Gix
fdd3892444 Bluetooth: Add EIR flags to LE Adv data cache
Use the EIR flags to prevent LE pairing attempts to
BR/EDR capable (Dual Mode) devices.

Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-10-04 17:14:22 -07:00
Brian Gix
065e8ff2cd Bluetooth: Balance LE hdev refcnt when not pairing.
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2011-10-04 17:14:08 -07:00
Srinivas Krovvidi
9ff51459ca Bluetooth: Storing Link key persistantly based on the Auth Req.
Store the link key persistently if one of the following is true:
 1. this is a legacy link key
 2. this is a changed combination key and there was a previously
    stored one
 3. neither local nor remote side had no-bonding as a requirement
 4. the local side had dedicated bonding as a requirement
 5. the remote side is using dedicated bonding since in that case
    also the local requirements are set to dedicated bonding
 If none of the above match only keep the link key around for
 this connection and set the temporary flag for the device.

CRs-Fixed: 309161
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
2011-10-04 17:13:59 -07:00