profile/ivi/kernel-x86-ivi.git
11 years agoath9k_hw: ar9002_hw_spectral_scan_config() can be static
Fengguang Wu [Sat, 12 Jan 2013 02:28:12 +0000 (10:28 +0800)]
ath9k_hw: ar9002_hw_spectral_scan_config() can be static

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge tag 'nfc-next-3.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
John W. Linville [Mon, 14 Jan 2013 20:08:52 +0000 (15:08 -0500)]
Merge tag 'nfc-next-3.9-1' of git://git./linux/kernel/git/sameo/nfc-next

Samuel Ortiz <sameo@linux.intel.com> says:

"This is the first NFC patchset targeted at the 3.9 merge window.

It brings the following goodies:

- LLCP socket timestamping (To be used e.g with the recently released nfctool
  application for a more efficient skb timestamping when sniffing).
- A pretty big pn533 rework from Waldemar, preparing the driver to support
  more flavours of pn533 based devices.
- HCI changes from Eric in preparation for the microread driver support.
- Some LLCP memory leak fixes, cleanups and slight improvements.
- pn544 and nfcwilink move to the devm_kzalloc API.
- An initial Secure Element (SE) API.
- An nfc.h license change from the original author, allowing non GPL
  application code to safely include it."

Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoNFC: Change nfc.h license
Lauro Ramos Venancio [Thu, 6 Dec 2012 00:12:25 +0000 (21:12 -0300)]
NFC: Change nfc.h license

nfc.h being GPL makes it quite controversial for non GPL applications to
include it.
Moreover, nfc.h only includes structures and API definitions that are hardly
copyrightable.

Signed-off-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Fix bad allocation size
Thierry Escande [Sat, 12 Jan 2013 18:37:12 +0000 (19:37 +0100)]
NFC: pn533: Fix bad allocation size

Use dereferenced pointer in sizeof instead of pointer itself.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agobcma: update pci configuration for bcm4706/bcm4716
Nathan Hintz [Fri, 11 Jan 2013 06:24:03 +0000 (22:24 -0800)]
bcma: update pci configuration for bcm4706/bcm4716

Update the PCI configuration for BCM4706 and BCM4716 per the 2011
Broadcom SDK.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: add tx gain tables for newer devices
Felix Fietkau [Thu, 10 Jan 2013 18:41:52 +0000 (19:41 +0100)]
ath9k_hw: add tx gain tables for newer devices

Improves stability on affected devices and also fixes the Tx IQ calibration
related regression on some AR9340 devices such as the TP-Link TL-WDR4300.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: return the mips irq number in bcma_core_irq
Nathan Hintz [Thu, 10 Jan 2013 16:54:09 +0000 (17:54 +0100)]
bcma: return the mips irq number in bcma_core_irq

The irq signal numbers that are send by the cpu are increased by 2 from
the number programmed into the mips core by bcma.
Return the irq number on which the irqs are send in bcma_core_irq() now.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: fix compile error
Hauke Mehrtens [Thu, 10 Jan 2013 16:52:38 +0000 (17:52 +0100)]
bcma: fix compile error

This error was introduced in:
commit e3f05a42faac627d8704c76c1927e09b22443b7b
Author: Hauke Mehrtens <hauke@hauke-m.de>
Date:   Fri Jan 4 00:51:21 2013 +0100

    bcma: mips: explicit assign IRQ numbers

  CC      drivers/bcma/driver_mips.o
drivers/bcma/driver_mips.c: In function 'bcma_core_mips_init':
drivers/bcma/driver_mips.c:302:4: error: implicit declaration of
function 'bcma_core_irq' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[6]: *** [drivers/bcma/driver_mips.o] Error 1

Reported-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: fix spectral scan endless mode on AR9002
Simon Wunderlich [Thu, 10 Jan 2013 10:45:14 +0000 (11:45 +0100)]
ath9k: fix spectral scan endless mode on AR9002

There was a copy+paste error in ar9002 for the endless spectral mode,
fix that.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agossb: add database of serial flash memories
Rafał Miłecki [Thu, 10 Jan 2013 09:11:37 +0000 (10:11 +0100)]
ssb: add database of serial flash memories

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomac80211_hwsim: fix beacon timestamp and mactime
Thomas Pedersen [Mon, 7 Jan 2013 22:48:07 +0000 (14:48 -0800)]
mac80211_hwsim: fix beacon timestamp and mactime

Set the beacon timestamp once during "transmission" so the
monitor interface also gets a timestamped beacon.

Also use a common base between TX timestamp and RX
mactime. This eliminates "TX" path delay, which shows up
as a constant error in Toffset.

Get the global TSF once before iterating over all RX HWs,
so they all set a mactime with the same time base.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agodrivers/nfc/nfcwilink.c: use devm_kzalloc
Julia Lawall [Thu, 6 Dec 2012 22:10:40 +0000 (23:10 +0100)]
drivers/nfc/nfcwilink.c: use devm_kzalloc

devm_kzalloc allocates memory that is released when a driver detaches.
This patch uses devm_kzalloc for data that is allocated in the probe
function of a platform device and is only freed in the remove function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoNFC: Use skb_copy_datagram_iovec
Samuel Ortiz [Fri, 11 Jan 2013 13:54:22 +0000 (14:54 +0100)]
NFC: Use skb_copy_datagram_iovec

Safer and more robust than than memcpy_toiovec.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Avoid memcpy on LLCP connection less Rx path
Samuel Ortiz [Fri, 11 Jan 2013 13:48:48 +0000 (14:48 +0100)]
NFC: Avoid memcpy on LLCP connection less Rx path

We can cast msg_name to a sockaddr_nfc_llcp pointer directly.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Update pn544 documentation
Samuel Ortiz [Thu, 10 Jan 2013 00:25:04 +0000 (01:25 +0100)]
NFC: Update pn544 documentation

The pn544 driver no longer has a /dev/pn544 interface nor a sysfs one.

Reported-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Fix missing parenthesis
Waldemar Rymarkiewicz [Fri, 21 Dec 2012 09:39:01 +0000 (10:39 +0100)]
NFC: pn533: Fix missing parenthesis

This is a quite critical patch as it fixes potential reference to
undefined general_bytes which were never set correctly on target
activation due to missing parenthesis.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Initial Secure Element API
Samuel Ortiz [Wed, 19 Dec 2012 18:11:32 +0000 (19:11 +0100)]
NFC: Initial Secure Element API

Each NFC adapter can have several links to different secure elements and
that property needs to be exported by the drivers.
A secure element link can be enabled and disabled, and card emulation will
be handled by the currently active one. Otherwise card emulation will be
host implemented.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: update HCI documentation
Eric Lapuyade [Tue, 18 Dec 2012 16:35:02 +0000 (17:35 +0100)]
NFC: update HCI documentation

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn544: Use devm_kzalloc API
Samuel Ortiz [Tue, 18 Dec 2012 17:07:37 +0000 (18:07 +0100)]
NFC: pn544: Use devm_kzalloc API

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn544: Use module_i2c_driver
Samuel Ortiz [Tue, 18 Dec 2012 15:40:16 +0000 (16:40 +0100)]
NFC: pn544: Use module_i2c_driver

The pn544 init routine does nothing but adding the driver to the i2c bus.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn544: Separate the core code and the i2c one into different modules
Samuel Ortiz [Tue, 18 Dec 2012 15:26:23 +0000 (16:26 +0100)]
NFC: pn544: Separate the core code and the i2c one into different modules

As we may need to support other physical layers, we can avoid linking the
core part into each and every pn544 module.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Add HCI quirks to support driver (non)standard implementations
Eric Lapuyade [Tue, 18 Dec 2012 13:15:49 +0000 (14:15 +0100)]
NFC: Add HCI quirks to support driver (non)standard implementations

Some chips diverge from the HCI spec in their implementation of standard
features. This adds a new quirks parameter to
nfc_hci_allocate_device() to let the driver indicate its divergence.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Fixed skb leak in tm_send() nfc and hci ops implementations
Eric Lapuyade [Tue, 4 Dec 2012 15:44:25 +0000 (16:44 +0100)]
NFC: Fixed skb leak in tm_send() nfc and hci ops implementations

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Changed event_received hci ops result semantic
Eric Lapuyade [Tue, 4 Dec 2012 15:43:24 +0000 (16:43 +0100)]
NFC: Changed event_received hci ops result semantic

Some chips use a standard HCI event code, destined to a proprietary
gate, with a different meaning. Therefore, the HCI driver must always
have a chance to intercept the event before standard processing is
attempted.
The new semantic specifies that the result value "1" means that the
driver doesn't especially handle the event. result <= 0 means it was
handled.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Added error handling in event_received hci ops
Eric Lapuyade [Wed, 28 Nov 2012 14:48:44 +0000 (15:48 +0100)]
NFC: Added error handling in event_received hci ops

There is no use to return an error if the caller doesn't get it.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Fixed nfc core and hci unregistration and cleanup
Eric Lapuyade [Mon, 26 Nov 2012 17:06:27 +0000 (18:06 +0100)]
NFC: Fixed nfc core and hci unregistration and cleanup

When an adapter is removed, it will unregister itself from hci and/or
nfc core. In order to do that safely, work tasks must first be canceled
and prevented to be scheduled again, before the hci or nfc device can be
destroyed.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: nfcwilink: Use devm_kzalloc
Julia Lawall [Thu, 6 Dec 2012 22:10:40 +0000 (23:10 +0100)]
NFC: nfcwilink: Use devm_kzalloc

devm_kzalloc allocates memory that is released when a driver detaches.
This patch uses devm_kzalloc for data that is allocated in the probe
function of a platform device and is only freed in the remove function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Introduce ops for frame logic
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:43:01 +0000 (14:43 +0100)]
NFC: pn533: Introduce ops for frame logic

Encapsulate whole frame logic (tx/rx frame structure and size) inside
the ops structure to make the core driver generic for devices which
handle frames in non standard menner (different then pn533 spec say).

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Remove unused dev->wq_in_frame
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:43:00 +0000 (14:43 +0100)]
NFC: pn533: Remove unused dev->wq_in_frame

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Cleanup pn533_cmd_complete_t
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:59 +0000 (14:42 +0100)]
NFC: pn533: Cleanup pn533_cmd_complete_t

'params' arg in pn533_cmd_complete_t definition has been deprecated and
currently is not in use (resp skb is pass in arg ptr), so remove it.

Also 'params_len' arg is used as a transfer status indicator, so simply
reword it appropriately.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Remove deprecated dev->out_frame buff
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:58 +0000 (14:42 +0100)]
NFC: pn533: Remove deprecated dev->out_frame buff

As it's not used anymore get rid of that buffer.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Use skb in __pn533_send_cmd_frame_asyn
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:57 +0000 (14:42 +0100)]
NFC: pn533: Use skb in __pn533_send_cmd_frame_asyn

__pn533_send_cmd_frame_async() should be frame type independent. So, don't
use pn533_frame type params and instead use skb for req and resp pointers.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Don't use out_frame in pn533_send_ack
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:56 +0000 (14:42 +0100)]
NFC: pn533: Don't use out_frame in pn533_send_ack

dev->out_frame buffer is much bigger for ACK frame needs. Use
local buffer instead.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Cleanup debug messages
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:55 +0000 (14:42 +0100)]
NFC: pn533: Cleanup debug messages

Remove debug messages which do not include valueable informations
in debug mode. Add some new ones for better tracking or reword when
if necessary.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Fix urb->status handling
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:54 +0000 (14:42 +0100)]
NFC: pn533: Fix urb->status handling

Fix text message to be more suitable for the error code and treat
ESHUTDOWN as an error not debug msg.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Remove unused pn533_send_cmd_frame_asy
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:53 +0000 (14:42 +0100)]
NFC: pn533: Remove unused pn533_send_cmd_frame_asy

Remove obsolete send async api as it's no longer used. Remove
global dev->in_frame as well, as each packet is kept is a
seperate skb struct now, so that's not used anymore.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Fix minor style issues
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:52 +0000 (14:42 +0100)]
NFC: pn533: Fix minor style issues

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Fix open parenthesis alignment
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:51 +0000 (14:42 +0100)]
NFC: pn533: Fix open parenthesis alignment

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Fix spacing issues
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:50 +0000 (14:42 +0100)]
NFC: pn533: Fix spacing issues

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Fix quoted strings split across lines
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:49 +0000 (14:42 +0100)]
NFC: pn533: Fix quoted strings split across lines

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Remove frame logic from poll cmds
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:48 +0000 (14:42 +0100)]
NFC: pn533: Remove frame logic from poll cmds

Remove frame logic from start_pool cb using the new iface
for async send.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Dump tx and rx data in debug mode
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:47 +0000 (14:42 +0100)]
NFC: pn533: Dump tx and rx data in debug mode

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Del frame logic from Data Exchange cmd
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:46 +0000 (14:42 +0100)]
NFC: pn533: Del frame logic from Data Exchange cmd

Remove frame logic from transceive cb using new iface
for async send.

For pn533_wq_mi_recv() use pn533_send_cmd_direct_async which
sends the cmd directly to the hardware, skipping cmd queue.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Del frame logic from InJumForDep cmd
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:45 +0000 (14:42 +0100)]
NFC: pn533: Del frame logic from InJumForDep cmd

Remove frame logic from InJmumpForDEP command using
the new iface for async send.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Del frame logic from TgGet/SetData cmd
Waldemar Rymarkiewicz [Mon, 10 Dec 2012 13:42:44 +0000 (14:42 +0100)]
NFC: pn533: Del frame logic from TgGet/SetData cmd

Remove frame logic from TgSetData and TgGetData commands
using the new iface for async send.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: llcp: Fix Rx memory leak
Samuel Ortiz [Fri, 7 Dec 2012 15:37:30 +0000 (16:37 +0100)]
NFC: llcp: Fix Rx memory leak

The reference count bump on the llcp Rx path is leading to a memory leak
whenever we're not receiving an I frame.
We fix that by removing the refcount bump (drivers must not free their
received skb) and using it only in the I frame path, when the frame is
actually queued. In that case, the skb will only be freed when someone
fetches it from userspace. in all other cases, LLCP received frames will
be freed when leaving the Rx work queue.

Reported-by: Eric Lapuyade <eric.lapuyade@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: llcp: Remove the tx backlog queue
Samuel Ortiz [Fri, 7 Dec 2012 14:55:19 +0000 (15:55 +0100)]
NFC: llcp: Remove the tx backlog queue

Not only it was improperly use to queue backlogged RX skbuffs, but it was
also not processed at all.
If the socket receive queue is full we simply drop the incoming packets.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Remove pn533_send_cmd_frame_sync
Waldemar Rymarkiewicz [Mon, 26 Nov 2012 13:18:38 +0000 (14:18 +0100)]
NFC: pn533: Remove pn533_send_cmd_frame_sync

Remove obsolate pn533_send_cmd_frame_sync() and use
previously added new iface for sync send.

The new interface require the use of individual skb for each
cmd which removes some memcpy calls and hides frame logic.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Add pn533_alloc_skb for req allocation
Waldemar Rymarkiewicz [Mon, 26 Nov 2012 13:18:37 +0000 (14:18 +0100)]
NFC: pn533: Add pn533_alloc_skb for req allocation

Allocate sk_buff for the request.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Add a new pn533_send_sync iface
Waldemar Rymarkiewicz [Mon, 26 Nov 2012 13:18:36 +0000 (14:18 +0100)]
NFC: pn533: Add a new pn533_send_sync iface

It is intended to replace pn533_send_cmd_frame_sync() iface which
requires from the caller to create complete frame.

The new function constructs a complete frame itself and sends it out
in sync manner. This way frame logic is hidden from the caller.

pn533_send_cmd_sync() returns ERR_PTR in case of an error or a pointer
to valid response sk_buff otherwise. The pointer must be freed by the
caller when it's been consumed.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Add a new pn533_send_data_async iface
Waldemar Rymarkiewicz [Mon, 26 Nov 2012 13:18:35 +0000 (14:18 +0100)]
NFC: pn533: Add a new pn533_send_data_async iface

This iface is intended to be used with DEP transfers. It differs
from pn533_send_cmd_async() in the way the response skb is allocated.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Add a new pn533_send_cmd_async iface
Waldemar Rymarkiewicz [Mon, 26 Nov 2012 13:18:34 +0000 (14:18 +0100)]
NFC: pn533: Add a new pn533_send_cmd_async iface

This is intendend to replace pn533_send_cmd_frame_async() which
requires from the caller to create a complete frame.

The new function constructs a frame and sends it out which hides the
frame logic and avoid code duplication.

The caller has to allocate skb and put its payload there, and finally
provide the skb together with a complete cb to pn533_send_cmd_async().

Response skb is allocated by the core part and pass to the caller cb.
Next, the caller has to free it when is not needed anymore or pass it
up to the stack.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Remove pointless flags param
Waldemar Rymarkiewicz [Mon, 26 Nov 2012 13:18:33 +0000 (14:18 +0100)]
NFC: pn533: Remove pointless flags param

__pn533_send_cmd_frame_async() is called when lock is held so GFP_KERNEL
flag will be always used. Thus, having extra param does not optimise the
code.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Add frame header length define
Waldemar Rymarkiewicz [Mon, 26 Nov 2012 13:18:32 +0000 (14:18 +0100)]
NFC: pn533: Add frame header length define

PN533_CMD_DATAEXCH_HEAD_LEN includes a frame header length which is not
seen at a glance. It can be missleading, so split it and define the
frame header length explicitly.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Remove unused definitions
Waldemar Rymarkiewicz [Mon, 26 Nov 2012 13:18:31 +0000 (14:18 +0100)]
NFC: pn533: Remove unused definitions

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Remove in/out_maxlen as it is not used
Waldemar Rymarkiewicz [Mon, 26 Nov 2012 13:18:30 +0000 (14:18 +0100)]
NFC: pn533: Remove in/out_maxlen as it is not used

in_maxlen and out_maxlen was replaced with PN533_NORMAL_FRAME_MAX_LEN

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Add support for SO_TIMESTAMP LLCP socket option
Thierry Escande [Tue, 27 Nov 2012 14:44:24 +0000 (15:44 +0100)]
NFC: Add support for SO_TIMESTAMP LLCP socket option

Set timestamp in sent and received sk_buffs. timestamp is then put in
msghdr structure in llcp_sock_recvmsg().

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoath9k: add spectral scan feature
Simon Wunderlich [Tue, 8 Jan 2013 13:48:58 +0000 (14:48 +0100)]
ath9k: add spectral scan feature

Adds the spectral scan feature for ath9k. AR92xx and AR93xx chips
are supported for now. The spectral scan is triggered by configuring
a mode through a debugfs control file. Samples can be gathered via
another relay debugfs file.

Essentially, to try it out:

echo chanscan > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan_ctl
iw dev wlan0 scan
cat /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan0 > samples
echo disable > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan_ctl

This feature is still experimental.

The special "chanscan" mode is used to perform spectral scan while
mac80211 is scanning for channels. To allow this,
sw_scan_start/complete() ops have been added.

The patch contains code snippets and information from Zefir Kurtisi and
information provided by Adrian Chadd and Felix Fietkau.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Fix radio programming for AR9550
Sujith Manoharan [Tue, 8 Jan 2013 15:27:53 +0000 (20:57 +0530)]
ath9k_hw: Fix radio programming for AR9550

For AR9550, program the synth value based on the ref. clock.
The logic for AR9550 is similar to AR9330, but keep the code
separate since changes for AR9330 are required - which would be
done later.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Add TempCompensation feature for AR9550
Sujith Manoharan [Tue, 8 Jan 2013 15:27:52 +0000 (20:57 +0530)]
ath9k_hw: Add TempCompensation feature for AR9550

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Update initvals for QCA955x
Sujith Manoharan [Tue, 8 Jan 2013 15:27:51 +0000 (20:57 +0530)]
ath9k_hw: Update initvals for QCA955x

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Wake up queues in mwl8k_start
Nishant Sarmukadam [Tue, 8 Jan 2013 06:40:53 +0000 (12:10 +0530)]
mwl8k: Wake up queues in mwl8k_start

If queues are stopped in mwl8k_stop,
these should be started in mwl8k_start

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Delete ampdu streams with state AMPDU_STREAM_NEW in sta remove
Yogesh Ashok Powar [Tue, 8 Jan 2013 04:46:37 +0000 (10:16 +0530)]
mwl8k: Delete ampdu streams with state AMPDU_STREAM_NEW in sta remove

When a station deauths, we do not delete the streams with state
AMPDU_STREAM_NEW and these remain created forever. Fix this issue by
removing such streams in the driver

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Disable tx_wait completion
Nishant Sarmukadam [Tue, 8 Jan 2013 04:46:05 +0000 (10:16 +0530)]
mwl8k: Disable tx_wait completion

Whenever TX ring is drained, priv->tx_wait still points
to a valid completion. Making sure that it points to
NULL before returning from the  mwl8k_tx_wait_empty
check.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Use helper routines to simplify ar9003_hw_init_cal()
Sujith Manoharan [Mon, 7 Jan 2013 09:13:33 +0000 (14:43 +0530)]
ath9k_hw: Use helper routines to simplify ar9003_hw_init_cal()

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Fix MCI init for AGC calibration
Sujith Manoharan [Mon, 7 Jan 2013 08:23:47 +0000 (13:53 +0530)]
ath9k_hw: Fix MCI init for AGC calibration

When AGC calibration is to be done, a GPM message with the
payload, MCI_GPM_WLAN_CAL_REQ has to be sent. Currently this falls
within the IQ-CAL code block which is incorrect. Fix this by using
a separate variable to decide when IQ-CAL is to be done separately
and call ar9003_mci_init_cal_req correctly.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Do not enable IQ-CAL for half/quarter rates
Sujith Manoharan [Mon, 7 Jan 2013 08:23:46 +0000 (13:53 +0530)]
ath9k_hw: Do not enable IQ-CAL for half/quarter rates

IQ calibration doesn't complete and times out for half/quarter
rates, so skip it correctly.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agossb: add place for serial flash driver
Rafał Miłecki [Sun, 6 Jan 2013 20:48:50 +0000 (21:48 +0100)]
ssb: add place for serial flash driver

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge branch 'for-john' of git://git.sipsolutions.net/mac80211-next
John W. Linville [Wed, 9 Jan 2013 19:22:45 +0000 (14:22 -0500)]
Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-next

11 years agoregulatory: fix restore_regulatory_settings
Johannes Berg [Wed, 9 Jan 2013 11:01:38 +0000 (12:01 +0100)]
regulatory: fix restore_regulatory_settings

My commit 379b82f4c9dc6e67bf61aa61b096c06a2f320f60
("regulatory: pass new regdomain to reset function")
broke the restore_regulatory_settings() function due
to a logic change. Consider this change:

- reset_regdomains(true);
- cfg80211_regdomain = cfg80211_world_regdom;
+ reset_regdomains(true, cfg80211_world_regdom);

This looks innocent enough, until you realise that the
called function (reset_regdomains) also resets the
cfg80211_world_regdom pointer, so that the old version
of the code would use the new object it pointed to and
the new version of the code uses the old object. This
lead to a double-free of this object.

Since reset_regdomains() sets it to &world_regdom, use
that directly.

Reported-by: Sujith Manoharan <sujith@msujith.org>
Tested-by: Sujith Manoharan <sujith@msujith.org>
Reported-by: Bob Copeland <me@bobcopeland.com>
Reported-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoregulatory: fix uevent
Johannes Berg [Wed, 9 Jan 2013 09:22:07 +0000 (10:22 +0100)]
regulatory: fix uevent

The uevent callback doesn't protect its access to
last_request, which now causes a warning since
the conversion to get_last_request(). Fix this by
allowing to use RCU protection for last_request.

Reported-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomwifiex: use map/unmap APIs in TX and RX to reduce memcpy
Avinash Patil [Fri, 4 Jan 2013 05:21:32 +0000 (21:21 -0800)]
mwifiex: use map/unmap APIs in TX and RX to reduce memcpy

This patch is an enhacement to mwifiex_pcie driver to use
map/unmap PCI memory APIs. This reduces one memcpy each in TX
path and RX path, and enhances throughput.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: flush TX ring for PCIe after disconnect or bss stop
Avinash Patil [Fri, 4 Jan 2013 05:21:31 +0000 (21:21 -0800)]
mwifiex: flush TX ring for PCIe after disconnect or bss stop

This patch adds handler to clean PCIe TX rings after disconnect
or bss stop is called for PCIe based mwifiex driver.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: use pci_alloc/free_consistent APIs for PCIe
Avinash Patil [Fri, 4 Jan 2013 05:21:30 +0000 (21:21 -0800)]
mwifiex: use pci_alloc/free_consistent APIs for PCIe

This patch uses pci_alloc_consistent and pci_free_consistent
APIs for mwifiex_pcie driver. Consistent DMA memory is allocated
for TX, RX and event rings. Command buffer and command response
buffer also uses map/unmap memory APIs to download commands and
get command responses.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: add init_fw_port handler for PCIe interface
Avinash Patil [Fri, 4 Jan 2013 05:21:29 +0000 (21:21 -0800)]
mwifiex: add init_fw_port handler for PCIe interface

This patch adds support for init_fw_port handler for PCIe
interface, which resets RXBD read pointer for PCIe.
This fixes issue where RX doesn't work until some TX from
driver happens.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: access interrupt status only while holding lock
Avinash Patil [Fri, 4 Jan 2013 05:21:28 +0000 (21:21 -0800)]
mwifiex: access interrupt status only while holding lock

This patch fixes a bug for few instances where PCIe interrupt
status variable is accessed without holding spin lock.
This can result into missing interrupts.

Fix this by copying interrupt status to a local variable and
then using it for calling specific routine.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: mips: rename oldirqflag to irqinitmask
Hauke Mehrtens [Thu, 3 Jan 2013 23:51:25 +0000 (00:51 +0100)]
bcma: mips: rename oldirqflag to irqinitmask

The new name better matches the use of this variable.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: mips: remove assigned_irqs from structure
Hauke Mehrtens [Thu, 3 Jan 2013 23:51:24 +0000 (00:51 +0100)]
bcma: mips: remove assigned_irqs from structure

This member is not needed any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: mips: show also disabled IRQs
Hauke Mehrtens [Thu, 3 Jan 2013 23:51:23 +0000 (00:51 +0100)]
bcma: mips: show also disabled IRQs

Some cores do not have a IRQ assigned and some do not support when an
IRQ is assigned to them, this is now handled and printed out in the
code.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: mips: make some info messages debug messages
Hauke Mehrtens [Thu, 3 Jan 2013 23:51:22 +0000 (00:51 +0100)]
bcma: mips: make some info messages debug messages

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: mips: explicit assign IRQ numbers
Hauke Mehrtens [Thu, 3 Jan 2013 23:51:21 +0000 (00:51 +0100)]
bcma: mips: explicit assign IRQ numbers

The assignment of the IRQs to the cores of the chips by iterating over
the cores is complicated and causes problems with SoC like the BCM4706
with two GMAC core where just one should get a dedicated IRQ number.
Now the code assigns the same IRQs to the cores as the code from the
Broadcom SDK does. If the SoC is not know the current assigned IRQs are
only read out and an error message is printed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: make bcma_find_core_unit() accessible
Hauke Mehrtens [Thu, 3 Jan 2013 23:51:20 +0000 (00:51 +0100)]
bcma: make bcma_find_core_unit() accessible

This bcma_find_core_unit() is needed by the mips driver in the next
patch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Fix calibration for AR9340
Sujith Manoharan [Thu, 3 Jan 2013 09:25:48 +0000 (14:55 +0530)]
ath9k_hw: Fix calibration for AR9340

TX_IQ_ON_AGC_CAL should not be enabled for AR9340. TX-IQ calibration
is run as part of AGC calibration only for AR9485, AR9462 and AR9565.
For the others (AR9300, AR9330, AR9340), TX-IQ cal is done independent
of AGC-cal.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: bump firmware API to 3
Yogesh Ashok Powar [Thu, 3 Jan 2013 07:54:44 +0000 (13:24 +0530)]
mwl8k: bump firmware API to 3

New firmware is required to support
a) Add support for additional ampdu streams
b) Handle corresponding watchdog events to destroy ampdu streams

Bumping firmware API version by one.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Handle watchdog event with highest prioriry
Yogesh Ashok Powar [Thu, 3 Jan 2013 07:54:19 +0000 (13:24 +0530)]
mwl8k: Handle watchdog event with highest prioriry

Currently, command path waits till all the tx host queues
are empty. Whenever watchdog event is raised, firmware
expects driver to destroy ampdu queues immediately.

This requires corresponding commands i.e.
mwl8k_cmd_get_watchdog_bitmap and mwl8k_destroy_ba to be
sent without waiting for the tx queues to be completely
empty.

Use "watchdog_event_pending" to ensure the above mentioned
two commands are sent down immediately.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Handle Watchdog events for the new ampdu streams
Yogesh Ashok Powar [Thu, 3 Jan 2013 07:54:03 +0000 (13:24 +0530)]
mwl8k: Handle Watchdog events for the new ampdu streams

With more ampdu streams, we need to handle watchdog
events for the new ampdu streams. Handle these
events appropriately.

Earlier mwl8k_cmd_get_watchdog_bitmap used to return
only one stream index and hence bitwise operations
on the return value were not required. Now the function
returns a bitmap with different bits are mapped with
different stream indices.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: changing mwl8k_destroy_ba prototype
Yogesh Ashok Powar [Thu, 3 Jan 2013 07:53:33 +0000 (13:23 +0530)]
mwl8k: changing mwl8k_destroy_ba prototype

Currently, mwl8k_ampdu_stream is passed as one of the
argument to the function mwl8k_destroy_ba. Instead of
this pass only the stream index. This will be helpful
during watchdog event handling when bitmap of stream
indices are received.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Enable support to support additional ampdu streams
Yogesh Ashok Powar [Thu, 3 Jan 2013 07:52:56 +0000 (13:22 +0530)]
mwl8k: Enable support to support additional ampdu streams

Currently, we have 2 ampdu streams that can be created
simultaneously. Firmware is capable of supporting
additional streams. Add support to use these streams.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: set ack policy to normal
Yogesh Ashok Powar [Thu, 3 Jan 2013 07:51:25 +0000 (13:21 +0530)]
mwl8k: set ack policy to normal

Set ACK policy to NORMAL when its not going to
be an AMPDU packet.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Remove redundant txq_idx
Yogesh Ashok Powar [Thu, 3 Jan 2013 07:50:47 +0000 (13:20 +0530)]
mwl8k: Remove redundant txq_idx

Ampdu stream index can be derived from stream->idx.
So we no longer need stream->txq_idx, hence removing it.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Remove TEMP_COMP_CAL
Sujith Manoharan [Thu, 3 Jan 2013 06:51:23 +0000 (12:21 +0530)]
ath9k_hw: Remove TEMP_COMP_CAL

This is not enabled for any chip and is unused.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Enable calibration types in init_cal_settings
Sujith Manoharan [Thu, 3 Jan 2013 06:51:21 +0000 (12:21 +0530)]
ath9k_hw: Enable calibration types in init_cal_settings

Doing this in ath9k_hw_fill_cap_info() is odd and it's
cleaner to do this in the init function for calibration.
Also, setup the supported calibration type in init_cal_settings.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: parse WMM IEs from hostapd for mwifiex AP
Avinash Patil [Thu, 3 Jan 2013 00:56:01 +0000 (16:56 -0800)]
mwifiex: parse WMM IEs from hostapd for mwifiex AP

This patch adds support for parsing WMM IEs from hostapd
and setting them to FW via sys configure command.

Patch also sets wiphy flag to advertise AP uAPSD support.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: use correct htcapinfo for HT20 ibss network
Amitkumar Karwar [Thu, 3 Jan 2013 00:56:00 +0000 (16:56 -0800)]
mwifiex: use correct htcapinfo for HT20 ibss network

It is observed that same htcapinfo ie is included in beacon for
HT20, HT40+ and HT40- ibss networks. This patch makes sure that
we will not advertise 40Mhz flags while creating/joining ibss
network in HT20 mode.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: mwifiex: remove unreachable paths
Sasha Levin [Thu, 3 Jan 2013 00:23:01 +0000 (16:23 -0800)]
wireless: mwifiex: remove unreachable paths

We know 'firmware' is non-NULL from the beginning of mwifiex_prog_fw_w_helper,
remove all !firmware paths from the rest of the function.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agop54pci: don't return zero on failure paths in p54p_probe()
Alexey Khoroshilov [Wed, 2 Jan 2013 20:06:47 +0000 (00:06 +0400)]
p54pci: don't return zero on failure paths in p54p_probe()

If pci_set_dma_mask() or pci_set_consistent_dma_mask() fails in p54p_probe(),
it breaks off initialization, deallocates all resources, but returns zero.
Similar issue is if check for returned value of pci_resource_len() fails.

The patch implements proper error code propagation.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: Update init code routines from interface up.
Hante Meuleman [Wed, 2 Jan 2013 14:22:51 +0000 (15:22 +0100)]
brcmfmac: Update init code routines from interface up.

On interface up dongle gets inialized. Move UP command to common
routine and update these common init routines using ifp.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: Removing obsolete variables and inline functions.
Hante Meuleman [Wed, 2 Jan 2013 14:22:50 +0000 (15:22 +0100)]
brcmfmac: Removing obsolete variables and inline functions.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: Return correct error on netdev xmit.
Hante Meuleman [Wed, 2 Jan 2013 14:22:49 +0000 (15:22 +0100)]
brcmfmac: Return correct error on netdev xmit.

Netdev xmit routine brcfm_netdev_start_xmit was defined
incorrectly and used wrong return codes. Always eat the
packet and return ok. Remove drvr_up check since it is not
relevant.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: Remove unused caching dongle error.
Hante Meuleman [Wed, 2 Jan 2013 14:22:48 +0000 (15:22 +0100)]
brcmfmac: Remove unused caching dongle error.

CDC errors are retained. However, it is never used so it can
be removed.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>