pandora-kernel.git
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>
12 years agomac80211: count authorized stations per BSS
Johannes Berg [Wed, 14 Dec 2011 11:20:31 +0000 (12:20 +0100)]
mac80211: count authorized stations per BSS

Currently, each AP interface will send multicast
traffic if any interface has a station entry even
if that station entry is allocated only. With the
new station state management we can easily fix it
by adding a counter that counts each authorized
station only and send multicast traffic only when
the correct interface has at least one authorized
station.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: refactor station state transitions
Johannes Berg [Wed, 14 Dec 2011 11:35:30 +0000 (12:35 +0100)]
mac80211: refactor station state transitions

Station entries can have various states, the most
important ones being auth, assoc and authorized.
This patch prepares us for telling the driver about
these states, we don't want to confuse drivers with
strange transitions, so with this we enforce that
they move in the right order between them (back and
forth); some transitions might happen before the
driver even knows about the station, but at least
runtime transitions will be ordered correctly.

As a consequence, IBSS and MESH stations will now
have the ASSOC flag set (so they can transition to
AUTHORIZED), and we can get rid of a special case
in TX processing.

When freeing a station, unwind the state so that
other parts of the code (or drivers later) can rely
on the transitions.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: use station mutex in configuration
Johannes Berg [Wed, 14 Dec 2011 11:20:29 +0000 (12:20 +0100)]
mac80211: use station mutex in configuration

There's no need to use RCU here, we can just lock
the station mutex instead. This allows the code
to sleep, which is necessary for later patches.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove duplicate TDLS peer verification
Johannes Berg [Wed, 14 Dec 2011 11:20:28 +0000 (12:20 +0100)]
mac80211: remove duplicate TDLS peer verification

This is already checked in cfg80211, so no need
to repeat the checks here.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: validate nl80211 station handling better
Johannes Berg [Wed, 14 Dec 2011 11:20:27 +0000 (12:20 +0100)]
cfg80211: validate nl80211 station handling better

The nl80211 station handling code is a bit messy
and doesn't do a lot of validation. It seems like
this could be an issue for drivers that don't use
mac80211 to validate everything.

As cfg80211 doesn't keep station state, move the
validation of allowing supported_rates to change
for TDLS only in station mode to mac80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211: add TDLS peer flag to policy
Johannes Berg [Wed, 14 Dec 2011 08:29:15 +0000 (09:29 +0100)]
nl80211: add TDLS peer flag to policy

This was evidently missed in the TDLS patch (07ba55d7).

Cc: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowl12xx: alloc buffer in driver_state_read to prevent compilation warning
Luciano Coelho [Thu, 15 Dec 2011 12:58:08 +0000 (14:58 +0200)]
wl12xx: alloc buffer in driver_state_read to prevent compilation warning

When compiling wl12xx for x86, there was a warning complaining about
the size of the buffer we were allocating in the stack:

drivers/net/wireless/wl12xx/debugfs.c: In function 'driver_state_read':
drivers/net/wireless/wl12xx/debugfs.c:380:1: warning: the frame size of 1040 bytes is larger than 1024 bytes

To prevent this, allocate the buffer in the heap instead.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agoSet wlvif->ps_compl to NULL in before return
Pontus Fuchs [Wed, 14 Dec 2011 13:32:23 +0000 (14:32 +0100)]
Set wlvif->ps_compl to NULL in before return

wl1271_configure_suspend_sta leaves a stale stack declared
completion in wlvif->ps_compl. Set it to NULL before returning.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
[small fix to use wlvif->ps_compl instead of wl->ps_compl]
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: remove unused firmware version macros
Luciano Coelho [Wed, 14 Dec 2011 12:57:58 +0000 (14:57 +0200)]
wl12xx: remove unused firmware version macros

We don't use WL12XX_BA_SUPPORT_FW_COST_VER2_START nor
WL12XX_BA_SUPPORT_FW_COST_VER2_END anymore.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: remove deprecated packet detection threshold config
Luciano Coelho [Tue, 13 Dec 2011 13:45:54 +0000 (15:45 +0200)]
wl12xx: remove deprecated packet detection threshold config

The ACX_PD_THRESHOLD configuration command is deprecated and should
not be used anymore.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: use ieee80211_free_txskb()
Eliad Peller [Tue, 13 Dec 2011 13:26:38 +0000 (15:26 +0200)]
wl12xx: use ieee80211_free_txskb()

Use the newly introduced ieee80211_free_txskb() instead
of dev_kfree_skb() for failed tx packets.

Additionally, if the skb is a dummy packet, re-enqueue
it (as the fw expects it) instead of freeing it.

Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: call extended radio parameters for wl127x AP mode
Luciano Coelho [Tue, 13 Dec 2011 09:39:50 +0000 (11:39 +0200)]
wl12xx: call extended radio parameters for wl127x AP mode

We need to set the extended radio parameters for wl127x only.
Currently, we were only calling this command with wl127x STA mode, but
we should also do it for AP mode.

Move the call to the extended radio paramaters to the common hw_init
and use a single if for the chip type to do everything at once.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: don't write out of bounds when hlid > WL12XX_MAX_LINKS
Luciano Coelho [Tue, 13 Dec 2011 09:39:02 +0000 (11:39 +0200)]
wl12xx: don't write out of bounds when hlid > WL12XX_MAX_LINKS

We should not get an hlid value bigger than WL12XX_MAX_LINKS from
wl1271_rx_handle_data().  We have a WARN_ON in case it happens.  But
despite the warning, we would still go ahead and write the hlid bit
into active_hlids (a stack variable).  This would cause us to
overwrite other data in the stack.

To avoid this problem, we now skip the write when issuing the warning,
so at least we don't corrupt data.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: Restore testmode ABI
Pontus Fuchs [Thu, 1 Dec 2011 11:13:44 +0000 (12:13 +0100)]
wl12xx: Restore testmode ABI

Commit 80900d0140a7648587982c8f299830e900e49165 accidently broke
the ABI for testmode commands. Restore the ABI again.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agoNFC: Initial LLCP support
Samuel Ortiz [Wed, 14 Dec 2011 15:43:12 +0000 (16:43 +0100)]
NFC: Initial LLCP support

This patch is an initial implementation for the NFC Logical Link Control
protocol. It's also known as NFC peer to peer mode.
This is a basic implementation as it lacks SDP (services Discovery
Protocol), frames aggregation support, and frame rejecion parsing.
Follow up patches will implement those missing features.
This code has been tested against a Nexus S phone implementing LLCP 1.0.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: DEP link hook implementation for pn533
Samuel Ortiz [Wed, 14 Dec 2011 15:43:11 +0000 (16:43 +0100)]
NFC: DEP link hook implementation for pn533

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Set and get DEP general bytes
Samuel Ortiz [Wed, 14 Dec 2011 15:43:10 +0000 (16:43 +0100)]
NFC: Set and get DEP general bytes

Without an API for setting and getting the local and remote general bytes,
drivers won't be able to properly establish a DEP link.
This API also allows them to propagate the remote general bytes they get
from the DEP link establishment up to the LLCP layer.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Add a DEP link control netlink command
Samuel Ortiz [Wed, 14 Dec 2011 15:43:09 +0000 (16:43 +0100)]
NFC: Add a DEP link control netlink command

NFC-DEP (Data Exchange Protocol) is an NFC MAC layer.
This command allows to enable and disable the DEP link on to which e.g.
LLCP can run.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Atomic socket allocation
Samuel Ortiz [Wed, 14 Dec 2011 15:43:08 +0000 (16:43 +0100)]
NFC: Atomic socket allocation

rawsock_create() is called with preemption disabled, so we should not
sleep.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Do not take the genl mutex from the netlink release notifier
Samuel Ortiz [Wed, 14 Dec 2011 15:43:07 +0000 (16:43 +0100)]
NFC: Do not take the genl mutex from the netlink release notifier

The netlink notifier is atomic so we must not sleep in that context.
Also we know that Any netlink packets arriving to us will be purged when
the notifier is called, so we don't need to take the mutex.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Add tx skb allocation routine
Samuel Ortiz [Wed, 14 Dec 2011 15:43:06 +0000 (16:43 +0100)]
NFC: Add tx skb allocation routine

This is a factorization of the current rawsock tx skb allocation routine,
as it will be used by the LLCP code.
We also rename nfc_alloc_skb to nfc_alloc_recv_skb for consistency sake.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Add function name to the NFC pr_fmt() routine
Samuel Ortiz [Wed, 14 Dec 2011 15:43:05 +0000 (16:43 +0100)]
NFC: Add function name to the NFC pr_fmt() routine

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Make use of ieee80211_free_txskb in tx path
Helmut Schaa [Wed, 14 Dec 2011 15:28:41 +0000 (16:28 +0100)]
rt2x00: Make use of ieee80211_free_txskb in tx path

ieee80211_free_txskb should be used when dropping a frame in the device
rx path such that mac80211 knows about this frame being dropped.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: free skb on error path of ieee80211_ibss_join()
Simon Wunderlich [Wed, 14 Dec 2011 12:33:30 +0000 (13:33 +0100)]
mac80211: free skb on error path of ieee80211_ibss_join()

Our new return also created a memleak. The skb should be freed before
returning an error.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: remove cfg_workqueue
Amitkumar Karwar [Wed, 14 Dec 2011 04:43:17 +0000 (20:43 -0800)]
mwifiex: remove cfg_workqueue

cfg_workqueue was added to notify cfg80211 that scan, connect
or disconnect is done by calling respective completion handlers.
We can avoid use of this workqueue by calling those handlers
from other places.
1) Call connect, disconnect completion handlers in their callback
   functions.
   ex. Call cfg80211_connect_result() in mwifiex_cfg80211_connect()
2) Call scan completion handler after parsing response of last scan
   command in a queue.

After removing the workqueue, variables (assoc_request etc.) and
checks used for mutual exclusion become redundant. Those are also
removed in this patch.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211: accept testmode dump with netdev
Johannes Berg [Tue, 13 Dec 2011 16:22:05 +0000 (17:22 +0100)]
nl80211: accept testmode dump with netdev

All nl80211 commands that need only the wiphy
still allow identifying it by giving an interface
index, except, as Kenny pointed out, the testmode
dump support.

Fix this by looking up the wiphy via the ifidx in
this case as well.

Tested-by: Kenny Hsu <kenny.hsu@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Wed, 14 Dec 2011 19:35:41 +0000 (14:35 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless

Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn.c

12 years agoiwlwifi: allow to switch to HT40 if not associated
Wey-Yi Guy [Wed, 14 Dec 2011 16:22:36 +0000 (08:22 -0800)]
iwlwifi: allow to switch to HT40 if not associated

My previous patch
34a5b4b6af104cf18eb50748509528b9bdbc4036 iwlwifi: do not re-configure
HT40 after associated

Fix the case of HT40 after association on specified AP, but it break the
association for some APs and cause not able to establish connection.
We need to address HT40 before and after addociation.

CC: stable@vger.kernel.org #3.0+
Reported-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Tested-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>