]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/blueto...
John W. Linville [Mon, 19 Dec 2011 19:28:22 +0000 (14:28 -0500)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next

12 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath6kl
John W. Linville [Mon, 19 Dec 2011 19:25:17 +0000 (14:25 -0500)]
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl

12 years agoMerge branch 'wireless-next' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Mon, 19 Dec 2011 19:24:13 +0000 (14:24 -0500)]
Merge branch 'wireless-next' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth
Gustavo F. Padovan [Mon, 19 Dec 2011 13:37:53 +0000 (11:37 -0200)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth

Conflicts:
net/bluetooth/l2cap_core.c

12 years agoBluetooth: Add missing mgmt_confirm_name command definition
Johan Hedberg [Mon, 19 Dec 2011 12:29:08 +0000 (14:29 +0200)]
Bluetooth: Add missing mgmt_confirm_name command definition

This patch adds the necessary structs for the Confirm Name command. This
ensures that the protocol definitions are up to date with the latest
mgmt specification. The actual implementation of the command will follow
in a later patch-set.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Fix mgmt_(block,unblock)_device opcodes
Johan Hedberg [Mon, 19 Dec 2011 12:29:07 +0000 (14:29 +0200)]
Bluetooth: Fix mgmt_(block,unblock)_device opcodes

This patch fixes the opcodes of the Block/Unblock device commands to
match with what user-space expects and to confirm with the latest mgmt
specification. The reason the values were wrong was a missing Confirm
Name command definition (which will be added by a subsequent patch).

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Add missing confirm_name field to mgmt_ev_device_found
Johan Hedberg [Mon, 19 Dec 2011 12:29:06 +0000 (14:29 +0200)]
Bluetooth: Add missing confirm_name field to mgmt_ev_device_found

This patch adds a missing confirm_name field to mgmt_ev_device_found.
Support for setting the correct value for this field is not implemented
yet, but having it part of the struct definition ensures that user-space
gets correct sized device_found events and is thereby able to do at
least rudimentary parsing of them.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoRevert "Bluetooth: Revert: Fix L2CAP connection establishment"
Gustavo F. Padovan [Mon, 19 Dec 2011 00:33:30 +0000 (22:33 -0200)]
Revert "Bluetooth: Revert: Fix L2CAP connection establishment"

This reverts commit 4dff523a913197e3314c7b0d08734ab037709093.

It was reported that this patch cause issues when trying to connect to
legacy devices so reverting it.

Reported-by: David Fries <david@fries.net>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Clear RFCOMM session timer when disconnecting last channel
Mat Martineau [Wed, 7 Dec 2011 00:23:26 +0000 (16:23 -0800)]
Bluetooth: Clear RFCOMM session timer when disconnecting last channel

When the last RFCOMM data channel is closed, a timer is normally set
up to disconnect the control channel at a later time.  If the control
channel disconnect command is sent with the timer pending, the timer
needs to be cancelled.

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

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Prevent uninitialized data access in L2CAP configuration
Mat Martineau [Fri, 9 Dec 2011 01:23:21 +0000 (17:23 -0800)]
Bluetooth: Prevent uninitialized data access in L2CAP configuration

When configuring an ERTM or streaming mode connection, remote devices
are expected to send an RFC option in a successful config response.  A
misbehaving remote device might not send an RFC option, and the L2CAP
code should not access uninitialized data in this case.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Incoming ACL packets do not force active mode
Mat Martineau [Tue, 13 Dec 2011 23:06:02 +0000 (15:06 -0800)]
Bluetooth: Incoming ACL packets do not force active mode

Incoming sk_buffs always have bt_cb(skb)->force_active set to 0, so
it's misleading to use that value from the control block when calling
hci_conn_enter_active_mode() for incoming data. The destination socket
is not known in the HCI layer, so the force_active setting for each
socket isn't known either. Hard-coding the force_active parameter does
not change any behavior, but makes it obvious that incoming ACL data
never exits sniff mode.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Simplify num_comp_pkts_evt function
Andrei Emeltchenko [Wed, 7 Dec 2011 13:56:52 +0000 (15:56 +0200)]
Bluetooth: Simplify num_comp_pkts_evt function

Simplify function and remove fourth level of indentation.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Add HCI Read Data Block Size function
Andrei Emeltchenko [Wed, 7 Dec 2011 13:56:51 +0000 (15:56 +0200)]
Bluetooth: Add HCI Read Data Block Size function

Implement block size read function. Use different variables for
packet-based and block-based flow control.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Use correct struct for user_confirm_neg_reply
Johan Hedberg [Wed, 14 Dec 2011 22:47:41 +0000 (00:47 +0200)]
Bluetooth: Use correct struct for user_confirm_neg_reply

This patch fixes user_confirm_neg_reply to use the appropriate struct
for accessing the call parameters.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Update ordering and opcodes of mgmt messages
Johan Hedberg [Wed, 14 Dec 2011 22:47:40 +0000 (00:47 +0200)]
Bluetooth: Update ordering and opcodes of mgmt messages

This patch updates the ordering and opcodes of mgmt messages to match
the latest API specification.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Add timer for automatically disabling the service cache
Johan Hedberg [Wed, 14 Dec 2011 22:47:39 +0000 (00:47 +0200)]
Bluetooth: Add timer for automatically disabling the service cache

We do not want the service cache to be enabled indefinitely after
mgmt_read_info is called. To solve this a timer is added which will
automatically disable the cache if mgmt_set_dev_class isn't called
within 5 seconds of calling mgmt_read_info.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Move EIR and CoD update functions to a better position
Johan Hedberg [Wed, 14 Dec 2011 22:47:38 +0000 (00:47 +0200)]
Bluetooth: Move EIR and CoD update functions to a better position

Due to the upcoming addition of a service cache timer the functions to
update the EIR and CoD need to be higher up in mgmt.c in order to avoid
unnecessary forward-declarations. This patch simply moves code around
without any other changes in order to make subsequent patches more
readable.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Remove mgmt_set_service_cache
Johan Hedberg [Wed, 14 Dec 2011 22:47:37 +0000 (00:47 +0200)]
Bluetooth: Remove mgmt_set_service_cache

Instead of having an explicit service cache command we can make the mgmt
API simpler by implicitly enabling the cache when mgmt_read_info is
called for the first time and disabling it when mgmt_set_dev_class is
called.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Move mgmt_set_fast_connectable to the right location
Johan Hedberg [Wed, 14 Dec 2011 22:47:36 +0000 (00:47 +0200)]
Bluetooth: Move mgmt_set_fast_connectable to the right location

Fast connectable is logically after the connectable property so that's
where it should show up in the code as well (it's also after connectable
in the settings bitfield).

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Update mgmt_read_info and related mgmt messages
Johan Hedberg [Wed, 14 Dec 2011 22:47:35 +0000 (00:47 +0200)]
Bluetooth: Update mgmt_read_info and related mgmt messages

This patch updates the mgmt_read_info and related messages to the latest
management API which uses a bitfield of settings instead of individual
boolean values.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Add ProFUSION's copyright
Gustavo F. Padovan [Sun, 18 Dec 2011 15:39:33 +0000 (13:39 -0200)]
Bluetooth: Add ProFUSION's copyright

Add ProFUSION's copyright to some files I've been touching recently.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Use system workqueue to schedule power_on
Gustavo F. Padovan [Sun, 18 Dec 2011 14:40:32 +0000 (12:40 -0200)]
Bluetooth: Use system workqueue to schedule power_on

hdev->workqueue should be only for rx/tx, so move this one out.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Remove work_add and work_del from hci_sysfs
Gustavo F. Padovan [Sat, 17 Dec 2011 20:53:02 +0000 (18:53 -0200)]
Bluetooth: Remove work_add and work_del from hci_sysfs

As we run in process context now we don't need worqueue to add e del from
sysfs.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Use new alloc_workqueue()
Gustavo F. Padovan [Sat, 17 Dec 2011 19:47:30 +0000 (17:47 -0200)]
Bluetooth: Use new alloc_workqueue()

Update hdev workqueue API usage to use the new interface, this new
interface also allow us to mark this workqueue as WQ_HIGHPRI, so now rx
and tx work gets higher priority when running.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: move power_off to system workqueue
Gustavo F. Padovan [Sat, 17 Dec 2011 16:52:27 +0000 (14:52 -0200)]
Bluetooth: move power_off to system workqueue

hdev->workqueue will be only for for rx/tx/cmd processing, all other small
works should go to the system workqueue for now.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Change l2cap chan_list to use RCU
Gustavo F. Padovan [Sat, 17 Dec 2011 12:56:45 +0000 (10:56 -0200)]
Bluetooth: Change l2cap chan_list to use RCU

This list has much more reads than writes, so RCU makes senses here, also
it avoid deadlock against the socket lock.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: invert locking order in connect path
Gustavo F. Padovan [Fri, 9 Dec 2011 06:48:17 +0000 (04:48 -0200)]
Bluetooth: invert locking order in connect path

This move some checking code that was in l2cap_sock_connect() to
l2cap_chan_connect(). Thus we can invert the lock calls, i.e., call
lock_sock() before hci_dev_lock() to avoid a deadlock scenario.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: convert info timer to delayed_work
Gustavo F. Padovan [Thu, 15 Dec 2011 03:16:14 +0000 (01:16 -0200)]
Bluetooth: convert info timer to delayed_work

Another step of remove interrupt context from Bluetooth Core.
Use the system workqueue.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: convert tx_task to workqueue
Gustavo F. Padovan [Thu, 15 Dec 2011 02:50:02 +0000 (00:50 -0200)]
Bluetooth: convert tx_task to workqueue

This should simplify Bluetooth core processing a lot.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Move command task to workqueue
Gustavo F. Padovan [Thu, 15 Dec 2011 01:53:47 +0000 (23:53 -0200)]
Bluetooth: Move command task to workqueue

As part of the moving on all the Bluetooth processing to Process context.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Don't disable tasklets to call hdev->notify()
Gustavo F. Padovan [Thu, 15 Dec 2011 00:58:44 +0000 (22:58 -0200)]
Bluetooth: Don't disable tasklets to call hdev->notify()

It's pointless, we aren't protecting anything since btusb_notify()
schedules a work to run, then all it operation happens without protection.
If protection is really needed here, we will fix it further.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: convert conn hash to RCU
Gustavo F. Padovan [Thu, 15 Dec 2011 00:54:12 +0000 (22:54 -0200)]
Bluetooth: convert conn hash to RCU

Handling hci_conn_hash with RCU make us avoid some locking and disable
tasklets.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Use RCU to manipulate chan_list
Gustavo F. Padovan [Wed, 14 Dec 2011 17:08:48 +0000 (15:08 -0200)]
Bluetooth: Use RCU to manipulate chan_list

Instead of using tasklet_disable() to prevent acess to the channel use, we
can use RCU and improve the performance of our code.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: convert chan_lock to mutex
Gustavo F. Padovan [Fri, 9 Dec 2011 06:45:12 +0000 (04:45 -0200)]
Bluetooth: convert chan_lock to mutex

spin lock doesn't fit ok anymore on the new code based on workqueues.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: move hci_task_lock to mutex
Gustavo F. Padovan [Fri, 9 Dec 2011 06:41:30 +0000 (04:41 -0200)]
Bluetooth: move hci_task_lock to mutex

Now we can sleep in any path inside Bluetooth core, so mutex can make
sense here.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Remove sk_backlog usage from L2CAP
Gustavo F. Padovan [Fri, 24 Jun 2011 04:54:50 +0000 (01:54 -0300)]
Bluetooth: Remove sk_backlog usage from L2CAP

We run everything in the same lock now. The backlog queue is useless now

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Don't use spin_lock socket lock anymore
Gustavo F. Padovan [Fri, 24 Jun 2011 04:53:01 +0000 (01:53 -0300)]
Bluetooth: Don't use spin_lock socket lock anymore

We now run everything in process context, so the mutex lock is the best
option. But in some places we still need the bh_lock_sock()

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Move L2CAP timers to workqueue
Gustavo F. Padovan [Thu, 23 Jun 2011 22:29:58 +0000 (19:29 -0300)]
Bluetooth: Move L2CAP timers to workqueue

L2CAP timers also need to run in process context. As the works in l2cap
are small we are using the system worqueue.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: hci_conn_auto_accept() doesn't need locking
Gustavo F. Padovan [Fri, 17 Jun 2011 15:58:41 +0000 (12:58 -0300)]
Bluetooth: hci_conn_auto_accept() doesn't need locking

It doesn't really touch any sensitive information about hdev. So no need
to lock here.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Use delayed work for advertisiment cache timeout
Gustavo F. Padovan [Mon, 20 Jun 2011 19:39:29 +0000 (16:39 -0300)]
Bluetooth: Use delayed work for advertisiment cache timeout

As HCI rx path is now done in process context it makes sense to do all the
timer in process context as well.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Use delayed_work for connection timeout
Gustavo F. Padovan [Fri, 17 Jun 2011 16:03:21 +0000 (13:03 -0300)]
Bluetooth: Use delayed_work for connection timeout

Bluetooth rx task runs now in a workqueue, so it a good approach run any
timer that share locking with process context code also in a workqueue.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Replace spin_lock by mutex in hci_dev
Gustavo F. Padovan [Fri, 17 Jun 2011 16:03:21 +0000 (13:03 -0300)]
Bluetooth: Replace spin_lock by mutex in hci_dev

Now we run everything in HCI in process context, so it's a better idea use
mutex instead spin_lock. The macro remains hci_dev_lock() (and I got rid
of hci_dev_lock_bh()), of course.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Process recv path in a workqueue instead of a tasklet
Marcel Holtmann [Mon, 9 Aug 2010 03:06:53 +0000 (23:06 -0400)]
Bluetooth: Process recv path in a workqueue instead of a tasklet

Run recv process in workqueue helps a lot with our processing as the recv
path will also be in the process context, i.e., now all our tx and rx are
in process context.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: make hci_conn_enter_sniff_mode static
Gustavo F. Padovan [Wed, 7 Dec 2011 15:24:33 +0000 (13:24 -0200)]
Bluetooth: make hci_conn_enter_sniff_mode static

It isn't used outside hci_conn.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agob43: mark some vars __maybe_unused in b43_nphy_pmu_spur_avoid
John W. Linville [Fri, 16 Dec 2011 21:29:17 +0000 (16:29 -0500)]
b43: mark some vars __maybe_unused in b43_nphy_pmu_spur_avoid

Avoids this warning when CONFIG_B43_BCMA is not set:

  CC [M]  drivers/net/wireless/b43/phy_n.o
drivers/net/wireless/b43/phy_n.c: In function ‘b43_nphy_pmu_spur_avoid’:
drivers/net/wireless/b43/phy_n.c:4052:6: warning: unused variable ‘pmu_ctl’
drivers/net/wireless/b43/phy_n.c:4051:22: warning: unused variable ‘cc’

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoBluetooth: Use list_for_each_entry in hci_conn_hash_flush()
Gustavo F. Padovan [Thu, 15 Dec 2011 00:52:31 +0000 (22:52 -0200)]
Bluetooth: Use list_for_each_entry in hci_conn_hash_flush()

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Use chan instead of l2cap_pi macro
Gustavo F. Padovan [Fri, 9 Dec 2011 06:40:10 +0000 (04:40 -0200)]
Bluetooth: Use chan instead of l2cap_pi macro

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Initialize LE connection count
Gustavo F. Padovan [Wed, 14 Dec 2011 22:56:12 +0000 (20:56 -0200)]
Bluetooth: Initialize LE connection count

le_num needs to be set to zero.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: remove lock from struct conn_hash
Gustavo F. Padovan [Wed, 14 Dec 2011 17:10:41 +0000 (15:10 -0200)]
Bluetooth: remove lock from struct conn_hash

It isn't used anywhere.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: remove struct hci_chan_hash
Gustavo F. Padovan [Wed, 14 Dec 2011 15:02:51 +0000 (13:02 -0200)]
Bluetooth: remove struct hci_chan_hash

Only the list member of the struct was used, so we now fold it into
hci_conn.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoMerge remote branch 'wireless-next/master' into ath6kl-next
Kalle Valo [Fri, 16 Dec 2011 19:10:39 +0000 (21:10 +0200)]
Merge remote branch 'wireless-next/master' into ath6kl-next

Conflicts:
drivers/net/wireless/ath/ath6kl/init.c

12 years agoiwlagn: remove iwlagn_build_addsta_hcmd
Johannes Berg [Mon, 12 Dec 2011 12:17:44 +0000 (04:17 -0800)]
iwlagn: remove iwlagn_build_addsta_hcmd

This function is not needed:
 * we already have the "cmd" input to it in the
   same type (and on the stack elsewhere)
 * the "legacy_reserved" parameter is never set,
   so will always be zero

Remove the function and the stack copy of the
input command.

This is still left from when iwlegacy was part
of the driver -- then we needed a translation
for the command for 3945.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: add IO function for continuous write of target memory
Hsu, Kenny [Fri, 9 Dec 2011 11:11:18 +0000 (03:11 -0800)]
iwlwifi: add IO function for continuous write of target memory

Add new IO function _iwl_write_targ_mem_words() to support
target memory write for a continuous area. It will return
error code -EBUSY if iwl_grab_nic_access() fails to indicate
the memory write does not be performed. Meanwhile the existing
function iwl_write_targ_mem() also been updated by using
_iwl_write_targ_mem_words() in a single word case.

Signed-off-by: Kenny Hsu <kenny.hsu@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: remove unused AMPDU factor/density configuration
Johannes Berg [Thu, 8 Dec 2011 15:13:29 +0000 (07:13 -0800)]
iwlwifi: remove unused AMPDU factor/density configuration

These are unused, so can be removed safely. They also
don't make a lot of sense in Bluetooth configuration.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: remove most of the iwl_priv references from iwl-ucode.c
Don Fry [Wed, 7 Dec 2011 16:50:46 +0000 (08:50 -0800)]
iwlwifi: remove most of the iwl_priv references from iwl-ucode.c

Remove all but the last few references to iwl_priv from the lower
level iwl-ucode.c, with resulting code changes.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: create iwl_mac80211 unregister routine
Don Fry [Fri, 9 Dec 2011 18:07:38 +0000 (10:07 -0800)]
iwlwifi: create iwl_mac80211 unregister routine

The mac80211 setup_register operations are collected in one routine,
but the cleanup routines are not.  Create a routine for this.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: add missing documentation for iwl_shared
Emmanuel Grumbach [Wed, 7 Dec 2011 12:46:24 +0000 (14:46 +0200)]
iwlwifi: add missing documentation for iwl_shared

A few descriptions were missing

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: don't accept Tx packets when draining HW queues
Emmanuel Grumbach [Wed, 7 Dec 2011 08:32:36 +0000 (10:32 +0200)]
iwlwifi: don't accept Tx packets when draining HW queues

If the agg SM is in IWL_EMPTYING_HW_QUEUE_ADDBA or in
IWL_EMPTYING_HW_QUEUE_DELBA, we are not supposed to get Tx packets
from mac80211. mac80211 is supposed to buffer these packets for us.
A few issues have been identified in this mechanism, not all of them
were fixed.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: kill iwl_{start,stop}_tx_ba_trans_ready
Emmanuel Grumbach [Wed, 7 Dec 2011 08:11:00 +0000 (10:11 +0200)]
iwlwifi: kill iwl_{start,stop}_tx_ba_trans_ready

Since my latest patches, the upper layer reports to mac80211 that the
driver is ready to continue the start / stop BA flow as opposed to
the transport layer. Hence, iwl_{start,stop}_tx_ba_trans_ready are
not needed any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: add debug in Tx path in AGG flow
Emmanuel Grumbach [Wed, 7 Dec 2011 07:30:21 +0000 (09:30 +0200)]
iwlwifi: add debug in Tx path in AGG flow

This will allow us to catch bad cases in which the packets aren't in
the right place on the ring.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: reset the tid_data when a station is removed
Emmanuel Grumbach [Wed, 23 Nov 2011 09:37:27 +0000 (11:37 +0200)]
iwlwifi: reset the tid_data when a station is removed

Since the station is removed, we need to reset the information that
was accounted for this station.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data moves to iwl_priv
Emmanuel Grumbach [Wed, 23 Nov 2011 09:06:12 +0000 (11:06 +0200)]
iwlwifi: tid_data moves to iwl_priv

The transport doesn't need to access it any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
12 years agoiwlwifi: transport layer shouldn't access the AGG SM
Emmanuel Grumbach [Wed, 23 Nov 2011 08:52:20 +0000 (10:52 +0200)]
iwlwifi: transport layer shouldn't access the AGG SM

This is another step towards the move of tid_data from the shared
area.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data logic move to upper layer - seq_number
Emmanuel Grumbach [Mon, 21 Nov 2011 11:25:31 +0000 (13:25 +0200)]
iwlwifi: tid_data logic move to upper layer - seq_number

The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with the seq_number.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data logic move to upper layer - txqid
Emmanuel Grumbach [Mon, 21 Nov 2011 11:25:31 +0000 (13:25 +0200)]
iwlwifi: tid_data logic move to upper layer - txqid

The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with the mapping of RA / TID to HW queues in AGG.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data logic move to upper layer - check_empty
Emmanuel Grumbach [Fri, 16 Dec 2011 15:13:25 +0000 (07:13 -0800)]
iwlwifi: tid_data logic move to upper layer - check_empty

The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with the code that checks if there are still
pending packets for an RA / TID.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data logic move to upper layer - tx AGG setup
Emmanuel Grumbach [Mon, 21 Nov 2011 11:25:31 +0000 (13:25 +0200)]
iwlwifi: tid_data logic move to upper layer - tx AGG setup

The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with tx AGG setup.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data logic move to upper layer - tx AGG alloc
Emmanuel Grumbach [Mon, 21 Nov 2011 11:25:31 +0000 (13:25 +0200)]
iwlwifi: tid_data logic move to upper layer - tx AGG alloc

The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with tx AGG alloc.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data logic move to upper layer - tx AGG stop
Emmanuel Grumbach [Mon, 21 Nov 2011 11:25:31 +0000 (13:25 +0200)]
iwlwifi: tid_data logic move to upper layer - tx AGG stop

The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with tx AGG stop.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: don't rely on the wr / rd pointers in DELBA flow
Emmanuel Grumbach [Mon, 21 Nov 2011 09:49:25 +0000 (11:49 +0200)]
iwlwifi: don't rely on the wr / rd pointers in DELBA flow

In the same spirit as the previous patch. Eventually this will
allow us to remove the tid_data knowledge from the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: we can wake SW queues even when draining HW queues
Emmanuel Grumbach [Mon, 21 Nov 2011 20:31:54 +0000 (22:31 +0200)]
iwlwifi: we can wake SW queues even when draining HW queues

In the very first implementation of HT, the driver was responsible
for the queueing: stopping and waking the queues while the HW queues
where being drained. In this implementation, we had to deal with the
case where we were draining the AGG queue because we wanted to tear
down the BA agreement.
In the normal flow (when we don't drain any HW queue), when packets
are reclaimed, we wake the SW queue in case the SW queue was stopped
which can happen when the HW queues are too full.
While draining a HW queue, we must make sure that we don't wake the
SW queue, since the whole point of the draining is to empty totally
the HW queue and not only get below a certain threshold.
This is why there is condition in the reclaim function:

if (NOT EMPTYING DELBA)
wake the SW queue is applicable

Since then, a lot has changed and mac80211 is now able to buffer
packets that are being sent to a packet list that will be spliced
after the driver has reported it has drained its HW queues.
Hence, there is no need for the for aforementioned if, and we can
safely wake up the queue even if we are draining HW queues.
Removing this if, also allows us to remove the wake_queue in
check_empty that was there in order to deal with a corner case
created by the if.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: don't count the tfds in HW queue any more
Emmanuel Grumbach [Mon, 21 Nov 2011 09:07:18 +0000 (11:07 +0200)]
iwlwifi: don't count the tfds in HW queue any more

Since packets sent to an RA / TID in AGG are sent from a
separate HW Tx queue, we may get into a race:
the regular queue isn't empty while we already begin to
send packets from the AGG queue. This would result in sending
packets out of order.

In order to cope with this, mac80211 waits until the driver
reports that the legacy queue is drained before it can send
packets to the AGG queue. During that time, mac80211 buffers
packets for the driver. These packets will be sent in order
after the driver reports it is ready.

The way this was implemented in the driver is as follows:
We held a counter that monitors the number of packets for
an RA / TID in the HW queues. When this counter reached 0,
we knew that the HW queues were drained and we reported to
mac80211 that were ready to proceed.

This patch changes the implementation described above. We
now remember what is the wifi sequence number of the first
packet that will be sent in the AGG queue (lets' call it
ssn). When we reclaim the packet before ssn, we know that
the queue is drained, and we are ready to proceed.

This will allow us to move this logic in the upper layer and
eventually remove the tid_data from the shared area.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: fix endianity issue in debug prints
Emmanuel Grumbach [Mon, 21 Nov 2011 09:15:34 +0000 (11:15 +0200)]
iwlwifi: fix endianity issue in debug prints

ba_resp->seq_ctl is __le16, need to translate to cpu endianity.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: Add official names for new devices
Don Fry [Tue, 6 Dec 2011 18:42:41 +0000 (10:42 -0800)]
iwlwifi: Add official names for new devices

Replace the engineering names with the marketing names for the
new devices.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_cfg from iwl_priv to iwl_shared
Don Fry [Fri, 16 Dec 2011 15:07:36 +0000 (07:07 -0800)]
iwlwifi: move iwl_cfg from iwl_priv to iwl_shared

Move the configuration pointer from the upper level iwl_priv to the
lower level iwl_shared structure, with associated code fixes.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoath9k: Support RSN Mesh
Chun-Yeow Yeoh [Wed, 7 Dec 2011 20:45:46 +0000 (12:45 -0800)]
ath9k: Support RSN Mesh

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: Restore orig channel values upon disconnect
Rajkumar Manoharan [Wed, 7 Dec 2011 16:20:08 +0000 (21:50 +0530)]
cfg80211: Restore orig channel values upon disconnect

When we restore regulatory settings the world regulatory domain
is properly reset on cfg80211 (or user prefered regulatory domain)
but we were never setting back channel values for drivers that use
WIPHY_FLAG_CUSTOM_REGULATORY. Set these values up again by using
the orig_ channel parameters.

This fixes restoring custom regulatory settings upon disconnect
events.

Cc: compat@orbit-lab.org
Cc: Paul Stewart <pstew@google.com>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: Senthilkumar Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: allow following country IE power for custom regdom cards
Luis R. Rodriguez [Wed, 7 Dec 2011 16:20:07 +0000 (21:50 +0530)]
cfg80211: allow following country IE power for custom regdom cards

By definition WIPHY_FLAG_STRICT_REGULATORY was intended to allow the
wiphy to adjust itself to the country IE power information if the
card had no regulatory data but we had no way to tell cfg80211 that if
the card also had its own custom regulatory domain (these are typically
custom world regulatory domains) that we want to follow the country IE's
noted values for power for each channel. We add support for this and
document it.

This is not a critical fix but a performance optimization for cards
with custom regulatory domains that associate to an AP with sends
out country IEs with a higher EIRP than the one on the custom
regulatory domain. In practice the only driver affected right now
are the Atheros drivers as they are the only drivers using both
WIPHY_FLAG_STRICT_REGULATORY and WIPHY_FLAG_CUSTOM_REGULATORY --
used on cards that have an Atheros world regulatory domain. Cards
that have been programmed to follow a country specifically will not
follow the country IE power. So although not a stable fix distributions
should consider cherry picking this.

Cc: compat@orbit-lab.org
Cc: Paul Stewart <pstew@google.com>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: Senthilkumar Balasubramanian <senthilb@qca.qualcomm.com>
Reported-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211_hwsim: fix wmediumd_pid
Johannes Berg [Wed, 7 Dec 2011 11:35:17 +0000 (12:35 +0100)]
mac80211_hwsim: fix wmediumd_pid

Fix a few minor issues with wmediumd_pid:
a) make static
b) use u32 to match the snd_pid type
c) use ACCESS_ONCE since we don't lock it
d) don't explicitly initialize to 0

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove ATH9K_HW_CAP_CST
Mohammed Shafi Shajakhan [Wed, 7 Dec 2011 11:21:39 +0000 (16:51 +0530)]
ath9k_hw: remove ATH9K_HW_CAP_CST

its not used anywhere in the current code

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: validate for non-zero BSSID
Mohammed Shafi Shajakhan [Wed, 7 Dec 2011 11:21:38 +0000 (16:51 +0530)]
ath9k: validate for non-zero BSSID

before concluding that the recieved beacon is for us, let us make sure
that the BSSID is non-zero. when I configured ad-hoc mode as creator and
left it for some time without joining I found we recieved few frames whose
BSSID is zero, which we concluded wrongly as 'my_beacons'

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: check for bustype before touching BCMA CC PLLs
Rafał Miłecki [Thu, 15 Dec 2011 13:17:21 +0000 (14:17 +0100)]
b43: N-PHY: check for bustype before touching BCMA CC PLLs

Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: precendence bug in wlc_phy_attach()
Dan Carpenter [Thu, 15 Dec 2011 11:23:32 +0000 (14:23 +0300)]
brcm80211: smac: precendence bug in wlc_phy_attach()

Negate has higher precendence than compare and since neither zero nor
one are equal to four or eight the original condition is always false.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: add DFS radar pulse processing
Zefir Kurtisi [Thu, 15 Dec 2011 04:16:34 +0000 (20:16 -0800)]
ath9k: add DFS radar pulse processing

This initial DFS module provides basic functionality to deal
with radar pulses reported by the Atheros DFS HW pulse detector.

The reported data is evaluated and basic plausibility checks
are performed to filter false pulses. Passing radar pulses are
forwarded to pattern detectors which are not yet implemented.

(Some modifications to actually use ATH9K_DFS_DEBUGFS based on comments
from Julian Calaby <julian.calaby@gmail.com>. -- JWL)

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: add DFS testing check
Zefir Kurtisi [Thu, 15 Dec 2011 04:16:33 +0000 (20:16 -0800)]
ath9k_hw: add DFS testing check

In order to enable DFS upstream we want to be sure
DFS has been tested for each chipset. Push for public
documentation of the requirements we want in place and
allow for enabling each chipset through a single upstream
commit.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath: add a debug level for DFS
Zefir Kurtisi [Thu, 15 Dec 2011 04:16:32 +0000 (20:16 -0800)]
ath: add a debug level for DFS

This can later be used by other drivers that implement
DFS support.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: Replace kmalloc/memset with kzalloc
Larry Finger [Thu, 15 Dec 2011 02:23:03 +0000 (20:23 -0600)]
brcmsmac: Replace kmalloc/memset with kzalloc

In ai_attach(), space is allocated for an si_info struct. Immediately
after the allocation, routine ai_doattach() is called and that allocated
space is set to zero. As no other routine calls ai_doattach(), kzalloc()
can be utilized.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath: document ATH_DBG_MCI
Luis R. Rodriguez [Wed, 14 Dec 2011 21:56:36 +0000 (13:56 -0800)]
ath: document ATH_DBG_MCI

A debug level was added to the ath module for printing
MCI messages but no documentation was provided. Clarify that
MCI is the Message Coexistence Interface, a private protocol
used exclusively for WLAN-BT coexistence starting from
AR9462.

Cc: wtsao@qca.qualcomm.com
Cc: rmanohar@qca.qualcomm.com
Cc: mohammed@qca.qualcomm.com
Cc: senthilb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: avoid retransmitting aggregation frames that a BAR was sent for
Felix Fietkau [Wed, 14 Dec 2011 21:08:08 +0000 (22:08 +0100)]
ath9k: avoid retransmitting aggregation frames that a BAR was sent for

The receiver will discard them anyway.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: simplify tx locking
Felix Fietkau [Wed, 14 Dec 2011 21:08:07 +0000 (22:08 +0100)]
ath9k: simplify tx locking

Instead of releasing and taking back the lock over and over again in the
tx path, hold the lock a bit longer, requiring much fewer lock/unlock pairs.
This makes locking much easier to review and should not have any noticeable
performance/latency impact.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove bogus sequence number increment
Felix Fietkau [Wed, 14 Dec 2011 21:08:06 +0000 (22:08 +0100)]
ath9k: remove bogus sequence number increment

tid->seq_next is initialized on A-MPDU start anyway, and the comment next
to this chunk of code seems to be bogus as well.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: reduce indentation level in a few places
Felix Fietkau [Wed, 14 Dec 2011 21:08:05 +0000 (22:08 +0100)]
ath9k: reduce indentation level in a few places

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: reduce the number of unnecessary BAR tx packets
Felix Fietkau [Wed, 14 Dec 2011 21:08:04 +0000 (22:08 +0100)]
ath9k: reduce the number of unnecessary BAR tx packets

When processing A-MPDU tx status, only send a BAR for the failed packet
with the highest sequence number.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: change maximum software retransmission handling
Felix Fietkau [Wed, 14 Dec 2011 21:08:03 +0000 (22:08 +0100)]
ath9k: change maximum software retransmission handling

Instead of limiting a subframe to 10 A-MPDU software transmission attempts,
count hardware retransmissions as well and raise the limit a bit. That way
there will be fewer software retransmission attempts when traffic suffers
from lots of hardware retransmissions.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Fix power save in change interface
Mohammed Shafi Shajakhan [Wed, 14 Dec 2011 14:16:08 +0000 (19:46 +0530)]
mac80211: Fix power save in change interface

we found that power save is not getting enabled when we do
change interface in this order STA->IBSS->STA. this is
because ieee80211_setup_sdata clears type-dependent union

Reported-by: Leela Kella <leela@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove an unnecessary paraenthesis
Mohammed Shafi Shajakhan [Wed, 14 Dec 2011 14:16:07 +0000 (19:46 +0530)]
mac80211: remove an unnecessary paraenthesis

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames
Helmut Schaa [Thu, 15 Dec 2011 09:18:34 +0000 (10:18 +0100)]
mac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames

Currently BAR, ADDBA and DELBA frames are always sent using AC_VO. If
the TID for which a BA session is established is assigned to a different
queue BAR, ADDBA and DELBA frames can "overtake" frames of the according
BA session.

Hence, always put BA session related frames into the same queue as the
BA sessions data frames.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: reduce station management complexity
Johannes Berg [Thu, 15 Dec 2011 10:24:20 +0000 (11:24 +0100)]
mac80211: reduce station management complexity

Now that IBSS no longer needs to insert stations
from atomic context, we can get rid of all the
special cases for that, and even get rid of the
sta_lock (though it needs to stay as tim_lock.)

This makes the station management code much more
straight-forward.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: delay IBSS station insertion
Johannes Berg [Thu, 15 Dec 2011 10:17:37 +0000 (11:17 +0100)]
mac80211: delay IBSS station insertion

In order to notify drivers and simplify the station
management code, defer IBSS station insertion to a
work item and don't do it directly while receiving
a frame.

This increases the complexity in IBSS a little bit,
but it's pretty straight forward and it allows us
to reduce the station management complexity (next
patch) considerably.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: make address arguments to sta_info_alloc const
Johannes Berg [Wed, 14 Dec 2011 12:28:46 +0000 (13:28 +0100)]
mac80211: make address arguments to sta_info_alloc const

No real changes, just note that they are const.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>