openwrt/staging/blogic.git
13 years agossb: remove invalid define SSB_TMSLOW_PHYCLK
Rafał Miłecki [Wed, 16 Feb 2011 12:58:26 +0000 (13:58 +0100)]
ssb: remove invalid define SSB_TMSLOW_PHYCLK

It was incorrectly introduced in d2730b2a6a019d14455556019d744ab051e6554b. We
have already fixed function to use correct define, but forgot remove old one.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Cc: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: trivial: fix SPROM extract warning formatting
Rafał Miłecki [Wed, 16 Feb 2011 12:58:25 +0000 (13:58 +0100)]
ssb: trivial: fix SPROM extract warning formatting

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix 2.4 GHz 40 MHz disabling
Johannes Berg [Wed, 16 Feb 2011 07:46:58 +0000 (08:46 +0100)]
mac80211: fix 2.4 GHz 40 MHz disabling

The module parameter ieee80211_disable_40mhz_24ghz
was meant to allow disabling 40 MHz operation in
the 2.4 GHz band by default. However, it is buggy
as implemented because while it advertises to the
AP that the device doesn't support 40 MHz, it will
itself still use 40 MHz configurations.

To fix this, clear the 40 MHz bits from the sband
completely instead of overriding where used.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless-next-2.6: brcm80211: fix compile issue
Henry Ptasinski [Fri, 18 Feb 2011 05:29:01 +0000 (21:29 -0800)]
wireless-next-2.6: brcm80211: fix compile issue

Commit 59eb21a65047 "cfg80211: Extend channel to frequency mapping for 802.11j"
changed the definition of the ieee80211_channel_to_frequency; so fix its
usage in brcmfmac.

Signed-off-by: Stanislav Fomichev <kernel@fomichev.me>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Add power to debugfs.
Ben Greear [Tue, 15 Feb 2011 21:11:22 +0000 (13:11 -0800)]
mac80211: Add power to debugfs.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agop54: Fix compile warning
Larry Finger [Tue, 15 Feb 2011 15:37:06 +0000 (09:37 -0600)]
p54: Fix compile warning

If any of the p54-based drivers are built with CONFIG_P54_LEDS not
defined, the following warning is generated:

  CC [M]  drivers/net/wireless/p54/main.o
drivers/net/wireless/p54/main.c: In function ‘p54_register_common’:
drivers/net/wireless/p54/main.c:614:21: warning: unused variable ‘priv’

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: move external function definitions to a header file
Bob Copeland [Tue, 15 Feb 2011 14:19:28 +0000 (09:19 -0500)]
ath5k: move external function definitions to a header file

Johannes pointed out the mess of external function prototypes in the
mac80211-ops.c file.  Woe to anyone who changes these functions...

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: Make ssb_wait_bit multi-bit safe
Michael Büsch [Mon, 14 Feb 2011 23:21:50 +0000 (00:21 +0100)]
ssb: Make ssb_wait_bit multi-bit safe

ssb_wait_bit was designed for only one-bit bitmasks.
People start using it for multi-bit bitmasks. Make the "set" case
is safe for this. The "unset" case is already safe.

This does not change behavior of the current code.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/blueto...
John W. Linville [Fri, 18 Feb 2011 21:49:17 +0000 (16:49 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/padovan/bluetooth-next-2.6

13 years agoBluetooth: fix checkpatch errors in af_bluetooth.c
Gustavo F. Padovan [Thu, 17 Feb 2011 22:24:05 +0000 (19:24 -0300)]
Bluetooth: fix checkpatch errors in af_bluetooth.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix errors reported by checkpatch.pl
Gustavo F. Padovan [Thu, 17 Feb 2011 22:22:19 +0000 (19:22 -0300)]
Bluetooth: Fix errors reported by checkpatch.pl

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: fix errors reported by checkpatch.pl
Gustavo F. Padovan [Thu, 17 Feb 2011 22:16:55 +0000 (19:16 -0300)]
Bluetooth: fix errors reported by checkpatch.pl

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix some code style issues in hci_event.c
Szymon Janc [Thu, 17 Feb 2011 15:44:23 +0000 (16:44 +0100)]
Bluetooth: Fix some code style issues in hci_event.c

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix some code style issues in hci_core.c
Szymon Janc [Thu, 17 Feb 2011 15:46:47 +0000 (16:46 +0100)]
Bluetooth: Fix some code style issues in hci_core.c

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix some code style issues in hci_core.h
Szymon Janc [Thu, 17 Feb 2011 15:42:00 +0000 (16:42 +0100)]
Bluetooth: Fix some code style issues in hci_core.h

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Clean up hci_sniff_subrate_evt function
Szymon Janc [Thu, 17 Feb 2011 13:16:33 +0000 (14:16 +0100)]
Bluetooth: Clean up hci_sniff_subrate_evt function

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
Szymon Janc [Thu, 17 Feb 2011 13:16:32 +0000 (14:16 +0100)]
Bluetooth: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>

As warned by checkpatch.pl, use #include <linux/uaccess.h> instead of
<asm/uaccess.h>.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Send LE Connection Update Command
Claudio Takahasi [Wed, 16 Feb 2011 22:44:53 +0000 (20:44 -0200)]
Bluetooth: Send LE Connection Update Command

If the new connection update parameter are accepted, the LE master
host sends the LE Connection Update Command to its controller informing
the new requested parameters.

Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use proper timer for hci command timout
Ville Tervo [Wed, 16 Feb 2011 14:32:41 +0000 (16:32 +0200)]
Bluetooth: Use proper timer for hci command timout

Use proper timer instead of hci command flow control to timeout
failed hci commands. Otherwise stack ends up sending commands
when flow control is used to block new commands.

2010-09-01 18:29:41.592132 < HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 00:16:CF:E1:C7:D7 mode 2 clkoffset 0x0000
2010-09-01 18:29:41.592681 > HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 0
2010-09-01 18:29:51.022033 < HCI Command: Remote Name Request Cancel (0x01|0x001a) plen 6
    bdaddr 00:16:CF:E1:C7:D7

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Make hci a child of the corresponding tty device.
Andrei Warkentin [Fri, 11 Feb 2011 23:19:26 +0000 (17:19 -0600)]
Bluetooth: Make hci a child of the corresponding tty device.

Make /sys/class/bluetooth/hciX a symlink to
path under corresponding tty.

Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix crash when ioctl(HCIUARTSETPROTO) fails
Gustavo F. Padovan [Tue, 15 Feb 2011 23:22:03 +0000 (20:22 -0300)]
Bluetooth: Fix crash when ioctl(HCIUARTSETPROTO) fails

If the fail happens the HCI del_timer may timeout after the the hci dev
unregister. This lead to a kernel crash.

Reported-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add connection parameter update response
Claudio Takahasi [Fri, 11 Feb 2011 21:28:55 +0000 (19:28 -0200)]
Bluetooth: Add connection parameter update response

Implements L2CAP Connection Parameter Update Response defined in
the Bluetooth Core Specification, Volume 3, Part A, section 4.21.
Address the LE Connection Parameter Procedure initiated by the slave.

Connection Interval Minimum and Maximum have the same range: 6 to
3200. Time = N * 1.25ms. Minimum shall be less or equal to Maximum.
The Slave Latency field shall have a value in the range of 0 to
((connSupervisionTimeout / connIntervalMax) - 1). Latency field shall
be less than 500. connSupervisionTimeout = Timeout Multiplier * 10 ms.
Multiplier field shall have a value in the range of 10 to 3200.

Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add LE signaling commands handling
Claudio Takahasi [Fri, 11 Feb 2011 21:28:54 +0000 (19:28 -0200)]
Bluetooth: Add LE signaling commands handling

This patch splits the L2CAP command handling function in order to
have a clear separation between the commands related to BR/EDR and
LE. Commands and responses in the LE signaling channel are not being
handled yet, command reject is sent to all received requests. Bluetooth
Core Specification, Volume 3, Part A, section 4 defines the signaling
packets formats and allowed commands/responses over the LE signaling
channel.

Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use usb_fill_int_urb()
Gustavo F. Padovan [Mon, 14 Feb 2011 21:53:43 +0000 (18:53 -0300)]
Bluetooth: Use usb_fill_int_urb()

Instead set urb structure directly we call usb_fill_int_urb() to set the
values to us.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add SMP command structures
Ville Tervo [Fri, 11 Feb 2011 01:38:54 +0000 (22:38 -0300)]
Bluetooth: Add SMP command structures

Add command structures for security manager protocol.

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Treat LE and ACL links separately on timeout
Ville Tervo [Fri, 11 Feb 2011 01:38:53 +0000 (22:38 -0300)]
Bluetooth: Treat LE and ACL links separately on timeout

Separate LE and ACL timeouts. Othervise ACL connections
on non LE hw will time out after 45 secs.

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix initiated LE connections
Vinicius Costa Gomes [Fri, 11 Feb 2011 01:38:52 +0000 (22:38 -0300)]
Bluetooth: Fix initiated LE connections

Fix LE connections not being marked as master.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Do not send disconn comand over LE links
Ville Tervo [Fri, 11 Feb 2011 01:38:51 +0000 (22:38 -0300)]
Bluetooth: Do not send disconn comand over LE links

l2cap over LE links can be disconnected without sending
disconnect command first.

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add server socket support for LE connection
Ville Tervo [Fri, 11 Feb 2011 01:38:50 +0000 (22:38 -0300)]
Bluetooth: Add server socket support for LE connection

Add support for LE server sockets.

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add LE connection support to L2CAP
Ville Tervo [Fri, 11 Feb 2011 01:38:49 +0000 (22:38 -0300)]
Bluetooth: Add LE connection support to L2CAP

Add basic LE connection support to L2CAP. LE
connection can be created by specifying cid
in struct sockaddr_l2

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use LE buffers for LE traffic
Ville Tervo [Fri, 11 Feb 2011 01:38:48 +0000 (22:38 -0300)]
Bluetooth: Use LE buffers for LE traffic

Bluetooth chips may have separate buffers for LE traffic.
This patch add support to use LE buffers provided by the chip.

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add LE connect support
Ville Tervo [Fri, 11 Feb 2011 01:38:47 +0000 (22:38 -0300)]
Bluetooth: Add LE connect support

Bluetooth V4.0 adds support for Low Energy (LE) connections.
Specification introduces new set of hci commands to control LE
connection. This patch adds logic to create, cancel and disconnect
LE connections.

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add low energy commands and events
Ville Tervo [Fri, 11 Feb 2011 01:38:46 +0000 (22:38 -0300)]
Bluetooth: Add low energy commands and events

Add needed HCI command and event structs to
create LE connections.

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add L2CAP mode to debugfs output
Gustavo F. Padovan [Thu, 10 Feb 2011 16:16:06 +0000 (14:16 -0200)]
Bluetooth: Add L2CAP mode to debugfs output

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: remove l2cap_load() hack
Gustavo F. Padovan [Mon, 7 Feb 2011 22:19:30 +0000 (20:19 -0200)]
Bluetooth: remove l2cap_load() hack

l2cap_load() was added to trigger l2cap.ko module loading from the RFCOMM
and BNEP modules. Now that L2CAP module is gone, we don't need it anymore.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agomac80211: reply to directed probes in IBSS
Johannes Berg [Mon, 14 Feb 2011 11:20:22 +0000 (12:20 +0100)]
mac80211: reply to directed probes in IBSS

WFA certification and the WMM spec require that we
always reply to unicast probe requests, so do that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agop54spi: update sample eeprom
Christian Lamparter [Sat, 12 Feb 2011 21:53:00 +0000 (22:53 +0100)]
p54spi: update sample eeprom

Commit: "p54: enhance rssi->dBm database import"
changed the way how the driver deals with the
rssical data. A new data format was necessary
and hence this patch.

NOTE: (for users with a custom eeprom binary)
I spent some time updating p54tools to support
the new format too: => (git available from)
http://git.kernel.org/?p=linux/kernel/git/chr/p54tools.git

It now comes with a simplistic script "n800_rssi2v2.sh"
which can be used to automate the conversion.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agop54: enhance rssi->dBm database import
Christian Lamparter [Sat, 12 Feb 2011 21:32:49 +0000 (22:32 +0100)]
p54: enhance rssi->dBm database import

This patch fixes several shortcomings of the
previous implementation. Features of the
rewrite include:

 * handles undocumented "0x0000" word at the
   start of the frequency table.
   (Affected some early? DELL 1450 USB devices
    and my Symbol 5GHz miniPCI card.)

 * supports more than just one reference point
   per band. (Also needed for the Symbol card.)

 * ships with default values in case the eeprom
   data is damaged, absent or unsupported.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agop54: p54_generate_band cleanup
Christian Lamparter [Sat, 12 Feb 2011 21:14:38 +0000 (22:14 +0100)]
p54: p54_generate_band cleanup

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agop54: sort channel list by frequency instead of channel index
Christian Lamparter [Sat, 12 Feb 2011 20:49:38 +0000 (21:49 +0100)]
p54: sort channel list by frequency instead of channel index

Some channel indices of the low 5GHz band clash with
those of the 2.4GHz band. Therefore we should go
with the channel's center frequency.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: add unlikely to ZD_ASSERT
Jussi Kivilinna [Sat, 12 Feb 2011 18:43:51 +0000 (20:43 +0200)]
zd1211rw: add unlikely to ZD_ASSERT

Case assert is violated should be quite unlikely.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: move async iowrite16v up to callers
Jussi Kivilinna [Sat, 12 Feb 2011 18:43:42 +0000 (20:43 +0200)]
zd1211rw: move async iowrite16v up to callers

Writing beacon to device happen through multiple write command calls.
zd_usb_iowrite16v uses synchronous urb call and with multiple write
commands in row causes high CPU usage.

Make asynchronous zd_usb_iowrite16v_async available outside zd_usb.c
and use where possible.

This lower CPU usage from ~10% to ~2% on Intel Atom when running
AP-mode with 100 TU beacon interval.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: use async urb for write command
Jussi Kivilinna [Sat, 12 Feb 2011 18:43:32 +0000 (20:43 +0200)]
zd1211rw: use async urb for write command

Writing beacon to device happen through multiple write command calls.
zd_usb_iowrite16v uses synchronous urb call and with multiple write
commands in row causes high CPU usage.

This patch makes zd_usb_iowrite16v use asynchronous urb submit within
zd_usb.c. zd_usb_iowrite16v_async_start is used to initiate writing
multiple commands to device using zd_usb_iowrite16v_async. Each URB
is delayed and submitted to device by next zd_usb_iowrite16v_async
call or by call to zd_usb_iowrite16v_async_end. URBs submitted by
zd_usb_iowrite16v_async have URB_NO_INTERRUPT set and last URB
send by zd_usb_iowrite16v_async_end does not. This lower CPU
usage when doing writes that require multiple URBs.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: correct use of usb_bulk_msg on interrupt endpoints
Jussi Kivilinna [Sat, 12 Feb 2011 18:43:23 +0000 (20:43 +0200)]
zd1211rw: correct use of usb_bulk_msg on interrupt endpoints

zd1211rw is using usb_bulk_msg() with usb_sndbulkpipe() on interrupt endpoint.
However usb_bulk_msg() internally corrects this and makes interrupt URB.

It's better to change usb_bulk_msgs in zd1211rw to usb_interrupt_msg for less
confusion.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Remove superfluous if clause
Helmut Schaa [Sat, 12 Feb 2011 13:17:15 +0000 (14:17 +0100)]
mac80211: Remove superfluous if clause

ieee80211_rx_h_check returned RX_DROP_MONITOR in case the if statement
in question was true but the same return value is also used directly
after the if clause. Hence, we can just drop the whole if clause and as
such simplify the code.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: disable beaconing before stopping beacon queue
Rajkumar Manoharan [Wed, 9 Feb 2011 12:16:39 +0000 (17:46 +0530)]
ath9k: disable beaconing before stopping beacon queue

Beaconing should be disabled before stopping beacon queue.
Not doing so could queue up beacons in hw that causes
failure to stop Tx DMA, due to pending frames in hw
and also unnecessary beacon tasklet schedule.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Check for errors from skb_pad() calls
Seth Forshee [Mon, 14 Feb 2011 14:52:25 +0000 (08:52 -0600)]
rt2x00: Check for errors from skb_pad() calls

Commit 739fd94 ("rt2x00: Pad beacon to multiple of 32 bits")
added calls to skb_pad() without checking the return value,
which could cause problems if any of those calls does happen
to fail. Add checks to prevent this from happening.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoBluetooth: Merge L2CAP and SCO modules into bluetooth.ko
Gustavo F. Padovan [Mon, 7 Feb 2011 22:08:52 +0000 (20:08 -0200)]
Bluetooth: Merge L2CAP and SCO modules into bluetooth.ko

Actually doesn't make sense have these modules built separately.
The L2CAP layer is needed by almost all Bluetooth protocols and profiles.
There isn't any real use case without having L2CAP loaded.
SCO is only essential for Audio transfers, but it is so small that we can
have it loaded always in bluetooth.ko without problems.
If you really doesn't want it you can disable SCO in the kernel config.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: sco: fix information leak to userspace
Vasiliy Kulikov [Mon, 14 Feb 2011 10:54:26 +0000 (13:54 +0300)]
Bluetooth: sco: fix information leak to userspace

struct sco_conninfo has one padding byte in the end.  Local variable
cinfo of type sco_conninfo is copied to userspace with this uninizialized
one byte, leading to old stack contents leak.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: bnep: fix buffer overflow
Vasiliy Kulikov [Mon, 14 Feb 2011 10:54:31 +0000 (13:54 +0300)]
Bluetooth: bnep: fix buffer overflow

Struct ca is copied from userspace.  It is not checked whether the "device"
field is NULL terminated.  This potentially leads to BUG() inside of
alloc_netdev_mqs() and/or information leak by creating a device with a name
made of contents of kernel stack.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agortlwifi: rtl8192ce: Rework rtl8192ce/phy.c
Larry Finger [Fri, 11 Feb 2011 20:27:58 +0000 (14:27 -0600)]
rtlwifi: rtl8192ce: Rework rtl8192ce/phy.c

Make the phy.c codes for rtl8192ce and rtl8192cu be as alike as possible.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192ce: Refactor rtl8192ce/fw
Larry Finger [Fri, 11 Feb 2011 20:34:03 +0000 (14:34 -0600)]
rtlwifi: rtl8192ce: Refactor rtl8192ce/fw

Make rtlwifi/rtl8192ce/fw.{h,c} match what will be needed for
rtlwifi/rtl8192cu.{h,c}.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192ce: Refactor rtl8192ce/dm
Larry Finger [Fri, 11 Feb 2011 20:33:58 +0000 (14:33 -0600)]
rtlwifi: rtl8192ce: Refactor rtl8192ce/dm

To reuse as much code as possible when adding additional drivers to the
rtlwifi tree, the common parts of various routines are moved to
drivers/net/wireless/rtlwifi. This patch does that for the version of
dm.{h,c} used by rtl8192ce.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Add usb driver
George [Fri, 11 Feb 2011 20:27:49 +0000 (14:27 -0600)]
rtlwifi: Add usb driver

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: George <george0505@realtek.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Modify core routines
Larry Finger [Fri, 11 Feb 2011 20:27:46 +0000 (14:27 -0600)]
rtlwifi: Modify core routines

The rtlwifi core needs some changes before inclusion of a driver
for the RTL8192CU USB device.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: <chaoming_li@realsil.com.cn>
Signed-off-by: <george0505@realtek.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: handle bt defer work in 2000 series
Wey-Yi Guy [Sun, 6 Feb 2011 19:29:42 +0000 (11:29 -0800)]
iwlagn: handle bt defer work in 2000 series

For 2000 series, need to handle bt traffic changes when
receive notification from uCode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: donot process bt update when bt coex disable
Wey-Yi Guy [Sun, 6 Feb 2011 16:56:35 +0000 (08:56 -0800)]
iwlagn: donot process bt update when bt coex disable

If bt coex is disabled, do not process any bt related information
from uCode even received.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoBluetooth: Add firmware support for Atheros 3012
Bala Shanmugam [Fri, 11 Feb 2011 10:08:53 +0000 (15:38 +0530)]
Bluetooth: Add firmware support for Atheros 3012

Blacklisted AR3012 PID in btusb and added the same
in ath3k to load patch and sysconfig files.

Signed-off-by: Bala Shanmugam <sbalashanmugam@atheros.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: l2cap: fix 1 byte infoleak to userspace
Vasiliy Kulikov [Thu, 10 Feb 2011 17:59:42 +0000 (20:59 +0300)]
Bluetooth: l2cap: fix 1 byte infoleak to userspace

Structure l2cap_options has one padding byte between max_tx and
txwin_size fields.  This byte in "opts" is copied to userspace
uninitialized.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agossb: extract boardflags2 for SPROMs rev 4 and 5
Rafał Miłecki [Tue, 8 Feb 2011 22:32:17 +0000 (23:32 +0100)]
ssb: extract boardflags2 for SPROMs rev 4 and 5

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: fix ack health for WiFi/BT combo devices
Stanislaw Gruszka [Tue, 8 Feb 2011 08:31:58 +0000 (09:31 +0100)]
iwlwifi: fix ack health for WiFi/BT combo devices

Combo devices have TX statistics on different place, because
struct statistics_rx_bt and struct statistics_rx have different
size. User proper values on combo devices instead of random data.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: cleanup iwl_good_ack_health
Stanislaw Gruszka [Tue, 8 Feb 2011 08:31:57 +0000 (09:31 +0100)]
iwlwifi: cleanup iwl_good_ack_health

Make ack health code easies to read. Compared to previous
code, we do not print debug messages when expected_ack_cnt_delta == 0
and also do check against negative deltas.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: cleanup iwl_recover_from_statistics
Stanislaw Gruszka [Tue, 8 Feb 2011 08:31:55 +0000 (09:31 +0100)]
iwlwifi: cleanup iwl_recover_from_statistics

No functional change, make recover from statistics code
easies to read.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Remove redundant beacon_interval
Steve Brown [Tue, 8 Feb 2011 00:10:39 +0000 (17:10 -0700)]
ath9k: Remove redundant beacon_interval

The variable appears in both ath_softc and ath_beacon_config.
The struct ath_beacon_config is embedded in ath_softc. The redundant
variable was added by commit id 57c4d7b4c4986037be51476b8e3025d5ba18d8b8.

Signed-off-by: Steve Brown <sbrown@cortland.com>
Reviewed-by: Mohammed Shafi <shafi.ath9k@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Ensure power-level set properly for scanning.
Ben Greear [Mon, 7 Feb 2011 21:44:38 +0000 (13:44 -0800)]
mac80211: Ensure power-level set properly for scanning.

My previous patch to optimize scanning on operating channel
accidentally removed the code that would ensure power was
set to maximum for scanning.

This patch re-adds that functionality.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Add debug info for configuring power level.
Ben Greear [Mon, 7 Feb 2011 21:44:37 +0000 (13:44 -0800)]
ath9k: Add debug info for configuring power level.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Allow work items to use existing channel type.
Ben Greear [Mon, 7 Feb 2011 21:44:36 +0000 (13:44 -0800)]
mac80211: Allow work items to use existing channel type.

Narrow channel types can function within larger channel types.
So, use existing channel type for work items when possible.
This decreases hardware channel changes significantly when
using non NO_HT channel types on the operating channel.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Allow scanning on existing channel-type.
Ben Greear [Mon, 7 Feb 2011 21:44:35 +0000 (13:44 -0800)]
mac80211: Allow scanning on existing channel-type.

Previous code set the channel type to NO_HT, but it
appears that NO_HT packets can be sent on any channel
type, so we do not need to change the channel type
as long as the channel is correct.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Properly set work-item channel-type.
Ben Greear [Mon, 7 Feb 2011 21:44:34 +0000 (13:44 -0800)]
mac80211: Properly set work-item channel-type.

Some were indirectly set to NO_HT (zero), but I think
it's better to explicitly set it in case the enum ever
changes.  In cfg.c, it seems the channel-type was just
ignored (and thus always set to NO_HT).

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Print channel-type in chan-change dbg message.
Ben Greear [Mon, 7 Feb 2011 21:44:33 +0000 (13:44 -0800)]
ath9k: Print channel-type in chan-change dbg message.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca...
John W. Linville [Wed, 9 Feb 2011 20:44:17 +0000 (15:44 -0500)]
Merge branch 'for-linville' of git://git./linux/kernel/git/luca/wl12xx

13 years agowl12xx: set supported_rates after association
Eliad Peller [Wed, 2 Feb 2011 07:59:37 +0000 (09:59 +0200)]
wl12xx: set supported_rates after association

Instead of looking for supported_rates change on every tx packet,
just extract the supported_rates after association completes (station only).

Remove wl1271.sta_rate_set and WL1271_FLAG_STA_RATES_CHANGED which are
not used anymore.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: use the conf struct instead of macros for memory configuration
Eliad Peller [Wed, 2 Feb 2011 07:59:36 +0000 (09:59 +0200)]
wl12xx: use the conf struct instead of macros for memory configuration

make the configuration management more flexible by using the
conf struct, rather than predefined macros.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: move to new firmware (6.1.3.50.49)
Eliad Peller [Wed, 2 Feb 2011 07:59:35 +0000 (09:59 +0200)]
wl12xx: move to new firmware (6.1.3.50.49)

This patch adds support for the new wl12xx firmware (Rev 6.1.3.50.49)

Since this fw is not backward compatible with previous fw versions,
a new fw (with different name) is being fetched.

(the patch is big because it contains all the required fw api changes.
splitting it into multiple patches will result in corrupted intermediate
commits)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: mcp2.5 - add config_ps acx
Eliad Peller [Wed, 2 Feb 2011 07:59:34 +0000 (09:59 +0200)]
wl12xx: mcp2.5 - add config_ps acx

mcp2.5 uses this acx to configure the fw only once, rather than
passing the params in every enter psm command.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agoBluetooth: update Bluetooth daemon name in Kconfig help
Gustavo F. Padovan [Mon, 7 Feb 2011 21:15:43 +0000 (19:15 -0200)]
Bluetooth: update Bluetooth daemon name in Kconfig help

Change hcid to bluetoothd.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move __l2cap_sock_close() to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 05:35:20 +0000 (03:35 -0200)]
Bluetooth: move __l2cap_sock_close() to l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move l2cap_sock_kill() to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 05:26:01 +0000 (03:26 -0200)]
Bluetooth: move l2cap_sock_kill() to l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move L2CAP sock timers function to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 05:23:31 +0000 (03:23 -0200)]
Bluetooth: move L2CAP sock timers function to l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move l2cap_sock_sendmsg() to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 05:20:52 +0000 (03:20 -0200)]
Bluetooth: move l2cap_sock_sendmsg() to l2cap_sock.c

Also moves some L2CAP sending functions declaration to l2cap.h

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move l2cap_sock_shutdown() to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 05:08:36 +0000 (03:08 -0200)]
Bluetooth: move l2cap_sock_shutdown() to l2cap_sock.c

Declare __l2cap_wait_ack() and  l2cap_sock_clear_timer() in l2cap.h

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move l2cap_sock_recvmsg() to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 05:02:31 +0000 (03:02 -0200)]
Bluetooth: move l2cap_sock_recvmsg() to l2cap_sock.c

It causes the move of the declaration of 3 functions to l2cap.h:
l2cap_get_ident(), l2cap_send_cmd(), l2cap_build_conf_req()

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move l2cap_sock_connect() to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 04:56:13 +0000 (02:56 -0200)]
Bluetooth: move l2cap_sock_connect() to l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move l2cap_sock_getsockopt() to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 04:52:55 +0000 (02:52 -0200)]
Bluetooth: move l2cap_sock_getsockopt() to l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move l2cap_sock_setsockopt() to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 04:48:48 +0000 (02:48 -0200)]
Bluetooth: move l2cap_sock_setsockopt() to l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move l2cap_sock_getname() to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 04:43:46 +0000 (02:43 -0200)]
Bluetooth: move l2cap_sock_getname() to l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move l2cap_sock_accept() to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 04:42:23 +0000 (02:42 -0200)]
Bluetooth: move l2cap_sock_accept() to l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move l2cap_sock_bind()/listen() to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 04:40:28 +0000 (02:40 -0200)]
Bluetooth: move l2cap_sock_bind()/listen() to l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move l2cap_sock_release() to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 04:36:42 +0000 (02:36 -0200)]
Bluetooth: move l2cap_sock_release() to l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: move l2cap_sock_ops to l2cap_sock.c
Gustavo F. Padovan [Fri, 4 Feb 2011 04:33:56 +0000 (02:33 -0200)]
Bluetooth: move l2cap_sock_ops to l2cap_sock.c

First step to move all l2cap_sock_ops function to l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Initial work for L2CAP split.
Gustavo F. Padovan [Thu, 3 Feb 2011 22:50:35 +0000 (20:50 -0200)]
Bluetooth: Initial work for L2CAP split.

This patch tries to do the minimal to move l2cap_sock_create() and its
dependencies to l2cap_sock.c. It create a API to initialize and cleanup
the L2CAP sockets from l2cap_core.c through l2cap_init_sockets() and
l2cap_cleanup_sockets().

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Rename l2cap.c to l2cap_core.c
Gustavo F. Padovan [Thu, 3 Feb 2011 20:58:10 +0000 (18:58 -0200)]
Bluetooth: Rename l2cap.c to l2cap_core.c

In a preparation to the the L2CAP code split in many files.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: ath3k: Avoid duplication of code
Rogério Brito [Thu, 3 Feb 2011 03:42:05 +0000 (01:42 -0200)]
Bluetooth: ath3k: Avoid duplication of code

In commit 86e09287e4f8c81831b4d4118a48597565f0d21b, to reduce memory
usage, the functions of the ath3k module were rewritten to release the
firmware blob after it has been loaded (successfully or not).

The resuting code has some redundancy and the compiler can potentially
produce better code if we omit a function call that is unconditionally
executed in

,----
|     if (ath3k_load_firmware(udev, firmware)) {
|             release_firmware(firmware);
|             return -EIO;
|     }
|     release_firmware(firmware);
|
|     return 0;
| }
`----

It may also be argued that the rewritten code becomes easier to read,
and also to see the code coverage of the snippet in question.

Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
Cc: Alexander Holler <holler@ahsoftware.de>
Cc: "Gustavo F. Padovan" <padovan@profusion.mobi>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: fix crash by disabling tasklet in sock accept
Andrei Emeltchenko [Mon, 24 Jan 2011 08:53:24 +0000 (10:53 +0200)]
Bluetooth: fix crash by disabling tasklet in sock accept

Crash can happen when tasklet handling connect/disconnect requests
preempts socket accept. Can be reproduced with "l2test -r" on one
side and several "l2test -c -b 1000 -i hci0 -P 10 <bdaddr>" on the
other side.

disable taskets in socket accept and change lock_sock and release_sock
to bh_lock_sock and bh_unlock_sock since we have to use spinlocks and
there is no need to mark sock as owned by user.

...
[ 3555.897247] Unable to handle kernel NULL pointer dereference at virtual
address 000000bc
[ 3555.915039] pgd = cab9c000
[ 3555.917785] [000000bc] *pgd=8bf3d031, *pte=00000000, *ppte=00000000
[ 3555.928314] Internal error: Oops: 17 [#1] PREEMPT
[ 3555.999786] CPU: 0    Not tainted  (2.6.32.21-13874-g67918ef #65)
...
[ 3556.005981] PC is at bt_accept_unlink+0x20/0x58 [bluetooth]
[ 3556.011627] LR is at bt_accept_dequeue+0x3c/0xe8 [bluetooth]
...
[ 3556.161285] [<bf0007fc>] (bt_accept_unlink+0x20/0x58 [bluetooth]) from
[<bf000870>] (bt_accept_dequeue+0x3c/0xe8 [bluetooth])
[ 3556.172729] [<bf000870>] (bt_accept_dequeue+0x3c/0xe8 [bluetooth]) from
[<bf324df8>] (l2cap_sock_accept+0x100/0x15c [l2cap])
[ 3556.184082] [<bf324df8>] (l2cap_sock_accept+0x100/0x15c [l2cap]) from
[<c026a0a8>] (sys_accept4+0x120/0x1e0)
[ 3556.193969] [<c026a0a8>] (sys_accept4+0x120/0x1e0) from [<c002c9a0>]
(ret_fast_syscall+0x0/0x2c)
[ 3556.202819] Code: e5813000 e5901164 e580c160 e580c15c (e1d13bbc)
...

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Do not use assignments in IF conditions
Andrei Emeltchenko [Tue, 11 Jan 2011 15:20:20 +0000 (17:20 +0200)]
Bluetooth: Do not use assignments in IF conditions

Fix checkpatch warnings concerning assignments in if conditions.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add set_io_capability management command
Johan Hedberg [Tue, 25 Jan 2011 11:28:33 +0000 (13:28 +0200)]
Bluetooth: Add set_io_capability management command

This patch adds a new set_io_capability management command which is used
to set the IO capability for Secure Simple Pairing (SSP) as well as the
Security Manager Protocol (SMP). The value is per hci_dev and each
hci_conn object inherits it upon creation.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add support for PIN code handling in the management interface
Johan Hedberg [Sat, 22 Jan 2011 04:10:07 +0000 (06:10 +0200)]
Bluetooth: Add support for PIN code handling in the management interface

This patch adds the necessary commands and events needed to communicate
PIN code related actions between the kernel and userspace. This includes
a pin_code_request event as well as pin_code_reply and
pin_code_negative_reply commands.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Create common cmd_complete function for mgmt.c
Johan Hedberg [Sat, 22 Jan 2011 04:46:43 +0000 (06:46 +0200)]
Bluetooth: Create common cmd_complete function for mgmt.c

A lot of management code needs to generate command complete events so it
makes sense to have a helper function for this.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add get_connections managment interface command
Johan Hedberg [Fri, 21 Jan 2011 11:56:35 +0000 (13:56 +0200)]
Bluetooth: Add get_connections managment interface command

This patch adds a get_connections command to the management interface.
With this command userspace can get the current list of connected
devices. Typically this command would only be used once when enumerating
existing adapters. After that the connected and disconnected events are
used to track connections.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add support for connect failed management event
Johan Hedberg [Sat, 22 Jan 2011 04:09:08 +0000 (06:09 +0200)]
Bluetooth: Add support for connect failed management event

This patch add a new connect failed management event to track failures
in connecting to remote devices. It is particularly useful for security
mode 3 scenarios when we don't have a connected state while pairing but
still need to detect when the connect attempt failed.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>