11 Jan, 2012
1 commit
04 Jan, 2012
1 commit
-
…wireless-next into for-davem
Conflicts:
drivers/net/wireless/b43/dma.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
03 Jan, 2012
1 commit
-
Everything is in process context now, we do not need such a call.
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan
20 Dec, 2011
1 commit
-
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"
Cc: netdev@vger.kernel.org
Signed-off-by: Rusty Russell
Signed-off-by: David S. Miller
19 Dec, 2011
4 commits
-
Instead of having an explicit service cache command we can make the mgmt
API simpler by implicitly enabling the cache when mgmt_read_info is
called for the first time and disabling it when mgmt_set_dev_class is
called.Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
This should simplify Bluetooth core processing a lot.
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
As part of the moving on all the Bluetooth processing to Process context.
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Now we run everything in HCI in process context, so it's a better idea use
mutex instead spin_lock. The macro remains hci_dev_lock() (and I got rid
of hci_dev_lock_bh()), of course.Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan
21 Sep, 2011
1 commit
-
Add management interface events for blocking/unblocking a device.
Sender of the block device command gets cmd complete and other
mgmt sockets get the event. Event is also sent to mgmt sockets when
blocking is done with ioctl, e.g when blocking a device with
hciconfig. This makes it possible for bluetoothd to track status
of blocked devices when a third party block or unblocks a device.Event sending is handled in mgmt_device_blocked function which gets
called from hci_blacklist_add in hci_core.c. A pending command is
added in mgmt_block_device, so that it can found when sending the
event - the event is not sent to the socket from which the pending
command came. Locks were moved out from hci_core.c to hci_sock.c
and mgmt.c, because locking is needed also for mgmt_pending_add in
mgmt.c.Signed-off-by: Antti Julku
Signed-off-by: Gustavo F. Padovan
17 Jun, 2011
1 commit
-
Move blacklisting functions to hci_core.c, so that they can
be used by both management interface and hci socket interface.Signed-off-by: Antti Julku
Signed-off-by: Gustavo F. Padovan
22 Feb, 2011
1 commit
-
Linux-next as of 20110217 complains when building for OMAP1.
LD vmlinux
`hci_sock_cleanup' referenced in section `.init.text' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o
`hci_sock_cleanup' referenced in section `.init.text' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o
make: *** [vmlinux] Error 1A recent patch by Gustavo (Bluetooth: Merge L2CAP and SCO modules
into bluetooth.ko) introduced this by calling the hci_sock_cleanup
function in the error path of bt_init.Fix this by dropping the __exit marking for hci_sock_cleanup.
Signed-off-by: Anand Gadiyar
Signed-off-by: Gustavo F. Padovan
08 Feb, 2011
1 commit
-
This patch adds a set_powered command to the management interface
through which the powered state of local adapters can be controlled.Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan
23 Dec, 2010
1 commit
-
Does not allow any channel different of HCI_CHANNEL_RAW and
HCI_CHANNEL_CONTROL to bind.Signed-off-by: Gustavo F. Padovan
08 Dec, 2010
2 commits
-
In order to send data to management control sockets the function should:
- skip checks intended for raw HCI data and stack internal events
- make sure RAW HCI data or stack internal events don't go to
management control socketsIn order to accomplish this the patch adds a new member to the bluetooth
skb private data to flag skb's that are destined for management control
sockets.Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Add initial code for handling Bluetooth Management interface messages.
Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Acked-by: Andrei Emeltchenko
Signed-off-by: Gustavo F. Padovan
02 Dec, 2010
1 commit
-
Do not use assignment in IF condition, remove extra spaces,
fixing typos, simplify code.Signed-off-by: Andrei Emeltchenko
Signed-off-by: Gustavo F. Padovan
01 Aug, 2010
1 commit
-
The bdaddr in the list root is completely unused and just
taking up space.Signed-off-by: David S. Miller
Tested-by: Johan Hedberg
Signed-off-by: Marcel Holtmann
22 Jul, 2010
1 commit
-
In some circumstances it could be desirable to reject incoming
connections on the baseband level. This patch adds this feature through
two new ioctl's: HCIBLOCKADDR and HCIUNBLOCKADDR. Both take a simple
Bluetooth address as a parameter. BDADDR_ANY can be used with
HCIUNBLOCKADDR to remove all devices from the blacklist.Signed-off-by: Johan Hedberg
Signed-off-by: Marcel Holtmann
28 Feb, 2010
1 commit
-
The pointer data can point to the variable ctv.
Access to data happens when ctv is already out of scope.Signed-off-by: Johann Felix Soden
Signed-off-by: Marcel Holtmann
04 Dec, 2009
2 commits
-
The tasklet schedule function helpers are just an obfuscation. So remove
them and call the schedule functions directly.Signed-off-by: Marcel Holtmann
-
Sending commands to a down interface results in a timeout while clearly
it should just return ENETDOWN. When using the ioctls this works fine,
but not when using the HCI sockets sendmsg interface.Signed-off-by: Marcel Holtmann
06 Nov, 2009
1 commit
-
The generic __sock_create function has a kern argument which allows the
security system to make decisions based on if a socket is being created by
the kernel or by userspace. This patch passes that flag to the
net_proto_family specific create function, so it can do the same thing.Signed-off-by: Eric Paris
Acked-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller
07 Oct, 2009
1 commit
-
All usages of structure net_proto_ops should be declared const.
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
01 Oct, 2009
1 commit
-
This provides safety against negative optlen at the type
level instead of depending upon (sometimes non-trivial)
checks against this sprinkled all over the the place, in
each and every implementation.Based upon work done by Arjan van de Ven and feedback
from Linus Torvalds.Signed-off-by: David S. Miller
30 Nov, 2008
1 commit
-
With the introduction of CONFIG_DYNAMIC_PRINTK_DEBUG it is possible to
allow debugging without having to recompile the kernel. This patch turns
all BT_DBG() calls into pr_debug() to support dynamic debug messages.As a side effect all CONFIG_BT_*_DEBUG statements are now removed and
some broken debug entries have been fixed.Signed-off-by: Marcel Holtmann
15 Jul, 2008
1 commit
-
With the Simple Pairing support, the authentication requirements are
an explicit setting during the bonding process. Track and enforce the
requirements and allow higher layers like L2CAP and RFCOMM to increase
them if needed.This patch introduces a new IOCTL that allows to query the current
authentication requirements. It is also possible to detect Simple
Pairing support in the kernel this way.Signed-off-by: Marcel Holtmann
03 May, 2008
1 commit
-
Signed-off-by: Harvey Harrison
Acked-by: Marcel Holtmann
Signed-off-by: David S. Miller
29 Mar, 2008
1 commit
-
The older RW_LOCK_UNLOCKED macros defeat lockdep state tracing so
replace them with the newer __RW_LOCK_UNLOCKED macros.Signed-off-by: Robert P. J. Day
Acked-by: Marcel Holtmann
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller
06 Mar, 2008
1 commit
-
hci_sock_cleanup() always returns 0 and its return value isn't used
anywhere in the code.Compile-tested with 'make allyesconfig && make net/bluetooth/bluetooth.ko'
Signed-off-by: Tobias Klauser
Signed-off-by: Andrew Morton
Acked-by: Marcel Holtmann
01 Nov, 2007
1 commit
-
Finally, the zero_it argument can be completely removed from
the callers and from the function prototype.Besides, fix the checkpatch.pl warnings about using the
assignments inside if-s.This patch is rather big, and it is a part of the previous one.
I splitted it wishing to make the patches more readable. Hope
this particular split helped.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller
22 Oct, 2007
1 commit
-
The Bluetooth HCI commands are divided into logical OGF groups for
easier identification of their purposes. While this still makes sense
for the written specification, its makes the code only more complex
and harder to read. So instead of using separate OGF and OCF values
to identify the commands, use a common 16-bit opcode that combines
both values. As a side effect this also reduces the complexity of
OGF and OCF calculations during command header parsing.Signed-off-by: Marcel Holtmann
11 Oct, 2007
1 commit
-
This patch passes in the namespace a new socket should be created in
and has the socket code do the appropriate reference counting. By
virtue of this all socket create methods are touched. In addition
the socket create methods are modified so that they will fail if
you attempt to create a socket in a non-default network namespace.Failing if we attempt to create a socket outside of the default
network namespace ensures that as we incrementally make the network stack
network namespace aware we will not export functionality that someone
has not audited and made certain is network namespace safe.
Allowing us to partially enable network namespaces before all of the
exotic protocols are supported.Any protocol layers I have missed will fail to compile because I now
pass an extra parameter into the socket creation code.[ Integrated AF_IUCV build fixes from Andrew Morton... -DaveM ]
Signed-off-by: Eric W. Biederman
Signed-off-by: David S. Miller
12 Sep, 2007
1 commit
-
Signed-off-by: David S. Miller
09 Sep, 2007
2 commits
-
This patch updates the HCI security filter with support for the
Bluetooth 2.1 commands and events.Signed-off-by: Marcel Holtmann
-
The timestamp structure needs special handling in case of compat
programs. Use the same wrapping method the network core uses.Signed-off-by: Marcel Holtmann
18 May, 2007
1 commit
-
We presently use lock_sock() to acquire a lock on a socket in
hci_sock_dev_event(), but this goes BUG because lock_sock()
can sleep and we're already holding a read-write spinlock at
that point. So, we must use the non-sleeping BH version,
bh_lock_sock().However, hci_sock_dev_event() is called from user context and
hence using simply bh_lock_sock() will deadlock against a
concurrent softirq that tries to acquire a lock on the same
socket. Hence, disabling BH's before acquiring the socket lock
and enable them afterwards, is the proper solution to fix
socket locking in hci_sock_dev_event().Signed-off-by: Satyam Sharma
Signed-off-by: Marcel Holtmann
Signed-off-by: Jiri Kosina
Signed-off-by: David S. Miller
05 May, 2007
1 commit
-
The L2CAP and HCI setsockopt() implementations have a small information
leak that makes it possible to leak kernel stack memory to userspace.If the optlen parameter is 0, no data will be copied by copy_from_user(),
but the uninitialized stack buffer will be read and stored later. A call
to getsockopt() can now retrieve the leaked information.To fix this problem the stack buffer given to copy_from_user() must be
initialized with the current settings.Signed-off-by: Marcel Holtmann
26 Apr, 2007
1 commit
-
For the common, open coded 'skb->h.raw = skb->data' operation, so that we can
later turn skb->h.raw into a offset, reducing the size of struct sk_buff in
64bit land while possibly keeping it as a pointer on 32bit.This one touches just the most simple cases:
skb->h.raw = skb->data;
skb->h.raw = {skb_push|[__]skb_pull}()The next ones will handle the slightly more "complex" cases.
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller
08 Mar, 2007
1 commit
-
[Bluetooth] Fix socket locking in hci_sock_dev_event()
hci_sock_dev_event() uses bh_lock_sock() to lock the socket lock.
This is not deadlock-safe against locking of the same socket lock in
l2cap_connect_cfm() from softirq context. In addition to that,
hci_sock_dev_event() doesn't seem to be called from softirq context,
so it is safe to use lock_sock()/release_sock() instead.The lockdep warning can be triggered on my T42p simply by switching
the Bluetooth off by the keyboard button.=================================
[ INFO: inconsistent lock state ]
2.6.21-rc2 #4
---------------------------------
inconsistent {in-softirq-W} -> {softirq-on-W} usage.
khubd/156 [HC0[0]:SC0[0]:HE1:SE1] takes:
(slock-AF_BLUETOOTH){-+..}, at: [] hci_sock_dev_event+0xa8/0xc5 [bluetooth]
{in-softirq-W} state was registered at:
[] mark_lock+0x59/0x414
[] l2cap_connect_cfm+0x4e/0x11f [l2cap]
[] __lock_acquire+0x3e5/0xb99
[] l2cap_connect_cfm+0x4e/0x11f [l2cap]
[] lock_acquire+0x67/0x81
[] l2cap_connect_cfm+0x4e/0x11f [l2cap]
[] _spin_lock+0x29/0x34
[] l2cap_connect_cfm+0x4e/0x11f [l2cap]
[] l2cap_connect_cfm+0x4e/0x11f [l2cap]
[] hci_send_cmd+0x126/0x14f [bluetooth]
[] hci_event_packet+0x729/0xebd [bluetooth]
[] hci_rx_task+0x2a/0x20f [bluetooth]
[] hci_rx_task+0x6c/0x20f [bluetooth]
[] trace_hardirqs_on+0x10d/0x14e
[] tasklet_action+0x3d/0x68
[] __do_softirq+0x41/0x92
[] do_softirq+0x27/0x3d
[] do_IRQ+0x7b/0x8f
[] common_interrupt+0x24/0x34
[] common_interrupt+0x2e/0x34
[] acpi_processor_idle+0x1b3/0x34a
[] acpi_processor_idle+0x1b6/0x34a
[] cpu_idle+0x39/0x4e
[] start_kernel+0x372/0x37a
[] unknown_bootoption+0x0/0x202
[] 0xffffffffSigned-off-by: Jiri Kosina
Acked-by: Marcel Holtmann
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Feb, 2007
1 commit
-
After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there. Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm. I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).Signed-off-by: Tim Schmielau
Acked-by: Russell King
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds