]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoBluetooth: Make mgmt_start_discovery_failed static
Andre Guedes [Tue, 30 Apr 2013 18:29:30 +0000 (15:29 -0300)]
Bluetooth: Make mgmt_start_discovery_failed static

mgmt_start_discovery_failed is now only used in mgmt.c so we can
make it a local function. This patch also moves the mgmt_start_
discovery_failed definition up in mgmt.c to avoid forward
declaration.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Remove start discovery handling from hci_event.c
Andre Guedes [Tue, 30 Apr 2013 18:29:29 +0000 (15:29 -0300)]
Bluetooth: Remove start discovery handling from hci_event.c

Since all mgmt start discovery command complete events are now handled
in start_discovery_complete callback in mgmt.c, we can remove this
handling from hci_event.c.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Update start_discovery to use HCI request
Andre Guedes [Tue, 30 Apr 2013 18:29:28 +0000 (15:29 -0300)]
Bluetooth: Update start_discovery to use HCI request

This patch modifies the start_discovery function so it uses the HCI
request framework.

We build the HCI request according to the discovery type (add inquiry
or LE scan HCI commands) and run the HCI request. We also register
the start_discovery_complete callback which handles mgmt command
complete events for this command. This way, we move all start_
discovery mgmt handling code spread in hci_event.c to a single place
in mgmt.c.

This patch also merges the LE-only and interleaved discovery type
cases since these cases are pretty much the same now.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Make inquiry_cache_flush non-static
Andre Guedes [Tue, 30 Apr 2013 18:29:27 +0000 (15:29 -0300)]
Bluetooth: Make inquiry_cache_flush non-static

In order to use HCI request framework in start_discovery, we'll need
to call inquiry_cache_flush in mgmt.c. Therefore, this patch adds the
hci_ prefix to inquiry_cache_flush and makes it non-static.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Fix multiple LE socket handling
Johan Hedberg [Mon, 29 Apr 2013 16:35:45 +0000 (19:35 +0300)]
Bluetooth: Fix multiple LE socket handling

The LE ATT server socket needs to be superseded by any ATT client
sockets. Previously this was done by looking at the hcon->out variable
(indicating whether the connection is outgoing or incoming) which is a
too crude way of determining whether the server socket needs to be
picked or not (an outgoing connection doesn't necessarily mean that an
ATT client socket has triggered it).

This patch extends the ATT server socket lookup function
(l2cap_le_conn_ready) to be used for all LE connections (regardless of
the hcon->out value) and adds an internal check into the function for
the existence of any ATT client sockets (in which case the server socket
should be skipped). For this to work reliably all lookups must be done
while the l2cap_conn->chan_lock is held, meaning also that the call to
l2cap_chan_add needs to be changed to its lockless __l2cap_chan_add
counterpart.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Remove useless hci_conn disc_timeout setting
Johan Hedberg [Mon, 29 Apr 2013 16:35:44 +0000 (19:35 +0300)]
Bluetooth: Remove useless hci_conn disc_timeout setting

There's no need to reset disc_timeout in l2cap_le_conn_ready since
HCI_DISCONN_TIMEOUT is the default when the hci_conn is created and
there should be no way for it to get changed between creation and
l2cap_le_conn_ready being called.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Simplify hci_conn_hold/drop logic for L2CAP
Johan Hedberg [Mon, 29 Apr 2013 16:35:43 +0000 (19:35 +0300)]
Bluetooth: Simplify hci_conn_hold/drop logic for L2CAP

The L2CAP code has been incrementing the hci_conn reference for each
l2cap_chan instance in the l2cap_conn list. Likewise, the reference is
dropped each time an l2cap_chan is removed from the list. The reference
counting policy with respect to removal has been clear and explicit in
the l2cap_chan_del function, however for addition the function
calling 2cap_chan_add has always had to do a separate hci_conn_hold
call.

What made the counting even more hard to follow is that the
hci_connect() procedure increments the reference and the L2CAP layer
making this call took advantage of it to use it as its own reference.

This patch aims to clarify things by having the call to hci_conn_hold
inside __l2cap_chan_add, thereby removing the need to do it in the
functions calling __l2cap_chan_add. The reference count for hci_connect
is still kept as it's necessary for users such as mgmt_pair_device,
however for the L2CAP layer it means that an extra call to hci_conn_drop
must be performed once l2cap_chan_add has been done.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Remove unnecessary L2CAP channel state check
Johan Hedberg [Mon, 29 Apr 2013 16:35:42 +0000 (19:35 +0300)]
Bluetooth: Remove unnecessary L2CAP channel state check

In l2cap_att_channel() we're only interested in the BT_CONNECTED state
so this state can directly be passed to l2cap_global_chan_by_scid().
This way there's no need to do any additional state check later.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Remove useless sk variable in l2cap_le_conn_ready
Johan Hedberg [Mon, 29 Apr 2013 16:35:41 +0000 (19:35 +0300)]
Bluetooth: Remove useless sk variable in l2cap_le_conn_ready

The sk variable is of quite little use since it's only used to simplify
access in the two bt_sk() calls.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Fix duplicate call to l2cap_chan_ready()
Johan Hedberg [Mon, 29 Apr 2013 16:35:40 +0000 (19:35 +0300)]
Bluetooth: Fix duplicate call to l2cap_chan_ready()

In l2cap_le_conn_ready() after doing l2cap_chann_add() the LE channel is
part of the list which is subsequently iterated in l2cap_conn_ready() in
this loop each channel will get l2cap_chan_ready() called which would
result in trying to set the channel two times into BT_CONNECTED state.
Instead it makes sense to just add the channel but not call chan_ready
in l2cap_le_conn_ready, which is what this patch does.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Add clarifying comment to l2cap_conn_ready()
Johan Hedberg [Mon, 29 Apr 2013 16:35:39 +0000 (19:35 +0300)]
Bluetooth: Add clarifying comment to l2cap_conn_ready()

There is an extra call to smp_conn_security() for outgoing LE
connections from l2cap_conn_ready() but the reason for this call is far
from clear. After a bit of commit history research and using git blame I
found out that this extra call is for socket-less pairing processes
added by commit 160dc6ac1. This patch adds a clarifying comment to the
code for this.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Fix hardcoding ATT CID in __l2cap_chan_add()
Johan Hedberg [Mon, 29 Apr 2013 16:35:38 +0000 (19:35 +0300)]
Bluetooth: Fix hardcoding ATT CID in __l2cap_chan_add()

Since in the future more than the ATT CID may be permissible we should
not be hardcoding it for all LE connections in __l2cap_chan_add().
Instead, the source ATT CID should only be set if the destination is
also ATT, and in other cases we should just use the existing dynamic CID
allocation function.

Assigning scid based on dcid means that whenever __l2cap_chan_add() is
called that chan->dcid is properly initialized. l2cap_le_conn_ready()
wasn't initializing is properly so this is also taken care of in this
patch.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Fix EBUSY condition test in l2cap_chan_connect
Johan Hedberg [Mon, 29 Apr 2013 16:35:37 +0000 (19:35 +0300)]
Bluetooth: Fix EBUSY condition test in l2cap_chan_connect

The current test in l2cap_chan_connect is intended to protect against
multiple conflicting connect attempts. However, it assumes that there
will ever only be a single CID that is connected to, which is not true.
We do need to check for conflicts with connect attempts to the same
destination CID but this check is not in anyway specific to LE but can
be applied to BR/EDR as well.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Fix LE vs BR/EDR selection when connecting
Johan Hedberg [Mon, 29 Apr 2013 16:35:36 +0000 (19:35 +0300)]
Bluetooth: Fix LE vs BR/EDR selection when connecting

The choice between LE and BR/EDR should be made on the destination
address type instead of the destination CID. This is particularly
important when in the future more than one CID will be allowed for LE.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Rename L2CAP_CID_LE_DATA to L2CAP_CID_ATT
Johan Hedberg [Mon, 29 Apr 2013 16:35:35 +0000 (19:35 +0300)]
Bluetooth: Rename L2CAP_CID_LE_DATA to L2CAP_CID_ATT

In future Core Specification versions the ATT CID will be just one of
many possible CIDs that can be used for data transfer. Therefore, it
makes sense to rename the define for the ATT CID to something less
ambigous.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Handle LE L2CAP signalling in its own function
Johan Hedberg [Mon, 29 Apr 2013 16:35:33 +0000 (19:35 +0300)]
Bluetooth: Handle LE L2CAP signalling in its own function

The LE L2CAP signalling channel follows its own rules and will continue
to evolve independently from the BR/EDR signalling channel. Therefore,
it makes sense to have a clear split from BR/EDR by having a dedicated
function for handling LE signalling commands.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Fix checks for LE support on LE-only controllers
Johan Hedberg [Wed, 24 Apr 2013 10:05:32 +0000 (13:05 +0300)]
Bluetooth: Fix checks for LE support on LE-only controllers

LE-only controllers do not support extended features so any kind of host
feature bit checks do not make sense for them. This patch fixes code
used for both single-mode (LE-only) and dual-mode (BR/EDR/LE) to use the
HCI_LE_ENABLED flag instead of the "Host LE supported" feature bit for
LE support tests.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agomwl8k: Fix the firmware hang issue for 8764
Nishant Sarmukadam [Fri, 24 May 2013 09:12:25 +0000 (14:42 +0530)]
mwl8k: Fix the firmware hang issue for 8764

The firmware hang issue is not seen very often,
though it is still seen sometimes (once in 12
hours in local tests). The changes in the driver
,to interrupt the firmware, are needed when we
detect that firmware is stuck and when the host
queues are full and we begin to drop packets.
This is to ensure that the firmware does not
miss any PPA_RDY interrupts to cause the firmware
restart dont miss PPA_READY interrupt for SC2

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: use kfree_skb() instead of kfree()
Wei Yongjun [Thu, 23 May 2013 09:10:43 +0000 (17:10 +0800)]
wil6210: use kfree_skb() instead of kfree()

Use kfree_skb() instead of kfree() to free sk_buff.

Introduced by commit e270045b569cc7030abd29857f3a4e7906524ec0
(wil6210: Sanity check for reported DMA length)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: move 53xx specific bbp initialization
Stanislaw Gruszka [Sat, 18 May 2013 12:03:55 +0000 (14:03 +0200)]
rt2800: move 53xx specific bbp initialization

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: move 3290 specific bbp initialization
Stanislaw Gruszka [Sat, 18 May 2013 12:03:54 +0000 (14:03 +0200)]
rt2800: move 3290 specific bbp initialization

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: move 3352 specific bbp initialization
Stanislaw Gruszka [Sat, 18 May 2013 12:03:53 +0000 (14:03 +0200)]
rt2800: move 3352 specific bbp initialization

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R108 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:52 +0000 (14:03 +0200)]
rt2800: initialize BBP_R108 on proper subroutines

Create helper function and move initialization to subroutines.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R104 on 3352 subroutine
Stanislaw Gruszka [Sat, 18 May 2013 12:03:51 +0000 (14:03 +0200)]
rt2800: initialize BBP_R104 on 3352 subroutine

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R134 & BBP_R135 on 53xx subroutine
Stanislaw Gruszka [Sat, 18 May 2013 12:03:50 +0000 (14:03 +0200)]
rt2800: initialize BBP_R134 & BBP_R135 on 53xx subroutine

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R128 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:49 +0000 (14:03 +0200)]
rt2800: initialize BBP_R128 on proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R120 on 3352 subroutine
Stanislaw Gruszka [Sat, 18 May 2013 12:03:48 +0000 (14:03 +0200)]
rt2800: initialize BBP_R120 on 3352 subroutine

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R106 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:47 +0000 (14:03 +0200)]
rt2800: initialize BBP_R106 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R105 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:46 +0000 (14:03 +0200)]
rt2800: initialize BBP_R105 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R104 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:45 +0000 (14:03 +0200)]
rt2800: initialize BBP_R104 on proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R103 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:44 +0000 (14:03 +0200)]
rt2800: initialize BBP_R103 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: move initialization of BBP_95 & BBP_98 to 53xx subroutine
Stanislaw Gruszka [Sat, 18 May 2013 12:03:43 +0000 (14:03 +0200)]
rt2800: move initialization of BBP_95 & BBP_98 to 53xx subroutine

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R92 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:42 +0000 (14:03 +0200)]
rt2800: initialize BBP_R92 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R91 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:41 +0000 (14:03 +0200)]
rt2800: initialize BBP_R91 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R88 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:40 +0000 (14:03 +0200)]
rt2800: initialize BBP_R88 on proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R86 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:39 +0000 (14:03 +0200)]
rt2800: initialize BBP_R86 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R84 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:38 +0000 (14:03 +0200)]
rt2800: initialize BBP_R84 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R83 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:37 +0000 (14:03 +0200)]
rt2800: initialize BBP_R83 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R82 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:36 +0000 (14:03 +0200)]
rt2800: initialize BBP_R82 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R74 - BBP_R80 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:35 +0000 (14:03 +0200)]
rt2800: initialize BBP_R74 - BBP_R80 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R70 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:34 +0000 (14:03 +0200)]
rt2800: initialize BBP_R70 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R69 - BBP_R77 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:33 +0000 (14:03 +0200)]
rt2800: initialize BBP_R69 - BBP_R77 on proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R68 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:32 +0000 (14:03 +0200)]
rt2800: initialize BBP_R68 on proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R65 & BBP_R66 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:31 +0000 (14:03 +0200)]
rt2800: initialize BBP_R65 & BBP_R66 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R47 on 3352 subroutine
Stanislaw Gruszka [Sat, 18 May 2013 12:03:30 +0000 (14:03 +0200)]
rt2800: initialize BBP_R47 on 3352 subroutine

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R31 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:29 +0000 (14:03 +0200)]
rt2800: initialize BBP_R31 on proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: move rt2800_bbp4_mac_if_ctrl to proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:28 +0000 (14:03 +0200)]
rt2800: move rt2800_bbp4_mac_if_ctrl to proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: move 3352 bbp specific code
Stanislaw Gruszka [Sat, 18 May 2013 12:03:27 +0000 (14:03 +0200)]
rt2800: move 3352 bbp specific code

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: add rt2800_init_bbp_305x_soc subroutine
Stanislaw Gruszka [Sat, 18 May 2013 12:03:26 +0000 (14:03 +0200)]
rt2800: add rt2800_init_bbp_305x_soc subroutine

New routine for SOC specific BBP initialization, empty for now.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: prepare for rt2800_init_bbp spit
Stanislaw Gruszka [Sat, 18 May 2013 12:03:25 +0000 (14:03 +0200)]
rt2800: prepare for rt2800_init_bbp spit

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: make rt2800_init_bbp return void
Stanislaw Gruszka [Sat, 18 May 2013 12:03:24 +0000 (14:03 +0200)]
rt2800: make rt2800_init_bbp return void

This function can not fail, we always return 0.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agodrivers/net/wireless/brcm80211/brcmfmac: add missing platform_driver owner
Libo Chen [Tue, 21 May 2013 02:42:40 +0000 (10:42 +0800)]
drivers/net/wireless/brcm80211/brcmfmac: add missing platform_driver owner

set the owner of platform_driver, to ensure that the
caller of driver holds a module refernece

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: add support for Marvell SD8897 chipset
Yogesh Ashok Powar [Sat, 18 May 2013 00:54:58 +0000 (17:54 -0700)]
mwifiex: add support for Marvell SD8897 chipset

Some of the key differences between SD8897 and older chipsets
are as follows:

a) sdio mpa_rx and mpa_tx ports have been increased from 16 to 32
b) Same is the case with read/write bitmap that one receives from
   mpa_reg read
c) aggregation packet count doubled from 8 to 16
d) Most of key reg addresses are changed
e) There is a separate command or control port
f) Now command rx/tx_done have new interrupts

1. 'supports_sdio_new_mode' flag is added to handle (a) and (b).
2. (c) and (d) are taken care of by filling chip specific
   information in global structurei (mwifiex_sdio_sd8897).
3. For older chipsets, port 0 was cmd port and port 1->15 were
   data port. Therefore we had CTRL_PORT_MASK to differentiate
   port type. Now these changes are under 'has_control_mask' flag.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: code rearrangement in multiport aggregation path
Amitkumar Karwar [Sat, 18 May 2013 00:54:51 +0000 (17:54 -0700)]
mwifiex: code rearrangement in multiport aggregation path

There are some macros defined for multiport aggregation
calculations. As we may need to add some more code to
accomodate new chipsets, we will change them to inline
functions. Also, use dynamic allocation for Rx buffer array.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: remove unnecessary macros in sdio.h
Amitkumar Karwar [Sat, 18 May 2013 00:54:42 +0000 (17:54 -0700)]
mwifiex: remove unnecessary macros in sdio.h

They are not used in the code.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: define a macro for MPA base address
Amitkumar Karwar [Sat, 18 May 2013 00:54:34 +0000 (17:54 -0700)]
mwifiex: define a macro for MPA base address

As Multiple-Port Aggregation base address value is fixed, we can
have a macro for it.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: do port calculations separately
Amitkumar Karwar [Sat, 18 May 2013 00:54:23 +0000 (17:54 -0700)]
mwifiex: do port calculations separately

This patch rearranges the code for better readability

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: code rearrangement in mwifiex_get_rd_port()
Amitkumar Karwar [Sat, 18 May 2013 00:53:56 +0000 (17:53 -0700)]
mwifiex: code rearrangement in mwifiex_get_rd_port()

Get rid of 'if else' usage by returning in 'if' block.
This improves readability by removing indentations.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: replace unnecessary u32 variables with u8 in sdio.c
Amitkumar Karwar [Sat, 18 May 2013 00:53:42 +0000 (17:53 -0700)]
mwifiex: replace unnecessary u32 variables with u8 in sdio.c

Some u32 variables in sdio.c are used to store/pass u8 values.
Replace them with u8 variables.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: store SDIO chip specific information in separate structure
Amitkumar Karwar [Sat, 18 May 2013 00:50:27 +0000 (17:50 -0700)]
mwifiex: store SDIO chip specific information in separate structure

Register addresses, firmware name and some macros are specific to
a chip. They are stored in a new structure.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: use u32 variables for SDIO read/write port bitmap
Amitkumar Karwar [Sat, 18 May 2013 00:50:26 +0000 (17:50 -0700)]
mwifiex: use u32 variables for SDIO read/write port bitmap

Currently supported SDIO chipsets (SD87XX) have 16 ports.
This change is a prerequisite for new chipset.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: add calibration data download feature
Amitkumar Karwar [Sat, 18 May 2013 00:50:25 +0000 (17:50 -0700)]
mwifiex: add calibration data download feature

User can provide a text file containing calibration data in hex
format while loading mwifiex module. It will be downloaded to
firmware.
eg. insmod mwifiex.ko cal_data_cfg=cal_data.conf

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: replace spin_lock_irqsave with spin_lock and fix warn_on
Avinash Patil [Sat, 18 May 2013 00:50:24 +0000 (17:50 -0700)]
mwifiex: replace spin_lock_irqsave with spin_lock and fix warn_on

We see this WARN_ON during PCIe unload:
WARNING: at kernel/smp.c:382 smp_call_function_many+0x66/0x1e1()

This happens because we are doing PCI iounmap operations while
holding spinlock via spin_lock_irqsave(). Holding spinlock this
way causes disabling IRQs and hence PCI iounmap shows warning on
irqs_disabled() check.

Use non-irq variant of spin_lock i.e. spin_lock() instead.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: add del_station handler
Avinash Patil [Sat, 18 May 2013 00:50:23 +0000 (17:50 -0700)]
mwifiex: add del_station handler

This patch adds cfg80211 del_station handler for mwifiex.
If bss is not started or there are no stations in associated
stations list, no action is taken. If argument received is
null/broadcast mac, all stations in associated station list are
deauthenticated.

Patch also deletes related RxReorder stream and TxBA stream tables
for related station.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: avoid deleting all stations during mwifiex_del_sta_entry()
Avinash Patil [Sat, 18 May 2013 00:50:22 +0000 (17:50 -0700)]
mwifiex: avoid deleting all stations during mwifiex_del_sta_entry()

During deleting a station entry from associated sta_list, we are
supposed to delete entry only for this particular mac address.
This patch is a bug fix wherein we were deleting all entries from
list; fix this by removing list_for_each_entry_safe() call.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: abort remaining scan commands when association started
Bing Zhao [Sat, 18 May 2013 00:50:21 +0000 (17:50 -0700)]
mwifiex: abort remaining scan commands when association started

A full-channel scan is split to multiple scan commands in driver
before they are sent to firmware. When each scan result is back
the SSID entries are parsed and informed to cfg80211 directly.

It's observed that sometimes userspace may initiate association
as soon as the target AP is found. During the 4-way handshake
firmware may go off-channel to scan the remaining channels.
This causes the 4-way handshake to fail.

Fix it by checking 'scan_block' flag and aborting the remaining
scan in this case. 'scan_block' flag is set after association
and before 4-way handshake. It gets cleared after 4-way handshake
is completed.

Tested-by: Jason Abele <jabele@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: remove global user_scan_cfg variable
Amitkumar Karwar [Sat, 18 May 2013 00:50:20 +0000 (17:50 -0700)]
mwifiex: remove global user_scan_cfg variable

As the variable is used only for preparation of internal scan
commands, we don't need to keep it allocated until the entire
scan completes. We will define it as a local variable and free
immediately after it's use.

New flag 'scan_aborting' is added to handle race between
mwifiex_close() and scan handler. Previously user_scan_cfg
pointer used to take care of this.

This patch fixes a memory leak in mwifiex_cfg80211_scan after
running "iwlist mlan0 scan & sleep 1; rmmod mwifiex_sdio".

Reported-by: Daniel Drake <dsd@laptop.org>
Tested-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: scan delay timer cleanup in unload path
Amitkumar Karwar [Sat, 18 May 2013 00:50:19 +0000 (17:50 -0700)]
mwifiex: scan delay timer cleanup in unload path

Return from scan delay timer routine if surprise_removed flag
is true. Also, cancel the timer in unload path.

This fixes a crash when scan delay timer accesses structures
that have been freed already.

Tested with "iwlist mlan0 scan & sleep 1; rmmod mwifiex_sdio"

Reported-by: Daniel Drake <dsd@laptop.org>
Tested-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: rename mwifiex_free_adapter() routine in init.c
Amitkumar Karwar [Sat, 18 May 2013 00:50:18 +0000 (17:50 -0700)]
mwifiex: rename mwifiex_free_adapter() routine in init.c

We have two different static routines with name
mwifiex_free_adapter(). The routine in main.c actually frees the
adapter structure.

We will rename other routine in init.c to mwifiex_adapter_cleanup()
to avoid confusion.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: support SPROM rev 10
Rafał Miłecki [Mon, 13 May 2013 20:07:53 +0000 (22:07 +0200)]
bcma: support SPROM rev 10

This is pretty much the same as rev 9, there are just 2 extra fields we
know about, but are not used/stored yet anyway.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: prepare for supporting more SPROM sizes
Rafał Miłecki [Mon, 13 May 2013 20:07:52 +0000 (22:07 +0200)]
bcma: prepare for supporting more SPROM sizes

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: don't hardcode SPROM length
Rafał Miłecki [Mon, 13 May 2013 20:07:51 +0000 (22:07 +0200)]
bcma: don't hardcode SPROM length

Pass it as an argument to all functions. This is requires as newer SPROM
revisions have different lengths.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: do not stop Tx queue on packet drop
Vladimir Kondratiev [Sun, 12 May 2013 11:43:38 +0000 (14:43 +0300)]
wil6210: do not stop Tx queue on packet drop

Packet drop may be caused by various flows, like disconnect
while Tx packets was queued; this should not lead to stopping
of the Tx queue, or all Tx get stalled.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: fix remaining use of non-cached copy of tx/rx descriptors
Vladimir Kondratiev [Sun, 12 May 2013 11:43:37 +0000 (14:43 +0300)]
wil6210: fix remaining use of non-cached copy of tx/rx descriptors

- Introduce common code for Tx/Rx descriptor physical address set/parse
- Fix endianness for address fields
- consistent descriptor naming: '_d' for non-cached memory, 'd' for cached copy
- wil_tx_desc_map now modify cached copy, no need for 'volatile'

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: use NAPI
Vladimir Kondratiev [Sun, 12 May 2013 11:43:36 +0000 (14:43 +0300)]
wil6210: use NAPI

Introduce NAPI for Rx and Tx completion.

This fixes packet reordering that happens when Rx handled right in
the IRQ: netif_rx puts packet in 'percpu' queue, then network stack
fetches packets from 'percpu' queues for processing, with different
pattern of queue switching. As result, network stack see packets
in different order. This causes hard to understand TCP throughput
degradation in about 30min

Complete polling if only one packet was processed - this eliminates
empty polls that would be otherwise done at the end of each burst

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: trace support
Vladimir Kondratiev [Sun, 12 May 2013 11:43:35 +0000 (14:43 +0300)]
wil6210: trace support

Trace the following:
- WMI cmd/event
- log events
- interrupts
- Tx/Rx

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: debug dump packet content right after DMA
Vladimir Kondratiev [Sun, 12 May 2013 11:43:34 +0000 (14:43 +0300)]
wil6210: debug dump packet content right after DMA

Move packet dump to the earliest location where it is known to have
valid data.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: Sanity check for reported DMA length
Vladimir Kondratiev [Sun, 12 May 2013 11:43:33 +0000 (14:43 +0300)]
wil6210: Sanity check for reported DMA length

If Rx descriptor contains garbage, it is possible to access memory beyond
allocated buffer.

Check this condition and drop Rx if reported length is
unreasonable large

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: 'length' in Tx/Rx descriptors is little endian
Vladimir Kondratiev [Sun, 12 May 2013 11:43:32 +0000 (14:43 +0300)]
wil6210: 'length' in Tx/Rx descriptors is little endian

Hardware uses little endian for the Tx/Rx descriptors field 'length',
do appropriate conversions

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: use ap style beaconing for mesh
Thomas Pedersen [Wed, 8 May 2013 17:16:48 +0000 (10:16 -0700)]
ath9k: use ap style beaconing for mesh

Chun-Yeow and Javier Lopez contributed these changes to
make mesh mode use the more similar AP beaconing mode and
queue parameters. Should improve PS performance, interface
concurrency (AP modes can coexist), and beacon interval
stability.

AR9271 (ath9k_htc) mesh interfaces also need to be in AP
operating mode.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_htc: Claim support for mgmt frame protection
Javier Cardona [Wed, 8 May 2013 17:16:47 +0000 (10:16 -0700)]
ath9k_htc: Claim support for mgmt frame protection

Advertise support for management frame protection in hardware.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_htc: Add support for mesh interfaces
Javier Cardona [Wed, 8 May 2013 17:16:46 +0000 (10:16 -0700)]
ath9k_htc: Add support for mesh interfaces

More specifically, enable AP-style beaconing on mesh
ifaces and change the hw capabilities to reflect mesh
support.

Coexistence with a virtual STA interface was tested as
working fine.

Signed-off-by: Javier Cardona <javier@cozybit.com>
[rebase, add iface combinations]
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Do not use local_bh_disable in ampdu_action
Sujith Manoharan [Tue, 7 May 2013 23:33:32 +0000 (05:03 +0530)]
ath9k: Do not use local_bh_disable in ampdu_action

This was added during the early conversion of ampdu_action
to a sleeping callback. There is no need to do this - instead,
use the normal mutex that is acquired for all callbacks.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Use bitops for scan flag
Sujith Manoharan [Tue, 7 May 2013 23:33:31 +0000 (05:03 +0530)]
ath9k: Use bitops for scan flag

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Remove MAC_DEBUG
Sujith Manoharan [Tue, 7 May 2013 23:33:30 +0000 (05:03 +0530)]
ath9k: Remove MAC_DEBUG

This option has not been enabled by default in any
distribution, has never been enabled in OpenWrt and no developer
has asked for this information in a bug report.

Dumping pages of random values doesn't help debugging,
remove this option (along with the vmalloc() abuse).

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2x00pci: Use PCI MSIs whenever possible
Jakub Kicinski [Mon, 6 May 2013 22:28:50 +0000 (00:28 +0200)]
rt2x00pci: Use PCI MSIs whenever possible

All PCIe devices must support MSIs, make use of them.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2x00: rt2x00dev: defer operational mode detection
Gabor Juhos [Wed, 1 May 2013 15:17:34 +0000 (17:17 +0200)]
rt2x00: rt2x00dev: defer operational mode detection

Only do it after the queues are allocated. This
will allow to use the 'rt2x00dev->bcn->limit'
instead of 'rt2x00dev->ops->bcn->entry_num'.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2x00: rt2800lib: use rt2x00dev->bcn->winfo_size
Gabor Juhos [Wed, 1 May 2013 15:17:33 +0000 (17:17 +0200)]
rt2x00: rt2800lib: use rt2x00dev->bcn->winfo_size

The beacon data queue is initialized already when
the rt2800_clear_beacon_register() function is called.

Fetch the size of the TXWI descriptor from that
instead of using the winfo_size field of the data
queue descriptor.

The two values are the same, and the use of the
rt2x00dev->bcn->winfo_size value allows us to
get rid of a superfluous pointer dereference.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2x00: rt2800usb: use rt2x00dev->rx->limit
Gabor Juhos [Wed, 1 May 2013 15:17:32 +0000 (17:17 +0200)]
rt2x00: rt2800usb: use rt2x00dev->rx->limit

The RX data queue is initialized already when
the rt2800_usb_enable_radio() function is called.

Fetch the number of the queue entries from that
instead of using the entry_num field of the data
queue descriptor.

The two values are the same, and the use of the
rt2x00dev->rx->limit value allows us to get rid
of a superfluous pointer dereference.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2x00: rt2800pci: use rt2x00dev->tx->limit
Gabor Juhos [Wed, 1 May 2013 15:17:31 +0000 (17:17 +0200)]
rt2x00: rt2800pci: use rt2x00dev->tx->limit

The TX data queue is initialized already when
the rt2800pci_txstatus_interrupt() function is
called.

Fetch the number of the queue entries from that
instead of using the entry_num field of the data
queue descriptor.

The two values are the same, and the use of the
rt2x00dev->tx->limit value allows us to get rid
of a superfluous pointer dereference.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2x00: rt61pci: use rt2x00dev->tx->limit
Gabor Juhos [Wed, 1 May 2013 15:17:30 +0000 (17:17 +0200)]
rt2x00: rt61pci: use rt2x00dev->tx->limit

The TX data queue is initialized already when
the rt61pci_txdone() function is called.

Fetch the number of the queue entries from that
instead of using the entry_num field of the data
queue descriptor.

The two values are the same, and the use of the
rt2x00dev->tx->limit value allows us to get rid
of a superfluous pointer dereference.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2x00: rt2x00dev: use rt2x00dev->tx->limit
Gabor Juhos [Wed, 1 May 2013 15:17:29 +0000 (17:17 +0200)]
rt2x00: rt2x00dev: use rt2x00dev->tx->limit

The TX data queue is initialized already when
the rt2x00lib_probe_hw() function is called.

Fetch the number of the queue entries from that
instead of using the entry_num field of the data
queue descriptor.

The two values are the same, and the use of the
rt2x00dev->tx->limit value allows us to get rid
of a superfluous pointer dereference.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoLinux 3.10-rc1 v3.10-rc1
Linus Torvalds [Sun, 12 May 2013 00:14:08 +0000 (17:14 -0700)]
Linux 3.10-rc1

11 years agoMerge tag 'trace-fixes-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rosted...
Linus Torvalds [Sun, 12 May 2013 00:04:59 +0000 (17:04 -0700)]
Merge tag 'trace-fixes-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing/kprobes update from Steven Rostedt:
 "The majority of these changes are from Masami Hiramatsu bringing
  kprobes up to par with the latest changes to ftrace (multi buffering
  and the new function probes).

  He also discovered and fixed some bugs in doing so.  When pulling in
  his patches, I also found a few minor bugs as well and fixed them.

  This also includes a compile fix for some archs that select the ring
  buffer but not tracing.

  I based this off of the last patch you took from me that fixed the
  merge conflict error, as that was the commit that had all the changes
  I needed for this set of changes."

* tag 'trace-fixes-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  tracing/kprobes: Support soft-mode disabling
  tracing/kprobes: Support ftrace_event_file base multibuffer
  tracing/kprobes: Pass trace_probe directly from dispatcher
  tracing/kprobes: Increment probe hit-count even if it is used by perf
  tracing/kprobes: Use bool for retprobe checker
  ftrace: Fix function probe when more than one probe is added
  ftrace: Fix the output of enabled_functions debug file
  ftrace: Fix locking in register_ftrace_function_probe()
  tracing: Add helper function trace_create_new_event() to remove duplicate code
  tracing: Modify soft-mode only if there's no other referrer
  tracing: Indicate enabled soft-mode in enable file
  tracing/kprobes: Fix to increment return event probe hit-count
  ftrace: Cleanup regex_lock and ftrace_lock around hash updating
  ftrace, kprobes: Fix a deadlock on ftrace_regex_lock
  ftrace: Have ftrace_regex_write() return either read or error
  tracing: Return error if register_ftrace_function_probe() fails for event_enable_func()
  tracing: Don't succeed if event_enable_func did not register anything
  ring-buffer: Select IRQ_WORK

11 years agoMerge tag 'stable/for-linus-3.10-rc0-tag-two' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sat, 11 May 2013 23:19:30 +0000 (16:19 -0700)]
Merge tag 'stable/for-linus-3.10-rc0-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

Pull Xen bug-fixes from Konrad Rzeszutek Wilk:
 - More fixes in the vCPU PVHVM hotplug path.
 - Add more documentation.
 - Fix various ARM related issues in the Xen generic drivers.
 - Updates in the xen-pciback driver per Bjorn's updates.
 - Mask the x2APIC feature for PV guests.

* tag 'stable/for-linus-3.10-rc0-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/pci: Used cached MSI-X capability offset
  xen/pci: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
  xen: clear IRQ_NOAUTOEN and IRQ_NOREQUEST
  xen: mask x2APIC feature in PV
  xen: SWIOTLB is only used on x86
  xen/spinlock: Fix check from greater than to be also be greater or equal to.
  xen/smp/pvhvm: Don't point per_cpu(xen_vpcu, 33 and larger) to shared_info
  xen/vcpu: Document the xen_vcpu_info and xen_vcpu
  xen/vcpu/pvhvm: Fix vcpu hotplugging hanging.

11 years agoMerge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb...
Linus Torvalds [Sat, 11 May 2013 22:24:22 +0000 (15:24 -0700)]
Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull second SCSI update from James "Jaj B" Bottomley:
 "This is the final round of SCSI patches for the merge window.  It
  consists mostly of driver updates (bnx2fc, ibmfc, fnic, lpfc,
  be2iscsi, pm80xx, qla4x and ipr).

  There's also the power management updates that complete the patches in
  Jens' tree, an iscsi refcounting problem fix from the last pull, some
  dif handling in scsi_debug fixes, a few nice code cleanups and an
  error handling busy bug fix."

* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (92 commits)
  [SCSI] qla2xxx: Update firmware link in Kconfig file.
  [SCSI] iscsi class, qla4xxx: fix sess/conn refcounting when find fns are used
  [SCSI] sas: unify the pointlessly separated enums sas_dev_type and sas_device_type
  [SCSI] pm80xx: thermal, sas controller config and error handling update
  [SCSI] pm80xx: NCQ error handling changes
  [SCSI] pm80xx: WWN Modification for PM8081/88/89 controllers
  [SCSI] pm80xx: Changed module name and debug messages update
  [SCSI] pm80xx: Firmware flash memory free fix, with addition of new memory region for it
  [SCSI] pm80xx: SPC new firmware changes for device id 0x8081 alone
  [SCSI] pm80xx: Added SPCv/ve specific hardware functionalities and relevant changes in common files
  [SCSI] pm80xx: MSI-X implementation for using 64 interrupts
  [SCSI] pm80xx: Updated common functions common for SPC and SPCv/ve
  [SCSI] pm80xx: Multiple inbound/outbound queue configuration
  [SCSI] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC
  [SCSI] lpfc: fix up Kconfig dependencies
  [SCSI] Handle MLQUEUE busy response in scsi_send_eh_cmnd
  [SCSI] sd: change to auto suspend mode
  [SCSI] sd: use REQ_PM in sd's runtime suspend operation
  [SCSI] qla4xxx: Fix iocb_cnt calculation in qla4xxx_send_mbox_iocb()
  [SCSI] ufs: Correct the expected data transfersize
  ...

11 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Linus Torvalds [Sat, 11 May 2013 22:23:17 +0000 (15:23 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux

Pull idle update from Len Brown:
 "Add support for new Haswell-ULT CPU idle power states"

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  intel_idle: initial C8, C9, C10 support
  tools/power turbostat: display C8, C9, C10 residency

11 years agoMerge git://git.infradead.org/users/eparis/audit
Linus Torvalds [Sat, 11 May 2013 21:29:11 +0000 (14:29 -0700)]
Merge git://git.infradead.org/users/eparis/audit

Pull audit changes from Eric Paris:
 "Al used to send pull requests every couple of years but he told me to
  just start pushing them to you directly.

  Our touching outside of core audit code is pretty straight forward.  A
  couple of interface changes which hit net/.  A simple argument bug
  calling audit functions in namei.c and the removal of some assembly
  branch prediction code on ppc"

* git://git.infradead.org/users/eparis/audit: (31 commits)
  audit: fix message spacing printing auid
  Revert "audit: move kaudit thread start from auditd registration to kaudit init"
  audit: vfs: fix audit_inode call in O_CREAT case of do_last
  audit: Make testing for a valid loginuid explicit.
  audit: fix event coverage of AUDIT_ANOM_LINK
  audit: use spin_lock in audit_receive_msg to process tty logging
  audit: do not needlessly take a lock in tty_audit_exit
  audit: do not needlessly take a spinlock in copy_signal
  audit: add an option to control logging of passwords with pam_tty_audit
  audit: use spin_lock_irqsave/restore in audit tty code
  helper for some session id stuff
  audit: use a consistent audit helper to log lsm information
  audit: push loginuid and sessionid processing down
  audit: stop pushing loginid, uid, sessionid as arguments
  audit: remove the old depricated kernel interface
  audit: make validity checking generic
  audit: allow checking the type of audit message in the user filter
  audit: fix build break when AUDIT_DEBUG == 2
  audit: remove duplicate export of audit_enabled
  Audit: do not print error when LSMs disabled
  ...

11 years agoMerge branch 'for-3.10' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Fri, 10 May 2013 16:28:55 +0000 (09:28 -0700)]
Merge branch 'for-3.10' of git://linux-nfs.org/~bfields/linux

Pull nfsd fixes from Bruce Fields:
 "Small fixes for two bugs and two warnings"

* 'for-3.10' of git://linux-nfs.org/~bfields/linux:
  nfsd: fix oops when legacy_recdir_name_error is passed a -ENOENT error
  SUNRPC: fix decoding of optional gss-proxy xdr fields
  SUNRPC: Refactor gssx_dec_option_array() to kill uninitialized warning
  nfsd4: don't allow owner override on 4.1 CLAIM_FH opens

11 years agoMerge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86
Linus Torvalds [Fri, 10 May 2013 16:27:40 +0000 (09:27 -0700)]
Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86

Pull x86 platform drivers from Matthew Garrett:
 "Small set of updates, mainly trivial bugfixes and some small updates
  to deal with newer hardware.

  There's also a new driver that allows qemu guests to notify the
  hypervisor that they've just paniced, which seems useful."

* 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86:
  Add support for fan button on Ideapad Z580
  pvpanic: pvpanic device driver
  asus-nb-wmi: set wapf=4 for ASUSTeK COMPUTER INC. X75A
  drivers: platform: x86: Use PTR_RET function
  sony-laptop: SVS151290S kbd backlight and gfx switch support
  hp-wmi: add more definitions for new event_id's
  dell-laptop: Fix krealloc() misuse in parse_da_table()
  hp_accel: Ignore the error from lis3lv02d_poweron() at resume
  dell: add new dell WMI format for the AIO machines